Compare commits

..

4240 Commits

Author SHA1 Message Date
5370ee06b2 handle multiple operator sockets more correctly 2020-02-28 09:49:50 +01:00
1618dadc16 make node rebuilding function more reusable 2020-02-28 09:34:44 +01:00
cc5da22bc6 Merge branch 'functions' into simulation-tree 2020-02-28 09:11:28 +01:00
4ed7334ef6 Merge branch 'master' into functions 2020-02-28 09:01:15 +01:00
9cac5fa681 Fix camera border gizmo size 2020-02-28 13:25:37 +11:00
e98f94d778 Cleanup: warnings using 'abs' on float values 2020-02-28 12:33:57 +11:00
d7d7859128 Cleanup: use fgets for parsing the xdg user dirs
Match bookmark reading behavior.
2020-02-28 11:52:44 +11:00
ba546976c3 Fix BLI_str_rstrip skipping the first character 2020-02-28 11:46:52 +11:00
28fca2c588 Docs: update the tool key-map docs, reference them from the toolbar 2020-02-28 09:18:07 +11:00
dd2cdd436f Fix T72903: Bone envelope & bone size tool functionality swapped 2020-02-28 09:18:07 +11:00
e339c7798e Cleanup: transform comments 2020-02-27 18:52:06 -03:00
30158b6ed0 Fix T74256, crash in bmesh.ops.bevel if segments not set.
Also changed signature of bevel function to take integer
for segments instead of float, which is just wrong.
2020-02-27 16:36:17 -05:00
91abb70006 Transform: Remove 'mouse_coordinate_override' property
This property depends on the view that can change when redoing.
2020-02-27 16:42:43 -03:00
c20caec7f0 Fix T70381: Motion Paths off by one
The apparent off-by-one error was caused by a few factors:

- The 'blend base' colour was green for the two frames directly
  surrounding the current frame, but black for the current frame itself.
- For the frames before the current one, the 'blend base' was mixed with
  black, making the green stand out clearly, but fading to black again
  for the current frame. This looks like an off-by-one, even though it
  was just bad mixing.
- For the frames after the current one, the 'blend base' was mixed with
  cyan, which already has a strong green component, so mixing it there
  was much less visible, making the entire thing look like an off-by-one
  error where it actually wasn't.

I have simplified the code, so now it only chooses green as the 'blend
base' for the current frame, and simplified the mixing for the current
frame.
2020-02-27 17:44:29 +01:00
f48ad37ef0 Fix T74262: Cycles OpenCL error on some devices after recent changes 2020-02-27 17:38:24 +01:00
33e9e1060f EEVEE: Shadow Render Pass
Revert the change that renders the background black.
2020-02-27 16:56:39 +01:00
e88a715364 Cleanup: more refactoring of GPU material attributes and textures
This further separates requested attributes and textures from the actual
node graph, that can be retained after the graph has been compiled and
freed. It makes it easier to add volume grids as a native concept, which
sits somewhere between an attribute and a texture.

It also adds explicit link types for UDIM tile mapping, rather than
relying on fairly hidden logic.
2020-02-27 16:14:21 +01:00
1ec11363bd Build: don't include WITH_SYSTEM_GLEW as part of make lite
System GLEW often is not new enough, which gives error on startup. The build
correctness should not be affected by using lite vs. full, so better to leave
this out than save compiling one extra file.
2020-02-27 16:11:07 +01:00
50f9c08979 Fix T74063: EEVEE Render Passes
Cycles recently fixed this issue, EEVEE needed to be adapted to output
similar results in the light passes.

This patch implements cycles `safe_divide_even_color` function to a GLSL
function that will be used when extracting the light passes.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6948
2020-02-27 16:02:20 +01:00
403bb357ae Fix T74110: EEVEE Shadow Pass
Shadow could penetrate occluded geometry. This patch adds a check to see
if the light is in the right location to light the pixel.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6918
2020-02-27 15:57:58 +01:00
Brecht Van Lommel
f2b95b9eae Objects: make evaluated data runtime storage usable for types other than mesh
This is in preparation of new object types. This only changes mesh_eval, we
may do the same for mesh_deform_eval and other areas in the future if there is
a need for it.

Differential Revision: https://developer.blender.org/D6695
2020-02-27 15:25:35 +01:00
57b7833d1e Cleanup: split off hair cache function for reusability
For when we support sources of hair other than particle systems.
2020-02-27 15:11:44 +01:00
74b0edce74 Cleanup: add missing use_nodes in default materials with nodetrees
This didn't break anything, but could in the future.
2020-02-27 15:02:29 +01:00
41dbb06b76 Fix T74228, T74246: Strange Characters
The glyph can come from a different cache.
2020-02-27 10:55:07 -03:00
0a3b4d4c64 Fix channel lists ignoring collection visibility
The dope sheet, NLA editor, and other similar animation editors were
ignoring the temporariy visibility flag of collections. As a result, an
editor that's supposed to show animation data of visible objects only was
still showing such data of objects that were hidden by hiding their
collection.

This was observed while fixing T71743.
2020-02-27 14:22:01 +01:00
aa4579c35f File Browser: Recognize .fountain files as text files
D6288 by @tintwotin
2020-02-27 13:07:11 +01:00
abc040f26c Build: change libc compatibility code to only be used for new glibc
This way we can still use fast math functions.
2020-02-27 12:52:19 +01:00
cb2f5d498e Fix T74119: Cycles Viewport Render Tint
Cycles uses the display_space_shader it gets from Blender. When
requested the shader used to be a GPU_SHADER_2D_IMAGE_COLOR, which
set the `color` uniform incorrectly. This resulted in a yellowish tint
when used.

To fix this the `GPU_SHADER_2D_IMAGE` shader will be used.

Reviewed By: brecht, fclem

Maniphest Tasks: T74119

Differential Revision: https://developer.blender.org/D6921
2020-02-27 12:50:08 +01:00
e21a475fae Fix T74229: EEVEE Bloom + Transparency
Bug was introduced by the render passes. We had to tweak the bloom
shader a bit so we could reuse it. After that tweaking the original
alpha was ignored.

This patch will read and store the correct alpha channel.
2020-02-27 12:47:28 +01:00
edb5e19442 Transform Snap: Unify SnapObjectData struct
This simplifies the code, and will allow to switch modes.
2020-02-27 08:43:10 -03:00
6d705693a3 Fix Linux CentOS buildbot handing on ffmpeg test
Don't use -ffast-math functions for libc compatibility implementation, since
then the function ends up calling itself. This may not be ideal for performance
but should be insignificant in practice.
2020-02-27 12:30:29 +01:00
2515a125c8 Fix T74254: EEVEE Render Passes Availability
When disabling AO or BLOOM in the render tab, when the pass is shown in
a 3d viewport the pass wasn't reset. This resulted in showing a black
texture and a not filled UI render pass in the shading popover.

This patch will by default reset to the combined pass. It is intended
that the render_pass in the 3d shading struct isn't set to combined as
people could have disabled AO/bloom by mistake and it could reset
viewports that aren't visible.
2020-02-27 12:22:16 +01:00
f24a4750bd Fix T74254: EEVEE Render Passes Availability
When disabling AO or BLOOM in the render tab, when the pass is shown in
a 3d viewport the pass wasn't reset. This resulted in showing a black
texture and a not filled UI render pass in the shading popover.

This patch will by default reset to the combined pass. It is intended
that the render_pass in the 3d shading struct isn't set to combined as
people could have disabled AO/bloom by mistake and it could reset
viewports that aren't visible.
2020-02-27 12:15:33 +01:00
57bd1a0ae1 Fix T74227: Crash when clicking on viewport shading properties 2020-02-27 12:13:00 +01:00
e420caab19 Fix T71743: NLA editor doesn't update properly when hiding/viewing objects
The NLA area & region listeners were ignoring the notifications that happen
when hiding/showing objects & collections.
2020-02-27 12:08:24 +01:00
d5bcc375ba Fix T69576, T74059: issues with rotation when adding objects
This clarifies logic in ED_object_add_generic_get_opts (see comments in
code).

Also following issues are adressed:
- do not enforce setting the op UI to WORLD when rotation is set (e.g.
on redo). This is not wrong (happens in world space), but is more
confusing than helpful (was added in own rB3b8a14a3c072).
- respect setting the User Preference to WORLD properly (could fail when
set to something else, then back to WORLD)

Maniphest Tasks: T69576

Differential Revision: https://developer.blender.org/D6943
2020-02-27 11:44:21 +01:00
01162f756a Fix unreported crash/assert in Cycles with volume render pass in viewport
Bug introduced on e0085bfd24.
2020-02-27 11:36:49 +01:00
830a45a18a Improve usage of recent golden ratio define
- fix typo
- set back to conjugate value and use as such

Followup to rB95175c3b5e2b.
2020-02-27 10:54:38 +01:00
10162d68e3 Constraints: replace 'Set Inverse' operator with an eval-time update
This fixes {T70269}.

Before this commit there was complicated code to try and compute the
correct parent inverse matrix for the 'Child Of' and 'Object Solver'
constraints outside the constraint evaluation. This was done mostly
correctly, but did have some issues. The Set Inverse operator now defers
this computation to be performed during constraint evaluation by just
setting a flag. If the constraint is disabled, and thus tagging it for
update in the depsgraph is not enough to trigger immediate evaluation,
evaluation is forced by temporarily enabling it.

This fix changes the way how the inverse matrix works when some of the
channels of the constraint are disabled. Before this commit, the channel
flags were used to filter both the parent and the inverse matrix. This
meant that it was impossible to make an inverse matrix that would
actually fully neutralize the effect of the constraint. Now only the
parent matrix is filtered, while inverse is applied fully. As a result,
pressing the 'Set Inverse' matrix produces the same transformation as
disabling the constraint. This is also reflected in the changed values
in the 'Child Of' unit test.

This change is not backward compatible, but it should be OK because the
old way was effectively unusable, so it is unlikely anybody relied on
it.

The change in matrix for the Object Solver constraint is due to a
different method of computing it, which caused a slightly different
floating point error that was slightly bigger than allowed by the test,
so I updated the matrix values there as well.

This patch was original written by @angavrilov and subsequently updated
by me.

Differential Revision: https://developer.blender.org/D6091
2020-02-27 10:37:59 +01:00
4952fb1669 Fix T54323: Improve Paint category names in keymap preferences
While one issue of the report was fixed already (rB27adc4aa3347), still a
couple of clarifications could be made:
- correct/clarify which modes these apply to
- clarify that "Face Mask" is a paint thing

Maniphest Tasks: T54323

Differential Revision: https://developer.blender.org/D6797
2020-02-27 10:11:23 +01:00
f38c54d56e Fix Vertex weight gradient tool show wrong weight/strength values in the
UI

Main issue is that the UI doesn not respect the Unified Weight/Strength
setting (but instead alwasy shows the brushes weight/strength)

Was working before, but somewhat missed in rBfb74dcc5d69d.

See discussion in T74025 on why the Gradient Tool in its current state
is not very user friendly in general, what I think we should do though
is at least have the values in the UI respect Unified Weight / Unified
Strength since this is what the tool will use internally...

ref T74025

Maniphest Tasks: T74025

Differential Revision: https://developer.blender.org/D6900
2020-02-27 09:56:02 +01:00
80684ca41c Fix T74248: Crash using a movie clip for the camera background
Missing NULL check in recent half-float support.
2020-02-27 16:08:44 +11:00
1a1f2912e6 UI: Clarify Laplacian Deform
- Match UI Style
- Clarify that the vertex group is different then other modifiers
2020-02-26 17:33:17 -05:00
1d302df4f8 UI: Fix Typo in GP Erase RNA 2020-02-26 16:37:44 -05:00
2d423479bd Fix T73371: Crash caused by wrong logic in NULL pointer check. 2020-02-26 19:31:37 +01:00
9085b7e847 Fix OpenVDB link error on Windows after recent changes 2020-02-26 19:24:20 +01:00
da38cb622e Cleanup: split image sequence detection into own file, and make it reusable 2020-02-26 19:22:42 +01:00
4c4e798f35 Color Management: Updated False Color Look
Change to false color are based on artist feedback:

  * Even 2.5 EV differences down to -10 EV.
  * Even 2.167 EV differences up to +6.5 EV.
  * Slightly below middle grey biased toward cyan.
  * Slightly above middle grey biased toward yellow.
  * Converts to nonlinear luma for more accuracy.
2020-02-26 12:18:52 -05:00
9f4b090eec Color Management: Allow looks on any transform
Previously it was not possible to use looks on filmic log.
2020-02-26 12:18:52 -05:00
d675cf20a1 Cleanup: add ImageKey to avoid longer argument lists and duplicated code 2020-02-26 18:13:14 +01:00
78391def6e Cleanup: deduplicate OpenVDB library definitions/include/libs logic
This will more important when we start using OpenVDB in more modules.
2020-02-26 18:13:14 +01:00
22abc7f080 Build: add compatibility between precompiled libraries and new glibc
On Linux, precompiled libraries may be made with a glibc version that is
incompatible with the system libraries that Blender is built on. To solve
this we add a few -ffast-math symbols that can be missing.

Differential Revision: https://developer.blender.org/D6930
2020-02-26 18:13:14 +01:00
30b3bf2b57 Build: ignore system paths when using precompiled libraries on Linux
Based on work by Nathan Craddock, with further changes to apply it to all
precompiled libraries.

Differential Revision: https://developer.blender.org/D6929
2020-02-26 18:12:18 +01:00
9dbfc7ca8b Fix T74225: Image (from sequence) cannot be loaded
If the current frame was not in range, the ImageTile's 'ok' was stuck at
0. Similar to the ImageUser being reset to 'ok' in
BKE_image_user_frame_calc, we now do for ImageTiles as well.

note: the crasher part of T74225 was fixed in rB5c490d437743.

Maniphest Tasks: T74225

Differential Revision: https://developer.blender.org/D6939
2020-02-26 17:30:22 +01:00
95175c3b5e Fix T74236: Golden ratio in camera composition guides is not working
Caused by 52da1b6e2b (where it was switched from a value to a define -
but the define was wrong...)
2020-02-26 17:24:22 +01:00
41cc3ffaf3 UI: Add Separate to bone and curve edit context menus
Makes it more consistent with mesh edit mode.
2020-02-26 16:25:25 +01:00
5c490d4377 Fix T74221 Crash when changing Image Source in UV editor 2020-02-26 15:33:44 +01:00
fe41c1ec0b EEVEE: Fix crash on certain drivers caused by redefined constant 2020-02-26 14:59:47 +01:00
28a16c4374 Cleanup: don't set renderpass_block twice for volumes 2020-02-26 12:28:22 +01:00
d95dbd1f4f UI: add kerning menu for 3D text editing 2020-02-26 22:27:45 +11:00
92c9dbf343 Cleanup: avoid path copy in XDG support 2020-02-26 22:07:53 +11:00
db7bb5bdd2 Cleanup: fix compiler warning 2020-02-26 11:51:34 +01:00
661b01825f Fix for recent commit removing slashes
The slashed were used for comparing bookmarks to the current directory.

Add trailing slashes in 'fsmenu_insert_entry',
which avoids having to duplicate strings just to add a slash
before passing to this function.
2020-02-26 21:34:45 +11:00
4cf3977a74 Cleanup: printf from xdg parsing 2020-02-26 18:42:51 +11:00
466d37e0b1 UI: remove check for HOME existing on unix
This is such a corner case there is no need to make the UI aware of it.
2020-02-26 18:19:29 +11:00
de8062053d Cleanup: remove trailing slash from bookmarks
This isn't needed.
2020-02-26 18:18:57 +11:00
48816d462e UI: Linux platform support for 'user-dirs.dirs'
Originally D6826 by @a.monti with parsing rewritten.
2020-02-26 18:14:34 +11:00
5f83495e4c BLI_fileops: add utility to read text with newlines set to nil 2020-02-26 18:01:42 +11:00
66af6e4f32 Docs: expand comment on tagging id properties to update
Addresses issue from T74000.
2020-02-26 15:22:46 +11:00
5a6a6ef0c6 Cleanup: spelling 2020-02-26 15:22:46 +11:00
220310ffc5 Cleanup: remove unused derived mesh functionality 2020-02-26 15:22:46 +11:00
c8d31807d2 Cleanup: reduce CDDM use, remove unused function calls 2020-02-26 15:22:46 +11:00
00a3d99f93 Cleanup: format, unused var 2020-02-26 15:22:46 +11:00
dc257318d0 PyAPI Doc: Add missing Imbuf documentantion
The documentation existed but it was never added to the script.
2020-02-25 23:17:01 -05:00
c05d83bc76 Fix T74063: Cycles light pass viewport display wrong with saturated colors 2020-02-25 19:52:18 +01:00
f4411b58ad Fix T72721: Add visibility flags updates to the PBVH
Currently, there its a function that sets manually the fully_hidden flag
of the nodes from the visibility operators in paint_hide.c. The undo
code was not updating the flag, so the visibility state of the nodes was
incorrect after preforming undo operations. This sometimes was drawing
fully hidden nodes with empty buffers, causing artifacts in the
geometry.

I added a function to mark nodes which visibility state changed (similar
as we are updating the mask flags and the nodes bounding boxes). This
way, the tools, operators and undo code don't have to update the
visibility flags, making everything much simpler to understand and
maintain.

I did not remove the flag update code from the current visibility
operators in this patch, but after reimplementing them (and all the new
ones) in the new visibility system, all visibility updates should be
done using this method and the BKE_pbvh_node_fully_hidden_set function
should be removed.

Reviewed By: jbakker

Maniphest Tasks: T72721

Differential Revision: https://developer.blender.org/D6767
2020-02-25 19:07:44 +01:00
271a5772eb write node storage to file and read back
Have to find a better way to do this. An issue is that `node->typeinfo`
when the node is just read.
2020-02-25 18:35:28 +01:00
9cc5af64c6 Cleanup: Constraints, simplified ChildOf evaluation function
This un-indents the `childof_evaluate()` function by one level, making it
easier to add new functionality in an upcoming commit.

No functional changes.
2020-02-25 18:16:25 +01:00
07fa59f11d initial operator socket callback 2020-02-25 18:01:03 +01:00
b206f0ae0f run node declaration function only once per update 2020-02-25 17:30:37 +01:00
b4b47e6ba2 Cleanup: Reduced indentation in objectsolver_evaluate()
This will make an upcoming change cleaner to implement.

No functional changes.
2020-02-25 17:22:23 +01:00
4f48179437 Constraints: fixed Object Solver 'Clear Inverse' operator
The 'Clear Inverse' operator didn't properly update the constraint, so
it didn't do anything until the entire depsgraph was updated. It's now
properly tagged for update.
2020-02-25 17:22:23 +01:00
65aa55babc Tests: Constraints, enable layer collections before testing
In the collections unit test file developers can now disable layer
collections and declutter the 3D Viewport while working in
`constraints.blend`, without influencing the actual unit tests themselves.
2020-02-25 17:22:23 +01:00
280d2a9a17 Cleanup: Silence compilation warnings (unused variables) 2020-02-25 17:21:01 +01:00
a93043153a Cleanup: Remove superfluous "cuda_device_ptr" function 2020-02-25 17:13:59 +01:00
e75059e3b6 Cleanup: removed runtime error
The render passes checked all bits of an integer, that can lead to
runtime errors. Added the max bit in the DNA and used this.
2020-02-25 16:16:31 +01:00
2f2e2d1748 simplify SocketDecl 2020-02-25 16:15:28 +01:00
6dd3e7d84d install_deps: fix several issues.
Lots of fixes and cleanups, mainly addressing:
* OpenEXR building was fully broken.
* Missing dependencies of Alembic to Boost and openEXR.
* OSL had changed its CMake parameters for custom OpenEXR install path.
* Dependencies between libs were not properly handles when switching a
lib from own build to system package.
2020-02-25 15:59:26 +01:00
5943e7d02e EEVEE: First Buffer Drawn Incorrectly
SSS buffers are lazy initialized when needed. When shaders recompile the
SSS buffers could be incorrectly drawn. During the render passes project
we tried to fix this, but that resulted in incorrect result of the first
sample after a shader was compiled.

We revert this change knowing that we know the issue, but haven't found
a proper solution for it.
2020-02-25 15:39:25 +01:00
0c09700f20 Cycles: Add option to change which sample to start viewport denoising at
This patch adds a new user-configurable option to change at which sample viewport
denoising should kick in. Setting it to zero retains previous behavior (start immediately), while
other values will defer denoising until the particular sample has been reached. Default is now
at one, to avoid the weirdness that is AI denoising at small resolutions.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6906
2020-02-25 15:27:11 +01:00
Michael Soluyanov
a4a1074f3d UI: Add theme option for time markers line
This patch adds the ability to set colors and alpha of dashed line of
Time Markers. That way themes can avoid contrast issues and communicate
selection better. See screenshots in D6877.

Bumps subversion.

Reviewed By: William Reynish, Julian Eisel

Differential Revision: https://developer.blender.org/D6877
2020-02-25 15:19:19 +01:00
4e9fffc289 GPU: Add Image property to allow high bitdepth support on a per image basis
This adds the `Half Float Precision` option in the image property panel.
This option is only available on float textures and is enabled by default.

Adding a flag inside the imbuf (IB_halffloat) on load is done for EXR and PSD formats that can store half floating point (16bits/channels).
The option is then not displayed in this case and forced.

Related task T73086

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6891
2020-02-25 15:14:32 +01:00
1bbc1eed62 Cleanup: clang-format 2020-02-25 15:13:25 +01:00
Yevgeny Makarov
fe3264fafd UI: fix wrong button padding on high DPI displays in a few places
Differential Revision: https://developer.blender.org/D6928
2020-02-25 15:13:25 +01:00
Phil Stopford
b0786d069c Ocean modifier: fix changes to resolution complete changing the shape
This takes the idea from the aaOcean library to link the RNG seed to the
surface point, so that changing resolution only adds/remove surface detail.

Differential Revision: https://developer.blender.org/D6871
2020-02-25 15:13:25 +01:00
9cdf01085f Constraints: added unit test for Child Of with bone target
No functional changes.
2020-02-25 14:48:32 +01:00
b72d4e1d98 new operator socket 2020-02-25 14:46:24 +01:00
bf9c6aad9e first node with a variable number of sockets 2020-02-25 14:34:29 +01:00
2ffd530217 EEVEE: Lookdev: Fix lookdev spheres positioning in viewport render 2020-02-25 14:24:31 +01:00
19de81afe5 EEVEE: Lookdev: Fix cubemap resolution change not refreshing lightcache 2020-02-25 14:08:10 +01:00
190fd795a9 Overlay: Fix overlays being washed out by render colors
Clamping here might be a bit too much if output is expected to be HDR.
But we don't support HDR atm so clamping is fine.
2020-02-25 13:58:28 +01:00
7bc893c827 Start of unit test framework for constraints
Currently this only tests the Child Of constraint. My aim is to cover
constraints with tests before they are refactored/altered.

No functional changes.
2020-02-25 13:30:42 +01:00
4f92367bde Cleanup: fixed copy-paste error in Object Solver constraint message
The message was clearly copied from the Child Of constraint, and never
changed to Object Solver.

No functional changes.
2020-02-25 13:30:42 +01:00
Clément Foucault
6e23433c1a EEVEE: Lookdev: Add support for partially blurred background
This is using the GGX probe as background. This has the drawback of
having the resolution choosed in the indirect lighting setting.
The blurring is not really high-quality.

The pros is that it has a simple implementation and is fast to evaluate.

This patch also fades the background alpha to make overlay engine draw the
default background color in the correct color space. Removing one colorspace
hack.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6895
2020-02-25 13:26:01 +01:00
7e7c927602 Cleanup: EEVEE: Use log2_floor_u 2020-02-25 13:18:22 +01:00
8885fb5929 EEVEE: Fix seams in reflection cubemap on low roughness
This was caused by the texture size not being power of 2. Thus the
padding applied to the base LOD did not match the highest mipmaps.
2020-02-25 13:18:22 +01:00
deb14fcfda keep socket values after node rebuild 2020-02-25 13:08:04 +01:00
cdcea4375c implicitely convert rgba_f to const float * 2020-02-25 13:07:08 +01:00
5b9c48b296 remove invalid links and maintain links after rebuild 2020-02-25 12:41:07 +01:00
54948972a2 access node identifier 2020-02-25 12:40:33 +01:00
7463da6c72 Fix T74095: crash deleting all faces in edit mode with Cycles rendering 2020-02-25 11:53:25 +01:00
e0085bfd24 Cycles: move sss and diffuse transmission into diffuse pass
This simplifies compositors setups and will be consistent with Eevee render
passes from D6331. There's a continuum between these passes and it's not clear
there is much advantage to having them available separately.

Differential Revision: https://developer.blender.org/D6848
2020-02-25 11:44:47 +01:00
e6be2af061 Cleanup: remove cddm_from_bmesh
Use BKE_mesh_from_bmesh_for_eval_nomain instead.
2020-02-25 21:30:23 +11:00
fb960416f7 automatically remove links between incompatible links 2020-02-25 11:23:12 +01:00
45b9ceac71 store incident links in virtual node tree 2020-02-25 11:22:51 +01:00
bd03fe1ab0 Cleanup: avoid Operator.customdata cast which could lead to errors
Both save and save-as share utility functions which
cast from customdata in an error prone way.

Avoid this by passing image format data directly.
2020-02-25 20:32:20 +11:00
6a61b7fd17 Merge branch 'functions' into simulation-tree 2020-02-25 09:58:51 +01:00
a90e202e8a Merge branch 'master' into functions 2020-02-25 09:58:40 +01:00
d94a3996a4 Fix memory leak saving images 2020-02-25 18:29:31 +11:00
ae3263e525 DrawEngine: Clean up
Put DefaultFramebufferList and DefaultTextureList into an own header
file. These structs were private, but also used by the window manager
and gpu package. The previous implementation we needed to keep these
structs in sync.
2020-02-25 07:47:35 +01:00
9e45468835 Image: support saving images in non-image spaces
Alternate fix for T74182, making changes to the save-as operator.
2020-02-25 17:19:32 +11:00
096936fe1d Fix T74182: Crash saving images from non-image spaces 2020-02-25 17:02:41 +11:00
727d430811 Cleanup: move deprecated enum into versioning code 2020-02-25 16:50:06 +11:00
a322b43e3d Cleanup: remove unused wmWindow.monitor 2020-02-25 09:25:14 +11:00
44862110de WM: move cursor refresh tag to the window
Avoids having to check the current area is NULL.
2020-02-25 09:19:31 +11:00
f61f26b033 Fix Cycles Embree hair + motion blur failing after recent Catmull-Rom change
Ref T73778
2020-02-24 20:29:36 +01:00
d109ea5ee5 Fix make deps failing to build opencollada on Linux, due to line endings
The OpenCOLLADA package contains a mix of files with unix and dos line endings.
Now we mark the diff as a binary file so that the patch also contains a mix of
line endings that matches the package.
2020-02-24 19:23:25 +01:00
f9b1e8f000 Fix T74169: Vector Rotate Node - Euler modes not working as intended
Remove additional Euler modes for the time being, not working as intended, will add back if there is a need.
2020-02-24 18:17:19 +00:00
f7b6b7dda3 Fix unnecessary Cycles OptiX kernel loading
With the OptiX viewport denoiser active, an OptiX device was added to the device list even when
rendering and denoising on different devices (e.g. CPU or CUDA) in background rendering. This
fixes it, so the OptiX device is only added when actually needed, as in only when OptiX denoising is
actually active in background rendering.
2020-02-24 17:53:41 +01:00
14856e149f Fix T74099: Can`t apply modifier, if mesh have fake user.
Also cleaned up code there, making a proper poll function for the apply
modifier operator, that way button is properly disabled in UI itself in
most invalid situations.
2020-02-24 15:02:52 +01:00
Julian Eisel
f01617bb15 Fix unused variable warning on Linux 2020-02-24 14:46:45 +01:00
8955b8b992 Cleanup: Workbench: Remove checkerboard depth
This is not needed anymore with the new overlay xray fading.
2020-02-24 13:48:38 +01:00
ed21506f26 Overlay: Remove Xray dithering noise
We now use a better smoother technique that uses correct alpha blending.
This is possible now that we render overlays in a separate buffer.
2020-02-24 13:48:38 +01:00
Julian Eisel
fc81eb74e7 Mantaflow: Address precompiler warning and related cleanup
* Address warning because of undefined OPENVDB usage
* Remove unused WITH_FLUID definitions

Differential Revision: https://developer.blender.org/D6919
2020-02-24 13:01:13 +01:00
69c587888b Fix T74003: Autocomplete bug with mesh.loop_triangles. in Blender Python Console.
The collection property `loop_triangles` was given the RNA type
`MeshLoopTriangle` (the type of the collection's items), instead
of `MeshLoopTriangles` (the actual expected RNA collection/array type).

The cutest, tiniest typo mistake in RNA code, leading to some complete
non-sense... It's fairly amazing that this did not cause more severe
issues actually.
2020-02-24 12:46:40 +01:00
001f7c92d1 BLF: Optimize text rendering and caching
The current code allocates and transfers a lot of memory to the GPU,
but only a small portion of this memory is actually used.
In addition, the code calls many costly gl operations during the
caching process.

This commit significantly reduce the amount of memory by allocating
and transferring a flat array without pads to the GPU.
It also calls as little as possible the gl operations during the cache.

This code also simulate a billinear filter `GL_LINEAR` using a 1D texture.

**Average drawing time:**
|before:|0.00003184 sec
|now:|0.00001943 sec
|fac:|1.6385156675048407

**5 worst times:**
|before:|[0.001075, 0.001433, 0.002143, 0.002915, 0.003242]
|now:|[0.00094, 0.000993, 0.001502, 0.002284, 0.002328]

Differential Revision: https://developer.blender.org/D6886
2020-02-24 08:01:22 -03:00
a31bd3f7b5 Fix T73912: Highlight selected face option causes faces to fade out
Recent changes to color mixing require updates to the theme,
light overlays need to have their alpha reduced.
2020-02-24 16:01:55 +11:00
abb7364912 Overlay: Edit Mode: Fix wireframes being brighter because of linear blend 2020-02-24 00:00:35 +01:00
b92b1a4fe5 Use new LinearAllocatedVector in various places 2020-02-23 17:37:15 +01:00
096856a700 new LinearAllocatedVector<T>
This is a vector that does not own the memory its elements are stored in.
Instead, a linear allocator is passed to every call to `append`, that will
be used if the vector has to grow. Since a linear allocator does not support
deallocation, no memory is dealloced until the linear allocator is destructed.

This structure can be used when many small vectors of initially unknown
size are required.
2020-02-23 17:35:47 +01:00
24ea6b713d UI: Remove Width/Percentage control from Bevel tool settings
Since this control is set as you drag in the viewport anyway, this amount value is effectively useless.

It was only recently added by mistake with the Bevel GSOC.
2020-02-23 16:52:43 +01:00
b564233c20 add missing include 2020-02-23 15:59:30 +01:00
837dcf6bd6 improve naming 2020-02-23 15:46:27 +01:00
95bee2ced1 Merge branch 'functions' into simulation-tree 2020-02-23 15:25:13 +01:00
beed795e5a Merge branch 'master' into functions 2020-02-23 15:25:05 +01:00
39d0bf9044 Overlay: Fix wireframes being brighter because of color management
Also change the blending factors to make wireframe a bit darker in
unselected cases.
2020-02-23 14:32:34 +01:00
c26f470cfe EEVEE: Fix memleak when G.is_break is set from another thread 2020-02-22 17:08:44 +01:00
189a6c783d Cleanup: EEVEE: Use interpf instead of custom lerp 2020-02-22 17:08:44 +01:00
fb47c131df Fix crash when open default template
As soon you select the default template, Blender crash on Winodws.

This was introduced in commit {0b626703}
2020-02-22 16:20:08 +01:00
0b626703f9 Cleanup: internal changes to cursor resetting
- Move gizmo cursor check into ED_region_cursor_set so the result of
  calling this function is the same as flagging for cursor update.

- Use tagging in ui_popup_block_remove which avoids adding a
  mouse-move event in case the cursor needs to be changed again.
2020-02-22 10:50:25 +11:00
3e77765362 Audaspace: Various fixes
- Fixed uninitialized result used in DynamicMusic::seek().

  The comment to this function says false is returned if the handle
  is invalid, while in practice non-initialized value will be returned.

- Spelling typos in comment.

- Silence -Wdelete-non-abstract-non-virtual-dtor warning.

Differential Revision: https://developer.blender.org/D6896
2020-02-21 18:31:56 +01:00
1fb62d1272 UI: Windows File Attributes and Hidden Items
File Browser using Windows file attributes for decorating and hiding items.

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

Reviewed by Campbell Barton
2020-02-21 08:20:58 -08:00
b1b020806e Cleanup: remove unused ScreenAnimData.refresh 2020-02-22 03:00:47 +11:00
4c30dc3431 Fix T73593: Drivers on hide_viewport and hide_render are unreliable
This fixes a threading issue (T73593) between drivers that write to the
same memory address. Driver nodes in the depsgraph now get relations to
each other in order to ensure serialisation.

These relations are only added between drivers that target the same
struct in RNA, which is determined by removing everything after the last
period. For example, a driver with data path
`pose.bones["Arm_L"].rotation_euler[2]` will be grouped with all other
drivers on that datablock with a data path that starts with
`pose.bones["Arm_L"]` to form a 'driver group'.

To find a suitable relation within such a driver group, say the relation
(from → to), a depth-first search is performed (turned out to be
marginally faster than a breadth-first in my test case) to see whether
this will create a cycle, and to see whether there already is such a
connection (direct or transitive). This is done by recursively
inspecting the incoming connections of the 'to' node and thereby walking
from it towards the 'from' node. This is an order of magnitde faster
than inspecting the outgoing connections of the 'from' node.

This approach generalises the special case for array properties, so the
code to support that special case has been removed from
`DepsgraphRelationBuilder::build_animdata_drivers()`.

A test on the Spring rig [1] shows that this process adds approximately
8% to the build time of the dependency graph. In my test case, it takes
28 ms for this process on a total 329 ms construction time. However,
since it also made some code obsolete, it only adds 24 ms (=8%) to the
construction time. I have experimented with a simple cache to keep track
of known-connected (from, to) node pairs, but this did not significantly
improve the timing.

Note that animation data and drivers are already connected by a
relation, which means that animating a field and also changing it with a
driver will not cause conflicts.

[1] https://cloud.blender.org/p/spring/5d30a1076249366fa1939cf1

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

Reviewed By: sergey, mont29
2020-02-21 16:57:13 +01:00
b8c7ff564c Cleanup: un-indent ED_screen_set_active_region
Also remove redundant flag assignment from previous comment.
2020-02-22 02:43:37 +11:00
d0578a94ee Fix regression in the orientation of transform Redo operations
Caused by rBb3abd2e102df
2020-02-21 12:20:03 -03:00
824b2c689e Cleanup: avoid looping over areas when refreshing the cursor
These values are already known, pass in as arguments.
2020-02-22 02:13:10 +11:00
4653d253b3 Fix T67805: Cursor doesn't update when switching tools via shortcuts 2020-02-22 01:59:36 +11:00
803636f888 Fluid: Fix typo in fluid RNA
Fix typo in fluid RNA.
2020-02-21 15:32:24 +01:00
f2b0aef4dc Fluid: Cleanup in cache delete function
Removed unneccessary calls to BLI_exists() as BLI_delete() does this implicitly.
2020-02-21 15:30:52 +01:00
b8af5e1062 Fluid: Updated manta pp files
Updates include:
- A fix from Jacques that changed the loop order in the mesh creation function (the fix speeds up the function significantly due to fewer cache misses).
- Some of the grid copy helper functions are now multithreaded.
- A fix for Windows file IO. Now it possible to load files with non ASCII characters on Windows too.
2020-02-21 15:29:32 +01:00
ec5fc1adcc Cleanup: Move transform_mode_init to transform_mode API 2020-02-21 10:43:40 -03:00
f2224ccfce Fix T74006: Alt+ clicking (assign to all selected) doesn not work for
bone constraints settings

'UI_context_copy_to_selected_list()' was working fine for constraints on
objects (would properly get the path and list of selected objects) and
also for bone settings (would properly get the path and list of bones).

There was no special case for constraints on bones though, so code would
work on selected objects (not selected bones).

So we now get the right bones and resolve the path to the constraint
setting _from the bones_.

Maniphest Tasks: T74006

Differential Revision: https://developer.blender.org/D6897
2020-02-21 14:35:32 +01:00
0c506a6ef0 Fix T74044: Switching from Edge Slide to Move and Cancelling causes crash
`TFM_TRANSLATION` was removed in rBa33b261473e9 but is still needed.
2020-02-21 10:04:45 -03:00
7bea1416b6 Transform: Fix reinitialization of custom data correction 2020-02-21 10:03:30 -03:00
94e180bd80 Fix: Drivers on hide_viewport and hide_render throw warnings
This partially fixes T73593.

The `add_relation(driver_key, property_entry_key, ...);` call can fail
in the following situation:

- A collection is linked, and instanced into the scene by an Empty.
- The collection contains an object with a driver on its `hide_render` or
  `hide_viewport` property.

As the object doesn't exist as a real object in the scene, it's added with
`base_index=-1` to the depsgraph (see `DepsgraphNodeBuilder::build_collection()`).
As a result the node for syncing the restrictflags back to the base
isn't present in the depsgraph, and the `add_relation()` call failed.

This commit fixes the warning, simply by not attempting to add the
offending relation.
2020-02-21 11:16:59 +01:00
Jeroen Bakker
be2bc97eba EEVEE: Render Passes
This patch adds new render passes to EEVEE. These passes include:

* Emission
* Diffuse Light
* Diffuse Color
* Glossy Light
* Glossy Color
* Environment
* Volume Scattering
* Volume Transmission
* Bloom
* Shadow

With these passes it will be possible to use EEVEE effectively for
compositing. During development we kept a close eye on how to get similar
results compared to cycles render passes there are some differences that
are related to how EEVEE works. For EEVEE we combined the passes to
`Diffuse` and `Specular`. There are no transmittance or sss passes anymore.
Cycles will be changed accordingly.

Cycles volume transmittance is added to multiple surface col passes. For
EEVEE we left the volume transmittance as a separate pass.

Known Limitations

* All materials that use alpha blending will not be rendered in the render
  passes. Other transparency modes are supported.
* More GPU memory is required to store the render passes. When rendering
  a HD image with all render passes enabled at max extra 570MB GPU memory is
  required.

Implementation Details

An overview of render passes have been described in
https://wiki.blender.org/wiki/Source/Render/EEVEE/RenderPasses

Future Developments

* In this implementation the materials are re-rendered for Diffuse/Glossy
  and Emission passes. We could use multi target rendering to improve the
  render speed.
* Other passes can be added later
* Don't render material based passes when only requesting AO or Shadow.
* Add more passes to the system. These could include Cryptomatte, AOV's, Vector,
  ObjectID, MaterialID, UV.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D6331
2020-02-21 11:13:43 +01:00
1f8f4c8cfe Codesign: Make file watcher robust for network errors 2020-02-21 11:00:11 +01:00
973982a8e5 Cleanup: Spelling in a comment 2020-02-21 10:49:58 +01:00
20b47d77e1 Codesign: Remove archive with files after they were copied 2020-02-21 09:31:55 +01:00
b56957f0af Fix transform 'center_override' not being flagged
Problem introduced by rBa33b261473e9
2020-02-20 22:21:21 -03:00
ee7f307c9a Fix T73841: Pressing 3 doesn't go to Pose mode
Just changing the order in the keymap seems to fix this
2020-02-20 22:50:19 +01:00
a9b184bbc4 windows: Add some more verbose logging to make.bat 2020-02-20 10:34:15 -07:00
282e8499b1 Fix T73871: improve assignement of material to selection in multi object
editmode

This was already supported in "Select" & "Deselect" but not in "Assign".
So similar to rB6b39dc7672eb, we now check if the material corresponding
to the currently selected material slot is found in other objects
materials and assign this (instead of always assigning their 'own'
actcol).

Maniphest Tasks: T73871

Differential Revision: https://developer.blender.org/D6869
2020-02-20 14:02:18 +01:00
d95e9c7cf8 Fix T63892: Tools cannot be registered into some contexts (e.g.
PAINT_TEXTURE)

This fails because some tool contexts define their tools with functions
[see the following list for context that fail]:

- PARTICLE (_defs_particle.generate_from_brushes)
- SCULPT (_defs_sculpt.generate_from_brushes)
- PAINT_TEXTURE (_defs_texture_paint.generate_from_brushes)
- PAINT_VERTEX (_defs_vertex_paint.generate_from_brushes)
- PAINT_WEIGHT (_defs_weight_paint.generate_from_brushes)
- PAINT_GPENCIL (_defs_gpencil_paint.generate_from_brushes)
- SCULPT_GPENCIL (_defs_gpencil_sculpt.generate_from_brushes)
- WEIGHT_GPENCIL (_defs_gpencil_weight.generate_from_brushes)

ToolSelectPanelHelper._tools_flatten() is usually called with
cls.tools_from_context(context) [that already yields from the function].
But when registering a tool, _tools_flatten() will still give back this
function, not a ToolDef - and we cannot get a bl_idname from that.
Now check for this and yield None in that case.

Also share logic across all tool_flatten functions:
- _tools_flatten
- _tools_flatten_with_tool_index
- _tools_flatten_with_keymap

Maniphest Tasks: T63892

Differential Revision: https://developer.blender.org/D6763
2020-02-20 13:28:53 +01:00
0a4da1baa2 show float property in socket 2020-02-20 13:13:00 +01:00
Stefan Werner
b4ae962447 Cycles: Switched Embree to use Catmull-Rom curves.
The latest versions of Embree support Catmull-Rom splines
which use less memory than the previously used Hermite splines.
The representation is also much closer to Cycles own data structures
and can hopefully be unified in the future for more memory savings.

Memory savings using Victor benchmark scene:
Compared to previous Embree: ~400MB
Compared to Cycles' native BVH: ~1GB
2020-02-20 13:05:27 +01:00
dc9858eb52 make per socket storage work 2020-02-20 13:00:39 +01:00
8dc6353e60 add draw function to socket 2020-02-20 12:39:30 +01:00
4d6128b53c remove prints 2020-02-20 12:34:23 +01:00
8dc1d5832c make new socket type callbacks work 2020-02-20 12:30:29 +01:00
a1947b3f41 initial socket init/copy/free interface 2020-02-20 12:12:26 +01:00
0d8a8ce03b Fix some issues with versionning of older files.
Consequences of own refactor of usercount handling in readfile.c
(rB367ecff15d74).

Not super happy to have to call that function twice, but that should be
OK (not a real overhead here anyway).
2020-02-20 11:37:03 +01:00
3db8c5e28b another test socket 2020-02-20 11:24:46 +01:00
f1a805ef91 unify node type freeing 2020-02-20 11:21:46 +01:00
18fb8ed3fb unify socket type freeing 2020-02-20 11:09:43 +01:00
a2febb8d91 CMake: Suppress strict warnings for extern on macOS
Silences a lot of noise from Mantaflow.
2020-02-20 11:06:40 +01:00
9675c3d95f remove unnecessary function parameter 2020-02-20 10:38:13 +01:00
6f67a82911 initial socket type definition (memory freeing ist still wrong) 2020-02-20 10:35:10 +01:00
e2722aec6b Fix ushort compiler errors in Windows
ushort is not supported
2020-02-20 10:28:32 +01:00
0e48bb26af Modifiers: Refactor Mask modifier
The functionality of the mask modifier remains unchanged.

This patch updates the mask modifier so that it uses C++.
The manual memory management has been replaced with proper containers.
The large `applyModifier` function has been splitup into multiple smaller functions.
A large speedup is achieved by using simple arrays instead of hash tables in multiple places.

In my performance test file the playback speed increased from 1.1 to 5.1 fps on my laptop.

Reviewers: campbellbarton, brecht

Differential Revision: https://developer.blender.org/D6779
2020-02-20 10:05:47 +01:00
49615720e8 Merge branch 'functions' into simulation-tree 2020-02-20 10:02:55 +01:00
fcfe9784cb Merge branch 'master' into functions 2020-02-20 09:27:28 +01:00
2a6df7dfe5 Cleanup: use named unsigned types in the Python API 2020-02-20 15:40:05 +11:00
1e3ffd1f87 mathutils: support for to_2x2 as well as non-square matrices 2020-02-20 15:17:22 +11:00
Tiago Chaves
bc86eb1780 mathutils: support Vector.rotate for 2D vectors 2020-02-20 13:58:46 +11:00
Tiago Chaves
0115568ca6 BLI_math: add 2x2 matrix utilities 2020-02-20 13:58:46 +11:00
e233e492df Cleanup: rename mul_m2v2 to mul_m2_v2
Matches mul_m3_v3
2020-02-20 13:58:46 +11:00
71d6fbcd51 Fix missing error message on convex hull failure
Also remove unused errors.
2020-02-20 12:21:05 +11:00
146fe1decf Cleanup: remove use of 'register'
This isn't needed with modern compilers.
2020-02-20 12:21:05 +11:00
60e877bb78 Cleanup: unused structs 2020-02-20 12:21:01 +11:00
5dcb6fb22f Cleanup: unused enums 2020-02-20 12:19:55 +11:00
a74f0dc0e3 Cleanup: declatatuons for functions that don't exist 2020-02-20 11:22:14 +11:00
6f5ef60f1b Fix T65640: Axis of Custom Shape Bones are drawn in a wrong position.
The problem is that Custom Shape Bones can also have a custom size.
So the pchan->disp_mat doesn't always consider the actual length of the bone.
The proposed solution is to calculate the axes matrix at the drawing pass.

Ref T65640

Reviewed By: fclem

Differential Revision: http://developer.blender.org/D5049
2020-02-20 00:53:07 +01:00
0c01ad9300 Fix T74019 Eevee High Quality Normals causing pitch black faces
Was due to a mistake when removing previous code...
2020-02-20 00:13:48 +01:00
67cbce0b02 DRW: Fix facing reset when drawing with inverted camera 2020-02-20 00:03:26 +01:00
Julian Eisel
03a4d3c33f RNA: Fail makesrna if enum identifiers contain spaces
We could of course always add checks for more invalid characters, but
I'd say they are more unlikely to happen.
2020-02-19 20:45:58 +01:00
Julian Eisel
e37988fa21 Fix compile error when building with Cycles 2020-02-19 20:14:30 +01:00
f972a3c314 DRW: Support inverted view matrix
We detect the case where we need to invert the facing directly inside the
DRWView update and do the appropriate GL calls at draw time.

Fix T63047 Camera with negative scale works only in Cycles Rendered view
Fix T71352 Negative scale camera causes BLI_assert
2020-02-19 19:36:48 +01:00
bda8076d35 Fluid: Temporary fix for gzopen on windows
Needs more consideration. This fixes compilation for now.
2020-02-19 19:34:23 +01:00
05fd2acf89 Theme: Radial gradient background and enum for gradient type
This commit replaces the "Use Gradient" checkbox theme option with an
enum and implements a radial background.

Whith this change, it should be easier to implemet other types of more
complex background types, like a world space oriented gradient.

Reviewed By: billreynish, fclem, brecht

Differential Revision: https://developer.blender.org/D6825
2020-02-19 19:12:46 +01:00
2df040ed58 Fix T54270: Reset last_hit and last_location when reading the file
It does not make sense to read those values when loading a file and they can crash the cursor if they contain invalid coordinates.

Reviewed By: brecht

Maniphest Tasks: T54270

Differential Revision: https://developer.blender.org/D6754
2020-02-19 19:08:08 +01:00
888d180164 Fluid: Updated manta pp files
Updates in the files include:
- New manta files now use an platform independent gzopen function
- Adjusted argument name for vorticity
2020-02-19 18:58:48 +01:00
04b7f052e1 Fluid: Updated Manta updater script
Minor adjustments for the build directory location.
2020-02-19 18:58:48 +01:00
213b4f76ee Cleanup: make format 2020-02-19 18:44:22 +01:00
19f3a93e22 Fluid: More cleanup in fluid rna code
Removed scientific variable names from UI.
2020-02-19 18:42:14 +01:00
f0a22f5dd0 Fix T73932: modifying keyframes in nodes fails when there is an image sequence
Image animation should not be an depsgraph node of type ANIMATION, there is
no need for it to be affected by the special casing for that.
2020-02-19 18:13:05 +01:00
ee5c13c45c Sculpt: Pinch only in the direction perpendicular to the stroke
By pinching this way, we can fix some artifacts when sculpting following
the topology direction. It does not make much difference with dyntopo/
remesher, but I think this should improve the quality of the brush when
working with Multires.

Reviewed By: JulienKaspar, jbakker

Differential Revision: https://developer.blender.org/D6587
2020-02-19 18:08:37 +01:00
e77e6ba308 Fluid: Cleanup in fluid rna code
More descriptive names for secondary particle options.
2020-02-19 17:35:15 +01:00
d772c6ea31 Fix T74009: bpy.ops.outliner.orphans_purge() poll being too restrictive.
There is no reason to even require an editor at all here, for now just
kept the 'orphan view needed' condition for the outliner case only.
2020-02-19 17:08:58 +01:00
1c0230b573 Fix for Fix (c) : Normals Edit modifier using unititialized array of normals...
Own mistake in recent rBcfdb5b9a8b07.
2020-02-19 16:35:45 +01:00
e317e9f6c7 Fix T72751: Timeline crash from overridden scene.
Depsgraph RNA pointer would generate infinite loop in override comparisons.

Depsgraph pointer should never be considered here anyway, this is purely
runtime data.
2020-02-19 16:10:57 +01:00
8c5e36d0a9 Fluid: Fix typo that was made in 4453509d83 2020-02-19 15:33:36 +01:00
4453509d83 Fix T73770: Mantaflow is unable to bake fluid simulations on non-ASCII file paths
Some fluid cache functions were not using Blender's more secure BLI_gzopen() function. On Windows there are some special cases which this function can handle compared to the plain gzopen().
2020-02-19 15:07:54 +01:00
1d35d56dc9 cleanup naming 2020-02-19 14:58:43 +01:00
0c66c82f37 simplify interface 2020-02-19 14:56:16 +01:00
8eb63e9c3b show custom label only when node is hidden 2020-02-19 14:49:25 +01:00
adf111a53e support for custom labels 2020-02-19 14:46:46 +01:00
338d585a68 cleanup 2020-02-19 14:34:56 +01:00
fdf3d0f124 cleanup 2020-02-19 14:31:06 +01:00
77e8c8ccf1 move functions in class 2020-02-19 14:23:59 +01:00
de6a8ad569 cleanup 2020-02-19 14:14:04 +01:00
5a52400550 cleanup 2020-02-19 14:10:51 +01:00
17c75b653f experiment with NodeTypeDefinition class 2020-02-19 14:05:00 +01:00
ba0a6ae075 add copy behavior to nodes 2020-02-19 13:47:37 +01:00
fed7ab5b06 correct copy and free of node storage 2020-02-19 13:35:49 +01:00
edc0c79204 fix 2020-02-19 13:26:27 +01:00
dd6012766a remove memory leak 2020-02-19 13:22:45 +01:00
e1cde2745c cleanup 2020-02-19 13:17:59 +01:00
14626601ab simplify node storage initialization 2020-02-19 13:09:04 +01:00
843d9c8dff add a second test node 2020-02-19 12:59:43 +01:00
367ecff15d readfile: Move ID refcounting to libquery.
Having that extra ID users handling at readfile level, besides generic
one ensured by libquery, has been something bothering me for a long time
(had to fix my share of bugs due to mismatches between those two areas).

Further more, work on undo speedup will require even more complex ID
refcount management if we want to keep it in readfile.c area.

So idea is instead to generalize what we did for linked data already
when undoing: recompute properly usercount numbers after liblink step,
for all IDs.

Note that extra time required here is neglectable in a whole .blend file
reading (few extra milliseconds when loading a full production scene
e.g.).

Notes:
* Some deprecated data (IPOs) are not refcounted at all anymore, this
should not be an issue in pratice since the are supposed to get deleted
after doversion anyway.
* Refcounting happens after `do_versions_after_linking`, i.e those
functions won't get valid ID usercounts currently. Again, this is not a
problem in current code, if needed we could recompute refcount before,
and then ensure `do_versions_after_linoiing()` actually handles properly
usercount, which it does not currently.

Differential Revision: https://developer.blender.org/D6881
2020-02-19 12:56:02 +01:00
bde215a60c Fix T68878: Update shapekeys during transformation
Only use the hack in `key_block_get_data` for the bmesh shapekey.
The remaining shapekeys can use the original offset values.

Differential Revision: https://developer.blender.org/D6516
2020-02-19 08:54:34 -03:00
cfdb5b9a8b Fix T73941: Custom normals from normal edit modifier ignored by further modifiers.
This commit actually fixes several issues in this modifier, but main one
from the report was caused by adding a `CD_NORMAL` layer to loops to
store temp real clnors. Unless we plan on modifying the topology itself,
this is useless, and would require some additional 'dirty normals'
tagging to work properly, so just switched to simpler, cleaner solution
of having a local array of computed clnors.
2020-02-19 12:28:35 +01:00
3f4db1f9fe move code to other function 2020-02-19 12:20:16 +01:00
65ea5020c4 Fix T73938: Cycles Vertex Color wrong if no layer is specified
The node would render black in this case (but should use the
'active_render' layer choosen in the object data properties -- this is
now in line to how this is handled for e.g. UVs)

This introduces ATTR_STD_VERTEX_COLOR and uses this thoughout, if no
particular layer is specified in the node.

Maniphest Tasks: T73938

Differential Revision: https://developer.blender.org/D6887
2020-02-19 12:10:33 +01:00
ee1925d6cc start extracting method to init a new node type 2020-02-19 11:52:02 +01:00
3b01dbdeb1 Subdiv: Clarify Subdiv settings
The actual naming might also be a subject to change, especially the one
around `level`. Tricky part here is that at some point in the API there
will be change from Blender modifier's Quality to OpenSubdiv's Level,
but which API level is most suitable for this?

At least now meaning of settings is better documented ans should be
clear what's going on.
2020-02-19 11:49:32 +01:00
4298c0a3e1 Merge branch 'functions' into simulation-tree 2020-02-19 11:49:21 +01:00
3b1c34267b improve copying StringRef to new buffer 2020-02-19 11:49:03 +01:00
02f44049a8 Fix make deps OSL build on some systems with Qt libraries 2020-02-19 11:41:38 +01:00
e6120eaa34 work towards defining a node in one file 2020-02-19 10:51:18 +01:00
cc1a111aec Merge branch 'functions' into simulation-tree 2020-02-19 10:18:09 +01:00
3fe710aeaf Merge branch 'master' into functions 2020-02-19 10:17:36 +01:00
d54a4a32f3 Fix T73859: Support executing sculpt.set_pivot_position without invoke
Reviewers: brecht
2020-02-19 10:07:46 +01:00
3afe218a7d Cleanup: assign Main, use existing assignments
Avoid accessing inline since it's often used multiple times.

In some cases it was already defined.
2020-02-19 15:07:32 +11:00
9f8dd4f9e5 BLI_math: unify zero area checks for barycentric weight calculation
This applies the change from T73348 fix to related functions.

Instead of checking against an epsilon to avoid divide by zero,
perform the division and check the result is finite.

This is needed since small faces can have an area under 'FLT_EPSILON',
and dividing by values close to zero can result in 'inf'.
2020-02-19 13:33:53 +11:00
Charlie Jolly
eef5b506d5 EEVEE: Color Ramp Ease Optimisation
This patch provides an optimisation for Ease (Smoothstep) setting in the color ramp node.
This optimisation exists already for Constant and Linear modes.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6880
2020-02-19 02:27:36 +01:00
e82827bf6e DRW: New High Quality Normal & Tangent extract
This patch adds a dedicated path to extract 16bit normals instead of packing them into 10bits/comp.
The tangents are also packed to 10bits/comp if not using the new High Quality Normal option.

Fix T61024 Degraded texture shading on dense meshes

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6614
2020-02-19 01:57:06 +01:00
77619f5274 GPU: Fix huge performance regression regarding instancing
Under some circumstances, MultiDrawIndirect was disabled to improve perf.
of average scene. But this conflicted with the normal instancing buffer
filling if only 1 or 2 instances were needed to fill the buffer. All
consecutive drawcalls could not be batched together and performance would
degrade rapidly.

This patch make my instance test scene go from 11fps back to 40fps where
it should have been.
2020-02-18 18:20:00 +01:00
56d6666689 GPU: Limit Mesa workaround to older version 2020-02-18 18:20:00 +01:00
Cody Winchester
20605c4b51 Modifiers: UVWarp modifier add invert vgroup option
Adds the invert vgroup option to the UVWarp modifier. Adds a flag and char padding to the DNA.

Differential Revision: https://developer.blender.org/D6841
2020-02-18 18:14:44 +01:00
Cody Winchester
6cd4363c0c Modifiers: Bevel modifier add invert vgroup option
Adds the invert vgroup option to the Bevel modifier.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D6845
2020-02-18 18:09:40 +01:00
ed8aa154a3 Fix crash loading .blend file saved with Blender 2.25
pathJumper.blend from 2.25 release demo files in demos225.zip
2020-02-18 18:05:11 +01:00
Cody Winchester
5df0f8bffb Modifiers: Explode modifier add invert vgroup option
Adds the invert vgroup option to the Explode modifier.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D6844
2020-02-18 17:23:16 +01:00
b8567b704b Fix Cycles fluid motion blur not working after recent refactor
This also re-enables the fluid motion blur test.
2020-02-18 17:11:57 +01:00
43c497051a Sculpt: Update red cursor color
Some users reported that the previous red color of the cursor was too
saturated and that can be distracting.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6828
2020-02-18 17:10:17 +01:00
Cody Winchester
e30d8f45ef Modifiers: Laplacian Deform modifier add invert vgroup option
Adds the invert vgroup option to the Laplacian Deform modifier.

Differential Revision: https://developer.blender.org/D6843
2020-02-18 16:57:09 +01:00
19e63bb51e EEVEE: Fix default material disappearing when SSRefraction is enabled 2020-02-18 16:56:52 +01:00
8673d2e92a Sculpt: Fix slide relax cursor color
Slide/Relax is a deform tool, so the color should be yellow.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6827
2020-02-18 16:56:37 +01:00
f996aeaf76 Fix T73105: Use Magnify instead of Pinch in the brush context menu
This matches the name in the properties panel for the Blob and Snake
Hook brushes

Reviewed By: brecht

Maniphest Tasks: T73105

Differential Revision: https://developer.blender.org/D6805
2020-02-18 16:53:57 +01:00
efcfe0ffdf Cleanup: clang-format. 2020-02-18 16:38:57 +01:00
Cody Winchester
d0cc9b522d Modifiers: Laplacian Smooth modifier add invert vgroup option
Adds the invert vgroup option to the Laplacian Smooth modifier.

Differential Revision: https://developer.blender.org/D6842
2020-02-18 16:28:02 +01:00
cef4d344f9 Fix Embree failing on objects with a very high number of motion steps
Set the limit to 129 to match Embree. This applies to all devices for
consistent render results.

Ref T73778
2020-02-18 15:38:11 +01:00
003a97e0bf Cycles: Fix failing avxf cross test on AVX2
cycles_util_avxf_avx2_test failed on the cross test, since
it wasn't immediately clear why, the test was disabled.

After looking into it, this test when build for AVX2 is
generating FMA instructions where the intermediate results
have "infinite" precision [1] leading to slightly different
results.

This diff re-enables the cross test and allows for a small error
in the results.

[1] https://www.felixcloutier.com/x86/vfmadd132ps:vfmadd213ps:vfmadd231ps

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

Reviewers: brecht
2020-02-18 06:42:35 -07:00
ad9b919962 Cleanup: protect parameters of FOREACH_MAIN_ID & co macros. 2020-02-18 14:38:33 +01:00
ce33388413 Fix (unreported) wrong handling of usercount in BKE_workspace_add().
This does not seem to be an actual issue in current master code (as
creating a new ID will assign 1 user to it by default), but is breaking
generic usercount handling in future changes.
2020-02-18 14:38:33 +01:00
e3e6dc41a7 Code cleanup EEVEE Render Passes
The render passes didn't follow the DrawManager way of doing things. It added new geometry and shading groups during drawing. This would make it harder to migrate to Vulkan later on.

This change will re-implement this part by using uniform references.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D6875
2020-02-18 12:23:04 +01:00
f7386b9757 Fix T62612: Saving with "Remap Relative" makes ALL paths relative 2020-02-18 22:12:34 +11:00
d4e38d99b2 libquery: add optional handling of 'UI' ID pointers.
Handling those through different ways /might/ be needed sometimes, but
in most case this is just a nest of issues, since you can easily forget
to take them into account.

Note that this should be a 'non-functional' change, as this new behavior
is not used anywhere yet.
2020-02-18 11:22:32 +01:00
abfdd1c697 Fix T73960: GPencil can't convert while it is a separate from old strokes
The problem was the new object hadn't any layer active.
2020-02-18 11:11:32 +01:00
5343d0f494 Fix making paths relative on windows
Comparing the drive letter was case sensitive,
causing 'BLI_path_rel' to fail in common cases
(manually entering a lower case drive letter for example).

Surprisingly this issue dates back to 2005 and wasn't reported.
2020-02-18 20:56:23 +11:00
8a2228a597 Remove debug prints from blendfile_liblink.
rBf35f7bd97a4151 was the proper fix it seems.
2020-02-18 10:28:33 +01:00
79f99becaf Fix T73954: Cycles viewport render from camera not respecting aspect ratio 2020-02-18 10:10:48 +01:00
f35f7bd97a Fix missing output dir for blendfile_liblink test. 2020-02-18 09:53:08 +01:00
c83099e987 Cleanup: use doxy sections for BLI_bpath API 2020-02-18 18:21:08 +11:00
d0c159ae97 build_deps: include venv on windows 2020-02-17 18:41:24 -07:00
ca72ff599a Fix Cycles Embree crash with AO shader local only option
Ref T73778
2020-02-18 00:45:30 +01:00
1761d65b25 Fix Cycles Embree test failures with shadow catcher
Ref T73778
2020-02-18 00:45:30 +01:00
a450bf330c Cleanup: compiler warnings 2020-02-18 00:45:30 +01:00
52a475287d Fix T70898: Area.type access fails for topbar & statusbar
Revert change from 5f6c45498c

Excluding enum items meant Python scripts couldn't access them.

This is no longer needed now Area.ui_type is used for the menu.
2020-02-18 10:34:45 +11:00
Stefan Werner
f5740ec8cf Cycles: Enabled quaternion motion blur with Embree.
Bringing Embree's motion blur closer to Cycles' native blur.
This requries Embree 3.8.0 or newer.

Differential Revision: https://developer.blender.org/D6575
2020-02-17 23:44:12 +01:00
435476cb87 IC keymap: Use B for Sequencer Blade tool, Ctrl/Cmd-B for Split operator
Also add Q for select tool, as in other editors
2020-02-17 22:50:46 +01:00
cc296ef179 DRW: Fix wrong view transform used in solid mode if using workbench engine 2020-02-17 22:49:17 +01:00
d38dfbd13d IC keymap: Fix warnings after recent Cut -> Split name change 2020-02-17 22:42:58 +01:00
b117b8e818 Fix T73793 Walk navigation crosshair gets hidden behind objects
This is a bug that the recent refactor exposed. Some widgets were drawing
with alpha set to 0.
2020-02-17 22:39:33 +01:00
9491e7d7c2 Fix T73914 Overlay: Unable to select bone in pose mode
It was caused by the bone selection overlay that was delaying the
xray pass. But OVERLAY_pose_draw were never called when doing selection.
2020-02-17 22:20:14 +01:00
a5ac142a31 Temp debug prints for liblink tests to check what happens on windows. 2020-02-17 21:41:15 +01:00
ff1d307e25 Fix: Alphabeticalize Object Modifiers
Reported by Dalai on the live stream
2020-02-17 15:04:01 -05:00
00227edf4c Fix T73748 Overlay: Infront disappearing/glitched while in Xray mode 2020-02-17 20:54:06 +01:00
a661ef42fb Overlays: Fixed blending issue when not using smooth wire 2020-02-17 19:37:48 +01:00
f78c407aff Fix T73876 Overlay: Armature: Pose bones display randomly
Caused by unitialized value.
2020-02-17 19:37:48 +01:00
5f3b898638 MSVC: Fix obscure RNA related build error
When you switch between debug/release mode a lot, you could end up
in a situation where the generated RNA code was out of sync between
the two configurations.

There was one function optionally defined with an `#ifndef NDEBUG`
guard, this patch adds a stub implementation for the other configurations
to prevent build errors.

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

Reviewers: brecht
2020-02-17 11:04:55 -07:00
37cdfac6b9 Codesign: Harden check for archive being ready for sign
Seems like sometimes files are being only partially ready, which makes it so there
are unsigned files, failing to deliver fully signed bundle.

Now expected archive file size is stored into stamp file and is checked against
size of the archive file on another side.

There are some bare prints used for debugging, would need to switch it to a proper
logger (or to be removed).
2020-02-17 18:52:38 +01:00
42ff69db25 Embree: avoid potential clashing symbols with external renderer add-ons 2020-02-17 18:44:54 +01:00
8d60e6fa38 Fix: T73830 OSL not finding stdosl.h on linux
This extends FindOpenShadingLanguage.cmake to also look for the location of
stdosl.h and adds the path to the invocation of oslc to deal with the headers
being in different locations a little better.

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

Reviewers: brecht
2020-02-17 10:28:12 -07:00
6b85f364e8 test drawing settings in node and have them update the sockets 2020-02-17 18:13:54 +01:00
fe029b9012 use extern "C" in DNA_node_types 2020-02-17 18:13:04 +01:00
a33b261473 Fix T71455, T73852, T73860: Transform, Redo doesn't work properly in time editors
The redo panel does not consider the position of the mouse.
So it is not possible to know the direction to redo the operator.

The solution is to add a new `direction` parameter that can be
saved and used for redo.

Differential Revision: https://developer.blender.org/D6852
2020-02-17 13:33:29 -03:00
847bb4c4e0 Fix T73853: Redo does't work properly with NLA "Move" transform mode
The orientation matrix when re-doing some transform operations was negated.
Thanks @lichtwerk for pointing out the problem.
2020-02-17 13:03:58 -03:00
a001417d64 initial automatic rebuild when the node tree changes 2020-02-17 16:49:26 +01:00
782b3ec1c5 add userdata to bNodeType 2020-02-17 16:49:03 +01:00
4353bc9190 VSE: Fix missed renaming of cut operator
Fix errors introduced by commit rB819af2094b21.

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D6870y
2020-02-17 16:46:59 +01:00
1fcca29b47 VSE: Remove atomized image duplication for preprocessing stage
Each image that goes through preprocessing is already duplicated in `input_preprocess()`

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6790
2020-02-17 16:46:59 +01:00
18b693bdbd Fix T70229: Show Cache On will cause a lower fps
Use gpu batch drawing for cache content in VSE.
Immediate drawing caused significant dorp in framerate.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6835
2020-02-17 16:46:59 +01:00
Charlie Jolly
20a4cdfd70 Cycles: Vector Rotate Node using Axis and Angle method
This node provides the ability to rotate a vector around a `center` point using either `Axis Angle` , `Single Axis` or `Euler` methods.

Reviewed By: #cycles, brecht

Differential Revision: https://developer.blender.org/D3789
2020-02-17 15:43:18 +00:00
ab3a6e050c Fix artifacts with Cycles viewport denoising when rendering with multiple CUDA devices
Rendering with multiple CUDA devices but denoising with OptiX caused parts of the image to go
missing at the start while the resolution was scaled. This is because the copy operation in
`MultiDevice::map_neighbor_tiles` which slices the copy across all devices would slice based on the
full resolution and not the scaled one and therefore copy incorrect data between devices.
Since this is not the recommended way of using viewport denoising anyway, simply avoid those
incorrect copies for now by disabling denoising while the resolution is scaled. Doing both rendering
and denoising with OptiX is not affected by this, since it avoids those copies altogether anyway.
2020-02-17 16:15:56 +01:00
c6572f9317 initial list sockets 2020-02-17 16:01:18 +01:00
d38f0d9937 extract function to create simple socket type 2020-02-17 15:51:05 +01:00
3e0a167475 add userdata to bNodeSocketType 2020-02-17 15:50:12 +01:00
3a53ae8d4b Fix T73817: Shape key users not properly mapped when duplicating their obdata.
Once again those crappy weirdos IDs with their crappy weirdos 'loopback'
pointers...

This is a quick hack for now, think id_copy needs to be reworked a bit
to supported re-entrant sub-ID copying (also an issue with nodes I bet).
2020-02-17 15:49:39 +01:00
852cdd476b ColorManagement: Dithering Improvement
- Unlock property range.
- Use triangular noise to keep perceptual noise error more uniform.
  Remap range to preserve perceptual intensity.
- Center noise distribution around 0 for GPU implementation because of
  rounding.
- Do dithering after merging overlays.

Effect of using triangular noise is not really noticeable if you don't use
really low bitdepth. But doing a test in the shader were we artificially
reduce the bitdepth (`col = (col * 16) / 16;`) reveals the real difference.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6850
2020-02-17 15:47:17 +01:00
5231d06d4c Cleanup: Remove period from RNA description. 2020-02-17 16:37:59 +02:00
d4f7ae49d3 Merge branch 'functions' into simulation-tree 2020-02-17 15:32:29 +01:00
6399bfcee3 add missing include 2020-02-17 15:32:19 +01:00
1415d3466b first socket defined in C++ 2020-02-17 15:17:33 +01:00
b4a6eba355 Merge branch 'functions' into simulation-tree 2020-02-17 15:08:10 +01:00
7f35aa99c7 Merge branch 'master' into functions 2020-02-17 15:07:46 +01:00
dcb905a58f Cleanup: add extern "C" to UI_interface.h 2020-02-17 15:07:03 +01:00
e64166652b Fix T68749: BPY: Deprecate height of popup
`invoke_props_dialog` and `invoke_popup` had a width and a height field. The height field was ignored as the height is determined based on the content. This change removes the field from the BPY + WM_api

Reviewed By: Campbell Barton, Jacques Lucke

Differential Revision: https://developer.blender.org/D6694
2020-02-17 15:03:11 +01:00
e2e2a98573 Fix T73518: Normal Overlay
This change will not render the normals for faces that are hidden.
Before we had instance drawing the hidden faces were registered in the
index buffer. During the overlay refactoring the rendering was migrated
to instance rendering. Instance rendering does not use the index buffer
so the data was ignored.

This patch stored the normal visibility in the .w part of the normal or
for face normals it will set the normal to zero. The shader looks at
this and renders the normals fully transparent when detected.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D6798
2020-02-17 14:59:30 +01:00
Dalai Felinto
d5d235c44f UI: Create quads > Create Quads 2020-02-17 14:44:22 +01:00
2278aa0da9 Cycles: Add support for adaptive kernel compilation to OptiX device
This modifies the common CUDA implementation for adaptive kernel compilation slightly to support both CUBIN and PTX output (the latter which is then used in the OptiX device). It also fixes adaptive kernel compilation on Windows.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6851
2020-02-17 14:27:44 +01:00
12b6ddaf95 Fix OpenCL issue after recent code cleanup
Thanks Patrick Mours for finding it.
2020-02-17 14:09:46 +01:00
456cb215c6 initial C++ node builder 2020-02-17 14:00:27 +01:00
5b22713c22 Cleanup: compiler warning 2020-02-17 13:24:07 +01:00
Bartosz Moniewski
67d12bb519 Shading: add direction modes and phase offset to wave texture node
* Direction mode X, Y and Z to align with axes rather than diagonal or
  spherical as previously. X is the new default, existing files will
  use diagonal or spherical for compatibility.
* Phase offset to offset the wave along its direction, for purposes like
  animation and distortion.

https://developer.blender.org/D6382
2020-02-17 13:24:07 +01:00
efb5108faa more work on socket data types 2020-02-17 13:23:29 +01:00
ae9bbb4d03 Python: Expose WM is_interface_locked to python.
This patch exposes the Window Manager `is_interface_locked` as a read
only property to python.

This property is needed to allow script writers to detect if a job is
running with locked interface like the Alembic exporter.

Reviewed By: Brecht

Differential Revision: https://developer.blender.org/D6749
2020-02-17 14:06:57 +02:00
d119e163d0 Fix many typos and other issues in UI messages. 2020-02-17 13:01:07 +01:00
2d1b05a15f Cleanup: Alembic, split source files into reader and writer
This separation between reader and writer code is part of Milesone 2 of
T73363.

In this commit the reader and writer classes are separated into their
own files, any `#include` and `using` statements are cleaned up, and
some separator comments have been removed.

No functional changes.
2020-02-17 11:50:28 +01:00
c498abb103 Fix macOS LLVM precompiled link error with older Xcode versions 2020-02-17 11:35:07 +01:00
97b93effd2 initial socket data type 2020-02-17 11:34:49 +01:00
395e0c79bd Alembic: fix unit test on Windows
There are two issues solved in this commit:

- Our Windows buildbot has slightly different floating point errors than
  the Linux one, which meant a larger delta was required for float
  comparisons.
- The test performs an export to a temporary Alembic file and
  subsequently imports it. Deleting the temporary file was impossible on
  Windows because it was still in use. This is now resolved by first
  loading the default blend file before deleting the Alembic file.
2020-02-17 11:31:09 +01:00
cec7db2004 UI: Use crosshair cursor for Extrude to Cursor tools
Since this tool doesn't perform selections when you click, it's important that the cursor helps communicate that something else will happen.

Also fix missing 'to' in Curve Edit Mode.
2020-02-17 11:16:13 +01:00
c64cea14ed Keymap: minor tweaks so box-select shortcuts show in the menu 2020-02-17 21:03:56 +11:00
340f452da8 GPencil: Fix unreported move to layer with lock material
The strokes with the material locked could be moved. Now the lock is respected.
2020-02-17 10:51:56 +01:00
a6755f2f1f Fix: Forgot to include the blade icon in CMakeLists
This should make the Blade icon appear correctly in the Sequencer
2020-02-17 10:48:58 +01:00
1945a23259 Merge branch 'master' into functions 2020-02-17 10:47:28 +01:00
c0423c871d Keymap: add sequencer box select with handles
Use Ctrl-B, include in menu, rename property to match graph editor.
2020-02-17 20:44:18 +11:00
fc85490c2d Fix T73906: Crash calling render from Python 2020-02-17 17:27:20 +11:00
0a1b6a3b4a Fix T73893: Unable to create torus with under 10mm radius
Allow zero major/minor radius, also use 10,000 for a hard maximum.
2020-02-17 17:01:07 +11:00
0b5c2685db Fix T73909: Crash deleting grease pencil layer from dope sheet 2020-02-17 16:48:45 +11:00
60890ccf9d Fix T73862: Fluid Sim file handle resource leak 2020-02-17 16:04:04 +11:00
2ff1d62b87 Keymap: IC keymap was using middle-mouse value with ANY value
Use 'PRESS' instead.

Also keep tweak events if a directional value is used.
2020-02-17 13:14:05 +11:00
d6977b5387 Fix T73898: UDIM crash changing form tiled to single 2020-02-17 12:33:12 +11:00
819af2094b Rename Sequencer 'Cut' to 'Split'
This avoids the ambiguity with the Cut operator in the Sequencer, which could be confused with Cut/Copy/Paste.

Use 'Split' for the operator and 'Blade' for the active tool.

Patch by Nathan Lovato, with edits

Differential Revision: https://developer.blender.org/D5542
2020-02-16 21:39:12 +01:00
31530d0da9 UI: add blade icon to the Sequencer Cut tool
Was previously using the mesh edit Knife tool icon - now this tool has a bespoke icon.
2020-02-16 20:56:59 +01:00
de0de9381d IC keymap: Activate tools with MMB immediately on press rather than drag
There seems to have been no particular great reason why we were activating tools using a tweak event with MMB.

This change makes it so tools are activated with a press event instead.
2020-02-16 19:53:15 +01:00
70ff8f4a97 BPY/Windows: Do not bundle the CRT for a bpy build
- Doesn't work
- If it worked, having a different CRT than the rest of
  the process would not be a good thing.
2020-02-16 10:38:33 -07:00
f6d5a95513 Fix T73880: error rendering UDIM in Eevee after recent refactor 2020-02-16 14:07:46 +01:00
fad8e475c7 remove UNUSED_FUNCTION_NDEBUG macro again 2020-02-16 12:45:25 +01:00
b80585ba30 remove unused code 2020-02-16 12:41:01 +01:00
ecc78d29d6 bring back more correct duplicate removal 2020-02-16 12:39:16 +01:00
0716394423 Cleanup: Transform: Rearrange definitions and declarations 2020-02-15 18:44:11 -03:00
322dc72316 Cleanup: refactor GPU material attribute and texture requests 2020-02-15 21:09:29 +01:00
007f1b74a6 Cleanup: split off code from gpu_codegen.c into smaller files 2020-02-15 20:33:16 +01:00
6701db773e Cleanup: don't perform some GPU shader codegen operations twice 2020-02-15 20:33:15 +01:00
ab18dbb67e Fix potential crash with Eevee render of missing image textures
This NULL check is needed elsewhere, do it here as well.
2020-02-15 20:32:08 +01:00
c6928843dc Fix Eevee shader node error when using both RGB and vector curve nodes 2020-02-15 20:31:48 +01:00
031dcbf15b Fix crash in some Eevee shader node setups after vector math node changes 2020-02-15 20:31:18 +01:00
50975026ff Cleanup: remove WITH_EMBREE make deps option
No other default enabled libraries have an option either.
2020-02-15 20:31:18 +01:00
b5f17f6b8a Cleanup: Silence warnings 2020-02-15 16:26:18 -03:00
e0499387ca GHOST: Init New Windows with a closer theme color
The user theme is loaded after window creation so we should create the 
window with a color that at least matches the default theme.

Differential Revision: https://developer.blender.org/D6858
2020-02-15 12:44:52 -05:00
4d74116218 initial MultiFunctionID 2020-02-15 17:55:18 +01:00
bd42f7c275 remove operation hash of functions, a more reliable system is necessary 2020-02-15 17:52:52 +01:00
0feb03e680 Fix T73763: Laggy when zooming a node editor with International Fonts
Two main reasons for the lag:
- Allocation of memory with transfer to GPU.
- BLF_cache_clear();

The (partial) solution is to avoid memory allocating in some setups
through the `GPU_texture_clear`.

Differential Revision: https://developer.blender.org/D6837
2020-02-15 12:18:52 -03:00
738bb309f9 GPU: Add GPU support to fill a texture image with a constant value
This solution is optimized for GL version 4.4 or greater.
2020-02-15 12:18:52 -03:00
de9ea94fc6 Transform: Deduplicate time snap code 2020-02-15 12:09:23 -03:00
f0c991a380 Cleanup: work around clang-format differences between versions
Ref T73747
2020-02-15 14:03:51 +01:00
924fe50e97 Cleanup: fix compiler warning 2020-02-15 13:44:20 +01:00
39fb33f0b7 Fix macOS build warnings about Boost symbol visibility
The default in Boost changed from global to hidden, but other libraries do
not use hidden symbols which gives warnings at link time on macOS.
2020-02-15 13:44:20 +01:00
ff4ffb18d4 Fix T67924: transform right/up arrow keys not working on macOS 2020-02-15 13:44:20 +01:00
6669eca820 Build: use clang-format from precompiled libraries for make format on Linux
Ref T73747
2020-02-15 13:44:20 +01:00
9531a8a10a Build: enable Embree by default for make deps
Ref T73819, T73778
2020-02-15 13:44:17 +01:00
a200986273 Keymap: Add front/back Alt-MMB absolute view axis switching
Oversight in previous commit.
2020-02-15 19:07:25 +11:00
35e3dc9192 Keymap: move weight & vertex paint handling before pose mode
This is needed so pose keymap doesn't override weight paint,
which currently prevents the weight paint context menu from showing.

Logically pose mode is secondary when used in combination with
weight paint, so evaluate it afterwards.

Also move vertex paint keymap since they have a lot in common,
it's simpler to keep them evaluated at the same place.

Resolves T73384
2020-02-15 18:59:46 +11:00
57511782cf Cleanup: duplicate calls to add keymap handlers 2020-02-15 18:46:54 +11:00
d8d1f66dbc Fix warp modifier invert vertex group duplicate flag 2020-02-15 18:13:54 +11:00
d936f6977f Fix T58571: Limited dissolve ignores boundaries between delimited faces
When a vertex between two edges is being collapsed,
it's important that edges between delimiting faces use the
angle between edges without scaling it down.

While faces with different materials wont ever be merged into a single
face, all the detail between the two faces may be removed.
2020-02-15 17:55:58 +11:00
f829fefe8a Cleanup: spelling 2020-02-15 15:58:06 +11:00
1857548b5c Fix T73796: Memory leak saving image 2020-02-15 15:24:03 +11:00
5192b60e57 Cleanup: comment unused node defines 2020-02-15 15:24:03 +11:00
60475b9549 Cleanup: remove various unused defines 2020-02-15 15:24:03 +11:00
fa5837c5e8 Cleanup: remove unused RenderData.displaymode 2020-02-15 15:24:03 +11:00
52da1b6e2b Cleanup: use define for golden ratio
Move from workbench_private.h where it wasn't used.
2020-02-15 15:24:03 +11:00
f37b9ffdcb Cleanup: unused BIK_api struct & defines
This was part of an unfinished API,
however this wasn't touched since 2009.
2020-02-15 15:24:02 +11:00
9c79a21eb0 Cleanup: unused math colorspace defines 2020-02-15 15:24:02 +11:00
82cf0ab468 Cleanup: bmesh inset comments
- Use doxy sections
- Don't document implementation details in doxy comments.
2020-02-15 15:24:02 +11:00
Lukas Stockner
f6aafd5186 Modifiers: Add option to directly specify a 2D transform for UVWarp
Currently the only option is to warp based on the transform of other
objects, which is inconvenient if you want to e.g. control it through
a driver - you need to set up a dummy object and go through that,
which is clunky and should be unneccessary.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6690
2020-02-15 03:37:20 +01:00
fa4ab69abf Cleanup: mixed camel/snake case 2020-02-15 10:45:46 +11:00
92a56bbe6a Fix T73798: Error raising exception for local shutil.copytree 2020-02-15 10:40:43 +11:00
7d90ff08f3 Fix incorrect enum in GHOST test 2020-02-15 10:40:42 +11:00
b2df29e50d Cleanup: clang-format 2020-02-15 10:40:41 +11:00
1c883fe646 Cleanup: make BLI_make_exist local to the file selector
This isn't a general utility, and the name wasn't descriptive.
2020-02-15 10:40:41 +11:00
68a52a7fa9 Cleanup: define use 2020-02-15 10:40:41 +11:00
b6c9c9c449 Cleanup: redundant headers 2020-02-15 10:40:41 +11:00
1135c2cd17 Cleanup: CMake formatting 2020-02-15 10:40:41 +11:00
b1f40955d9 Cleanup: incorrect __contains__ comparison, long line 2020-02-15 10:40:41 +11:00
38e569cb1f Cleanup: use UI_GetThemeColor3ubv when alpha is ignored 2020-02-15 10:40:41 +11:00
12728d43f8 Revert "Fix T73763: Laggy with nodes Editor + International Fonts"
This reverts commit a21f5ec562.
2020-02-15 00:22:56 +01:00
Charlie Jolly
635ab9d1dd Shading: Extend Vector Math Node with Sin, Cos, Tan and Wrap functions
This adds some extra functions recently added to the float Maths Node.
Not all functions have been ported over in this patch.

Also:
+ Tidy up menu
+ Change node color to match other vector nodes, this helps distinguish vector and float nodes in the tree
+ Move shared OSL functions to new header node_math.h

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6713
2020-02-14 22:14:05 +00:00
44d7706fe1 Fix property warning due to recent commit
```Warning: property 'mode' not found in keymap item 'TRANSFORM_OT_bbone_resize'```
2020-02-14 15:54:48 -03:00
6608caef0e build_environment: Upgraded Embree to 3.8.0
The latest versions of Embree allow similar motion interpolation
as Cycles' own BVH.
2020-02-14 19:14:32 +01:00
180aff7b74 DRW: Fix viewport render always rendering with transparent background 2020-02-14 18:21:04 +01:00
Ian Karanja
73e404697b Fix small typo in BGL API docs
Differential Revision: https://developer.blender.org/D6681
2020-02-14 17:59:00 +01:00
Nicholas Rishel
e7cf132e57 Cleanup: simplify redundant tests in scrollbar code
Differential Revision: https://developer.blender.org/D6783
2020-02-14 17:57:34 +01:00
Julian Eisel
9b243b9a53 Fix failing assert & uninitialized paint settings in empty scene
Steps to reproduce were:
* Add new (empty) scene
* Add some mesh object
* Change to texture paint mode

While it can be argued that we should already init the settings when
creating a new scene (so that the texture tab can show up),
BKE_paint_init() should always ensure paint settings are initialized
either way.

Related to T73611.
2020-02-14 17:15:15 +01:00
332aed6399 Fix sporadic CUDA launch failures with Cycles viewport denoising
Sometimes the viewport buffer size is zero for a frame, which caused the denoising task to also try to
launch CUDA kernels with a launch size of zero, which in turn failed with a CUDA error. This patch
prevents launches from occuring in this case, similar to how it is handled in `copy_to_display_buffer`.
2020-02-14 17:00:44 +01:00
e34ff4926f Cleanup: Fix compiler warning 2020-02-14 16:17:01 +01:00
Julian Eisel
60e823fe22 Cleanup: Rename ED_region_tag_redraw_overlay() to ED_region_tag_redraw_cursor()
Old name was a bit confusing/misleading, esp. since previous commit.
2020-02-14 15:59:30 +01:00
Julian Eisel
c4b9cb0af0 UI: Allow gizmo-only redraw tagging
NOTE: This change shouldn't have any visible effect. It's just the
first (easiest) step towards decoupling gizmo redraws from viewport
redraws.

We currently redraw the entire region whenever a gizmo needs redrawing,
which would be nice to avoid in the future, see T73198. The first step
towards this would be having a separate tag for them, which is what
this patch implements.
The term "editor-overlays" was chosen because for the forseeable future,
we'll also have to redraw non-gizmo overlays in-between drawing 3D and
2D gizmos. Namely annotations.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6838
2020-02-14 15:59:30 +01:00
8645b73cd8 Cleanup: Rename bonesize transform file
`transform_mode_bonesize.c` --> `transform_mode_bbone_resize.c`
2020-02-14 11:57:56 -03:00
ef4505a158 Fix T68610: B-Bone display size/scaling op issues
Fix ReDo and create a new operator to display only the required properties.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6849
2020-02-14 11:51:29 -03:00
38e06b19f6 Fix T59218: Loop Cut from the Context Menu doesn't slide
Differential Revision: https://developer.blender.org/D6810
2020-02-14 11:47:30 -03:00
fb2f100d89 Cleanup: Alembic, renamed and moved convert_matrix function
The `convert_matrix()` function just converts between the Alembic and
Blender matrix data types, and doesn't do any coordinate system conversion.
To clarify this, the function has now been renamed to
`convert_matrix_datatype()`.

I also moved the implementations next to each other in the source file,
so that it's visible that there are actually two of them.

No functional changes.
2020-02-14 15:41:17 +01:00
451bd5fd79 Cleanup: Alembic, removed unused export settings
No functional changes.
2020-02-14 15:41:17 +01:00
7c5a44c71f Alembic: refactor import and export of transformations
The Alembic importer now works with local coordinates. Previously, the
importer converted transformations from Alembic to world coordinates
before processing them further; this processing often included
re-converting to local coordinates. This change made it possible to
remove some code that assumed that a child transform was only read after
its parent transform.

Blender's Alembic code follows the Maya convention, where in the zero
orientation the camera looks forward instead of down. This extra
rotation is now handled more consistently, and now also properly handles
children of cameras. This fixes T73269.

Unit tests were added to at least ensure that the importer and exporter
are compatible with each other, and that static and animated camera
transforms are handled in the same way.
2020-02-14 15:41:17 +01:00
f457dc122d Cleanup: Alembic, rename unit test
This rename is to prepare for a future addition to the unit test file.
Currently it's named "import" and I will add an export test as well. The
rename is a separate commit to easily see the difference between the
rename and the addition of another test.

No functional changes.
2020-02-14 15:41:11 +01:00
a21f5ec562 Fix T73763: Laggy with nodes Editor + International Fonts
Two main reasons for the lag:
- Allocation of memory with transfer to GPU.
- BLF_cache_clear();

The memory allocation seems to be unnecessary, so I removed it.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6837
2020-02-14 11:25:41 -03:00
d6d44ccc77 Fluid: Inflow object improvements
Various fixes for smoke / fire flow objects:
- Apply inflow at every subframe (new: also emit during adaptive steps in between frames)
- Fix issue with fire not being emitted on first frame
- Higher value range for smoke flow density variable
2020-02-14 14:22:36 +01:00
5ba727861d Cleanup: compiler warnings 2020-02-14 14:10:53 +01:00
Alessio Monti di Sopra
e139a3f9a5 UI: draw object names in 3D viewport with full opacity
Lamp names were be almost invisible when unselected.

Differential Revision: https://developer.blender.org/D6048
2020-02-14 14:01:28 +01:00
Ray molenkamp
9339dc6dd1 Fix T70685: Cycles crash using WITH_CYCLES_NATIVE_ONLY on Windows
MSVC does not have -march=native, so the kernel gets built without AVX2 and
BVH8 support. The code assumed it to be available and crashed

Differential Revision: https://developer.blender.org/D6082
2020-02-14 13:55:11 +01:00
1c1b78eab5 Make libquery resilient to old blend-files missing pointers.
This makes libquery usable during blendfile reading phases.

Some pointers that shall never be NULL in modern Main database did not
exist before.
2020-02-14 12:52:47 +01:00
e277e8d085 Cleanup: Split transform.c in multiple files
Differential Revision: https://developer.blender.org/D5819
2020-02-14 08:42:59 -03:00
897f943ca0 BKE: Version Bump to 2.82.3
Needed to avoid double fix of sun lights bias.
2020-02-14 12:26:59 +01:00
31ad86884c EEVEE: Shadow: Fix cascade shadowmap bias multiplicator
This fixes the issue where sun shadowmaps needs a very big bias value to
make any difference.

The bias is now in world space and not dependant on shadow bounds.

Unfortunatelly this breaks compatibility with previous version and old
scene are likely to need user intervention to fix.

Also fixes the property range.

Fix T71661 EEVEE shadow from sun on incorrect face
2020-02-14 12:26:49 +01:00
38ced52d34 Fix minor issue with new libraries ID usercount.
Library data-blocks are supposed to be tagged as 'real user', i.e.
have one virtual user, since nothing else actually uses (refcounts)
them. That was done in liblink code, but not for newly added ID-LI IDs
when linking from a new libblend file e.g.
2020-02-14 12:18:21 +01:00
38c8378f52 Cleanup: libquery: add explicit comment that we ignore ID.lib pointer there. 2020-02-14 12:18:21 +01:00
0c5014aaef Cleanup: Deduplicate some code in new blenfile io/linking tests. 2020-02-14 12:18:21 +01:00
e543c9ad32 add global sin and cos functions 2020-02-14 11:40:02 +01:00
5ca7c85e10 Particle editmode: add mouse independent "Select Linked" operator
The current "Select Linked" operator works based on mouse position and
makes no sense to call from the menus and was removed in rBdd9dfadaac9b.

This patch adds an operator independent from mouse position that just
selects all keys to a corresponding point (and adds back menu entries,
adds keymap entry).

The original operator is renamed to 'select_linked_pick' internally
(this is now more in line to how "Select Linked" works for meshes,
curves etc)

Differential Revision: https://developer.blender.org/D6823
2020-02-14 11:37:17 +01:00
bdd69570e2 make naming more consistent 2020-02-14 11:31:23 +01:00
3e533af702 make some functions more reusable 2020-02-14 11:29:49 +01:00
d9e4f5a7e8 Fix T73774: Error in Paint 'Clone from Image/UV Map' panel
This panel is not for 2D paint, IMAGEPAINT_PROJECT_LAYER_CLONE is only
ever used in projection painting, not 2D painting.
Add a proper poll for this.

Maniphest Tasks: T73774

Differential Revision: https://developer.blender.org/D6836
2020-02-14 11:12:35 +01:00
8363204347 use faster CPPType access 2020-02-14 11:03:32 +01:00
0e0f6a9216 provide faster access to builtin CPPTypes 2020-02-14 10:59:37 +01:00
9fef5a2db4 Fix T71971: Inset with depth and relative offset fails 2020-02-14 20:38:39 +11:00
2b83d33032 Merge branch 'master' into functions 2020-02-14 10:01:16 +01:00
59bae6d149 BMesh: stop BM_mesh_elem_index_validate from setting indices
This prevented indices from being set to temporary values,
which is needed in some situations.
2020-02-14 19:39:43 +11:00
f621f03e4b Fix console cursor offset
Also remove hard coded offsets.
2020-02-14 16:14:02 +11:00
bbe6b661df Cleanup: console/info headers 2020-02-14 15:06:03 +11:00
9e74c071b6 Cleanup: use 'textview_' prefix for internal functions 2020-02-14 14:00:55 +11:00
489cecb954 Cleanup: change textview 'unsigned char' to 'uchar' 2020-02-14 13:58:58 +11:00
69be8039e8 Fix T73784: Python console: incorrect wrapped line cursor position
Regression in aa919f3e82

Remove character margins, it complicated drawing & picking
to have one margin in pixels and a second margin in characters.

Replace this with an outer pixel-margin for drawing background colors.
2020-02-14 13:45:45 +11:00
75a5ea01c1 Cleanup/MSVC: Enable C++ conformance mode on compiler versions that support it.
MSVC has a conformance mode (/permissive-) where the C++ standard is more strictly
enforced. This mode is available on MSVC 15.5+ [1]

This patch enables this mode on compilers that support it and cleans up the few violations it threw up in the process.

- Mantaflow was using M_PI without requesting them using the _USE_MATH_DEFINES define to opt in to non default behaviour.
- Collada did not include the right header for std::cerr, this seemingly was fixed for other platforms already but put inside a platform guard.
- Ghost had some scoping issues regarding uninitialized variables and goto behaviour

Second landing of this patch, earlier commit was reverted due to some compiler configurations having slipped though testing

[1] https://docs.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance

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

Reviewed By: brecht
2020-02-13 17:13:07 -07:00
4af74f453d Freestyle: Add option for rendering Freestyle to a separate pass
This allows for more flexibility in Compositing compared to the
hardcoded alpha-over that is currently used.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6829
2020-02-14 00:33:50 +01:00
4526aa70e5 remove unused timers 2020-02-13 19:01:28 +01:00
1df94f6257 remove obselete BLI_math_cxx.h file 2020-02-13 18:58:34 +01:00
9564cd045a remove lazy init code 2020-02-13 18:44:50 +01:00
de23a2c35b remove lazy init usage 2020-02-13 18:39:38 +01:00
fd46b5e9fe remove lazy init usage 2020-02-13 18:33:56 +01:00
10927b6747 fix allocator usage for StringMap 2020-02-13 18:33:42 +01:00
ba1fcdf41a give test node a poll function 2020-02-13 18:33:29 +01:00
9906e5313b remove usage of lazy init macro 2020-02-13 18:21:15 +01:00
2e1d18600f remove unused code 2020-02-13 18:16:31 +01:00
b6572c5430 DRW: Fix color management in material/rendered mode
We only do exposure/gamma if not using scene lighting
2020-02-13 18:12:28 +01:00
e4343f6aa2 add license headers 2020-02-13 18:08:38 +01:00
953b8d6066 cleanup 2020-02-13 17:59:32 +01:00
f943f4f99c move rgba_b and rgba_f to separate file 2020-02-13 17:59:05 +01:00
350bc04f56 move float3 -> float2 conversion to different file 2020-02-13 17:55:15 +01:00
9933b5bc27 move float4x4 into separate file 2020-02-13 17:53:03 +01:00
d46273563e Add initial, very basic save/open & library linking blendfile tests.
Do not do much for now, but would have been enough to catch the crash
introduced the other day in linking code...
2020-02-13 17:48:00 +01:00
2e950e3b89 move float2 to separate file 2020-02-13 17:47:04 +01:00
dadabf5cf3 Py API: Add orphans_purge helper to bpy.data.
Much more convinient than trying to use outliner operator...
2020-02-13 17:46:57 +01:00
bb4b0cc954 move float3 to separate file 2020-02-13 17:45:26 +01:00
92e41bb1a8 Fix for fix (c) assert from own recent commit.
This master_collection thing is really, really annoyingly spreading all
over the place...
2020-02-13 16:56:31 +01:00
52f326ed48 Cleanup: add clarifying comment to ViewLayer->layer_collections 2020-02-13 16:33:50 +01:00
be40d86e35 Fix (unreported) private/embedded IDs being added to bpy.data.user_map() dict.
We do not want those here.
2020-02-13 16:23:42 +01:00
3ec3c5b557 Fix (unreported) fully broken bpy.data.user_map() helper.
The introduction of python instancing for ID data in 2.80 completely
broke the 'smart & efficient' hack of using a same py object as key for
initial quick check, since rebuilding the RNAPointer in the
BPy_StructRNA would actually affect the py instance of the first ID used
to generate that py object...

TL;DR: No need for this complex and unclear optimization anymore, since
we do not actually rebuild a whole py object anymore every time we call
`pyrna_id_CreatePyObject()` from a same ID pointer.
2020-02-13 16:23:42 +01:00
c9c013f53b libquery: Add 'owner id' to callback data.
In some cases it's important to always have a proper ID as reference,
e.g. whene generating data supposed to represent main data-base...
2020-02-13 16:23:42 +01:00
a1397e48b9 Cleanup old special cases from some libquery callbacks.
We now have proper flagging for horrible loopback pointers...
2020-02-13 16:23:42 +01:00
f28bb6992f Refactor libquery ID looper callback to take a single parameter.
Using a struct here allows to change given parameters to the callbacks
without having to edit all callbacks functions, which is always noisy
and time consuming.
2020-02-13 16:23:42 +01:00
0d750d7c06 Fix OptiX denoising when multiple CUDA streams are active 2020-02-13 15:22:26 +01:00
63bde1063f Cleanup: Remove some unnecessary OptiX device code 2020-02-13 15:22:26 +01:00
13e5e55f3f Cloth: Optimization in self collision
15% to 20% improvement in cloth simulation performance with
self-collision.

The idea is to reduce the number of collisions computed by avoiding
overlapping tris with the same combination (eg. (1,0) and (0,1)).

Reviewed By: zeddb

Differential Revision: https://developer.blender.org/D6474
2020-02-13 11:09:25 -03:00
1c81255cdb try socket decl in c++ 2020-02-13 15:07:02 +01:00
6022cd015f Revert "Cleanup/MSVC: Enable C++ conformance mode on compiler versions that support it."
It is breaking compilation on some configurations, revert for now while
i see what is wrong.

This reverts commit 9fe469c110.
2020-02-13 07:04:30 -07:00
90b41c7c2f create socket in new node 2020-02-13 12:52:29 +01:00
2630b4c231 new node type for testing 2020-02-13 12:43:01 +01:00
630da3b5e3 Initial builtin simulation node tree type 2020-02-13 12:04:41 +01:00
a88db0aa7d fix warning 2020-02-13 11:53:15 +01:00
f72b3f33a0 define UNUSED_FUNCTION_NDEBUG macro 2020-02-13 11:53:05 +01:00
2c077e741d test commit with different email 2020-02-13 11:12:18 +01:00
94c410a5af Merge branch 'master' into functions 2020-02-13 11:07:28 +01:00
d1cd3ec9ba Fix T67649: clarify description of node update method 2020-02-13 11:02:12 +01:00
0840469ccd Fix T71112: UILayout.activate_init when used in popups that refresh 2020-02-13 17:06:29 +11:00
57d0e4969d Fix crash using 'activate_init' in popup menus
Reported in T71112
2020-02-13 17:02:52 +11:00
60066b0b80 Fix crash using '--debug-handlers' command line argument 2020-02-13 15:19:49 +11:00
d1bd33407d Cleanup: pass const variables 2020-02-13 14:14:33 +11:00
f874f6817d Fix T73727: Invalid event.type for Gizmo.modal callback 2020-02-13 13:55:37 +11:00
eaea5c8904 Workbench: Fix depth of field background being glitchy 2020-02-13 01:55:08 +01:00
10b04fa316 Revert "VSE: Add option to select handles with box selection"
This partially reverts commit 5314161491.

Conflicts with Emulate "Middle Mouse Button".
This feature should be accessible under all supported configurations.
2020-02-13 11:33:03 +11:00
d051dd01ed Workbench: Fix premultiply alpha issue in transparent material 2020-02-13 01:24:40 +01:00
a40d9ce553 Overlay: Fix non meshes object disappearing if smooth wire is not enabled 2020-02-13 01:07:15 +01:00
9fe469c110 Cleanup/MSVC: Enable C++ conformance mode on compiler versions that support it.
MSVC has a conformance mode (/permissive-) where the C++ standard is more strictly
enforced. This mode is available on MSVC 15.5+ [1]

This patch enables this mode on compilers that support it and cleans up the few violations it threw up in the process.

- Mantaflow was using M_PI without requesting them using the _USE_MATH_DEFINES define to opt in to non default behaviour.
- Collada did not include the right header for std::cerr, this seemingly was fixed for other platforms already but put inside a platform guard.
- Ghost had some scoping issues regarding uninitialized variables and goto behaviour

[1] https://docs.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance

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

Reviewed By: brecht
2020-02-12 12:49:34 -07:00
a2a8932981 cleanup 2020-02-12 20:32:48 +01:00
dd9dfadaac remove "Select Linked" from the particle select and context menu
The operator in its current state is based on mouse position and doesnt
make sense to be called from a menu.
(In fact it should be called 'select_linked_pick' internally and a
separate 'select_linked' should be implemented similar to how "Select
Linked" works for meshes, curves etc -- see D6823 for this)

Differential Revision: https://developer.blender.org/D6822
2020-02-12 19:36:01 +01:00
9aae62a59b Particles: remove unused sel_col and nosel_col from
CacheEditrPathsIterData and PTCacheEdit

Followup to 80cecee5b7.

ref D6725
2020-02-12 19:17:19 +01:00
80cecee5b7 Fix T68788: Particle Edit Mode Hair vertex doesn't follow vertex theme
color

Selection and grooming only ever happens on hair keys (vertices), so
makes sense to use that theme color.

Sidenote: `CacheEditrPathsIterData` and `PTCacheEdit` have `sel_col` and
`nosel_col`, these can go, will do in a separate commit.

Maniphest Tasks: T68788

Differential Revision: https://developer.blender.org/D6725
2020-02-12 19:03:28 +01:00
e4a3186aad fix after merge 2020-02-12 19:02:03 +01:00
dc89a3ec7c Merge branch 'master' into functions 2020-02-12 19:00:59 +01:00
5527cd4ba0 Codesign: Attempt to make macOS codesign more reliable
Is still sometimes .ready file appears prior to an actual archive.
2020-02-12 18:57:57 +01:00
6da097136c Fix T59271: Curves with Extrude still show curve
Compared to 2.79, this also has the benefit of actually showing the curve
again if you set both bevel start and end to 0.0 for example.

Maniphest Tasks: T59271

Differential Revision: https://developer.blender.org/D6168
2020-02-12 18:44:39 +01:00
8e4d5740c8 GPencil: Disable multisampling as it is not supported anymore
Another AA method is comming in the GPencil refactor.
2020-02-12 18:43:10 +01:00
00e012d564 GPencil: Fix colormanagement broken by recent refactor
This is a quick fix that should work until the GPencil refactor lands.
2020-02-12 18:21:53 +01:00
c10e05ceb8 Fix T69697: Remove not working "Inherit Scale" option from menu
The option can still be modified in the bone settings in the properties
editor. In the future a correct menu entry (using an enum) can be
added back. For that, an operator like `wm.context_collection_boolean_set`
could be added for enums.
2020-02-12 17:02:10 +01:00
fffb185dbf DRW: Fix debug drawcalls and annotation drawing 2020-02-12 16:55:05 +01:00
6389471c40 Fix NLM denoiser no longer working with OptiX after recent commit 2020-02-12 15:46:30 +01:00
83c6f09746 Harmless Fix for recent cleanup.
For some reason that file did not get included in the commit...
2020-02-12 14:35:33 +01:00
d104c77af8 Fix Cycles compiler warnings after recent commit 2020-02-12 14:29:14 +01:00
709012187a Fix Cycles build errors and clang-format after recent commit 2020-02-12 14:14:02 +01:00
153e001c74 Cleanup: Move common CUDA/OptiX Cycles device code into separate file
This reduces code duplication between the CUDA and OptiX device implementations: The CUDA device
class is now split into declaration and definition (similar to the OpenCL device) and the OptiX device
class implements that and only overrides the functions it actually has to change, while using the CUDA
implementation for everything else.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6814
2020-02-12 13:11:32 +01:00
Cody Winchester
cc085e228d Modifiers: Vertex Weight Modifiers add invert vgroup option
Adds the invert vgroup mask option to the Vertex Weight modifiers.

These 3 modifiers share the same functions so they needed to be modified at the same time. They are all setup the same with the invert vgroup option being added. I had to add a flag to the Mix modifier but the others I use the existing flags.

Differential Revision: https://developer.blender.org/D6819
2020-02-12 12:43:02 +01:00
24b5d5aa61 Modifiers: Weld Modifier - simplify invert_vgroup code
No functional change
2020-02-12 08:35:27 -03:00
a1e50cfe6b Weight Paint: add a pie menu for locking and unlocking vertex groups.
Provide different options for locking and unlocking vertex groups
using bone selection, accessible via a pie menu triggered via the
'K' hotkey. To implement a variety of operations, extend the old
operator with a new option to mask it by bone selection. If the
X Mirror option is enabled, selection is automatically mirrored.

This follows D6533 as the next step in improving accessibility of
vertex group locking during weight painting.

Differential Revision: https://developer.blender.org/D6618
2020-02-12 14:08:07 +03:00
Cody Winchester
cd57c9e310 Modifiers: Weld Modifier add invert vgroup option
Adds the invert vgroup option to the weld modifier.

Differential Revision: https://developer.blender.org/D6818
2020-02-12 11:05:35 +01:00
0e15850a7e Cleanup: clang-format. 2020-02-12 10:46:53 +01:00
Cody Winchester
e32457952b Modifiers: Hook Modifier add invert vgroup option
Adds the invert group optin to the hook modifier.

Differential Revision: https://developer.blender.org/D6817
2020-02-12 10:34:35 +01:00
Cody Winchester
1f28af6a79 Modifiers: Fix bug where UVWarp Modifier would try to get bone matrix from a non armature object
There is a bug where the UVWarp modifier will stop working if an armature bone is set as the Bone To target and then later changed to a non armature object without clearing the Bone To string property. The modifier will still think it is needing a bone matrix and not properly use the object matrix.

A simple fix by adding a check for the object being an armature as well as the bonename string being set.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D6809
2020-02-12 10:18:52 +01:00
cc6defa244 Fix T73446: WorkSpace ID properties not saved 2020-02-12 18:19:27 +11:00
a2ce3b342a Cleanup: clang-format 2020-02-12 18:19:01 +11:00
df1e9b662b Cleanup: Fix build warnings from OSL shader compilation
There were to copies of stdosl.h one from stock OSL
and one in the cycles tree augmented with cycles
specific closures.

moved the cycles ones to stdcycles.h and copied
the stock stdosl.h and accompanying headers from
the OSL shader folder.

for further details see D6812.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6812
2020-02-11 21:40:23 -07:00
6a28d14f72 Fix T73740: Auto-key "Only Available" de-selects f-curves
This was especially bad with "Only Selected Curve Keyframes",
effectively making f-curves un-editable on each insertion.
2020-02-12 14:26:21 +11:00
88210a6ddf Cleanup: warning 2020-02-12 12:08:14 +11:00
7e99e396a9 Fluid: Naming and UI visibility fixes for some parameters
Cleaned up some inconsistencies in the UI, i.e. corrected name for velocity factor and fixed UI visibility for fractional obstacle parameter.
2020-02-12 00:45:21 +01:00
df45257ec5 Sculpt: Split normal radius and area radius
This enables an extra layer of control in the sculpt brushes.
For now it is enabled only in Scrape, but it should work in all brushes (like normal radius). In the future it may also be enabled in other brushes.
You can tweak in this property in the scrape brush to achieve a much better behavior when working on curve surfaces and control how much volume you want to trim. In most cases, it also fixes the bug where the brush keeps trimming in the same area without disabling accumulate.
It should be possible to fix some other artifacts in other brushes by tweaking this default property.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D5993
2020-02-11 20:48:01 +01:00
6ee6a42d10 Sculpt: Clay Strips Tip Roundness property
This patch allow to change the brush tip shape between a square and a
circle using a brush property.

After this change we are no longer testing the distance against a cube
(the Z axis is not used). I did not test this in depth, but if it does
not produce any artifacts I think we can keep it this way instead of
adding more complexity to the code.

In this new distance test the brush falloff is only applied on the
rounded parts of the square to avoid sharp artifacts in the
diagonals. Because of this, the round version is much softer than
the square one. The planned hardness property will fix this, but
this can also be avoided by setting the fallof to a custom curve.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6165
2020-02-11 20:11:44 +01:00
0ab7e32158 Pose Brush: Option to disable the IK anchor point
The IK chain was using an anchor point by default as it makes sense for
posing, but for creating curved shapes it is useful to be able to
disable it.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6584
2020-02-11 19:44:14 +01:00
015d5eda88 Sculpt: Clay Thumb Brush
This brush simulates deforming clay with your fingers, accumulating
material during the stroke. It has a plane that tilts during the stroke
in the front part of the brush to achieve this effect.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6238
2020-02-11 18:57:07 +01:00
f1f2d9fe74 Fix T73442 Overlay: Wireframe infront buggy in material shading mode
This was caused by the refactor. The wireframe was drawn with the incorrect
depth buffer.

Should be included in 2.82
2020-02-11 18:38:10 +01:00
38589de10c Cycles: Add support for denoising in the viewport
The OptiX denoiser can be a great help when rendering in the viewport, since it is really fast
and needs few samples to produce convincing results. This patch therefore adds support for
using any Cycles denoiser in the viewport also (but only the OptiX one is selectable because
the NLM one is too slow to be usable currently). It also adds support for denoising on a
different device than rendering (so one can e.g. render with the CPU but denoise with OptiX).

Reviewed By: #cycles, brecht

Differential Revision: https://developer.blender.org/D6554
2020-02-11 18:03:43 +01:00
35490c3ead Fix T73656: Use BKE_brush_alpha_get in texture paint
The code was using brush->alpha directly, so the alpha value from
UnifiedPaintSettings was not used when eneabled.

Reviewed By: brecht

Maniphest Tasks: T73656

Differential Revision: https://developer.blender.org/D6804
2020-02-11 17:52:17 +01:00
Yevgeny Makarov
2fb9285371 Fix T70039, T68707: issues when opening .blend file from Finder on macOS
* Missing close dialog displayed to warn about unsaved changes.
* No reaction when the file was opened on a different desktop.

Differential Revision: https://developer.blender.org/D6765
2020-02-11 17:45:02 +01:00
Charlie Jolly
7b0aca2a53 Nodes: Add dynamic label support for Math Nodes
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6375
2020-02-11 16:09:25 +00:00
64e65442a1 Cleanup: Sculpt/Paint, use correct types and iterator variable declaration
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6788
2020-02-11 17:02:29 +01:00
395e91b87c Cleanup: Sculpt, Comment formatting
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6792
2020-02-11 16:41:12 +01:00
af6ba4dce5 Fix T73706: Crash after disabling dyntopo with multires modifier
ss->multires is set in sculpt_update_object, which is not called just
after disabling dyntopo, so it needs to be checked before running
reshapeFromCCG

Reviewed By: campbellbarton, brecht

Maniphest Tasks: T73706

Differential Revision: https://developer.blender.org/D6801
2020-02-11 16:38:46 +01:00
efbe4fd6c2 Merge branch 'blender-v2.82-release' 2020-02-11 11:46:04 -03:00
c939b4df18 Fix Attempt to free NULL pointer
Assert when snapping `Selection to ...` but without objects.
Missed in the last commit.
2020-02-11 11:45:07 -03:00
Matthias Ellerbeck
63de813914 Node Editor: node resize can now be cancelled, like other operators
Differential Revision: https://developer.blender.org/D6800
2020-02-11 15:32:24 +01:00
Alessio Monti di Sopra
4aa0e2136c UI: improve graph editor channels drawing
The channel color squares are no longer positioned under the visibility
icon, since contrast is poor. Instead they are thinner and drawn on the
left side, before the visibility icon. If the curve is hidden, the color
gets less opaque.

Differential Revision: https://developer.blender.org/D5882
2020-02-11 15:30:30 +01:00
Yevgeny Makarov
bf361fc9a0 Fix T64024: monitor/fullscreen switching on macOS shows red line artifacts 2020-02-11 15:30:30 +01:00
dac4e48bb7 Fix Attempt to free NULL pointer
Assert when snapping `Selection to ...` but without objects.
2020-02-11 11:25:36 -03:00
804e90b42d DRW: Color Management improvement
Reviewed By: brecht sergey jbakker

Differential Revision: http://developer.blender.org/D6729
2020-02-11 15:19:04 +01:00
58cdab8b97 install_deps.sh: correct clang/llvm download URLs 2020-02-11 15:02:45 +01:00
3657bb5141 Fix: Build error on windows
USD "library" directory was not set, leading to an error
during the INSTALL phase.
2020-02-11 06:51:18 -07:00
4e216b1025 Merge branch 'blender-v2.82-release' 2020-02-11 14:14:12 +01:00
3dcddf83bf Fix T73675: Leaving exit mode tags all objects for update
This is an oversight of a fix for T69834, where I didn't realize the
ED_object_editmode_exit_ex() function is called for all objects as an
opposite of only the ones which were in edit mode.

Seems a simple fix: just move tag into a check that object was in the
edit mode prior to tag.

Differential Revision: https://developer.blender.org/D6808
2020-02-11 14:04:13 +01:00
2e80265dc3 Merge branch 'blender-v2.82-release' 2020-02-11 22:15:05 +11:00
d2ff21e75d Fix memory leak with 2D image painting
Regression from c30d6571bb
2020-02-11 22:12:37 +11:00
be8879718e Documentation: add note on altering data from frame change handlers
Blender can crash while rendering, when scene data is changed from within
a `frame_change_pre` or `frame_change_post` callback function. This results
in bug reports like T60094, T67627, and T73530. Until this is properly
resolved, this limitation should be documented.

No functional changes.
2020-02-11 11:00:12 +01:00
757da61606 Fix T68243: Python sqlite module not working on macOS 2020-02-11 10:17:35 +01:00
baa4b5e93c CLeanup: clang-format 2020-02-11 18:45:08 +11:00
452674db30 Cleanup: minor edit to last commit
Avoid repeating the fallback return.
2020-02-11 18:24:30 +11:00
c5d0a23204 Fix T73348: Surface Deform distortion on bind with small faces
Thanks to @CodyWinch for finding the root cause
2020-02-11 18:21:02 +11:00
e08c2128af Merge branch 'blender-v2.82-release' 2020-02-11 17:20:31 +11:00
3a1af7444c Fix T73682: Sampling color fails for float images 2020-02-11 17:13:33 +11:00
Kai Jægersen
5911b6b313 Fix T73695: line highlight jitters with smooth scroll 2020-02-11 16:27:51 +11:00
50d5c03e2d UI: Use popup dialog for make single user from operator search
Use a popup since the default action was to do nothing,
the user would always need to access the redo panel.

Resolves T73711.
2020-02-11 14:10:22 +11:00
ad2a8400e9 Fix T56108: Crash editing corrupted vertex groups
While the file in this report had corrupted values,
this is avoidable without adding any extra overhead.

Use unsigned vertex group indices since we don't need negative values,
this is an alternative to checking they aren't negative in many places.

Vertex group values over INT_MAX is still considered invalid,
so any accidental unsigned wrapping won't be silently ignored.
2020-02-11 13:20:49 +11:00
56a4ee3fdb Cleanup: remove duplicate, commented structs 2020-02-11 12:23:49 +11:00
3e6e9ce01b Cleanup: extra semicolons, comma use, undeclared vars 2020-02-11 12:04:50 +11:00
9f07c03d20 Cleanup: unused headers 2020-02-11 11:54:50 +11:00
906b8a241a Cleanup: add license header, use header guards 2020-02-11 11:37:35 +11:00
a66b9490a1 Doc: update to T73699 fix
It's important to refer to "other selected objects" in this case.
2020-02-11 11:29:19 +11:00
7d6c08beb8 Doc: simplify T72883 fix
Code example made it seem setting the active object was more complex
than a single assignment.
2020-02-11 11:27:01 +11:00
1c61f3e018 RNA: Raise error assigning an active object which doesn't exist
Previously this silently cleared the view layers active object.
2020-02-11 11:21:26 +11:00
189e96ba68 Fix T72883: Correct Context Usage 2020-02-10 14:08:34 -05:00
974dc28476 Fix T73699: Unhelpful error message when trying to knife project a manifold object 2020-02-10 13:38:44 -05:00
51b67218ae Revert "Sculpt: Remove partial viewport updates from sculpt stroke code"
This reverts commit 394b48029c.

Leaving this here does not affect performance in any significant way and it may be useful in the future.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6688
2020-02-10 19:41:35 +01:00
78cf61cc62 Fix T72690: Do not draw points behind the viewport camera in the paint cursor
In some situations the symmetry point may be behind the camera, so the
projection is inverted and it looks wrong. This avoids drawing points in
screen space when they are behind the camera.

Reviewed By: jbakker

Maniphest Tasks: T72690

Differential Revision: https://developer.blender.org/D6487
2020-02-10 19:39:26 +01:00
08d1df4729 Fix T66349: Add missing update for face orientation overlay
This forces the full geometry when that overlay is enabled.
I would rather not support this and leave that bug as a know issues/
limitation because this is terrible for performance and people may not
be aware that by enabling the option they are disabling the
optimization.

Reviewed By: jbakker

Maniphest Tasks: T66349

Differential Revision: https://developer.blender.org/D6552
2020-02-10 19:37:48 +01:00
Dalai Felinto
a2248e2ec4 Cleanup: Fix warning (unused variable) 2020-02-10 19:11:23 +01:00
e75e29ee47 Cleanup: Rename BKE_library_override_ functions to BKE_lib_override_library_
pqrt of T72604.
2020-02-10 18:05:19 +01:00
c6e28f6513 Updated install_deps to latest required OSL/LLVM. 2020-02-10 17:36:06 +01:00
c92163b2b0 CTest: Disable the cross test from the avxf unit tests.
Test fails on AVX2, I'll look into this but until the
cause is determined the test will be disabled
2020-02-10 09:27:11 -07:00
f3a3a976b7 Refactor: move Library-specific functions into proper BKE_library file.
Even though we do not have much of those, this might change in the
future, and in any case having specific functions for this ID type in
generic `BKE_lib` area was really confusing.
2020-02-10 17:10:17 +01:00
ddad044cfe Fix mismatch in BKE headers' multi-include safeguards naming.
Forgot to update those in recent `BKE_lib_` files renames.
2020-02-10 16:54:24 +01:00
872ac349ad Cleanup CLOG identifiers in BKE_lib' implementation files. 2020-02-10 16:31:45 +01:00
810088bf9b Merge branch 'blender-v2.82-release' 2020-02-10 16:26:44 +01:00
d08ccd526f Fix unreported: Packing/unpacking errors don't mention tiled images
Thanks to @dfelinto for spotting this!
2020-02-10 16:25:22 +01:00
b4bf6b9cc9 remove pad_up function 2020-02-10 16:23:14 +01:00
77208a0871 GPencil: Fix unreported missing annotation popover menu
This was introduced when annotations was splited.
2020-02-10 16:21:54 +01:00
36b7f5d27e Fix T73713: Tiled textures (UDIM) getting lost when saving the .blend but not the textures
The issue here is simple, IMA_SRC_TILED was missing from a check for whether the image should
be saved.

Note that tiled images won't be automatically saved if they have never been saved before.
For single images this is handled by packing them, but packing of tiled images isn't
supported yet.

However, in that case the file closing dialog will at least show a warning now instead of
completely ignoring tiled images.
2020-02-10 16:12:45 +01:00
ec6fcac628 Cleanup/Refactor: Move ID deletion into its own .c file.
Having functions defined in `BKE_lib_id.h` implemented into
`lib_remap.c` was confusing at best.

Besides trivial code splitting and header includes cleanup, had to add a
new `lib_intern.h` header for callbacks used by both remapping and
deletion code.
2020-02-10 15:56:11 +01:00
f8df6286c2 BLI: add utilities for defining non-movable and non-copyable classes
Structs and classes can subclass these member-free classes privately.
Then they become non-movable, non-copyable or both.
2020-02-10 15:33:39 +01:00
ec116e3d49 USD: Install USD library via install_deps.sh
This commit adds the download, extract, patch, build, and install of the
Universal Scene Description (USD) library to the `install_deps.sh`
script.

Reviewed By: mont29, LazyDodo

Differential Revision: https://developer.blender.org/D6478
2020-02-10 15:07:56 +01:00
cd48b132ff Cleanup: Add basic doc about each BKE_main and BKE_lib files.
Including expected prefixes for functions in those files.

Part of T72604.
2020-02-10 15:05:54 +01:00
2d36836616 cleanup dot export 2020-02-10 14:46:44 +01:00
0b9888d038 fix after merge 2020-02-10 14:40:04 +01:00
43e2ca8fd1 Merge branch 'master' into functions 2020-02-10 14:23:37 +01:00
de09db6b4d Fix missed include update in recent BKE_library renaming. 2020-02-10 14:21:34 +01:00
8cda8bef1e Merge branch 'master' into functions 2020-02-10 14:14:16 +01:00
68cc982dcb BLI: improve various C++ data structures
The changes come from the `functions` branch, where I'm using
these structures a lot.

This also includes a new `BLI::Optional<T>` type, which is similar
to `std::Optional<T>` which can be used when Blender starts using
C++17.
2020-02-10 14:09:01 +01:00
Alex Fuller
76208a5670 Cycles: internal support for constant object/mesh attribute values
None are currently exported from Blender, this fixes the Cycles side
implementation.

Differential Revision: https://developer.blender.org/D6794
2020-02-10 13:52:23 +01:00
ff21d33bfe Don't allow getting mutable reference to vector set 2020-02-10 13:32:02 +01:00
bae72c4b8e remove unused classes 2020-02-10 13:27:30 +01:00
11e9ad412e UI: Graph Editor Show Cursor panel
Make the Graph Editor Cursor panel fit in and use the split layout.

Also removed the snap buttons, since they were only a subset of the snapping possibilities, all of which are in Key > Snap anyway, and also in the context menu.

Update the theme to use correct hierarchy progression like in other editors.

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

Reviewed by Brecht van Lommel
2020-02-10 13:26:08 +01:00
23b52a1958 remove unused class 2020-02-10 13:24:46 +01:00
56116bbdf4 Cleanup/refactor: Rename BKE_library files to BKE_lib.
Note that `BKE_library.h`/`library.c` were renamed to
`BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here.

Part of T72604.
2020-02-10 13:00:42 +01:00
6218f315bb remove unused class 2020-02-10 12:58:20 +01:00
3f65050354 remove unused classes 2020-02-10 12:53:44 +01:00
ae863f34df Tracking: Clarify calculation of camera matrix for object solver
It might be confusing why matrix is constructed from scratch rather
than using already calculated one.
2020-02-10 12:48:45 +01:00
0f07848efe Tracking: Cleanup, more clear variable name 2020-02-10 12:48:45 +01:00
a605775298 Tracking: Fix usage PLACEHOLDER function
Don't use BKE_view_layer_context_active_PLACEHOLDER which is marked
as "never use this".

In fact, it isn't needed to lookup for camera in the tracking function
at all: camera object is always explicitly passed to it.
2020-02-10 12:48:45 +01:00
f363ff348c remove temporary allocator 2020-02-10 12:42:24 +01:00
379ee3e527 PY API doc generation: Add option for multi-tasking sphinx. 2020-02-10 12:38:03 +01:00
003dc7ffc9 fix after merge 2020-02-10 12:26:14 +01:00
14d1dc5df5 Fix T61138: Difficulty in aligning handles of Stroke of type Curve
The user has preference to select the center point for alignment.
But in this case, it was not available for selection.

Also prioritizes selection of the middle point over the handles.

Reviewed By: #user_interface, brecht

Differential Revision: https://developer.blender.org/D6780
2020-02-10 08:18:04 -03:00
605928c15b Merge branch 'master' into functions 2020-02-10 12:01:07 +01:00
795c4a3462 GPencil: Fix unreported missing annotation popover menu
This was introduced when annotations was splited.
2020-02-10 11:56:00 +01:00
9880bebd1a improve linear allocator 2020-02-10 11:47:17 +01:00
956fd64653 Cycles: Fix linking error of new avxf unit tests
Was happening on macOS. The reason of this is because OpenImageIO
depends on boost, so it is to be passed to the linker after the
OpenImageIO libraries.
2020-02-10 11:22:10 +01:00
39b3327490 Fix: Missed this line in last commit 2020-02-10 11:04:34 +01:00
6a841acab6 UI: Bone Custom Shape layout
The layout was somewhat poor - hard to see what relates to the custom object, and also weirdly we show the Wireframe toggle above the Custom Object control, even though it can only be active if a bone has a custom object set.

Instead, I grouped everything in a Custom Shape sub-panel and used greying out.

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

Reviewed by Brecht van Lommel
2020-02-10 10:53:59 +01:00
9677fbe029 rename MonotonicAllocator to LinearAllocator 2020-02-10 10:51:18 +01:00
dbf48758d9 Fix T73681: Python exception adding Empty objects via object_data_add
with "Enter Edit Mode" enabled

It is valild to add Empties this way, but we cannot enter editmode on
those.
2020-02-10 10:31:02 +01:00
6989f9be3d add StringRef.substr method 2020-02-10 09:53:33 +01:00
Kai Jægersen
7c54de4ab3 Fix T73696: Text editor scroll glitch
Scrolling a short text buffer could show the cursor offset.
2020-02-10 17:04:01 +11:00
cdfaddbb1d Cleanup: spelling 2020-02-10 10:33:00 +11:00
068f4e4592 Cleanup: sort file, struct lists 2020-02-10 10:15:59 +11:00
8a9c4bd907 Cleanup: keymap formatting, unused arg 2020-02-10 10:07:58 +11:00
5314161491 VSE: Add option to select handles with box selection
Patch adds an "Handle" option to the `SEQUENCER_OT_box_select` operator,
that allows to select the handles instead of whole strips.
Feature is mapped to Alt key modifier

A difference from the proposed design in T70730 is that covering the entire strip with the box actually selects both handles.

Reviewed By: iss

Differential Revision: https://developer.blender.org/D6372
2020-02-09 17:59:13 +01:00
f780057d52 Merge branch 'blender-v2.82-release' 2020-02-09 17:27:15 +01:00
5e30bd43f8 Fluid: Optimization for fluid domain obstacle boundary handling
This fix should especially improve liquid obstacles boundaries, i.e. help with the problem of particles sticking to the surface.
2020-02-09 17:25:00 +01:00
a048354e9f Fluid: Fixed file formats for script exporter
File formats in the exported scripts were using hardcoded file extensions and not the ones specified in the UI.
2020-02-09 17:17:24 +01:00
86e24ea10c Fluid: Fixes for fluid guiding
Fluid guiding functionality was broken in the bake / read cache loop in fluid.c. Committing this to the release branch as otherwise fluid guiding would not have worked as expected (i.e. not at all).
2020-02-09 17:15:41 +01:00
4a08eb0707 Fluid: Updated manta pp files
Includes the OpenVDB read/write functions for int grids. This essential for the resume bake functionality in modular fluid caches.
2020-02-09 17:09:00 +01:00
19361bf2f4 Fix eigen/openmp link error in some build configurations 2020-02-09 16:29:37 +01:00
8e981efe38 3D View: support axis views with axis-aligned roll
Previously any of the named views could not have any roll,
this commit supports roll as long as it's axis-aligned (90,180,270 deg).

This is useful for snapping to views,
an improvement on cebd025e02.
2020-02-10 01:50:23 +11:00
89ce270f61 BLI_string_utils: add utility to join a string into a fixed buffer 2020-02-10 01:33:47 +11:00
Bataev Artem
cebd025e02 3D View: check view quaternion alignment which orbiting
This makes auto-perspective work as expected
when orbiting out of a snapped view.
2020-02-09 11:37:56 +11:00
2be20e9ece Cleanup/CMake: Fix superfluous warning of WITH_BOOST being turned off
The check for turning boost off did not actually check if WITH_BOOST
was on to start with leading to a superfluous warning during configuration.
2020-02-08 17:17:28 -07:00
94c8bbec9c Windows: Improve rebuild.cmd
Previously the MSVC environment was setup every time using vcvarsall.bat
when you ran you ran rebuild.cmd, Generally not an issue but after many
rebuilds on the same console, it grows the path environment variable
beyond what is supported and building breaks.

This patch adds a check to see if the environment is setup already
and skips the call to vcvarsall.bat

Also cleans up the double build in the msbuild's version of rebuild.cmd
install.vcxproj will build all that is needed, so no need to do a regular
build first.
2020-02-08 17:14:47 -07:00
02495f1e3c Cycles: Add avxf unit tests.
Differential Revision: https://developer.blender.org/D3706

Reviewers: brecht
2020-02-08 16:01:28 -07:00
6a1414dc58 Build_environment: Fix unwanted exports from oidn on windows.
oidn puts dllexport on all its functions causing the
blender binary to export these symbols.

this patch fixes this unwanted behaviour.

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

Reviewers: brecht , sergey
2020-02-08 15:32:19 -07:00
01cb35cc8f Fix Cycles error with hair and spatial splits after recent changes 2020-02-08 23:26:09 +01:00
a5a9493ffd UI: Cleanup Liquid Settings Code Style
This makes the code more consitent with the rest of blender

The `fractions_threshold` was changed to be active than enabled which is 
also more consistent. This needs to be changed in other areas also.
2020-02-08 17:20:03 -05:00
8c509f98e1 Build_environment: Fix unwanted exports from libxml on windows.
libxml puts dllexport on all its functions causing the
blender binary to export these symbols.

this patch fixes this unwanted behaviour.

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

Reviewers: brecht , sergey
2020-02-08 15:04:09 -07:00
67d3613d1a Build_environment: Freetype 2.10.1
Freeetype 2.9.1 tags dllexport on most of its functions so these
are now exported from the blender binary. (Same issue as D6563
which fixed it for USD)

Issue has already been fixed upstream so a simple version bump
fixes it.

This patch bumps freetype to 2.10.1

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

Reviewers: brecht , sergey
2020-02-08 14:23:28 -07:00
9ff3482af4 Fix Cycles embree render crash after recent refactor 2020-02-08 21:28:50 +01:00
fc412be5ac Cleanup: fix compiler warning 2020-02-08 21:28:50 +01:00
b9c9b00171 Build_environment: OSL 1.10.9 / llvm 9.0.1
OSL 1.10.9 fixes osl-bug 866 [1] which is long standing issue
on windows where paths get un-escaped and osl breaks when you
install it to for instance c:\blender-tests\new-boolean

This patch bumps osl to 1.10.9, and since osl is llvm's
only consumer, llvm/clang were bumped 9.0.1

Removed some of the patches that were no longer needed

Builds and passes all tests on windows and linux

[1] https://github.com/imageworks/OpenShadingLanguage/issues/866

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

Reviewers: brecht
2020-02-08 13:01:31 -07:00
a7106883e8 Merge branch 'blender-v2.82-release' 2020-02-08 14:00:44 -05:00
2bfc0da301 Update RNA Manual References 2020-02-08 13:58:26 -05:00
a010d97204 Cleanup: remove old VSE prefetching code.
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6774
2020-02-07 23:49:37 +01:00
4e2e28b8c3 Merge branch 'blender-v2.82-release' 2020-02-07 19:38:33 +01:00
68221b7eba Fluid: Fixed cache reading issue with larger resolution noise grids
Important fix that needs to go into the release. The upscaled noise cache was not read into upscaled grids.
2020-02-07 19:37:44 +01:00
b05651199b Code Quality Day: Comment formatting in bmesh_bevel.c 2020-02-07 13:32:02 -05:00
47d13fecfb Fix T73660: Hide envelop option for Grease Pencil weights generation
As this feature is not supported yet, it's better to hide for grease pencil.
Differential Revision: https://developer.blender.org/D6777
2020-02-07 17:58:45 +01:00
03000549fb remove poll for OBJECT_OT_parent_clear
This works on selected_editable_objects, so no active object mandatory.

After deletion of the active object and using slection tools such as
e.g. box select, the lack of an active object would prevent this
operator from being called without good reason.

Also cannot think of any other existing poll that would really make
sense (Editor type, ...).

ref T68975

Maniphest Tasks: T68975

Differential Revision: https://developer.blender.org/D6773
2020-02-07 17:31:40 +01:00
11df80fc6d Cleanup: add extern "C" 2020-02-07 17:23:50 +01:00
c2e80cfaa3 BLI: add index_range method to some data structures
This can be used to iterate over all indices with less code.
2020-02-07 17:23:25 +01:00
f3db5a0965 Cleanup: Improve usage of extern "C" 2020-02-07 17:22:11 +01:00
974eca79d3 Cleanup: Animation, split driver evaluation into separate functions
No functional changes.
2020-02-07 16:42:14 +01:00
41ada0381c Cleanup: Animation, reduce indentation by reordering conditions
This turns error condition checks into precondition checks, grouping the
non-error functionality together towards the bottom of the function and
error-handling functionality towards the top.

No functional changes.
2020-02-07 16:42:14 +01:00
677e027f20 Fix T73625: GPencil array offset wrong whe use Scale or Rotation
This is not 100% a bug but a design change. The old method used the object origin as pivot point for Scale a nd Rotation, so when you moved the stroke in edit mode, the whole array ittems where offset because the pivot point distance changed.

Now, before applying scale and rotation, the stroke is moved to object origin to keep the offset when scale or rotate, so these transformations are done in stroke local space.
2020-02-07 16:36:23 +01:00
faf08954d5 Cleanup: Rename BKE_library_idmap file to BKE_main_idmap
Part of T72604:
> Proposal: BKE_library and BKE_main API naming: prefixes conventions
2020-02-07 16:29:02 +01:00
f2df4e0076 Build optimization: Compile glew for size rather than speed with msvc.
Glew.obj is one of the more expensive targets we have to build clocking in
at 34.907 seconds.

The root cause [1] is the msvc inliner is not super thrilled with the
glewIsSupported supported function, this patch changes the buildflags
of extern_glew to optimize for size rather than speed.

Given glew is only in play at initalization time there will be no
performance impact.

Time to build glew.obj

Before: 34.907s
After :  1.961s

[1] https://developercommunity.visualstudio.com/content/problem/732941/slow-compilation-of-glewc-for-visual-studio-2019-x.html

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

Reviewers: brecht, sergey, fclem
2020-02-07 07:35:17 -07:00
Dalai Felinto
08a4cb0727 Cleanup: make format
Remember to run `make format` after cleanups/renames/...
2020-02-07 15:29:46 +01:00
6477fcf40f BuildSystem/Cleanup: Fix warning behaviour regarding library dependencies
Adding USD to a lite build fails to build due to boost errors, when you turn
boost on and rebuild still boost errors, boost was silently turned off since
it was not deemed needed. Once boost was forced on, it still fails due to TBB
being off.

This patch fixes:

- The Silent disabling of boost
- Add a check that USD is is not on before doing that
- move the TBB checks to a central location rather than the individual platform files
- Add USD to the TBB checks.

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

Reviewers: brecht, sybren
2020-02-07 07:27:40 -07:00
1a93bc2db8 Merge branch 'blender-v2.82-release' 2020-02-07 15:21:26 +01:00
ffcccf654c OpenVDB: Added missing macros in fluid wrapper file
These were needed to compile when WITH_FLUID=1 and WITH_OPENVDB=0.
2020-02-07 15:19:17 +01:00
6f3e498e7d Cleanup: use of 'unsigned'
- Replace 'unsigned' used on it's own with 'uint'.
- Replace 'unsigned const char' with 'const uchar'.
2020-02-08 01:02:18 +11:00
80415ee203 Cleanup: remove legacy OpenGL viewport clipping code 2020-02-08 00:38:40 +11:00
91c64b5ca3 CodeCleanup: Remove unused studiolight algorithm
Code was originally added to test a different approach to calculate the
irradiance buffer. The approach was just to slow so we never used it.

This change will remove it from the code base
2020-02-07 14:19:08 +01:00
636fe3df0e CodeCleanup: Workbench
Code was already hidden by a compile directive.
2020-02-07 14:16:11 +01:00
b40ac82052 Cleanup: transform_convert comment and spacing 2020-02-07 10:08:37 -03:00
ccda7ef996 Cleanup: Animation, match parameter names in declaration with implementation
The implementation had more descriptive parameter names, so I copied those
to the declarations.

No functional changes.
2020-02-07 13:56:04 +01:00
6dc9f89c6a Constraint: Fix forced request of evaluated camera
Constraint stack similarly to modifier stack is fully operate on what
have been given to it, without requesting original or evaluated IDs.
Validness of datablocks passed to constraint stack are to be handled
on dependency graph/evaluation stream levels.
2020-02-07 13:52:01 +01:00
f81fe8a3a0 Cleanup: Tracking, use LISTBASE_FOREACH
Makes loops declaration shorter and cleaner.
2020-02-07 13:15:54 +01:00
3e738a60d0 Cleanup: Tracking, reduce scope of variables 2020-02-07 13:15:54 +01:00
dfa7e1cd9f Cleanup: reduced indentations by returning/continuing early
No functional changes.
2020-02-07 12:58:01 +01:00
d809853513 Cleanup: simplify Cycles primitive attribute map storage 2020-02-07 12:18:15 +01:00
d9c5f0d25f Cleanup: split Cycles Hair and Mesh classes, with Geometry base class 2020-02-07 12:18:15 +01:00
46c9872afa Cleanup: remove unnecessary operations in Cycles curves export
Clearing and computing bounds is already done elsewhere.
2020-02-07 12:18:15 +01:00
47402dcb91 Cleanup: split Cycles export into smaller files 2020-02-07 12:18:15 +01:00
7b66f73558 Cleanup: export particle hair as a separate Cycles object 2020-02-07 12:18:15 +01:00
ad489b7164 Cleanup: add type inheritance for Cycles nodes 2020-02-07 12:18:15 +01:00
b1f1a1ca60 Cleanup: Tracking, reduce scope of more variables 2020-02-07 12:16:23 +01:00
28cd16ec44 Cleanup: Tracking, reduce scope of variables
Mainly affects for() loops.

The reason why loop parameter was declared outside of the loop roots
back to the times when not all compilers supported C99.
2020-02-07 12:01:50 +01:00
Dalai Felinto
0f7a90d4ad Cleanup: make format
Dear developers remember to set your coding environment to use clang-format.
2020-02-07 11:58:54 +01:00
Dalai Felinto
f2695c9c1d Cleanup: Remove view3d_draw_legacy.c
This file was originally a placeholder for all the old functions that
have not yet been ported to the new draw system. Over time all the
functions that needed refactor were gone, and the functions here are
still needed.

While moving the functions around I removed dead code and made sure the
existent comments start with a capital letter and end with a full stop.
2020-02-07 11:50:48 +01:00
638adb2f1a Merge branch 'blender-v2.82-release' 2020-02-07 11:05:03 +01:00
f12b4e53aa Fluid: Fixed try/catch exception issue and unsed variable issue
Sergey just pointed this out, fixing in it the release branch to avoid any compilation issues during the actual release. Thx!
2020-02-07 11:02:55 +01:00
753323af15 Fix crash when linking.
Stupid mistake in yesterday's own refactoring of readfile code...
2020-02-07 10:58:18 +01:00
192314b9d3 Merge branch 'blender-v2.82-release' 2020-02-07 13:57:27 +11:00
c01dea5711 Merge branch 'blender-v2.82-release' 2020-02-07 13:57:23 +11:00
1778efc897 Keymap: preference to swap 3D orbit/pan actions
Requested by @pepeland for grease pencil/2D usage.
2020-02-07 13:47:29 +11:00
d8830048f7 Keymap: preference for relative/absolute Alt-MMB navigation
Original request from Hjalti was to set absolute view axis,
so make this an option.
2020-02-07 13:46:04 +11:00
8ff556cf75 Merge remote-tracking branch 'origin/blender-v2.82-release' 2020-02-06 13:44:55 -07:00
763f117c48 Fix: Build error on windows in bf_intern_mantaflow
bf_intern_mantaflow lacked the `-DOPENVDB_STATICLIB` define
causing it to dynamically import openvdb, linked against
our static libs a happy time was not had by the linker.
2020-02-06 13:44:30 -07:00
a24b5a74b5 Fluid: Optimization for fluid domain obstacle boundary handling
This fix should especially improve liquid obstacles boundaries, i.e. help with the problem of particles sticking to the surface.
2020-02-06 19:27:47 +01:00
ffb94e88b0 Fluid: Hide Advanced cache options
The Manta script export should not be visible in the UI. At least not to normal users. The export feature is only useful for developers.
2020-02-06 19:06:22 +01:00
7954e672c5 Readfile: refactor/factorize more handling of common ID data.
- Move handling of private ID data (nodetree and master_collection)
under generic ID code. This shortens code a bit, but mostly avoids having
to modify all type-specific callback functions if/when we have to add
generic processing to IDs there.

- Seriously factorize `expand_xxx` area, in the same way we were already
doing in `direct_link_xxx` and `lib_link_xxx` areas.

Note that this actually also fixes some bugs (at least, potential ones),
like e.g. missing call to expand_id() for our beloved 'private ID'
(nodetrees & co), in current master code...

Differential Revision: https://developer.blender.org/D6764
2020-02-06 18:55:50 +01:00
921d74dd36 NodeTree: Add access to the address of an ID's nodetree pointer. 2020-02-06 18:55:20 +01:00
Nathan Letwory
49b66ad914 Merge branch 'blender-v2.82-release' into master 2020-02-06 18:57:36 +02:00
Nathan Letwory
f875655418 Reference correct sha1s of submodules 2020-02-06 18:27:54 +02:00
1bb702df1e OpenVDB: Fix IOError in try catch statement
Broader exception handling for OpenVDB IO errors.
2020-02-06 17:24:09 +01:00
e7d71ce9cf Fluid: Fixed slow cache loading for smoke data
Cache files are currently loaded via the Manta Python API. With very big caches this can slow down the viewport playback. Especially smoke simulations, which just load grids and no meshes, can suffer from this. This fix solves this problem by directly loading the cache files from disk (no Python). This fix has been in the works for some time. The developer of this patch is ready to handle any potential fall-out of this patch quickly.
2020-02-06 16:53:00 +01:00
ce14c2c7bd store default value per CPPType 2020-02-06 16:44:32 +01:00
ae112a38ab Fluid: Removed UI locks for cache file types
Caches that haven't been baked yet should not be locked.
2020-02-06 15:59:10 +01:00
b088d1e996 Particle: Added sanity in particle system removal function
Added a NULL check since psys_get_modifier() might also return a NULL pointer.
2020-02-06 15:56:34 +01:00
807aefd623 Fix (unreported) timeline missing refresh on VSE selection change
Keyframes and channels were not updating immediately (you had to enter
channel and main regions with the mouse to force a redraw).

Differential Revision: https://developer.blender.org/D6762
2020-02-06 15:46:53 +01:00
09149b4f0d Zero initialize before default construction to make it more deterministic 2020-02-06 15:42:08 +01:00
62ca9bcd0a Cleanup: refactor default materials and shader nodes 2020-02-06 13:36:39 +01:00
Cody Winchester
dd00e8ecd6 Smooth Modifier add invert vgroup option
Adds the invert vertex group option to the smooth modifier.

Setup same way as previous modifiers.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D6745
2020-02-06 11:54:55 +01:00
Cody Winchester
8768cd6a6a Curve Modifier add invert vgroup option
Adds the invert vertex group option to the Curve modifier.

Adds a short flag and char pad to the Curve modifier DNA. Passes the flag into the curve_deform_verts function as the weight values are found there and not in the modifiers .c file.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D6746
2020-02-06 11:51:06 +01:00
2abe733771 Merge branch 'blender-v2.82-release' 2020-02-06 11:38:03 +01:00
515b4d9a84 Cleanup: Fix comment 2020-02-06 11:37:23 +01:00
617f6bc320 Merge branch 'blender-v2.82-release' 2020-02-06 11:31:33 +01:00
342ceba5bf Fix T64058: GPencil - Ensure object mode if linking from a library
If the linked or append grease pencil object was added to the scene, the original file could have the datablock status in a different mode, so it's necessary to be sure is in object mode.

Differential Revision: https://developer.blender.org/D6759
2020-02-06 11:30:59 +01:00
Cody Winchester
efa2ffaa2d Lattice Modifier add invert vgroup option
Adds the invert vertex group option to the Lattice modifier.

Adds a short flag and modifies the existing char padding for the correct amount.
Adds a .invert_vgroup to the LatticeDeformUserdata.
Passes the flag into the lattice_deform_verts function where the weights around found and used.
For the other calls of lattice_deform_verts function they pass in NULL for the flag in the same way they pass NULL for the vgroup name.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D6747
2020-02-06 11:29:59 +01:00
2c5379b405 Fix T73620: Diameter Scale was calles 'Radius'
This was left over from when the other properties were renamed.
2020-02-06 10:55:09 +01:00
d7429e76b8 Merge branch 'blender-v2.82-release' 2020-02-06 10:25:16 +01:00
10705807fe Fix T68076: Color Correction node generates NaN
This is the same fix that the `GammaOperation` uses.

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

Reviewers: brecht
2020-02-06 10:19:51 +01:00
02226ef653 Code_Cleanup_Day/Windows: Clean-up windows API Level.
Not sure when this happened but apparently the lower bar is now windows 7 [1]

This patch bumps to API version to 0x0601 (Win7) and cleans up any uses that
worked around the globally set API version.

[1] https://www.blender.org/download/requirements/

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6758
2020-02-05 20:03:06 -07:00
dc1db0791e Cycles: Track specular throughput to account for reflection color in denoising albedo pass
To determine the albedo pass, Cycles currently follows the path until a predominantly
diffuse-ish material is hit and then takes the albedo there.
This works fine for normal mirrors, but as it completely ignores the color of the bounces
before that diffuse-ish material, it also means that any textures that are applied to the
specular-ish BSDFs won't affect the albedo pass at all.

Therefore, this patch changes that behaviour so that Cycles also keeps track of the
throughput of all specular-ish closures along the path so far and includes that in
the albedo pass.

This fixes part of the issue described in T73043. However, since it has an effect on the
albedo pass in most scenes, it could cause cause regressions, which is why I'm uploading
it as a patch instead of just committing as a fix.

Differential Revision: https://developer.blender.org/D6640
2020-02-06 03:37:48 +01:00
8c353931af Merge branch 'blender-v2.82-release' 2020-02-06 03:37:43 +01:00
3caefc89ee Fix unreported: View All in the Image Editor ignores UDIM tiles
Thanks to @dfelinto for spotting this!
2020-02-06 03:29:44 +01:00
462d566485 Fix unreported: Trying to create invalid UDIM tiles failed without error
Thanks to @dfelinto for spotting this!
2020-02-06 03:29:44 +01:00
d1112ae0d0 Merge branch 'blender-v2.82-release' 2020-02-05 22:59:29 -03:00
Patrick Bender
b4f8e3f01b Fix T69776: Error with complex Eevee noise texture in some drivers
Apparently the compiled shader bump into some register limit and
the compiler instead of giving an error, does something incorrectly.

Differential Revision: https://developer.blender.org/D6759
2020-02-05 22:57:38 -03:00
cad09e5227 Merge branch 'blender-v2.82-release' 2020-02-05 19:32:51 +01:00
092deb88b0 Fix T73127 EEVEE: Reflection plane not visible in lookdev without scene world 2020-02-05 19:32:16 +01:00
77394ef1db Fix T73517 Overlay: Edit Mode: X-Ray does not work if xray is equal to 1 2020-02-05 18:45:39 +01:00
00a0f06241 Fix T66802: Edge Slide: Unpredictable direction of the edge loop when it is fully occluded
When an edge loop is fully occluded the direction of movement
is not calculated resulting in unpredictable behavior.

So always calculate the direction of the groups of edge loops
but continue preventing occluded edges from affecting `mval_dir`
(global) value.

Differential Revision: https://developer.blender.org/D5247
2020-02-05 14:42:22 -03:00
354b2a7b1d Transform: Optimize edge slide
The current edge slide is executed in this sequence:
- traverses all edges to find the ones selected,
- traverses each vertex of the selected edges,
- traverses each linked edge of the vertex to finally execute the code.

However the list of vertices that are part of selected edges are already
stored in `EdgeSlideData` through the `TransDataEdgeSlideVert *sv;` member.

Therefore, the code can be simplified as follows:
- traverses all `sv` in `EdgeSlideData`,
- get the `sv->v` vertex to finally execute the code.

Differential Revision: https://developer.blender.org/D5277
2020-02-05 14:20:41 -03:00
cb46cc6705 Merge branch 'master' into functions 2020-02-05 17:34:24 +01:00
0a95a0852e Fix T69834 Edit Mesh: Multi-object edit crash when an instance is hidden
This was caused by a missing tag of the mesh datablock.
2020-02-05 17:22:36 +01:00
994e9f702f Fix T70121 EEVEE/GPencil: Curves cause crash when using background rendering
This was caused by a faulty initialization of cache->surf_per_mat which
should have been empty.
2020-02-05 16:28:34 +01:00
b841167ee3 Refactor readfile's liblink code.
Liblink specific ID type function was so far running a loop over all IDs
of relevant type, unlike almost any other 'ID-callback-like' functions
in Blender, which usually let the looping controll to calling code.

The latter approach is more convinient when one want to add generic
(i.e. type-agnostic) code, since it typically only has to change code in
one place (caller function) instead of tens of places (all the callback
functions).

This commit also changes/sanitizes a few things that had nothing to do
in main liblink code, like mesh conversion from tessfaces to polys
(which can be done in after-linking versionning code), or scenes' cycles
detection/check regarding background 'set' scenes.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6727
2020-02-05 16:18:17 +01:00
c35d6b1854 Cleanup: Remove unused function: give_node_material() 2020-02-05 15:56:50 +01:00
1bc2a98a9d T73589: Code Quality: Renaming on BKE_material.h
Old Name                             New Name
=========                            =========
init_def_material                    BKE_materials_init
BKE_material_gpencil_default_free    BKE_materials_exit
test_object_materials                BKE_object_materials_test
test_all_objects_materials           BKE_objects_materials_test_all
give_matarar                         BKE_object_material_array
give_totcolp                         BKE_object_material_num
give_current_material_p              BKE_object_material_get_p
give_current_material                BKE_object_material_get
assign_material                      BKE_object_material_assign
assign_matarar                       BKE_object_material_array_assign
give_matarar_id                      BKE_id_material_array
give_totcolp_id                      BKE_id_material_num
assign_material_id                   BKE_id_material_assign
clear_matcopybuf                     BKE_material_copybuf_clear
free_matcopybuf                      BKE_material_copybuf_free
copy_matcopybuf                      BKE_material_copybuf_copy
paste_matcopybuf                     BKE_material_copybuf_paste
BKE_material_init_gpencil_settings   BKE_gpencil_material_attr_init
BKE_material_add_gpencil             BKE_gpencil_material_add
BKE_material_gpencil_get             BKE_gpencil_material
BKE_material_gpencil_default_get     BKE_gpencil_material_default
BKE_material_gpencil_settings_get    BKE_gpencil_material_settings
2020-02-05 15:56:50 +01:00
Bastien Montagne
06c5608646 Readfile: Proper fix for recalc flags clearing in non-real IDs
In current `readfile.c` code we have that:

https://developer.blender.org/diffusion/B/browse/master/source/blender/blenloader/intern/readfile.c$3523

This is unconditionally clearing nodetree's recalc flags, and was added by rB81a762e79f83 ages ago. Thing is, in main ID read code we only clear that flag when **not** in undo context.

This proposed change intends to properly handle those cases, by moving `id.recalc` flags clearing from `read_libblock()` to `direct_link_id()`, which is also called for all 'local' IDs (ntrees and master collections currently).

I’d expect that change to be straightforward (and maybe even fixing some odd undocumented bugs), however there is no .blend file testcases associated with changes in rB81a762e79f83, so wouldn’t mind that to be double checked before it goes to master.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6711
2020-02-05 15:51:56 +01:00
ea2e6995a9 Fix T56892: Crash on Collada .dae import
In this case the ERROR_REQUIRED_ATTRIBUTE_MISSING seem to be fatal so
stop the import to avoid crashing if we run into this error.
2020-02-05 15:49:11 +01:00
d2c0df2842 Merge branch 'blender-v2.82-release' 2020-02-06 01:33:23 +11:00
6d10c24062 Fix finding freetype on Linux not using pre-compiled libs
Finding X11 before platform libs caused freetype not to use
pre-compiled libraries.
2020-02-06 01:30:26 +11:00
be70fcd7f2 Merge branch 'blender-v2.82-release' 2020-02-06 01:24:49 +11:00
87c18fbbc5 CMake: remove non-standard package search paths
Reduce the number of possible locations used to find libraries,
to simplify troubleshooting.

Only keep '*_ROOT_DIR' and the path used by 'install_deps.sh'.
2020-02-06 01:23:22 +11:00
edcec3aee0 Merge branch 'blender-v2.82-release' 2020-02-05 11:08:57 +01:00
db0121a009 Fix T73580: Gpencil crash when try to draw without eraser brush available 2020-02-05 11:08:33 +01:00
8fa26bf7e1 disable duplicate removal 2020-02-05 10:26:33 +01:00
79003fa0c4 Fix T67641 Gizmo3D: Transform gizmo disappear in very close view
This was caused but a workaround for not selecting the gizmos in camera
view. We lower the threshold to make it work on maximum zoom level.
2020-02-05 00:04:45 +01:00
93a46f7d08 Fluid: Improved baking progress bar UI
The baking progress bar now uses the entire notification space in the UI. Before, old reports could still be visible when a bake job got started. This had the disadvantage that those message got frozen too with the bake UI freeze.
2020-02-04 21:36:18 +01:00
78ba097331 Merge branch 'blender-v2.82-release' 2020-02-04 21:24:48 +01:00
559d01e129 Improve error message converting nurb to bezier
BKE_nurb_type_convert now takes r_err_msg and is more specific in the
error message...

ref T71672.

Maniphest Tasks: T71672

Differential Revision: https://developer.blender.org/D6275
2020-02-04 21:14:05 +01:00
f3fec859ba Merge branch 'blender-v2.82-release' 2020-02-04 21:11:20 +01:00
0bedf9cf07 Fix T58842: Add-ons Import/Export entries disapear when enabling Filter
Addons option

This removes the 'use_owner' option feature from rB61c8ed40f5df.
(this wasnt working well when addons are enabled and when switching
workspaces)

Now Addon filtering is just bypassed for Import/Export menus.
(by introducing/setting bl_owner_use_filter = False)

Maniphest Tasks: T58842

Differential Revision: https://developer.blender.org/D6740
2020-02-04 21:06:37 +01:00
54a4e9b697 Merge branch 'blender-v2.82-release' 2020-02-04 20:59:35 +01:00
36d09d9029 Fix T67084: Modal keymaps could show the wrong shortcut
WM_modalkeymap_operator_items_to_string() wasnt checking
WM_keymap_active(), so it was possible that e.g. when using the Industry
Compatible keymap, the shortcut from the Blender keymap was shown.

This also fixes the (now exposed) bug that the Industry Compatible keymap
would not have a ADD_CUT_CLOSED kmi defined for the Knife Tool [mandatory
for the status bar].

Maniphest Tasks: T67084

Differential Revision: https://developer.blender.org/D6748
2020-02-04 20:56:07 +01:00
Julian Eisel
15bb6e63e8 Fix errors from conflicts in last merge
Handled merge conflicts wrong apparently. When checking changes before
committing, everything seemed fine...
2020-02-04 20:22:06 +01:00
Julian Eisel
e4605cb155 Merge branch 'blender-v2.82-release' 2020-02-04 20:09:03 +01:00
Julian Eisel
f7ca86369d Reports: Add utility to cancel displayed reports
Sebastián Barschkis needs something like this to fix an issue, so he
asked me to add this to the release branch. It's unused for now.
2020-02-04 19:54:06 +01:00
c19112d755 Fix T61685 Curve extrusion looses flat shading in certain viewport shading
This was caused by default surface batch not using loop normals.
2020-02-04 19:31:00 +01:00
fd130a711e GPU: Remove disabling of indirect drawcall batching on NVIDIA hardware
Nvidia has fixed their drivers so there is no reasons to keep this.

This fix T70011 NVIDIA issue prevents full indirect draw call batching performance
2020-02-04 19:12:49 +01:00
86fb8062d7 Fix T72155 Overlay: Bone X-ray no longer works in pose or weight paint mode 2020-02-04 19:01:38 +01:00
8efd804685 Fix T72504 EEVEE: Crash when rendering Instance Collection with hair
This was caused by a double free of the instance data. Remove the need
of the instance data fix the issue.
2020-02-04 18:35:40 +01:00
Simon G
370a6175e0 Fix wrong glColor3usv array size check in clang array checker
Differential Revision: https://developer.blender.org/D6716
2020-02-04 17:54:51 +01:00
Simon G
937eff4112 Cleanup: remove duplicated bl_parent_id in brush mask panel
Differential Revision: https://developer.blender.org/D6718
2020-02-04 17:53:52 +01:00
cf59daf62f fix killing particles 2020-02-04 16:48:46 +01:00
6b9062508a Merge branch 'blender-v2.82-release' 2020-02-04 15:33:19 +01:00
db4bb49aae Fix warning when initializing the IK chain in the Pose Brush
The code removed was left there from an early prototype and it was not
doing anything.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6741
2020-02-04 15:32:00 +01:00
3685347b41 Selection: Add conservative rasterization to select really small objects
The conservative depth shader is ~4.5x slower than the normal one as it
uses geometry shader and fragment shader discard.

This patch also includes a hack to also fix the view parallel planar
geometry and the really small wire objects.

For some reason, the conservative raster fix does not work with normal
selection but does with box select.

This is a fix for T63356.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D6714
2020-02-04 15:20:15 +01:00
Bartosz Moniewski
842e71a1ef Fix wrong default value for Lacunarity in Musgrave texture
Lacunarity parameter determines scaling of subsequent octaves in fractal
noises. For example, Noise node have this scaling hardcoded to 2.0. Each
octave have twice bigger scale than previous one, resulting in finer details.

By design fractal noises that generate octaves with same seed should not
have Lacunarity set to 1.0, since then it just stacks up identical noises.

Differential Revision: https://developer.blender.org/D6742
2020-02-04 13:46:28 +01:00
cd0a028624 Merge branch 'blender-v2.82-release' 2020-02-04 12:40:30 +01:00
e35dab4895 Fix T57866: Annotation not working using Search and Enter key
Thanks to @mano-wii for the fix
2020-02-04 12:40:05 +01:00
5c8f8a7403 Merge branch 'blender-v2.82-release' 2020-02-04 22:20:58 +11:00
3dde6360ff Fix T65306: UI widgets clipped when scaled up
Normal UI widget and 3D navigation gizmo where clipping at high DPI.
2020-02-04 22:19:28 +11:00
62dba60e49 GPU: add projection matrix function to set only near/far clipping
Useful when UI code needs to extend the clipping range.
2020-02-04 22:19:28 +11:00
e3f8c887fb Fix T73567: Mantaflow adaptative domain takes objects with the flow turned off into account
This is a small optimization that makes sure the adaptive domain only considers active inflow objects. Ones with disabled fluid flow are skipped and thus the adaptive domain will not try to cover them.
2020-02-04 12:02:05 +01:00
04ec64b251 Merge branch 'blender-v2.82-release' 2020-02-04 11:08:15 +01:00
2264590d8c CMake: Attempt to fix tests on buildbot
An educated guess to put ensure order of static libraries initialization.

A bit weird, since OpenImageDenoise should be depending on TBB, but that
is likely being ensured by bf_compositor.

Linking succeeded on my Intel machine, and blenloader_test was passing
when doing manual test on buildbot.
2020-02-04 11:05:57 +01:00
647521af20 Merge branch 'blender-v2.82-release' 2020-02-04 10:37:52 +01:00
Aaron Carlisle
057b78c40c Grease Pencil: UI: Clarifiy Erase modes
The erase mode has an option to change the erase mode from soft/hard/stroke.
However, there are 4 brush types: hard/soft/point/stroke. Hard and Soft here are similar (they are both "soft" erase mode) only having different strengths.
The erase mode should be soft (Maybe this should be renamed to something more generic like "fade"), point, stroke.

Reviewed By: #user_interface, #grease_pencil, billreynish, antoniov

Differential Revision: https://developer.blender.org/D6733
2020-02-04 10:35:45 +01:00
9dd6b0842a Merge branch 'blender-v2.82-release' 2020-02-04 10:25:34 +01:00
ae433393af Codesign: Fix script for Windows
Apparently, there is no os.sync() on Windows.
2020-02-04 10:24:59 +01:00
ea8975cb27 Merge branch 'blender-v2.82-release' 2020-02-04 09:50:53 +01:00
5dc1183580 Codesign: Possible fix for stamp appearing prior to archive
From looking into builder's logs it seems that stamp file is picked
up prior to actual archive: sometimes worker reports missing archive
file, from a code path which is only possible if there is a stamp file.

Could be something with IO scheduling where bigger file is sent to
Samba server after smaller file.

Hopefully with this change this will not happen anymore.
2020-02-04 09:47:59 +01:00
84e71195c9 Merge branch 'blender-v2.82-release' 2020-02-04 19:02:08 +11:00
77702245b1 Merge branch 'blender-v2.82-release' 2020-02-04 19:02:03 +11:00
0964ae5266 Fix T73234: Undo/redo with local collection crashes
Resolves crashes when edit-mode undo data wasn't included
because it wasn't visible, also resolves T73416.
2020-02-04 18:41:04 +11:00
d09646a40b Fix T73095: Edit Mode Overlay Linked Mesh
When using duplicate linked meshes, objects that are not in edit-mode will be drawn as
it is in edit mode, when another object with the same mesh is in edit mode.
This will not be the case when one of the objects are influenced by modifiers. The change
reflects more how it was done in Blender 2.79.

The current change introduces a draw manager method that checks in detail who is responsible
for the drawing (render engine or overlay engine). If the edit mesh is not the original or
the object that is drawn doesn't draw the original mesh the object will be drawn by the render
engine.

Known Limitation of this patch is that the rendering outside edit mode doesn't reflect the
latest changes until the user switches between object and edit mode. When there are no
modifiers in use, the updating is done immediately.

IMO this would be sufficient for blender 2.82, it also fixes parts of T72733.
The updating of the surface batches requires more development and is
post-poned for now.

Reviewed By: fclem, brecht

Differential Revision: https://developer.blender.org/D6737
2020-02-04 07:46:15 +01:00
c482e22f3f Merge branch 'blender-v2.82-release' 2020-02-03 22:39:28 -05:00
fdb68e1847 Fix: UI: Spelling and Capitalization 2020-02-03 22:35:39 -05:00
e268fe6e64 Fix T73537: Particle system Crash
Added sanity check in the flow / obstacle object loops that check if the modifier data is valid. Ideally this should not be needed. However, in remove_particle_systems_from_object() the fluid modifier can get freed. It is not yet clear whether the modifier free call is really needed or not.
2020-02-03 22:04:07 +01:00
0cd0058e27 Fix T72261 Overlay: Edit Mesh: Edges not visible when using "In front"
This was caused by additional depth pass not rendering in the correct
view.
2020-02-03 19:54:47 +01:00
06a8f55104 Overlay: Armature: Fix Display armature as bound box in object mode 2020-02-03 18:53:30 +01:00
95ad34c5d7 Fix CMake error with versions older than 3.9 2020-02-03 18:45:30 +01:00
Yevgeny Makarov
03a29090b5 UI: invert toolbar icon colors for light toolbar button background
Fixes T64177.

Differential Revision: https://developer.blender.org/D6649
2020-02-03 18:41:49 +01:00
5f056fb742 Merge branch 'blender-v2.82-release' 2020-02-03 18:40:21 +01:00
0936f2f52c Fix T73045 Crash entering edit mode for "Object Font" instance mesh
Font duplicator was not outputing dupli-objects using evaluated object
pointers, leading to crash because original object are not supposed to
be drawable.
2020-02-03 18:37:23 +01:00
3d6e7cd67c Fix Cycles particle hair rendering broken after recent changes
This code was already wrong, we were just lucky that the previous coordinate
was repeated due to using the same memory location.
2020-02-03 18:35:29 +01:00
85776521f8 Merge branch 'blender-v2.82-release' 2020-02-03 17:53:28 +01:00
26ba7573e6 Codesign: Fix wrong logging message 2020-02-03 17:53:03 +01:00
7799890d8e Merge branch 'blender-v2.82-release' 2020-02-03 17:31:26 +01:00
3125cfceec Codesign: Add codesign for macOS worker
Works similarly to Windows configuration where buildbot worker and
codesign machines are communicating with each other using network
drive.
2020-02-03 17:03:51 +01:00
59e1c2f629 Overlay: Armature: Fix wireframe display type not working as 2.81 2020-02-03 16:15:05 +01:00
88ffee6953 Overlay: Armature: Improve bone outline z-bias in orthographic mode
The bias was too big and cause interpenetration on geometry that was in
front of bones.
2020-02-03 16:15:05 +01:00
dcf44dfe8e Fix T65114 Overlay: Armature: Bones with negative scale have wrong display
This moves the backface culling to the fragment shader to avoid all the
limitations of the current system. This has a cost but it is unlikely that
bone drawing will be a bottleneck.
2020-02-03 16:15:05 +01:00
ed8e110b5a Merge branch 'blender-v2.82-release' 2020-02-03 14:32:45 +01:00
f13940e883 Fix T73472: Crash in override code on dirty pose bone pointers.
Usual issue from those dear Bone pointers in pose data...

Note that this is more like minimal-risk, quick fix, it's nothing like
'nice to have' code. Think proper solution would be to refactor handling
of those kind of 'caches' to ensure they are valid/up-to-date in a much
easier way, at the very least.

Ideal solution being to get fully rid of those horrors, of course, but
let's not dream here. ;)
2020-02-03 14:32:16 +01:00
f037244e2c Merge branch 'blender-v2.82-release' 2020-02-03 14:07:48 +01:00
bc3d7faab7 Buildbot: Specify path to macOS codesign 2020-02-03 14:07:21 +01:00
aea125fe9d Cleanup: Rearrange ED_armature.h 2020-02-03 08:16:10 -03:00
Cody Winchester
808fa22a7a Warp Modifier add invert vgroup option
Adds the invert vertex weights option to the Warp Modifier. Setup in the same way as the other modifiers.

Uses the existing flag char that is labeled unused.

Differential Revision: https://developer.blender.org/D6720
2020-02-03 12:05:04 +01:00
Julian Eisel
a8ea1ea1b7 Fix: Broken tweak select-transform in Dopesheet
Clicking and dragging (aka tweaking) an unselected item should select
it, deselect others and translate. After rB395dfff103e1, it would not
deselect others anymore.
2020-02-03 12:01:38 +01:00
Cody Winchester
7bbbb9ba8a Displace Modifier add invert vgroup option
Adds the invert vertex weights option to the Displace modifier.

Adds a flag and char padding to the Displace modifier DNA for the invert group boolean.

Differential Revision: https://developer.blender.org/D6686
2020-02-03 11:55:29 +01:00
6d95baf67a Fix T73364: crash calling particle_sytem.co_hair() on disabled particles 2020-02-03 11:35:42 +01:00
d237681cad Fix T73559: UDIM Crash Fill Tile
The function `gpu_texture_create_tile_array` checked for a valid
tile ibuf when determining the packing location. During the actual packaging it didn't.

As the tiles are already ignored when selecting the packing location, we
can also ignore it when copying it to the glTexture. Therefore this
patch removes the existing BLI_assert and replaces it with a NULL check.

Reviewed By: Brecht van Lommel

Differential Revision: https://developer.blender.org/D6738
2020-02-03 11:05:40 +01:00
68ab4dd28a Merge branch 'blender-v2.82-release' 2020-02-03 17:58:38 +11:00
Yevgeny Makarov
831bb6bc77 Text: make "Text" tab active when searching 2020-02-03 17:55:13 +11:00
3dc2b009ae Merge branch 'blender-v2.82-release' 2020-02-03 15:29:57 +11:00
5206124ce1 Merge branch 'blender-v2.82-release' 2020-02-03 15:29:48 +11:00
d243a0b03a Fix T73553: Grease pencil poll crash with non-gpencil objects 2020-02-03 15:21:22 +11:00
7e60e7a185 UI: Re-organize Sculpt Symmetrize controls
Currently the UI for Symmetrize is confusing, for a few reasons:

- It exists as a sub-panel to the Dyntopo panel, even though it doesn't require Dyntopo to work
- It is inside a panel called Remesh, which is confusing because we now have a different Remesh panel

Changes:

- Put the Symmetrize controls in the Symmetry panel
- Rename Optimize to Rebuild BVH and move to the Sculpt menu
- Change the poll function - apparently it doesn't require Dyntopo

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

Reviewed by Pablo Dobarro
2020-02-02 20:14:33 +01:00
601ed4061a cleanup 2020-02-02 14:17:49 +01:00
6905633e57 fix generating operation hash
this needs some more work
2020-02-02 14:17:39 +01:00
79b3de9a63 assert data types when inserting links 2020-02-02 14:16:58 +01:00
975decb5e3 new Vector Length node 2020-02-02 14:16:21 +01:00
58ec7b44fe fix memory leak 2020-02-02 12:39:13 +01:00
57a063f599 new normalize vector node 2020-02-02 12:37:59 +01:00
d944146ebe fix stack use out of scope error 2020-02-02 12:26:37 +01:00
2e5ab9640e vectorize Map Range node 2020-02-02 12:26:11 +01:00
7c06e2e8d2 new ceil and floor float nodes 2020-02-02 11:43:33 +01:00
a20c781343 Merge branch 'master' into functions 2020-02-02 10:40:56 +01:00
Yevgeny Makarov
f51286cb8c UI: fix blurring of bitmap icons for the navigation gizmo 2020-02-02 19:28:33 +11:00
0a09fe7831 Merge branch 'blender-v2.82-release' 2020-02-02 18:09:35 +11:00
07df76496d Fix error showing viewport units
Out of bounds buffer unit-system index with zoomed out viewport.
2020-02-02 18:01:49 +11:00
f48e876459 Cleanup: clang-format 2020-02-02 11:47:49 +11:00
f051d47cdb UI: Shortcut String Changes
Improvements to keyboard shortcuts shown in menus, mostly for Macs.

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

Reviewed by Brecht Van Lommel
2020-02-01 08:56:38 -08:00
63d5b974cc UI: Ellipsis Character for Line Continuation
Using ellipsis character for line continuation since that glpyh is now narrower.

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

Reviewed by Brecht Van Lommel
2020-02-01 08:35:08 -08:00
599e8f7bb1 cleanup same size asserts 2020-02-01 11:58:50 +01:00
26f4fa9de7 utility to add input/output dummy nodes 2020-02-01 11:37:36 +01:00
e52941fe5b utility for printing arrays 2020-02-01 11:34:57 +01:00
bf8a26b745 Fix T54292: CrazySpace transform calculation error
The function `modifiers_disable_subsurf_temporary` disables
temporarily only subsurf modifiers with the `On Cage` option enabled.

But a modifier can act on cage even with this option disabled.

Differential Revision: https://developer.blender.org/D6722
2020-01-31 23:58:32 -03:00
26d0f7ed23 Merge branch 'blender-v2.82-release' 2020-02-01 13:40:07 +11:00
3ba5461af0 Object: support 'Affect Parents' for snap/clear transform
Resolves T69450
2020-02-01 13:34:27 +11:00
b97da8a3de Merge branch 'blender-v2.82-release' 2020-02-01 13:01:54 +11:00
253dbdbb39 Object: no longer skip weight paint objects when clearing transform
This meant a non-active selected object would be skipped based on the
mode last used, mostly an issue with 'Lock Object Modes' disabled.
Other transform operators (such as snap) don't do this.

Partially reverts b8aff06466
2020-02-01 12:35:17 +11:00
dc3f073d1c UI: Font Binary Symbol Updates
Font binaries updated with consistent keyboard symbols. Footer events now have per-platform icons.

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

Reviewed by Brecht Van Lommel
2020-01-31 14:07:49 -08:00
4046fade9b Merge branch 'blender-v2.82-release' 2020-01-31 21:58:02 +01:00
eee5a0e4ec UI: use full width for ID blocks in speaker properties
rBb6a97baa0efa already did this for World, Light, Camera, Texture.
rBb196c42d4ade already did this for Lattice.
2020-01-31 21:49:24 +01:00
ff40f3967a Cycles: bump version to 1.12, matching Blender 2.83 release cycle 2020-01-31 19:26:40 +01:00
f9d09a1209 Merge branch 'blender-v2.82-release' 2020-01-31 19:26:20 +01:00
Yevgeny Makarov
5780142679 Fix T64024: fullscreen switching on macOS shows red line artifacts
Specifically, this happened when automatically hiding and showing of the
menu bar and dock was enabled in the system preferences.

Differential Revision: https://developer.blender.org/D6710
2020-01-31 18:40:45 +01:00
Nicholas Rishel
4633bb9939 Cleanup: enforce immutability through const, instead of a comment
Differential Revision: https://developer.blender.org/D6504
2020-01-31 17:48:26 +01:00
4f8f0f3208 Fix issues in Cycles standalone, particularly related to render display
Some code was removed to avoid storing the combined pass when viewport
rendering other passes. But we can keep this by default, Blender overrides
the list of passes entirely.
2020-01-31 16:49:24 +01:00
aa81a05de8 Cycles: bump version to 1.11, matching Blender 2.82 release cycle 2020-01-31 16:39:13 +01:00
3601924acb Fluid: More stable flow emission
Reverting some changes that were made in 33317b4647
2020-01-31 13:50:33 +01:00
a663ece5a3 Fluid: Better default values and cleanup
Use OpenVDB by default, smaller particle radius to avoid volume increase, and shorter names for combined fluid particle systems.
2020-01-31 13:50:33 +01:00
9b308f27ad Fluid: Fixed deletion issue with secondary fluid particle systems
Manually deleting fluid particle systems had no effect in the fluid domain UI.
2020-01-31 13:50:33 +01:00
385b34b9b8 Fluid: Fixed secondary particle warnings
This commit fixes the warning that bpy_rna.c470 was producing.
2020-01-31 13:50:33 +01:00
eea3751c5b UI: Icons update
- New bespoke icon for the universal brush toggles
  - New icon for Redirected Folder (currently unused)
  - New icons for handle types (Auto Clamped, Auto, Aligned, Vector, Free)
  - New icons for Sequencer Text Strip anchor (Top, Bottom, Left, Right, Centre)

Thanks to Andrzej Ambroż for the new icons
2020-01-31 13:20:24 +01:00
53d805abcb Merge branch 'blender-v2.82-release' 2020-01-31 13:03:15 +01:00
James Fulop
6ab359e525 Fix potential crash in guarded alloc stats, when there are no allocations
This was found with static analysis warnings in Visual Studio 2019.

Differential Revision: https://developer.blender.org/D6564
2020-01-31 13:01:07 +01:00
c82b8c5944 Fix tests failing on AMD Ryzen, due TBB initialization order issue
Similar fix as the one we did for the blender executable, see T72015.
2020-01-31 12:56:20 +01:00
a075f45526 Fix more undefined behavior in tangent space computation
Ref D6677
2020-01-31 12:56:20 +01:00
14ccda75f6 USD: Include USD library version in System Info
Pixar recently released USD 20.02 [1]. I think it's important for people
to be able to figure out which version of the USD library is used in
Blender.

[1] https://github.com/PixarAnimationStudios/USD/releases/tag/v20.02

This commit exposes the USD library information via `bpy.app.usd`, and
includes that info in the `system-info.txt` saved via Help → Save System
Info.

Reviewed by: brecht

Differential Revision: https://developer.blender.org/D6724
2020-01-31 11:29:29 +01:00
bcacf47cbc Displist: Add mikktspace tangent space generation for DL_SURF
This should match mesh tangents form surfaces converted to mesh.
2020-01-31 02:55:19 +01:00
fd959bf658 Fix unreported: Missing Empty Transparency panel poll
Own mistake in recent change
2020-01-30 17:18:07 +01:00
cb8714fd8a Merge branch 'blender-v2.82-release' 2020-01-30 15:51:57 +01:00
Simon G
2de704da68 Fix preset tracking setttings missing a comma
Preset tracking settings is missing a comma here.
Without a comma this will result in an implicit string concatenation.
This was probably not wanted.

Reviewed By: sergey, Blendify

Differential Revision: https://developer.blender.org/D6717
2020-01-30 15:23:37 +01:00
8c5cb8359a EEVEE: Test maximum texture size before render.
This will catch any non renderable size.
2020-01-30 15:07:23 +01:00
30963eecfb Fix T73450, crash when adding segments on bevel.
Needed to protect against a case where clamp overlap limited
the offset to approximately zero, and the snap-to-pipe code
would therefore encounter an almost degenerate profile and
fail in matrix inversion.
2020-01-30 07:56:00 -05:00
e207cba8cc Merge branch 'blender-v2.82-release' 2020-01-30 13:32:54 +01:00
8285a12f4e Buildbot: Make archive naming shorter and cleaner
It changes name to be blender-<version>-linux64.

Since CentOS is used as a base host for builds there is no real need
in specifying libc version. Is unlikely anything older could be used
anyway.

Also make bitness to be the same as windows. It is something what
users will read easier.
2020-01-30 13:32:22 +01:00
6dcb4c9b4f Buildbot: Allow building on systems without scl
Makes it easier to verify changes on local machine without scl
before committing changes to repo.
2020-01-30 13:32:22 +01:00
9112d19cf7 Merge branch 'blender-v2.82-release' 2020-01-30 08:40:22 -03:00
944ab36657 BLI_kdopbvh: Prevent division by zero in raycast 2020-01-30 08:36:35 -03:00
2142288eae Merge remote-tracking branch 'origin/blender-v2.82-release' 2020-01-30 12:04:48 +01:00
87b551e836 Fix T73051: Multiple IK chains influencing the same bone don't work
This patch fixes {T73051}. The cause of the issue was the absence of
relations in the depsgraph between IK solvers of overlapping IK chains.

Reviewed By: sergey, brecht

Differential Revision: https://developer.blender.org/D6700
2020-01-30 11:59:50 +01:00
5a570be9f5 Fluid: Updated Manta pp files
Includes latest changes from the upstream manta repository.
2020-01-30 11:27:54 +01:00
543685fe3d Merge branch 'blender-v2.82-release' 2020-01-30 11:15:51 +01:00
78872b3360 Fix T73499: Crash on hiding parent and all children of an object if one child is in an excluded collection
Dont act on a base which cannot be found in the viewlayer.
Oversight in rB41858a73111d.

Maniphest Tasks: T73499

Differential Revision: https://developer.blender.org/D6721
2020-01-30 11:08:03 +01:00
332f310b81 Merge branch 'blender-v2.82-release' 2020-01-30 10:25:36 +01:00
306edb7477 Buildbot: Enable 16 threads for macOS worker as well 2020-01-30 10:24:57 +01:00
bae2cb730a Merge branch 'blender-v2.82-release' 2020-01-30 17:25:38 +11:00
81def64739 Cleanup: remove WM_keymap_verify_item
This wasn't used and isn't useful since it only checked
if an operator was included in the keymap - ignoring it's properties.
2020-01-30 17:23:35 +11:00
d83acac66b Merge branch 'blender-v2.82-release' 2020-01-30 16:52:36 +11:00
725477fdb1 Fix outliner delete not flushing multi-object edit-mode data 2020-01-30 16:50:06 +11:00
ac2d342d88 Cleanup: ED_editors_flush_* functions
- Remove the only_render arg from ED_editors_flush_edits
  was only used in one place, the '_ex' version can be used instead.

- Split out the single object version of this function as currently
  flushing is being done in-line, often only accounting for edit-mode,
  ignoring sculpt mode for e.g.
2020-01-30 16:46:09 +11:00
97ace45e42 Merge branch 'blender-v2.82-release' 2020-01-30 15:12:33 +11:00
1d28ff7f2b Fix T73495: Missing undo switching active shape-key in edit-mode 2020-01-30 15:02:25 +11:00
4c1b7f311d Merge branch 'blender-v2.82-release' 2020-01-30 13:31:39 +11:00
7a27f64ecb Cleanup: clang-format, unused variable 2020-01-30 13:28:17 +11:00
ccb3cb0b9b Fix changing shape key in multi-object edit mode
Updating only accounted for the active object.
2020-01-30 13:26:00 +11:00
c27d30f3ea Displist: Add mikktspace tangent space generation for DL_INDEX3
This now matches the Mesh behavior. Surfaces and metaball implementation
are yet to be implemented.
2020-01-30 02:46:01 +01:00
002b183506 Merge branch 'blender-v2.82-release' 2020-01-30 11:54:15 +11:00
Simon G
4482d70f6e Fix invalid exception used in 'rna_xml' 2020-01-30 11:50:09 +11:00
5a541cfcec Cleanup: resolve static analyzer warnings in bl_i18n_utils
Reported in T73504
2020-01-30 11:48:26 +11:00
15350c70be DRW: Add support for tangent on objects using display lists.
Only Metaballs are left unsupported.
However, the implementation does not match 100% with cycles which converts
all objects to meshes.

Fixes T63424 EEVEE: Normal map node doesn't works with curve objects
2020-01-30 01:37:46 +01:00
89996da1f5 Merge remote-tracking branch 'origin/blender-v2.82-release' 2020-01-29 15:02:02 -07:00
c7c8ee6168 Fix crash when adding modifiers to curve/surface/text objects 2020-01-29 22:53:20 +01:00
6576148722 Fix T65146: Curve Texture Coordinates in Cycles and Eevee differ
Remove the use UV for mapping option.
2020-01-29 22:53:20 +01:00
337b918b92 missing value forwarding 2020-01-29 21:21:10 +01:00
323c20bbb7 remove unused data structure 2020-01-29 21:18:41 +01:00
a11b21f1eb Merge branch 'master' into functions 2020-01-29 21:14:40 +01:00
2430d76b1e Write to output buffer directly instead of doing a copy in the end 2020-01-29 21:05:07 +01:00
c3001812dc Merge branch 'blender-v2.82-release' 2020-01-29 20:38:12 +01:00
3984586292 Merge branch 'blender-v2.82-release'
Merge conflict in source/blender/gpu/GPU_texture.h
2020-01-29 20:29:20 +01:00
33317b4647 Fluid: Fixes for flow objects and initial velocities
This commit cleans up the flow emission code (i.e. the code that determines where flow is generated). It also addresses an issue with initial velocities.

Related issues (that might be fixed through this commit) are: T73422, T72949
2020-01-29 19:21:52 +01:00
76489fbe7c Fix T73483: Mantaflow: Smoke inflow in liquid domain emits liquid
Added an extra check in the flow object loop that compares flow object type and domain type prior to writing to flow maps.
2020-01-29 19:21:52 +01:00
a16eacf615 Fluid: Added wavelet noise tile to the gitignore
This file is generated during bakes. It should not be committed to the blender repository. It just annoys developers when staging files.
2020-01-29 19:21:52 +01:00
88b14fdf60 Fluid: Updated UI
UI updates include:
- More descriptive tool tips
- Removed texture panel for liquid flow objects
- Adjusted alignment for some smoke / fire parameters
2020-01-29 19:21:52 +01:00
a8bfa91633 Fluid: Removed wireframe drawtype setter for fluid domains
Fluid domains with (auto-generated) particle systems were set to wireframe drawtype automatically. This was a convenience feature that made particles visible immediately. As the auto switching is sometimes a bit annoying though this has been removed. Instead, the Quick Liquid Operator switches the viewport shading type to wireframe.
2020-01-29 19:21:52 +01:00
745e356300 Fluid: More cleanup related to flow emission maps
In addition to 4670c68e3dd9544fe14656dacdff641fcabcd540 which removed the unused high-res emission maps.
2020-01-29 19:21:52 +01:00
42318e358a Fluid: Cleanup in flow emission loops
- Initial velocities are no longer influenced by surface distance value.
- Added optimizations for different flow types (e.g. skip part of loop for liquid flow objects).
- Comments style cleanup and removed old todos.
2020-01-29 19:21:52 +01:00
e782d35d34 Fluid: Removed the currently unused high-res smoke emission code
This code is currently not in use and so removing it based on the YAGNI principle. If there really is need for a high-res emission loop it could be easily added again. However, I believe for the smoke noise it is sufficient to upscale the base emission map. A high-res emission map can easily be achieved by increasing the base resolution. Note also that in the new fluid system base loop and noise loop are decoupled making the need for a high-res emission loop even more unneccessary.
2020-01-29 19:21:52 +01:00
35c6d68d35 UI: fsmenu_insert_entry Declaration Mismatch
Code cleanup. Fixes a mismatch between definition and declaration of fsmenu_insert_entry().

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

Reviewed by Julian Eisel
2020-01-29 10:20:30 -08:00
e4faed120d Fix T73466: Unable to set particle rotation
Error in rB1f6ab32196d7.

Maniphest Tasks: T73466

Differential Revision: https://developer.blender.org/D6706
2020-01-29 19:16:11 +01:00
9e490d7cf5 make naming more specific 2020-01-29 19:07:23 +01:00
2929bc8d7e cleanup 2020-01-29 18:56:49 +01:00
a5470fe0ca cleanup 2020-01-29 18:47:51 +01:00
06ddde0daa new way to construct custom functions at compile time 2020-01-29 18:43:52 +01:00
aa919f3e82 UI: Info Editor Visual Changes
Changes to Info Editor making it easier to read. Only visual changes, no functional changes.

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

Reviewed by Julian Eisel
2020-01-29 09:24:54 -08:00
e7c90438e0 Fix T73054: Add DNA defaults for pose_ik_segments
This fixes the crash with pose_ik_segments = 0 in old files.
Some files were saved with the property set to 0, so the versioning code
won't work in that cases. I also changed that to fix the crash in those
files.

Reviewed By: brecht

Maniphest Tasks: T73054

Differential Revision: https://developer.blender.org/D6663
2020-01-29 16:47:24 +01:00
Julian Eisel
e3f89237fe Fix T73453: Selecting playhead in VSE deselects all selected strips
Tool system handlers had higher priority than the overlayed animation
"regions" (fake regions in fact). Give animation (and View2D) handlers
priority over toolsystem handlers.

Gizmo's still have higher priority, but I'll leave that unless there's a
reason to change.
2020-01-29 16:26:19 +01:00
Julian Eisel
9cb7ecefce Fix T73487: Crash when opening filebrowser while error is displayed
More concretly, the crash would happen if a filebrowser is opened while
an error popup is visisble **in a different window**.

Code assumed the popup to be in the active window/screen, but it may
actually be displayed in a non-active window. Temporarily override
context to ensure this assumption is correct.
2020-01-29 15:09:06 +01:00
18c88eac17 Fix T73188: RenderResult as Camera BG Image
In blender 2.79 you could use a render result as a camera background
image. This is useful during layout/compositing. During Blender 2.80
development there were 2 issues introduced that removed this feature.

* to receive a render result the image required a lock. This lock wasn't passed and therefore no image was read from the result. Generating an GPUTexture from an Blender image also didn't do the locking.
* the iuser->scene field wasn't set what is required for render results.

This change adds an optional `ibuf` parameter to `GPU_texture_from_blender` that can be passed when available.

Reviewed By: fclem, brecht

Differential Revision: https://developer.blender.org/D6684
2020-01-29 15:07:45 +01:00
fee7a34575 IC keymap: Add extend & subtract box selection to animation channel lists
Same as recent change for default keymap
2020-01-29 15:01:39 +01:00
925cd40460 UI: Theme tweak to selected animation channels
We have the problem that it's very hard to see which animation channels are selected. This is a very small tweak to make it more obvious, using the same text highlight color as the Outliner.

Really it should be overhauled to be more exactly like the Outliner, but this is just a quick fix to make it reasonably visible.

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

Reviewed by Julian Eisel
2020-01-29 14:22:25 +01:00
bd59b21907 Keymap: Add ability to extend or subtract animation channel box selections
For some reason this was missing. Seems to be a simple oversight.

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

Reviewed by Julian Eisel
2020-01-29 14:07:26 +01:00
657ff6ef5e Merge branch 'blender-v2.82-release' 2020-01-29 13:41:43 +01:00
b683fcb628 Buildbot: Increase number of compile thread for Linux Buildbot 2020-01-29 13:41:04 +01:00
d3670823b3 Fix T73469: OSL: Vector Math Node modulo uses wrong function
This also fixes glsl version of fmod when both inputs are negative.

Differential Revision: https://developer.blender.org/D6704
2020-01-29 12:37:22 +00:00
051ee76f7f Applying patch D6576, more tests for modifiers.
Patch from Jesse Y, reviewed by Habib Gahbiche.
Addes tests for modifiers: array, decimiate, mirror, screw, solidify,
subd, and weld.
2020-01-29 07:11:42 -05:00
642e5ec78c Merge branch 'blender-v2.82-release' 2020-01-29 12:49:18 +01:00
Julian Eisel
395dfff103 Dopesheet: Avoid deselect-all triggering on every box-select
This wouldn't only behave glitchy, but break certain copy-paste
workflows. See T70457 for details.

Addresses T70457
2020-01-29 12:38:16 +01:00
aa123555d7 Fix T73014: Marker sync does not work correctly if moving strip so it overlaps another strip
Need to also offset markers in BKE_sequence_base_shuffle_time().
Also clarify/correct related comments.

Maniphest Tasks: T73014

Differential Revision: https://developer.blender.org/D6555
2020-01-29 11:44:56 +01:00
a4842eb8db Merge branch 'blender-v2.82-release' 2020-01-29 11:37:53 +01:00
67a6050499 Fix T55622: Proportional editing for Gpencil/Masks in dope sheet not
taking proportional size into account

Transform would always move all keyframes (e.g even when Proportional
size is 0.0).

'calculatePropRatio()' was setting td->factor correctly, but this was
not being considered in 'applyTimeTranslateValue()' if there was no
action [which greasepencil and masks do not have].

Maniphest Tasks: T55622

Differential Revision: https://developer.blender.org/D6697
2020-01-29 11:27:20 +01:00
Julian Eisel
7c9b5523ff Fix T73482: Context Menu on any button is broken
What I removed here used to be needed in an earlier version of the
patch, to avoid use-after-frees. This is not the case anymore, so it
seems we can remove this.

Generally the context region code is very weak and inconsistent. If
things were done properly, the line I added shouldn't cause issues -
it's logically correct.

Also fixes T73475.
2020-01-29 11:22:58 +01:00
3ee219b845 Merge branch 'blender-v2.82-release' 2020-01-29 11:19:20 +01:00
34853c7e06 Fix T67483: Cannot paste on unit-vector uibut
Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D6701
2020-01-29 11:13:00 +01:00
9c062ac310 Fix T72089: Image Editor - Paint mode, Clone Tool - disfunctional clear
button in the Image slot in the Brush panel

Caused/exposed by rBaf9ca138ba7b
Also relevant was rB828905190e12

Above commits moved the WM_UI_HANDLER_BREAK around so it would not be
returned anymore.
We need WM_UI_HANDLER_BREAK, otherwise we wont get through to to
KM_RELEASE. There are two places that explicitly check for KM_RELEASE
(call to `ui_do_but_extra_operator_icon` in both
`ui_do_but_SEARCH_UNLINK` / `ui_do_button`), and without the above we
only ever get here with KM_PRESS.

This patch restores the behavior regarding WM_UI_HANDLER_BREAK to what
is was before the two culprit commits.

Checked that both this report (T72089) and T69755 are working.

Maniphest Tasks: T72089

Differential Revision: https://developer.blender.org/D6363
2020-01-29 11:09:14 +01:00
eb4c26a46c Merge branch 'blender-v2.82-release' 2020-01-29 10:59:51 +01:00
8410aa2684 Fix T67654: missing ui refresh when changing active particle system
Since changing the active particle system uses NC_OBJECT | ND_DRAW
for 'RNA_def_property_update()' we need to redraw/refresh
BCONTEXT_PARTICLE in 'buttons_area_listener()' as well.

Maniphest Tasks: T67654

Differential Revision: https://developer.blender.org/D6702
2020-01-29 10:55:25 +01:00
787293c71f UI: Enable decorators in NLA Animated Influence and Strip Time panels
Since the whole point of these properties is for them to be animated, enable decorators here for easy keyframing.
2020-01-29 09:56:07 +01:00
a554ff9693 Merge branch 'blender-v2.82-release' 2020-01-29 17:00:26 +11:00
dee9c3cc25 UI: pose X-ray state wasn't shown in the header 2020-01-29 16:56:21 +11:00
a622e29a25 UI: Linux Platform File Browser System List
Since we can now use separate icons for the items in the File Browser
lists, the following rounds out the "System" list for Linux.

Adds a few more folders that are available in most distributions
at installation, but only if they exist.
2020-01-29 16:27:54 +11:00
Henrik Dick
9c190dea4c Fix solidify complex fixed thickness on flipped normal boundary
Fixed thickness with zero offset gave uneven results for complex
solidify cases (3+ faces sharing an edge).

See D6643 for steps to redo the error.
2020-01-29 14:30:06 +11:00
51546ff6e6 Merge branch 'blender-v2.82-release' 2020-01-29 13:02:31 +11:00
337ce7c984 UI: hide filter alembic option
This was showing along side image save options.
2020-01-29 12:59:57 +11:00
64e13bef6d Cleanup: minor style changes, use const vars for bmp.c 2020-01-29 12:57:06 +11:00
James Fulop
d8435596d5 imbuf: support writing grayscale BMP images 2020-01-29 12:40:49 +11:00
7642ee627a Merge branch 'blender-v2.82-release' 2020-01-29 11:11:40 +11:00
deb5b00e1b Cleanup: revert wrapping from D6692 2020-01-29 11:11:09 +11:00
b0f6fb8369 EEVEE: Micro optimize disk light
Try to never do operation twice and try to use MADD operations. Even if this
is very unlikely to make any difference, it can help compilers do some
optimization. I did not measure any difference as probes have much higher
impact on render time because of texture lookups.

Note that disk light is currently the most expensive light type so it
does not hurt to micro optimize.
2020-01-29 01:02:14 +01:00
3d73609832 Fix T67060 EEVEE: Noise caused by disk lights
This is an issue on some drivers that might output NaN out of sqrt if the
number is infinity.
2020-01-29 01:02:14 +01:00
William Reynish
f9e1e088a4 Tool System: add shear tool to non-mesh edit-modes 2020-01-29 10:34:42 +11:00
b499b24c54 UI: Fix typo in tooltip 2020-01-28 23:17:32 +01:00
bcbd9009e7 Fix T73433: Transform options (Affect Only) tooltips are confusing
Change these to be more descriptive and understandable.
2020-01-28 23:03:29 +01:00
Julian Eisel
7b5f09c068 Fix memory leak of NLA child panel-types
Panel types always need to be registered in the region-panel-types list,
or they won't get free'd.
2020-01-28 18:47:55 +01:00
14deacdc22 Merge branch 'blender-v2.82-release' 2020-01-28 18:39:58 +01:00
b707504973 UI: Edit Menu - Undo History List and Operator Polling
Enable and Disable Edit Menu items based on whether those actions are currently applicable.

https://developer.blender.org/D4846

Reviewed by Brecht Van Lommel
2020-01-28 09:34:55 -08:00
b2034c6ba2 Fix T62730 Overlay: Selected edit hair points highlight is incorrect
This was due to the fact the drawing code was expecting the editpoints
to be equaly spaced. Reuse the code in particle.c to output the select
mask in red color channel of the particle (which is unused in new code).
2020-01-28 18:28:48 +01:00
ca572e9970 Cleanup: fix compiler warnings related to deprecated members
For Freestyle, it helps to move the struct copy from C++ to C, where the
compiler knows that copying deprecated members is ok.
2020-01-28 18:25:31 +01:00
49403a676b Merge remote-tracking branch 'origin/blender-v2.82-release' 2020-01-28 18:24:17 +01:00
1af8e0cc6c UI: Windows Platform File Browser System List
Showing Windows special folder locations with icons in File Browser System list.

https://developer.blender.org/D6405

Reviewed by Brecht Van Lommel
2020-01-28 09:10:50 -08:00
12865caf4f Alembic depsgraph: explicitly add ANIMATION -> CACHE dependency
This dependency was removed in fd0bc7e002,
as there already were dependencies ANIMATION -> PARAMETERS and
PARAMETERS -> CACHE, making ANIMATION -> CACHE unnecessary.

Upon subsequent inspection, the ANIMATION -> PARAMETERS dependency was
there due to the fallback behaviour in
`RNANodeQuery::construct_node_identifier()`. Now this is no longer
relied upon, and the required relation is made explicit again.
2020-01-28 17:58:19 +01:00
5d36a2e587 Fix T72143: editing image frame start/offset does not update in Eevee 2020-01-28 17:48:30 +01:00
Julian Eisel
a5790b2656 Fix T63999: Filepath property won't open filebrowser from a popover
To issues caused this:
* The code to launch the filebrowser from a button didn't respect popup
  menus stored in context
* There was actually no popup menu region stored in context for this
  case. Doing so *may* introduce other issues, but the way I did things
  already fixes all issues I've found.
2020-01-28 17:02:10 +01:00
3fd4c88e3a Fix T72593 Blender crashes when modifier change the material count
Instead of changing the modifiers behavior, we make sure to always use
the data->totcol instead of the ob->totcol. Also we centralize getting
this number to avoid future issues.

Fix T72593 Blender crashes when separating mesh
Fix T72017 Crash on set visibility change
2020-01-28 16:39:37 +01:00
ba01ea3f8b Merge remote-tracking branch 'origin/blender-v2.82-release' 2020-01-28 16:34:33 +01:00
fd0bc7e002 Fix T72660: Alembic caches are not properly updated by drivers
Drivers were not considered when building the dependency graph for
`CacheFile` datablocks.
2020-01-28 16:28:44 +01:00
4a7faaa399 Cleanup: reformatted after NULL -> nullptr in depsgraph C++ code
No functional changes.
2020-01-28 16:17:21 +01:00
38f3a85649 Merge branch 'blender-v2.82-release' 2020-01-28 16:10:37 +01:00
864cb7f376 Partially fix & comment about bad handling of wrong_id in read_libblock().
Not fully fixing it for now since I do not see an easy way to remove freed
pointer from libmap, and it does not seem to be an actual, practical
issue currently, but eeek...
2020-01-28 16:09:57 +01:00
d33f4bce8d Fix T67006: Crash RenderEngine with preview
In a minimal render engine blender crashes as it cannot create a preview
of the material yet. This patch adds a failsafe test for this specific
scenario.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6633
2020-01-28 15:54:34 +01:00
ecab41e44f Fix T54422 FluidSim: ColorRamp set position does not update the viewport
This was a missing notification because of wrong type. Also remove
the id tag as the changes are still picked up by workbench and does not
affect geometry or the particle system directly.
2020-01-28 15:54:07 +01:00
7038a3a774 Disable some longer running tests from previous commit. 2020-01-28 09:52:45 -05:00
2867c35d4e Fix T73271, Delaunay Triangulation not robust enough.
A big rework of the code now uses exact predicates for orientation
and incircle. Also switched the main algorithm to use a faster
divide and conquer algorithm, which is possible with the exact
predicates.
2020-01-28 09:45:46 -05:00
40a9b5ebc7 Cleanup: changed NULL to nullptr in depsgraph C++ code
No functional changes.
2020-01-28 15:10:44 +01:00
01a3482742 Merge branch 'blender-v2.82-release' 2020-01-28 14:45:19 +01:00
Yevgeny Makarov
5536be2cfe UI: better preserve icon sharpness at different UI scales
This changes the GL_TEXTURE_MIN_FILTER parameter from GL_LINEAR_MIPMAP_LINEAR
to GL_LINEAR_MIPMAP_NEAREST. It gives a sharper result, since with these
settings only down scaling is used.

Differential Revision: https://developer.blender.org/D6662
2020-01-28 14:44:20 +01:00
ed4cbde967 Fix T66699 EEVEE: Material Preview "World" option doesn't work
Just hide the button for now.
2020-01-28 14:34:35 +01:00
ecfcb560db UI: NLA Editor Sidebar overhaul
The NLA Editor sidebar is currently out of step with the rest of Blender, and in particular the Sequencer, which offers similar features and functionality. This patch makes a number of UI layout changes to make it fit in.

  - Remove Active Track panel, since the track names can just be edited in the source list on the left
  - Rejiggered the categories to be more understandable. 'Strip' includes settings for the current strip, and 'Edited Action' includes settings for the action that is currently being edited
  - Use single column split layout
  - Use name + mute toggle configuration like in the Sequencer
  - Fix an issue with the theme, where the sidebar background was too dark, breaking the bright -> dark hierarchical logic
  - Use sub-panels for animated strip properties controls

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

Reviewed by Brecht van Lommel
2020-01-28 13:13:45 +01:00
Yevgeny Makarov
773beec541 macOS: add trackpad smart zoom event support
This is done with two-finger double tap on trackpads, and is usually used to
zoom into an element under the cursor.

It can now be used for toggling local view in the 3D viewport.

Differential Revision: https://developer.blender.org/D6588
2020-01-28 11:35:18 +01:00
Yevgeny Makarov
92d606ba26 UI: show better volume names and icons in file browser on macOS
Now it shows "Macintosh HD" instead of "/", and a different icon for
removable and network drives.

Differential Revision: https://developer.blender.org/D6683
2020-01-28 11:13:12 +01:00
Christian Rauch
bb65f49005 Linux: update EGL context code to fully work, including offscreen rendering
This is a step towards Wayland and headless rendering support, using EGL
instead of GLX. The EGL backend is not enabled by default, it can be tested
using WITH_GL_EGL=ON.

Differential Revision: https://developer.blender.org/D6585
2020-01-28 10:59:42 +01:00
Yevgeny Makarov
cdd223039b Fix T65350: scrolling popovers with trackpad not working on macOS
Differential Revision: https://developer.blender.org/D6483
2020-01-28 10:27:59 +01:00
acb576c762 UI: Empty image Properties layout tweaks
- Enable decorators
  - Use sub-panel for transparency

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

Reviewed by Brecht van Lommel
2020-01-28 10:25:46 +01:00
Yevgeny Makarov
50d65d5a2e Fix: icon alpha theme option does not affect toolbar icons correctly
Differential Revision: https://developer.blender.org/D6535
2020-01-28 10:14:13 +01:00
d4daecb223 Merge branch 'blender-v2.82-release' 2020-01-28 16:46:09 +11:00
2a39fb1345 Fix T68960: Crash loading app-template keymap 2020-01-28 16:44:24 +11:00
9a4544762e Merge branch 'blender-v2.82-release' 2020-01-28 16:22:37 +11:00
2e7fd35425 Error in last comment (redundant assignment) 2020-01-28 16:21:09 +11:00
051d224065 Merge branch 'blender-v2.82-release' 2020-01-28 16:15:38 +11:00
eb6cb67ab6 Fix T69213: App-Template doesn't run scripts in BLENDER_USER_SCRIPTS 2020-01-28 16:09:40 +11:00
ddda73b98a Cleanup: warnings, clang-format 2020-01-28 11:43:42 +11:00
477d15998c add utility function 2020-01-27 23:04:02 +01:00
e8ea904cee fix compile error 2020-01-27 23:03:54 +01:00
5df494d75c bmesh_intersect_edges: Don't detect faces if an edge already exists
For optimization.
2020-01-27 18:31:15 -03:00
d17a352f23 Merge branch 'master' into functions 2020-01-27 22:13:42 +01:00
787f6c8a7e enable node tree optimizations 2020-01-27 22:05:55 +01:00
f6334efbd8 cleanup naming 2020-01-27 22:05:44 +01:00
3a27fb824e fix typo 2020-01-27 21:57:50 +01:00
944956aba8 bmesh_intersect_edges: Improve detection of the best_face
`lambda_a` made it more restricted than it should be.
2020-01-27 17:43:12 -03:00
a39dc76dec pass buffer cache to functions via context 2020-01-27 21:30:59 +01:00
9291558b63 bmesh_intersect_edges: Fix asserts 2020-01-27 17:29:32 -03:00
3f29c1dd39 remove array allocator 2020-01-27 21:08:12 +01:00
b4a5df88fa try using BufferCache instead of ArrayAllocator 2020-01-27 21:07:03 +01:00
507a331f01 Fix T67552 EEVEE: Vector Curves node clamps maximum input value at 1.0 2020-01-27 19:52:20 +01:00
0366c46ec6 Fix T69070 EEVEE: Volume shader glitch if object as axis with 0.0 scale 2020-01-27 19:52:20 +01:00
22ca8b8aee UI: Win32 - Restore Minimized App On WM_Close
Changes needed for Windows 10 to restore and show close dialog from minimized state.

https://developer.blender.org/D5107

Reviewed by Brecht Van Lommel
2020-01-27 10:41:39 -08:00
f357740a80 Merge remote-tracking branch 'origin/blender-v2.82-release' 2020-01-27 10:49:18 -07:00
10eb711e16 Fix: Building without WITH_MOD_FLUID
When MOD_FLUID was off and WITH_CYCLES was on there was a build error.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6542
2020-01-27 10:46:55 -07:00
67f3941dd5 Merge branch 'blender-v2.82-release' 2020-01-27 14:17:51 -03:00
Simon G
c8103efbe3 Fix undefined behavior in tangent space computation
Use an improved implementation for circular shift.

Differential Revision: https://developer.blender.org/D6677
2020-01-27 18:00:34 +01:00
Miguel Pozo
6bf0e9dbb1 Fix particle instance modifier generating NaN polygons in some cases
Particles that don't exist should not be used, for example due to a
density texture.

Differential Revision: https://developer.blender.org/D6561
2020-01-27 17:38:21 +01:00
Yevgeny Makarov
f4f57ed21a Fix part of T65404: quit dialog doesn't show if Blender is minimized
This solves the problem for macOS and Linux, but not Windows yet.

Differential Revision: https://developer.blender.org/D6673
2020-01-27 17:38:21 +01:00
2662ba2438 Fix T59804: Expose hidden bmesh.ops.symmetrize options in python
The operator actually supports a 6-item enum

Differential Revision: https://developer.blender.org/D6613
2020-01-27 12:59:11 -03:00
20e803ac6b Shading: Add color output to White Noise node
Hash input values to a color.

Differential Revision: https://developer.blender.org/D6672
2020-01-27 15:47:51 +00:00
84c537e685 Document that tessellate_polygon() doesn't handle degenerate geometry
This 'fixes' T68554: 'API mathutils.geometry.tessellate_polygon returns
bad results sometimes' by documenting the limitations of the current
implementation.

I've also added a unit test for the function, so that any change in this
behaviour will get noticed.

No functional changes.
2020-01-27 16:42:25 +01:00
9c0cd8d7a3 cleanup 2020-01-27 16:36:26 +01:00
62bc3b2716 cleanup 2020-01-27 16:23:23 +01:00
fb953e0d8d restructure file 2020-01-27 16:04:48 +01:00
92b5b1fb69 cleanup naming 2020-01-27 15:59:41 +01:00
638a48885a cleanup 2020-01-27 15:41:10 +01:00
45619f2f2f cleanup 2020-01-27 15:40:24 +01:00
5d21efcd21 Fix T73409: error deleting preset saved on different drive than Blender install 2020-01-27 15:12:27 +01:00
Cody Winchester
1094e56041 Cast modifier: Add invert vgroup option.
Adds the Invert Vertex Group weight option to the Cast modifier.
Uses the same setup as similar modifiers invert weight.
Adds a boolean invert property next to the vertex group string in the modifier
and subtracts the current vertex weight from 1.0f if it is turned on.

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

Minor modifications by @mont29.
2020-01-27 14:46:01 +01:00
2ab5ca81a5 Fix T68413: gpu module example in docs produces unexpected results 2020-01-27 10:29:00 -03:00
5c82c9bae4 Edit Mesh: Auto Merge - Split Edges & Faces - Better logic for splitting faces
Differential Revision: https://developer.blender.org/D6626
2020-01-27 08:38:05 -03:00
39fd6ef305 Cleanup: fix compiler warning 2020-01-27 12:27:33 +01:00
aabf4d4076 Merge branch 'blender-v2.82-release' 2020-01-27 12:26:18 +01:00
5c75c8d8d0 Fix T63805: remove outdated and unused Linux package spec files
These are maintained by the various Linux distributions themselves instead.
2020-01-27 12:22:01 +01:00
c76a8f65b7 Memory: add OBJECT_GUARDED_SAFE_DELETE like MEM_SAFE_FREE 2020-01-27 12:22:01 +01:00
1107af1abb Fix OBJECT_GUARDED_FREE compiler error when type is in namespace 2020-01-27 12:22:01 +01:00
9cacadc8a6 Fix tests failing when building without Cycles
The purpose of this line was to not use Blender Internal and associated old
materials, now either Eevee or Cycles is fine.
2020-01-27 12:22:01 +01:00
3788901107 Cleanup: fix compiler warnings 2020-01-27 12:19:49 +01:00
62ec19f37c Cleanup: removed unused derivedDeform and derivedFinal 2020-01-27 12:18:43 +01:00
c055d69f83 Cleanup: remove unused partial visibility code, weird indentation 2020-01-27 12:18:43 +01:00
2efd8099de Merge branch 'blender-v2.82-release' 2020-01-27 11:54:35 +01:00
Julian Eisel
4e881540f7 Fix mistake in previous commit
While the behavior of this shortcut can be argued (it only works while
hovering the possibly invisible markers region), it was not my intention
to remove it entierly from the Graph and Sequencer Editor. Only wanted
to copy it.
2020-01-27 11:49:24 +01:00
34c8ba6d3e Fix T73399: Crash trying to move the origin of an empty.
Empty objects have no obdata, so we need to check for NULL id...
2020-01-27 11:48:44 +01:00
Julian Eisel
6dbc254c0b Fix T66920: Shortcut Bind Camera to Marker in timeline not working
The shortcut was only registered for the marker region, although it can
be registered to the main region without conflicts.
2020-01-27 11:42:46 +01:00
7527eb3a3a Merge branch 'blender-v2.82-release' 2020-01-27 11:41:23 +01:00
7e8e7bfe69 Fix T72862: Viewport Render doesn't render Grease Pencil Overlays
Fix by @campbellbarton
Note: Duplicated commit done in master first by error
2020-01-27 11:40:38 +01:00
dfb4a2e907 Fix T72862: Viewport Render doesn't render Grease Pencil Overlays, Shading
Fix by @campbellbarton
2020-01-27 11:34:00 +01:00
Julian Eisel
8a7859b9ad Fix T73428: Editor type dropdown menu missing in VSE
Mistake in 6a49161c8c, the tool-header region was not created when
creating a new VSE editor (as opposed to an existing one in some
workspace).

There was also no way to get the tool-header to show in such cases.
2020-01-27 11:21:35 +01:00
Julian Eisel
82f08cb2b0 Fix HUD toggle ("Adjust Last Operation") missing in VSE
The `SpaceSequenceEditor.show_region_hud` property was not generated,
but accessed in Python.
2020-01-27 11:04:01 +01:00
649659aa24 Merge branch 'blender-v2.82-release' 2020-01-27 19:48:54 +11:00
756b9acaf5 Fix T71719: Unrelated menus open on hover
Logic to open menus on hover changed since 2.7x for convenience
switching between popovers in the top-bar.
This also made hover open menus in situations where it isn't useful.

Restrict this to buttons placed side-by-side.
2020-01-27 19:45:20 +11:00
3ca9eaf187 BLI_rect: add rect-rect intersection checks on a single axis 2020-01-27 17:57:51 +11:00
65e42d7b32 Merge branch 'blender-v2.82-release' 2020-01-27 17:02:09 +11:00
9ee87231e1 Fix T72449: Stale outliner selection after object duplicate 2020-01-27 16:57:48 +11:00
b2769562ee Merge branch 'blender-v2.82-release' 2020-01-27 13:43:32 +11:00
9a8dd37d1a makesdna: avoid 'alloca' in a for loop
Issue raised by Sergey in D6634
2020-01-27 13:39:58 +11:00
f56bc68231 Docs: update reference to PYTHONPATH 2020-01-27 13:33:25 +11:00
1824b8fb52 make single element execution work again 2020-01-26 21:56:41 +01:00
cbadf3e29a cleanup warning 2020-01-26 21:55:32 +01:00
e7a9d2ce96 cleanup 2020-01-26 21:00:34 +01:00
a5b08c1d95 minor improvement 2020-01-26 20:56:05 +01:00
0116cc1f4d fix 2020-01-26 20:54:09 +01:00
4141c905f3 cleanup 2020-01-26 20:50:02 +01:00
4202a208c2 compute dependency depths in network implementation 2020-01-26 20:39:41 +01:00
8c45804a1c initial deepest depth first heuristic 2020-01-26 17:26:45 +01:00
Julian Eisel
b59adcaa36 Fix T73357: Multiple importers fail
Very stupid mistake in ba8de85299, registered property for wrong
class. It should be registered for the PLY importer add-on only.
2020-01-26 16:48:05 +01:00
96339c4cef Fix T73304: Crash using force fields and hair dynamics
This implements a better heuristic for identifying if cloth or hair is
being dealt with (checking hairdata, instead of primitive_num).

The issue was caused by a change in primitive counting in rBd42a7bbd6ea5

I'm also adding some safeguards to avoid ever computing pressure for
hair. This shouldn't really be necessary, but it's good to be sure.
2020-01-26 15:19:42 +01:00
97b6d31f41 use new network evaluation storage 2020-01-26 13:16:43 +01:00
24724b70f0 new network evaluation storage (unused so far) 2020-01-26 12:32:11 +01:00
8667a87134 Revert "try storing values per input differently"
This reverts commit fee675ffe0.
2020-01-26 11:06:54 +01:00
36f713e216 CMake: Fix precompiled Boost libraries on Linux
When building with precompiled libraries on Linux, CMake used boost libs
from the system outside the lib dir. This restricts CMake to use only the
libraries from the precompiled libraries.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D6659
2020-01-25 23:37:13 -07:00
5325bc3fb6 Industry Compat keymap: cleanup
Remove entries for the transform tools, since this is no longer necessary after recent changes. The default keymap entries are simply used instead, since the MMB is now added automatically.
2020-01-25 18:01:04 +01:00
92230a32fd Fix T73362: Tweak Tool not working if IC Keymap is chosen
I don't fully understand why this was broken, but defining the Tweak tool keymap here and removing the 3d cursor argument fixes it.
2020-01-25 17:03:39 +01:00
12b183ba55 Docs: update reference to PYTHONPATH 2020-01-25 20:15:38 +11:00
cb83cf1b71 Cleanup: spelling 2020-01-25 20:15:38 +11:00
cdebc8a9f6 Cleanup: include missing CMake headers 2020-01-25 20:15:35 +11:00
497be89f28 Cleanup: remove source file added by accident 2020-01-25 17:25:08 +11:00
39cf62607f Bevel: Remove Debugging Code
Remove old / trivial print statements and drawing code.

Reviewed By: howardt

Differential Revision: https://developer.blender.org/D6661
2020-01-24 18:12:30 -05:00
abe5fcb8d1 Bevel: Simplify Profile Calculation Step
Profile calculation now happens in a single pass rather than being spread
throughout the process. This means each profile will only be calculated a
single time.

Reviewed By: howardt

Differential Revision: https://developer.blender.org/D6658
2020-01-24 17:59:54 -05:00
4aa703aa14 UI: View3D Cursor Changes
Changes the default View3D mouse cursor to the OS-supplied arrow pointer. Subsequent cursor changes will now be set per-tool instead.

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

Reviewed by Campbell Barton
2020-01-24 12:17:57 -08:00
79d9874028 Merge branch 'blender-v2.82-release' 2020-01-24 20:48:38 +03:00
fc1f5bded4 Depsgraph: fix false positive time dependencies for simple drivers.
The dependency graph has to know whether a driver must be re-evaluated
every frame due to a dependency on the current frame number. For python
drivers it was using a heuristic based on searching for certain sub-
strings in the expression, notably including '('.

When the expression is actually evaluated using Python, this can't be
easily improved; however if the Simple Expression evaluator is used,
this check can be done precisely by accessing the parsed data.

Differential Revision: https://developer.blender.org/D6624
2020-01-24 20:48:02 +03:00
dada30f5ef Merge branch 'blender-v2.82-release' 2020-01-24 18:23:28 +01:00
300f937aec Sculpt: Rename Topology Brush to Slide Relax Brush
The full name was "Topology Slide/Relax", but it didn't fit in the
toolbar UI. This was causing some problems:

- The mesh filter that does the same thing is called "Relax"
- We may want to add a "Topology Brush" tool in the future that is more
oriented to retopology task (like creating strips of quads), so by doing
this we avoid having two tools with the same name in the UI.

Reviewed By: billreynish

Differential Revision: https://developer.blender.org/D6590
2020-01-24 18:21:19 +01:00
f08f92a04d Merge branch 'blender-v2.82-release' 2020-01-24 18:15:15 +01:00
5186bb56b5 Fix T71373: Sculpt Mask not extracting correctly on scaled objects
This patch applies the original object scale to the coordinates of the
extracted mask mesh. Without this patch, the mesh was no taking the
original object scale into account and the shrinkwrap will fail.

The other solution would be copying the objecty scale to the new
extracted mask object, but I would like to avoid entering sculpt mode
with scaled objects as it may produce wrong behaviors in some tools.

Reviewed By: jbakker

Maniphest Tasks: T71373

Differential Revision: https://developer.blender.org/D6207
2020-01-24 18:14:13 +01:00
be691105c2 Fix T73080: Remove support for scene radius in Weight/Vertex paint
The 2D paint cursor in the 3D view does not support scene radius in
weight and vertex paint mode. This was also the case in 2.80 with the
old cursor. The option to change the units from view to scene is not
available in the UI in those modes, so I think it makes sense to remove
the support from the code.

The ideal solution could be supporting the new cursor in all paint
modes, but that is going to take more time and it is going to be
problematic in texture paint. After doing this, we can bring this code
back and add the option to change the units to the UI.

Reviewed By: jbakker

Maniphest Tasks: T73080

Differential Revision: https://developer.blender.org/D6586
2020-01-24 18:11:37 +01:00
8d3df01e9d Fix T53205: Show Smoke Advance Panel at Outflow type
Now hiding the initial velocity and texture panel when flow behavior is set to outflow.
2020-01-24 17:23:50 +01:00
7a9f102537 Fix T72975: [Mantaflow] Mesh generation bug
The initial value for phi was too high.
2020-01-24 17:23:50 +01:00
64b152c254 Fluid: Added resume cache boolean to standalone scripts
Exported Manta script was missing the new resume options in the data load functions.
2020-01-24 17:23:50 +01:00
1c98539b57 Depsgraph: Correct FPS debug print
It was printing "frame" time instead of FPS.

Other interesting thing to get solved is to solve "drop" in FPS
when there is an idle time in user input.

Current usecase is limited to observing FPS when there is a continuous
stream of events: for example, keep moving vertex in edit mode while
watching debug prints.
2020-01-24 16:45:32 +01:00
b5652f3f02 Merge branch 'blender-v2.82-release' 2020-01-24 15:24:27 +01:00
cb6f9c2f19 Make deps: Force some boost dependencies
Boost could have picked up system-wide libbz2-dev installed and enable
this compression in iostreams. Nothing really wrong with this, but it
makes it so final Blender binary depends on bz2, which breaks default
linker flags.

This commit makes it so Boost is not using libraries which we don't
need, simplifying linking setup.

Differential Revision: https://developer.blender.org/D6668
2020-01-24 15:21:36 +01:00
6b28b77730 Depsgraph: Report FPS when running with --debug-depsgraph-time
The FPS here is measured based on a timestamp from when depsgraph
was previously evaluated.

Allows to ease investigating performance improvements/regressions
which are not related on animation system but on modifications on
a single frame (such as transforming vertex in edit mode).
2020-01-24 15:19:29 +01:00
21892d5592 Merge branch 'blender-v2.82-release' 2020-01-24 10:07:08 -03:00
2bd62ca7eb Fix T73349: X-Ray Mode - snapping through object stop working on value = 1 2020-01-24 10:06:27 -03:00
11df5443e5 Merge branch 'blender-v2.82-release' 2020-01-24 12:49:49 +01:00
18343c230d Fix/workaround initialization order of static TBB/MKL
Was caused by recent refactor of dependencies in 517870a4a1.

While there is no fully reliable solution to this issue other than
making TBB a dynamic library dependency (as documentation tells us
to do), there seems to be simple workaround which doesn't require
deeper changed in build process and packaging.

Tested on Brecht's computer who managed to reproduce the issue on
Linux (T72015#857423).
2020-01-24 12:47:35 +01:00
cf84db61a6 Depsgraph: Refactor, move debug struct to own file 2020-01-24 12:44:16 +01:00
c89e103348 Depsgrapg: Refactor, move Relation to own file 2020-01-24 12:44:16 +01:00
3401b070b8 Depsgraph: Refactor, wrap debug fields into own structure 2020-01-24 12:44:16 +01:00
71d53ab465 Fix T73001: Shader Node with driver not updating when animated
When there are ID properties on an object, and these are animated and
used by a driver, the depsgraph has proper connections between ACTION →
ID PROPERTY → DRIVER.

When these properties are defined on a mesh, however, the depsgraph
relations are incorrectly created between GEOMETRY → PROPERTIES_EXIT →
DRIVER (because it's assumed that 'source = ENTRY' implies 'geometry').

This patch solves this by first checking whether the targeted property
is an ID property and handling it accordingly. This also made it
possible to remove some special cases from pose bone relations.

Maniphest Tasks: T73001

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D6571
2020-01-24 12:16:33 +01:00
316d2c1522 Fix T73336: Several issues (including crashes) with ID pointer IDProps and RNA.
`RNA_property_pointer_set()` was just broken when assigning to an ID
pointer IDProp, on both debug/checks and actual assignment.

That was at least affecting RNA copying and liboverrides area...
2020-01-24 11:39:21 +01:00
af00fab312 IDProps: add utility to set an ID pointer IDProp value. 2020-01-24 11:39:21 +01:00
726c7ba632 Merge branch 'blender-v2.82-release' 2020-01-24 09:57:55 +01:00
005af1e274 Fix T72083: Object.proxy_collection is been set to linked target object
even when target is not a collection

Looks like this was (accidentally) removed in {rBbe9e469ead22}
https://developer.blender.org/
rBbe9e469ead227aee8d4c29b98a125cf599c5c8bb#change-pFg0VUTAHY2q

This could also result in a missing update in
object_handle_update_proxy, see T72083 for an example.

Thx @Macroni investigating!

Maniphest Tasks: T72083

Differential Revision: https://developer.blender.org/D6651
2020-01-24 09:54:03 +01:00
d6bd359545 Merge branch 'blender-v2.82-release' 2020-01-24 09:43:42 +01:00
c5436883c6 Fix T69121 DRW: Missing depth buffer refresh with GPencil + Cycles
I just cleaned up the logic and checked for GPencil objects in the scene.
2020-01-23 21:38:06 +01:00
c2e21b2329 Fix T71374 EEVEE: Fix Node group socket not converting inputs as in Cycles
Pretty straight Forward. Create a temp node during sockets expansion to
force the conversion to float.
2020-01-23 19:56:50 +01:00
39ae4804a8 Fix T72789: Mantaflow cache doesn't work with non-latin cache directory
Root of the problem was that Manta's Python API was converting to and from Latin1 instead of UTF8.
2020-01-23 17:15:45 +01:00
6fff73e3f0 Merge branch 'blender-v2.82-release' 2020-01-23 16:59:50 +01:00
517870a4a1 CMake: Refactor external dependencies handling
This is a more correct fix to the issue Brecht was fixing in D6600.

While the fix in that patch worked fine for linking it broke ASAN
runtime under some circumstances.
For example, `make full debug developer` would compile, but trying
to start blender will cause assert failure in ASAN (related on check
that ASAN is not running already).

Top-level idea: leave it to CMake to keep track of dependency graph.

The root of the issue comes to the fact that target like "blender" is
configured to use a lot of static libraries coming from Blender sources
and to use external static libraries. There is nothing which ensures
order between blender's and external libraries. Only order of blender
libraries is guaranteed.

It was possible that due to a cycle or other circumstances some of
blender libraries would have been passed to linker after libraries
it uses, causing linker errors.

For example, this order will likely fail:

  libbf_blenfont.a libfreetype6.a libbf_blenfont.a

This change makes it so blender libraries are explicitly provided
their dependencies to an external libraries, which allows CMake to
ensure they are always linked against them.

General rule here: if bf_foo depends on an external library it is
to be provided to LIBS for bf_foo.
For example, if bf_blenkernel depends on opensubdiv then LIBS in
blenkernel's CMakeLists.txt is to include OPENSUBDIB_LIBRARIES.

The change is made based on searching for used include folders
such as OPENSUBDIV_INCLUDE_DIRS and adding corresponding libraries
to LIBS ion that CMakeLists.txt. Transitive dependencies are not
simplified by this approach, but I am not aware of any downside of
this: CMake should be smart enough to simplify them on its side.
And even if not, this shouldn't affect linking time.

Benefit of not relying on transitive dependencies is that build
system is more robust towards future changes. For example, if
bf_intern_opensubiv is no longer depends on OPENSUBDIV_LIBRARIES
and all such code is moved to bf_blenkernel this will not break
linking.

The not-so-trivial part is change to blender_add_lib (and its
version in Cycles). The complexity is caused by libraries being
provided as a single list argument which doesn't allow to use
different release and debug libraries on Windows. The idea is:

- Have every library prefixed as "optimized" or "debug" if
  separation is needed (non-prefixed libraries will be considered
  "generic").

- Loop through libraries passed to function and do simple parsing
  which will look for "optimized" and "debug" words and specify
  following library to corresponding category.

This isn't something particularly great. Alternative would be to
use target_link_libraries() directly, which sounds like more code
but which is more explicit and allows to have more flexibility
and control comparing to wrapper approach.

Tested the following configurations on Linux, macOS and Windows:

- make full debug developer
- make full release developer
- make lite debug developer
- make lite release developer

NOTE: Linux libraries needs to be compiled with D6641 applied,
otherwise, depending on configuration, it's possible to run into
duplicated zlib symbols error.

Differential Revision: https://developer.blender.org/D6642
2020-01-23 16:59:18 +01:00
544ee7a4f2 Make deps: Fix zlib symbols defined twice
We compile zlib as own dependency, but are not informing BLOSC
to use it. This leads to zlib symbols defined twice when linking
Blender: one set comes from libz.a and another one from libblosc.a.

Tested on Linux Debian testing and CentOS 7.5.

It is possible that this change on its own will lead to linking
errors after libraries are re-compiled, This will be fixed as
a dedicated fix to Blender's build system.

Reviewed By: brecht, mont29, LazyDodo

Differential Revision: https://developer.blender.org/D6641
2020-01-23 16:59:18 +01:00
fb671035be Merge branch 'blender-v2.82-release' 2020-01-23 16:56:26 +01:00
d9d11e2faf Fix T73327: GPencil strength sculpt brush not working with small brush radius
The problem was related to the smooth of the strength. As the factor was very low and the value was smoothed , the result was almost nothing when the radius was very small. Now the factor is higher and the smooth is done after clamping pressure.
2020-01-23 16:55:37 +01:00
fee675ffe0 try storing values per input differently 2020-01-23 16:02:24 +01:00
ce3ec2f172 remove print 2020-01-23 16:01:55 +01:00
170844135a Fix T67050 Overlay: Forcefield limits are not dashed
This adds some kind of dashing to the tube and cone limits. Although the
dashing is in object space and is not a good as old dashing. But it is
the least time consuming and least complex solution.
2020-01-23 15:41:41 +01:00
3cd32c376d Fix T66956 EEVEE: NaN produced by bad geometry mess with the DoF
Sanitize the source of the depth of field.
2020-01-23 15:41:41 +01:00
6dcbc3cd5a Fix T73335 Overlay: Light Distance line does not represent custom distance
This is a fix to the issue that light distance line end does not represent
anything now that shadow bounds are computed automatically.
2020-01-23 15:41:41 +01:00
3ad9ccaba7 initial array allocator 2020-01-23 15:15:29 +01:00
8482ba6d2e UI: Text Editor header cleanup
- Register toggle is in the Text menu
  - Run Script and Refresh OSL become an icon buttons next to ID block

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

Reviewed by Campbell Barton
2020-01-23 14:53:19 +01:00
24ebed4d84 Fix T51011: bpy.ops.action.new does nothing when invoked from script
The operator always expect to be called form a button.
But this is not always the case.

This does not bring functional changes when not called from python.
2020-01-23 10:44:19 -03:00
fb0136f908 Fix T71311 Bridge Edge Loops crash when bridging cube edges
This commit will prevent the crash. It does produce a result that may not
be desirable (only briding one face of the cube), but at least it's better
than crashing.
2020-01-23 14:39:50 +01:00
79122aec30 UI: Make default Info Editor theme more consistent with Outliner (round 2)
Fixes an error in the first version of this commit. Accidentally included theme entries from anther patch which isn't yet merged.
2020-01-23 14:38:10 +01:00
dae7527f4f Merge branch 'master' into functions 2020-01-23 14:31:59 +01:00
9c9ea37770 Fix: Use a minimal alignment of 8 in MEM_lockfree_mallocN_aligned
`posix_memalign` requires the `alignment` to be at least `sizeof(void *)`.
Previously, `MEM_mallocN_aligned` would simply return `NULL` if a too small
`alignment` was used. This was an OS specific issue.

The solution is to use a minimal alignment of `8` for all aligned allocations.
The unit tests have been extended to test more possible alignments (some
of which were broken before).

Reviewers: brecht

Differential Revision: https://developer.blender.org/D6660
2020-01-23 14:21:48 +01:00
237d03f3a3 Revert "UI: Make default Info Editor theme more consistent with Outliner"
This reverts commit dc96995b03.
2020-01-23 13:43:42 +01:00
dc96995b03 UI: Make default Info Editor theme more consistent with Outliner
Currently, the Info Editor default theme settings aren't consistent with other areas such as the Outliner. This change makes it fit in more by using the same default values for things like the background and selected elements.

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

Reviewed by Pablo Vazquez
2020-01-23 13:34:33 +01:00
9f63f863f1 Merge branch 'master' into functions 2020-01-23 12:34:12 +01:00
dee01cad19 UI: Rename 'View Frame' to 'Go to Current Frame'
In our animation editors, we have a feature called View Frame. Problem is, it is not self evident what this feature does. Does it show frame numbers? Does it show all frames? Does it frame the view? Does it frame the view?

What this does, is it moves the view to where the playhead is. With clearer naming, we can communicate this much more clearly.

This is just a simple patch that changes the name from 'View Frame' -> 'Go to Current Frame'.

Differential Revision: https://developer.blender.org/D6437
2020-01-23 11:50:13 +01:00
c01246f6c0 UI: Consolidate masking-related brush controls
In the brush properties, some masking-related controls are currently available as a sub-panel in the Options panel, while others are in the Mask panel. I want to generally lessen the amount of controls in generic 'options' panels, since it's non-descriptive and rather a rather random grab bag of various controls. Better to group things in terms of their functionality with descriptive names.

This change consolidates the masking-related controls under one panel.

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

Reviewers: Pablo Dobarro, Julien Kaspar
2020-01-23 11:45:48 +01:00
1f6ab32196 Fix T73279: Particle Rotation checkbox enabled when a bake exists
The contents of the Rotation panel was already disabled when a bake
exists, but the checkbox in the header wasn't. Since rotations are part
of the baked data, it doesn't make sense to enable/disable rotations
after baking.
2020-01-23 10:37:32 +01:00
fe772bf818 UI: Change 'Lock Time to Other Windows' > 'Sync Visible Range' + add to Sequencer
As pointed out by user @Peter Fog (tintwotin):

The current name for this property is wrong for two reasons:

  - Because it makes incorrect use of the term 'window' (in Blender these are called 'editors')
  - 'Lock Time' is incorrect, because it has nothing to do with locking the time at all. In Blender, the time is already locked and always the same across editors, no matter what. This property only syncs the visible range, which is something quite different.
For this reason, this is changed to 'Sync Visible Range' instead. I also added a tooltip, which was completely missing.

This patch also adds this property to the Sequencer, where it was missing.

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

Reviewed by Julian Eisel
2020-01-23 10:34:29 +01:00
c5c46e5b74 UI: Fix Hover Flickering on Selected Items
Removes hover highlight from already-selected UI items to remove unintended flickering.

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

Reviewed by Campbell Barton
2020-01-22 14:00:08 -08:00
452834f1e3 UI: Area Duplicate Icon
Changes the icon used for 'duplicate into new window' to a new one created for this purpose.

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

Reviewed by Julian Eisel
2020-01-22 13:48:25 -08:00
Tyler Seacrest
e769be1f34 Bugfix for T69413
Fixes the invisible scrollbar when opening preferences by 'Editor Type' by always creating scrollbars for V2D_COMMONVIEW_PANELS_UI objects.

This removes a fix (T47047) for dpi issues when dragging out the toolbox. The new toolbox in 2.8 does not seem to have the same DPI issues.

Exact steps for others to reproduce scrollbar invisible (T69413):
change the 3d viewport to preferences and go to addons. The scrollbar will not be visible

To verify there are no DPI issues:
Apply the patch and open blender. Hide the toolbar. Split the 3d view port into 4 windows, such that one is very small horizontally, another is very small vertically, and a third is small in both directions. Drag out the toolbar arrow on all four viewports. The Toolbar will be the same size in each. For further verification, adjust the scaling and repeat.
{F7805968}

Also this is my first time submitting a patch. Some instruction is welcome!

Reviewed By: #user_interface, Severin

Maniphest Tasks: T69413

Differential Revision: https://developer.blender.org/D6050
2020-01-22 18:49:03 +01:00
Julian Eisel
c68c160e7b UI: Hide empty Tool-Header in Rendering workspace (Image Editor)
Fixes T71509
2020-01-22 18:35:47 +01:00
ca7bd3f1c3 Fluid: Cleaned up functions that deal with Python objects (C-API)
This commit belongs to T72894. It's related to (my) previous commits on pointer exchanges (today + yesterday). It cleans up the functions by describing their usage in the comments, adds additional nullptr checks, and fixes the reference count responsibilities of newly created PyObjects.
2020-01-22 18:31:19 +01:00
8fc68a2e9c Fix T69090: Collada Exporter now exports the base color if Nodes are disabled
I also changed the Collada importer scuh that the diffuse Alpha is now set
for the generated PBSDF Shader AND for the base color.

Note: we can not export the base color AND the color
from the PBSDF Shaders at the same time. And when importing
we do not know if the color was originally coming from a base
material or from a shader. Setting them both in import seems
to give the most consistent results.
2020-01-22 18:04:08 +01:00
Julian Eisel
084f072aae Fix T73191: Buttons in lower left of Preferences broken
I'm still not entirely sure what was going on - I know that the execute
region didn't get initialized correctly, but doing that at a later point
didn't fix the issue. Apparently forcing the header region to
re-initialize does fix it, even though I was sure this was redundant.

Also fixes a memory leak in UI code after preferences were opened.
2020-01-22 18:02:47 +01:00
abce4833a6 install_deps.sh: strip trailing punctuation from version numbers
Encountered this issue when enabling more libraries.
2020-01-23 03:39:06 +11:00
be7571a5e4 Fluid: Refactored Mantaflow <-> Blender pointer exchange once more 2020-01-22 16:45:57 +01:00
fde6151641 install_deps.sh: fix versions such as 1.6_RC2 failing to compare
This is stripped off since it causes an error when evaluating
the strings as numbers.
2020-01-23 02:17:28 +11:00
Julian Eisel
412179b39b Cleanup: Rename ED_region_init() -> ED_region_floating_initialize()
This function is a very special refresh function just for floating
regions. _initialize is more consistent with ED_area_initialize() so use
that too.

Also adds assert.
2020-01-22 15:58:39 +01:00
26687dda5a Fix T71344: Optix render errors with motion blur and unknown bone constraint relationship
The OptiX SRT motion expects a motion defined by translation,
rotation, shear and scale, but the matrix decomposition code in
Cycles was not able to extract shear information and instead
produced a stretch matrix with the information baked in. This
caused conflicting transforms between traversal and shading
and lead to render artifacts.
This patch changes the matrix decomposition to produce factors
inline with what OptiX expects to fix that.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6605
2020-01-22 15:49:14 +01:00
0272acee0d install_deps.sh: fix IFS being incorrect when a version check fails
This caused quoting to fail later on.
2020-01-23 01:42:33 +11:00
fc0df1ffb4 Revert "install_deps.sh: fix ffmpeg package installation on Arch"
This reverts commit 3cb212602c.

The root cause was IFS being set incorrectly.
2020-01-23 01:42:33 +11:00
cfb7a8048c Merge branch 'blender-v2.82-release' 2020-01-22 15:41:50 +01:00
cbbbb9d179 Fix wrong DNA alignment on arm{el,hf} and mipsel
Technically, pointers are to be padded with followup pointer.
2020-01-22 15:34:27 +01:00
6a49161c8c VSE: Tool system integration
Add toolbar to sequencer regions.

A bit of refactoring has to be done in RNA space.
Currently there is only cut tool implemented to serve as template for
anybody who would like to add more.
2020-01-22 15:06:18 +01:00
Julian Eisel
f559e3977e Alembic & Collada: Show sidebar by default in file browser
Importers/exporters should show the sidebar by default (if they have
any settings). For some reason this was missing for the Alembic and
Collada exporters.
2020-01-22 14:59:06 +01:00
Julian Eisel
ba8de85299 PLY Import: Hide empty operator properties sidebar in file browser
The sidebar is empty for the PLY importer, so better to hide it.
2020-01-22 14:59:06 +01:00
3cb212602c install_deps.sh: fix ffmpeg package installation on Arch
A blank space at the start of the string caused the list to be quoted
as a single argument.
2020-01-23 00:50:33 +11:00
e790f4a49f install_deps.sh: define sections with overlines
Over-lines are used in other large files (keymaps for e.g),
using this add-hoc convention for sections make it easier to
configure editors to jump between them (as I have locally).
2020-01-23 00:45:34 +11:00
2b236294bb install_deps.sh: use jack2 on Arch 2020-01-23 00:41:26 +11:00
a90c2834a1 install_deps.sh: add debugging options
Add USE_DEBUG_TRAP, USE_DEBUG_LOG for trapping errors and logging
executed lines respectively.

Handy for troubleshooting issues in the script.
2020-01-23 00:41:26 +11:00
fbe25aeed4 Cleanup: adjust extend argument for tweak tool
This isn't a type, name argument 'extend'.
2020-01-23 00:41:26 +11:00
d51760dc5a Merge branch 'blender-v2.82-release' 2020-01-22 13:41:43 +01:00
a60a623a1a Fix T69921: VSE - Waveforms unnecessary redrawn on offset change
Waveform is freed in `sound_load_audio()` when sound length is `queried by BKE_sound_info_get()`.

Add argument free_waveform, so `BKE_sound_info_get()` can skip waveform freeing, as it is not expected to alter sound.

Reviewed By: sybren

Differential Revision: http://developer.blender.org/D6053
2020-01-22 13:36:55 +01:00
96fa613639 Fix T73311: Mantaflow > Liquid: Enabling Initial Velocity on Inflow / Outflow crashes Blender 2020-01-22 11:40:04 +01:00
c4b5279bbc Fix T72894: Mantaflow: several crashes due to null pointers
Incorporated LazyDodo's suggestions from the task.
2020-01-22 11:17:54 +01:00
908ed661ee Fix Blender DMG bundling for macOS failing on buildbot
The change from D6462 caused a permission prompt. Setting the user and group
UID appears unnecessary to fix the issue, so leave just the mode.
2020-01-22 11:14:30 +01:00
69828cba53 UI: rename transparency to opacity
Calling it transparency makes value seem inverted, resolves T73306.
2020-01-22 17:44:54 +11:00
4099ad1984 install_deps.sh: quiet warning in install_deps.sh
The unquoted check gave a 'binary operator expected' warning.
2020-01-22 17:30:54 +11:00
a4cf2cf2de VSE: Add Adjust Last Operation panel to the video sequencer
Add Adjust Last Operation panel to Sequencer.

`OPTYPE_REGISTER` was removed form some operators and few properties were hidden
So they don't show up on the panel

Author: a.monti

Reviewed By: ISS

Differential Revision: http://developer.blender.org/D6210
2020-01-22 02:07:54 +01:00
0f7095f826 Merge branch 'blender-v2.82-release' 2020-01-22 01:41:26 +01:00
3119a014a6 Fix T70415 100% proxy files playing with poor performance
Refactor code to use `eSpaceSeq_Proxy_RenderSize` or corresponding `IMB_Proxy_Size`
enum items directly.

`SEQ_PROXY_RENDER_SIZE_100` has assigned value 99 to distinguish from `SEQ_PROXY_RENDER_SIZE_FULL`.
This caused error in image size calculation and because of that image had to be scaled.

Author: EitanSomething

Reviewed By: ISS

Differential Revision: http://developer.blender.org/D6368
2020-01-22 00:59:31 +01:00
Bataev Artem
ddda1af97a 3D View: support auto-perspective when snapping
Part of D6639
2020-01-22 08:00:05 +11:00
055b323a0c Merge branch 'blender-v2.82-release' 2020-01-22 06:16:11 +11:00
Henrik Dick
bda0c0847b Fix numerical instabilities of solidify with complex constraints
Sometimes on flat open vertices the thickness would suddenly start
to be jumping in powers of 2, also when bending a plane there is a
noticeable jump in the geometry.
When offset is set to -1 or 1 weird glitches happen.

See D6559 for test cases that failed.
2020-01-22 06:12:38 +11:00
676f6a699b Merge branch 'blender-v2.82-release' 2020-01-21 20:10:56 +01:00
56c7ee99b8 Fix T72619: Fix/implement support of particle modifiers in liboverride.
Some modifiers (like particle system, but also some other physics
simulations) require extra steps besides creating the modifier itself,
so had to switch to higher-level `ED_object_modifier_add()` to add
inserted modifiers in an overriding object data-block.

Due to how particle modifier handles copying, some extra nasty
hacks/work-around were also needed to get it working.
2020-01-21 20:10:02 +01:00
367d60dab1 Make ED_object_modifier_add() accept NULL scene parameter.
This data is only used to get current time/frame value, which is never
mandatory to add a modifier.

Needed by incoming fix to support particles modifiers in liboverrides.
2020-01-21 20:10:02 +01:00
Henrik Dick
71f39c45a7 Fix numerical instabilities of solidify with complex constraints
Sometimes on flat open vertices the thickness would suddenly start
to be jumping in powers of 2, also when bending a plane there is a
noticeable jump in the geometry.
When offset is set to -1 or 1 weird glitches happen.

See D6559 for test cases that failed.
2020-01-22 06:07:09 +11:00
6c50e82efb Fluid: Refactored the Mantaflow <-> Blender pointer exchange function and switched to from NULL to nullptr in cpp files 2020-01-21 18:31:10 +01:00
Keith Boshoff
0de07c9814 Docs: describe vertex dirt method 2020-01-22 04:08:30 +11:00
7dc4477784 Merge remote-tracking branch 'origin/blender-v2.82-release' 2020-01-21 17:58:49 +01:00
5168408ae5 Fix T72459: Mask Modifier breaks Vertex Parenting
The `give_parvert()` function was only considering the mesh's original
vertex indices when the parent vertex index was valid for the evaluated
mesh. However, when using the Mask modifier the evaluated mesh can have
less vertices but still have the parent vertex.

Since the `if (nr < numVertex)` condition wasn't used to prevent any
out-of-bounds access, and seems just an incorrect optimisation, it could
be removed.
2020-01-21 17:53:06 +01:00
4db9562246 libs/windows: Prevent USD exports from leaking into blender binary.
Even though we build USD as static, it still feels the need to mark its
symbols with declspec(dllexport) which means the blender binary now exports
these symbols.

this patch fixes that unwanted behaviour, however USD libs still need to
rebuild before this becomes visible in the blender binary

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

Reviewed By: sybren
2020-01-21 09:47:10 -07:00
ce92e3d553 Fix: Building with clang on windows.
The USD landing broke building with clang on windows
due to a couple of reasons:

1) Some incompatibilities in their headers [1] only one
of them was important for us and is included in our patchset
now.

2) clangs lld wanted the full path to the libusd_b library
when using the whole archive link option, while msvc can
figure it out from just the library name.

Tested with clang/msvc and msbuild and ninja generators

[1] https://github.com/PixarAnimationStudios/USD/issues/1030
2020-01-21 09:46:53 -07:00
6cfdd882d7 Merge branch 'blender-v2.82-release' 2020-01-22 02:58:31 +11:00
8d163d5976 Docs: describe turn-table gimble lock mitigation 2020-01-22 02:53:38 +11:00
3436eea1f5 Fix T73297: Incorrect lock properties tooltip 2020-01-22 02:53:38 +11:00
42360e64da Fix T73233: Image Editor Color Picker Crash
When using the color picker on a image editor it tries to read the color
from the original image. When there is no original image the code
crashes during the determination of the UDIM tile number.

There are 2 approaches to solve this.
1. Modify `BKE_image_get_tile_from_pos` to support NULL pointers.
2. Modify `ED_space_image_color_sample` with an early exit.

This patch modifies `ED_space_image_color_sample` with an early exit.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6629
2020-01-21 16:32:26 +01:00
Julian Eisel
5d69d2a863 Fix T71810: Flipping Sidebar with tabs breaks alignment
Panel alignment was only updated when panel size changed. Now we can
also recognize changes in the category tabs offset and tag panels
for alignment updates.
2020-01-21 16:13:07 +01:00
267061e8f4 Merge branch 'blender-v2.82-release' 2020-01-22 01:34:11 +11:00
02e1f92cfa Merge remote-tracking branch 'origin/blender-v2.82-release' 2020-01-21 15:31:19 +01:00
98a99cb763 Fix T73295: Incorrect BMesh volume calculation
Use double precision since volume calculation is susceptible
to float precision errors.
2020-01-22 01:31:12 +11:00
2e4fbd327f Fix T72216 Copied Particles not refreshing in the viewport
The depsgraph was not tagged for relations update after the copy, which
means it was incomplete and thus didn't update the copied particle sim.
2020-01-21 15:30:07 +01:00
1ee253c014 Fix T68677: Graph Editor zoom to selected ignores scrollbar occlusion
Reviewed by: Sybren Stüvel, Julian Eisel

Differential Revision: https://developer.blender.org/D6309
2020-01-21 14:25:43 +01:00
4c8de1040d Merge branch 'blender-v2.82-release' 2020-01-21 23:58:27 +11:00
79bd553f06 Industry Compatible Keymap: use MMB to access the active tool
Fallback tools are used on LMB, MMB accessed the active tool.
2020-01-21 23:50:24 +11:00
2e9d5ba211 GHOST: bundle tablet data with GHOST event
Previously the window manager would receive the GHOST event and then query the
latest tablet data from the window to go along with it. If multiple events were
queued, it would then use too new tablet data for handling older events.

Fixes T62565: tablet pressure not working on macOS with some devices
2020-01-21 12:24:01 +01:00
c58cc8aeda Cleanup: deduplicate window event state update code 2020-01-21 12:22:24 +01:00
ca4e8b423e Cleanup: simplify wmEvent tablet data storage and naming
Removing meaningless distinction between NULL pointer and EVT_TABLET_NONE,
and initialize pressure and tilt to 1.0 and 0.0 respectively when no tablet
is used.
2020-01-21 12:22:24 +01:00
40d71fc642 Fix T70891: Motion Path - Changing endframe clamps startframe to 1
There were two strange things going on:

- Start frame was clamped to 1, even when frame 0 is always a valid number.
  This also ignored the 'Allow Negative Frames' user preference.
- Start frame was only clamped when setting the end frame, so first setting
  the end frame and then the start frame would result in a different result
  than doing it in the opposite order.

This commit fixes both issues by:

- Clamping the lower bound of the start frame only if negative frames are
  not allowed, and
- apply that clamp both when setting the start and the end frame.
2020-01-21 11:53:12 +01:00
f10d190240 Merge branch 'blender-v2.82-release' 2020-01-21 21:50:15 +11:00
Yevgeny Makarov
5a29356b4d Fix T61259: Loop Cut with Trackpad or MagicMouse 2020-01-21 21:42:34 +11:00
463941b6a1 Merge remote-tracking branch 'origin/blender-v2.82-release' 2020-01-21 11:13:47 +01:00
c81549af28 Cleanup: unused vars, clang-format 2020-01-21 20:57:15 +11:00
9f66062da7 Fix T72213: F-Curve animation does not update FreeStyle properties
FreeStyle line styles were not part of the dependency graph, and
blacklisted from the Copy-on-Write system. As a result, animated
FreeStyle properties would not be updated by the animation system,
resulting in T72213. There was an explicit call to run the animation
system on the original datablocks, but that was (for good reasons)
removed in D5394.

This commit adds the FreeStyleLineStyle datablocks to the dependency
graph and allows them to be handled by the CoW system. As a result

- the UI now updates properly when properties are animated, and
- animated property values are actually used when rendering.

This commit includes @Sergey's patch P1222, which unifies two bits of
code that did the same thing: check whether datablock type is covered by
copy-on-write.

Reviewed By: sergey, brecht

Differential Revision: https://developer.blender.org/D6609
2020-01-21 10:44:23 +01:00
ed4bf2dc61 Fix T73283: Shadows checkbox affects Custom Distance active state
This appears to just have been a simple copy/paste mistake
2020-01-21 09:59:22 +01:00
Nico Zevallos
1982d110f4 Fix T62882: Make Dynamic Paint update weights in viewport
Related to T62882
When the SupportsMapping modifier flag was added to the dynamic paint
modifier it was added commented out. It may have not worked back then,
but it seems to work fine now.
MOD_weightvgedit.c was already updated similarly.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6072
2020-01-21 09:42:26 +01:00
93a9fbb35f Windows: Update platform_win32.cmake to boost 1.70
to match the updated libs in svn.
2020-01-20 19:31:31 -07:00
04e318de3a UI: Adopt 2.8-style layout for the Graph Editor sidebar
Differential Revision: https://developer.blender.org/D6636#inline-54134

Reviewed by Julian Eisel
2020-01-20 23:30:42 +01:00
2210f9c7c8 Merge branch 'blender-v2.82-release' 2020-01-20 23:11:38 +01:00
902209eda5 Partial Fix T73043: Denoising Albedo not working well for Sheen
Similar to the Microfacet Closures, the Principled BSDF Sheen closure is
added at a high weight but typically results in fairly low values.
Therefore, the default weight is a bad indicator of importance.

The fix here is the same as it was back then for Microfacets:
Compute an average weight using the normal as the half-vector
and use it to scale down the sample weight and the albedo channel.

In addition to drastically improving denoising of materials with
sheen when using the new Denoising node, this also can reduce noise
on such materials considerably.
2020-01-20 23:06:08 +01:00
43b4cf232c Merge branch 'blender-v2.82-release' 2020-01-20 21:27:39 +01:00
aee2b754dc Fix T73110: UDIM Texture Paint Crash
This would happen if a tile is found on disk, painting would actually
request that tile (because corresponding uvs were in that range), but
that tile was not added in blenders list of tiles in that Image.

Need to also check tile in `image_quick_test` (regardless of iuser
having passed).

thx @lukasstockner97 for additional input!

Maniphest Tasks: T73110

Differential Revision: https://developer.blender.org/D6578
2020-01-20 21:21:59 +01:00
b6051f1f01 Merge branch 'blender-v2.82-release' 2020-01-20 21:14:30 +01:00
ddddb94517 Fix T72546: Video Sequencer: Select grouped 'OVERLAP' operator wrong
selection

False positive when a sequences end would be the same as active
sequences start.

Also thx @sybren for the heads up to make this more readable.

Maniphest Tasks: T72546

Differential Revision: https://developer.blender.org/D6451
2020-01-20 21:05:11 +01:00
335930ab4e Overlay: Improve Outline diagonal Antialiasing
I doubt we can do much better. Most of the aliasing comes from the edge
detection which does not use a lot of samples. We could use more samples
but then the detection becomes way more complex and expensive.

The second issue comes from the reconstruction (AA pass) that only bleed
adjacent pixels in if their line direction is perpendicular to the offset.
This makes corner gaps on certain diagonals.
2020-01-20 19:36:08 +01:00
6b902d78b3 cleanup: do no longer use deprecated Alpha channel from Shader diffuse color (use Shader's Alpha value instead) 2020-01-20 18:47:57 +01:00
932cfdbe98 cleanup: Collada exporter: Removed misleading comments 2020-01-20 18:47:57 +01:00
89b6a7bae9 Merge remote-tracking branch 'origin/blender-v2.82-release' 2020-01-20 17:33:10 +01:00
31e2786707 Fix T71825: Custom Animation Player path overrides chosen player
Thanks @mano-wii for providing the patch!

The original code assumed that when `animation_player_preset` was not
`CUSTOM`, the `animation_player` path would be empty. This is a bad
assumption, as it can be quite useful to be able to toggle between a custom
and a built-in player. As such, `animation_player` should not be reset to
an empty string when a non-custom player is chosen.
2020-01-20 17:32:23 +01:00
661d363e13 Fix T73162: Modal tools cant be mapped to MMB
Also rename struct members to 'launch_event', since it's more
descriptive and was called this in some places.
2020-01-21 03:09:56 +11:00
587ca9e69b Merge branch 'blender-v2.82-release' 2020-01-20 16:19:02 +01:00
a5f19e3f72 Fix T73265: GPencil console error when delete frist frame 2020-01-20 16:18:20 +01:00
4dbaee0293 Fluid: Fix for liquid domains in cache replay mode
Added missing check that prevented bake from being executed correctly.
2020-01-20 16:17:16 +01:00
dae033801b Fix T72050 Subdivide method "Straight Cut" not working with N-Gons enabled
'Straight Cut' is actually documented as creating N-Gons. However, the
code was disallowing this. This is probably a mix-up as the "allow N-Gons"
option is documented as a "force quad/tri" option.
2020-01-20 16:11:00 +01:00
2795a7d02a Merge branch 'blender-v2.82-release' 2020-01-21 01:30:45 +11:00
133f6a9812 Bevel: flush selection with non-modal execution 2020-01-21 01:27:46 +11:00
a5270d4cf3 Merge branch 'blender-v2.82-release' 2020-01-20 14:53:14 +01:00
James Fulop
482f3c008b Cleanup: use existing helper for float to uchar color conversion
Differential Revision: https://developer.blender.org/D6617
2020-01-20 14:52:38 +01:00
Yevgeny Makarov
5c5f2bd221 Fix file browser not excluding AirDrop from the System list on macOS
There is already code for this, it just wasn't working. Now add the
slash after checking for an empty string.

Differential Revision: https://developer.blender.org/D6568
2020-01-20 14:50:18 +01:00
81befded7b Fluid: Fix for smoke domain geometry object with adaptive domain enabled
The smoke mesh geometry always needs to be updated when using the adaptive domain.
2020-01-20 14:34:08 +01:00
8e7faf0e67 Fix failing cycles_render_graph_finalize_test when building with clang
The gflags library was not fully configured to be built as a static
library, only one of two files was changed.

Differential Revision: https://developer.blender.org/D6611
2020-01-20 14:16:05 +01:00
3bda3a2992 Fix T73187 Overlay: Stereo 3D Camera not displaying correctly 2020-01-20 14:15:54 +01:00
1613c994b0 Fix Cycles not correctly using Background.shader if specified
Based on patch by Alex Fuller.

Differential Revision: https://developer.blender.org/D6627
2020-01-20 14:03:14 +01:00
bb692a2d0f Fix T59747 EEVEE: Bug on EnvironmentTexture 2020-01-20 13:48:25 +01:00
ccfe5bf215 Cleanup: remove redundant function 2020-01-20 13:27:19 +01:00
153a96472a Fluid: Fix typo in smoke script 2020-01-20 12:34:38 +01:00
e6ccd512e6 EEVEE: Fix crash during lightbake 2020-01-20 12:55:21 +01:00
b15073b9ee Merge branch 'blender-v2.82-release' 2020-01-20 20:53:20 +11:00
cfae9fb9e4 Fix T73224: Crash calling UV Sculpt from operator search 2020-01-20 20:46:29 +11:00
a5a30e485f Merge branch 'blender-v2.82-release' 2020-01-20 09:50:09 +01:00
Brecht Van Lommel
02f6722350 Build: upgrade to OpenEXR 2.4.0, OpenVDB 7.0.0 and Boost 1.70.0
This aligns with the VFX reference platform 2020 along with the decision
to stick to Python 3.7, see T68774.

Blosc was downgraded to 1.5 as recommended by the OpenVDB documentation.

IlmBase and OpenEXR are now built together with CMake rather separately
using autoconf.

Differential Revision: https://developer.blender.org/D6593
2020-01-20 09:43:28 +01:00
78aa321931 Linux: update release notes for appdata 2020-01-20 09:39:54 +01:00
957ba51200 Fix T71830: invalid Linux appdata syntax 2020-01-20 09:39:54 +01:00
4f4435001a Fix OSL build error on macOS, no need to use external pugixml 2020-01-20 09:39:54 +01:00
Jean First
66e02d15a0 Fix T72605: Blender works only in one user account on macOS
User permissions in the disk image were wrong.

Differential Revision: https://developer.blender.org/D6462
2020-01-20 09:39:54 +01:00
6368343da9 Fix T73129: sculpt mode slow on mesh with fake user
We can't use the fast path when the mesh is used by mulitple objects and so
slower sculpting is expected then. But fake users should not affect this. This
also fixes the same type of error in a few other areas.
2020-01-20 09:39:54 +01:00
fb26d25405 Merge branch 'blender-v2.82-release' 2020-01-20 19:22:44 +11:00
6395937b01 Fix T71922: Bisect creates flipped faces 2020-01-20 19:19:04 +11:00
3fb8191d1d Cleanup: rename lightprobe configure to type_set
Consistent with similar API functions.
2020-01-20 17:54:38 +11:00
81b7f8efaf Fixed secondary particle combined export functionality
The combined export was using the old flag format.
2020-01-19 23:44:57 +01:00
c7596cd820 Fluid: Improved cache file loading
Cache file loading for mesh and particle files now works through the direct update_structures functions. The final cache mode now also only bakes the most essential files and is therefore not resumable anymore.
2020-01-19 23:44:56 +01:00
9b70950e3c Merge branch 'blender-v2.82-release' 2020-01-19 18:50:37 +03:00
d1657b406e Fix T73117: B-Bone twist weirdness in chains with sharp bends.
When computing the roll value coming from the handle bone, the code
was using some strange unexplained math. It probably works fine when
the difference with the 'zero roll' orientation is pure twist, like
is the case when called from mat3_to_vec_roll. However, it appears
to break when significant swing is involved.

The issue is fixed by using the proper Swing+Twist decomposition
utility function that was added in a recent version for drivers.
2020-01-19 18:48:18 +03:00
83d5b3be12 disable optimizations 2020-01-19 12:44:21 +01:00
2e28fc0dd6 cleanup 2020-01-19 12:31:07 +01:00
c5868657aa support for deduplicating many more functions 2020-01-19 12:24:12 +01:00
04bfe684c9 rename 2020-01-19 12:06:24 +01:00
e1a5d15d95 set more operation hashes 2020-01-19 12:05:54 +01:00
00b1399593 deduplicate Particle Attribute node 2020-01-19 11:47:56 +01:00
85c43fbd2e store a random hash per type 2020-01-19 11:47:43 +01:00
65237b2346 support deduplicating vectorized nodes 2020-01-19 11:39:00 +01:00
35af9ecd3d support deduplicating all math nodes 2020-01-19 11:35:22 +01:00
32b02c13d8 operation hash for converters 2020-01-19 11:10:34 +01:00
bf74ef2e40 should not iterate over array that is being changed 2020-01-19 11:10:18 +01:00
b40bdad104 utility to generate constant random numbers per line 2020-01-19 10:57:14 +01:00
ea5fa56ca9 disable optimizations for now 2020-01-18 20:15:20 +01:00
0db9e85a7a replace Vector.index with Vector.index_try 2020-01-18 20:10:53 +01:00
5697fd53f2 implement initial Remove Duplicates optimization 2020-01-18 20:03:10 +01:00
c2e62c1292 Cleanup/deps: Clean up remnants of old python packaging method 2020-01-18 12:00:42 -07:00
4afdb40b4e set operation hash for some functions 2020-01-18 20:00:14 +01:00
296fd08875 support for storing operation hash per function 2020-01-18 19:59:40 +01:00
2272f380bd Merge remote-tracking branch 'origin/blender-v2.82-release' 2020-01-18 11:59:18 -07:00
03f51bf4e1 add utilities to MFNetworkBuilder 2020-01-18 19:59:01 +01:00
3e11c4e63b Fix: T71159 missing python3.dll
File got forgotten during the last repack of python.
2020-01-18 11:58:38 -07:00
a73b17564c fix Vector.remove_first_occurrence_and_reorder 2020-01-18 19:58:37 +01:00
2b0041e4dd new Optional.set_new methods 2020-01-18 19:58:28 +01:00
a7ca0e92ef UI: Change default Spin steps from 9 to 12
Differential Revision: https://developer.blender.org/D6615

Reviewed by: Brecht van Lommel
2020-01-18 19:49:19 +01:00
9801678295 Merge branch 'blender-v2.82-release' 2020-01-18 15:29:37 -03:00
deb59c25c0 Weld Modifier: Reduce size of the leaf nodes to half
This improves performance by reducing the amount of false positives.

A self overlap is made, so the distance from the vertices in the
overlap nodes is actually added.
2020-01-18 15:28:49 -03:00
7dad14ae79 simplify constant folding 2020-01-18 18:20:16 +01:00
6dc979e2f9 Cycles: Suppress OSL normalize function warnings.
This patch suppress the OSL warnings resulted from ambiguous calls
to the normalize function. This is done by casting to the vector
type before normalizing.

Reviewed By: Brecht

Differential Revision: https://developer.blender.org/D6621
2020-01-18 19:19:26 +02:00
40bac586dc improve naming 2020-01-18 17:54:54 +01:00
f439518781 Merge branch 'functions' into network-builder-refactor 2020-01-18 17:24:13 +01:00
ed89a010cb Merge branch 'master' into functions 2020-01-18 17:23:52 +01:00
966383138a Weight Paint: implement a red shade for bones with locked weights.
Blender supports locking vertex groups to prevent changes to the
weights. However, as mentioned in comments for D3837, it is hard
to use this because there is no interface for locking in 3D View.

This adds a red shade to bones that are associated with a locked
weight group during weight paint mode, as the first step to adding
such interface. The next step is adding a pie menu for lock/unlock.

Differential Revision: https://developer.blender.org/D6533
2020-01-18 11:43:31 +03:00
1f92e9903f Merge branch 'blender-v2.82-release' 2020-01-17 20:09:44 +01:00
5472ae6fdf Fix memory leak when full-copying a scene after recent changes.
Once again, am not exactly sure why that was working before, and not
anymore - but in any case, doing that kind of update here is not only
useless (since we have to do it at the end of the whole
collections/objects duplication and remapping anyway), it is also rather
dangerous, as collections are currently in rather invalid states at that
point of the code...

Note that in ideal world, `BKE_main_collection_sync()` & co would be
lazy (setting only a flag, then code actually needing this to be valid
again should call some sort of `BKE_main_collection_sync_ensure()`).
Then we would not have to worry about such things (and we'd get nice
performance improvements in some cases, also in main remapping code,
etc.).

Food for some refactoring, some day...
2020-01-17 19:59:00 +01:00
6744f4d108 Cleanup of previous rBac723db57fd8ba5 commit.
Simplify a bit, and remove some now redundant remappings.

As a side note, rBac723db57fd8ba5 actually also fixed some unreported
issues (missing remappings to new objects/collections in new copied
scene, that were not previously handled by the 'custom' code).

There are almost certainly still some missing remappings around,
though...
2020-01-17 19:59:00 +01:00
fb0fc1d613 Fix T73170: New Scene -> "Full Copy" Crashes Blender.
rBac723db57fd8ba5 makes proper remapping of all pointers in Scene...
including the object pointers of bases in ViewLayers.

Using `BKE_main_collection_sync_remap()` makes sense here anyway
(compared to `BKE_main_collection_sync()`, it additionally clears caches
in ViewLayers and Collections), this whole code makes a lot of
remapping.

Note that I do not really understand *why* that was working OK
before rBac723db57fd8ba5. I.E. *why* not remapping at all ViewLayers'
base object pointers seemed to be OK...

This whole collection/viewlayer caching is very hard to follow, and
really needs a full rework at some point (just as much as ID copying
code in general, and scene copying code in particular, in fact).
2020-01-17 19:59:00 +01:00
66ad94d905 Cleanup: remove dead code in full scene copy/make single users area. 2020-01-17 19:59:00 +01:00
35b16e4985 Cleanup: factorize collection handling in libquery code.
Both actual Collection datablocks and the horrible master collection
should share the same code (there were already some differences,
although probably not critical, but some callbacks from
scene->master_collection did not have the 'not self' flag...).
2020-01-17 19:59:00 +01:00
7b29956cc5 Fix T67942 EEVEE: Crash when empty is set as camera and motion blur is on 2020-01-17 19:43:41 +01:00
swann
e280c0441b Fix lightprobe creation from python data API
### Description of the problem

Until now, it is only possible to correctly add a lightprobe in python via an operator:
`bpy.ops.object.lightprobe_add()`

### Description of the proposed solution

The idea of this patch is to fix the lack of consistency lightprobe creation without operator.
It allow creation of different lightprobe type directly via `bpy.data.lightprobes.new(name, type)` (such as for curves).

In order to make it possible I had to:
1. Add a function `BKE_lightprobe_configure` in charge of lightprobe settings configuration (avoid code redundancy)
2. Allow an object to take lightprobe datablock as data during is initialization.

### A short example of this patch usage

```
lp = bpy.data.lightprobes.new('some_name','PLANAR')

bpy.data.objects.new('toto', lp)

```

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6396
2020-01-17 19:14:51 +01:00
f185a9b97c Merge branch 'blender-v2.82-release' 2020-01-18 03:12:25 +11:00
David
f417787ee1 Gizmo: draw dial arc only over one rotation to avoid artifacts
There were some visual artifacts when the spin gizmo had a rotation
greater than 360 degrees.

Avoids this by drawing the arc over the span of one rotation only
and adjusting the background color based on the rotation count.
2020-01-18 03:07:13 +11:00
6eaf51ef3e DRW: Use USHORT for vertex color and upload them in linear color to the GPU
This way we remove the need for the srgb boolean uniform and a lot of code complexity. However, mesh update is going to be a bit slower.

I did not benchmark the performance impact.

This also fix a typo in draw_cache_impl_particles.c and fix hair not using vertex color in workbench.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6610
2020-01-17 16:29:20 +01:00
9410e5dc97 Make the scene preview range not clamp the start/end values
This will make this consistent with the behaviour of other start/end
ranges in blender. So start/end will instead be adjusted to always
satisfy the "start >= end" requirement instead of clamping the values.
2020-01-17 15:10:17 +01:00
3ef32cb90a Fix T73186: Grease Pencil convert to Curve hidden until exiting edit mode
The converted object wasn't tagged for updating its geometry in the
dependency graph.
2020-01-17 14:48:11 +01:00
Danrae Pray
1e91d9d4dc Fix T51289: Particle System UI issue/annoyance: setting Start later than End should increase End if necessary, rather than capping it
Reviewed By: Luca Rood, Sebastian Parborg, Julian Eisel

Differential Revision: http://developer.blender.org/D2701
2020-01-17 14:26:42 +01:00
7f794ae09d Keymap: Use PRESS event for Tweak tool extend selection
This makes selection more responsive when using the Tweak tool

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

Reviewed by Campbell Barton
2020-01-17 14:09:54 +01:00
7c9d15fca8 Fix T71154: EEVEE Soft Shadows Viewport Rendering
EEVEE Soft shadows were not rendered correctly during viewport
rendering. The reason for this is that during viewport rendering the
shadow buffers were only update once and not per sample. This resulted
that all the samples calculated the same shadow.

This fix moves the call to `EEVEE_shadows_update` from cache finished to
draw scene. This needs to happen before `EEVEE_lightprobes_refresh`.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6538
2020-01-17 14:03:29 +01:00
Julian Eisel
d57b93437e Fix T73190: Anim Player button in the status bar when scrubbing 2020-01-17 13:46:01 +01:00
b9fa80ed5a Merge branch 'blender-v2.82-release' 2020-01-17 09:19:36 -03:00
c22d2f9e01 Fix T73159: Crash transforming 0 edited grease objects 2020-01-17 09:17:36 -03:00
4b6ce694c2 Merge branch 'blender-v2.82-release' 2020-01-17 19:43:56 +11:00
f60d97d426 Fix T73176: No options for Centre Action Safe Margins 2020-01-17 19:27:57 +11:00
2aa497661f Merge branch 'blender-v2.82-release' 2020-01-17 09:26:51 +01:00
554f861ac1 Build: fix Linux linking errors with some combinations of build options
Differential Revision: https://developer.blender.org/D6600
2020-01-17 09:21:18 +01:00
684b5172ff Merge branch 'blender-v2.82-release' 2020-01-17 19:07:03 +11:00
6b7e5b35bc Fix T73135: Gizmos flicker when changing viewport options 2020-01-17 18:58:50 +11:00
74acb00684 Merge branch 'blender-v2.82-release' 2020-01-17 18:26:11 +11:00
192940e8c2 Cleanup: bad brace placement for manually formatted blocks 2020-01-17 18:11:50 +11:00
Peter Lönnebring
61072f0819 Fix T72964: Text editor Python syntax highlighting for numerals
Less common notation for numbers wasn't highlighted eg:
0b0, 0o0, 0x0, 1.0e0, 1.0E-1, 100_000j
2020-01-17 18:01:18 +11:00
4aca02064f Fix T72905: EEVEE + UV Edit Unused Map
There is a cornercase when the user edits an uvmap, that is not part of
the material (yet). When this is the case the uvmap was not added to the
uv buffer and the 'pos' alias was not created.

This change will always request the active uv map when uv editing.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6534
2020-01-17 07:51:06 +01:00
55c70a908e Merge branch 'blender-v2.82-release' 2020-01-16 23:34:13 -03:00
9b3c9ab61a Fix T53178: Casting in Blur node with Relative
In this case the user expects rounding.
2020-01-16 23:32:45 -03:00
9d90cad3ed Cleanup: Fix typo in instruction comments 2020-01-16 19:13:37 -05:00
0982fdccd9 fix alignment in BLI::Optional 2020-01-16 21:59:00 +01:00
86db35845a libs/windows: Prevent USD exports from leaking into blender binary.
Even though we build USD as static, it still feels the need to mark its
symbols with declspec(dllexport) which means the blender binary now exports
these symbols.

this patch fixes that unwanted behaviour, however USD libs still need to
rebuild before this becomes visible in the blender binary

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

Reviewed By: sybren
2020-01-16 13:11:07 -07:00
b963745cdf Merge branch 'blender-v2.82-release' 2020-01-16 20:54:11 +01:00
Stefan Werner
6257cdc376 Fix T73064: Embree does not like Bevel shader
Embree's local intersection routine was not prepared
for local intersections without per-object BVH.
Now it should be able to handle any kind of local
intersection, such as AO, bevel and SSS.

Differential Revision: https://developer.blender.org/D6602
2020-01-16 20:42:17 +01:00
9ebd64ec7e Merge branch 'blender-v2.82-release' 2020-01-16 20:34:44 +01:00
b05bca2364 Fix (unreported) surface deform modifier not reporting its errors in the
UI

Seems like we need to set the error with the evaluated ModifierData.
Pass this to 'surfacedeformBind' and report with that.

Differential Revision: https://developer.blender.org/D6601
2020-01-16 20:24:55 +01:00
d72ffb5e9a Overlay: Fix wrong 3D icon for cubemap lightprobes 2020-01-16 19:47:19 +01:00
5d5add5de2 Fix T69794 "Bake Cubemap Only" resets Irradiance Volume if world is updated
Was caused by a clear done for when irradiance need to be baked.
2020-01-16 19:47:19 +01:00
d42a7bbd6e Integrate hair collisions with cloth collision
This integrates hair collisions with the new cloth collision system,
greatly improving reliability, and reducing the amount of hair-specific
code paths in the cloth code.

The removes all the point constraint based collision stuff, instead
implementing segment impulse based collisions, using the same collision
response code as the normal cloth solver.

The hair system can now also collide with the emitter if it is a
collision object.

Reviewed By: mano-wii, Sebastian Parborg

Differential Revision: https://developer.blender.org/D6545
2020-01-16 18:54:30 +01:00
7c2f0074f3 Python: disable environment variables by default
This avoids the problem where Blender doesn't start because
the PYTHONPATH points to an incompatible Python version,
see T72807.

Previously we chose to assume people who set the PYTHONPATH know what
they're doing, however users may have set this for non Blender projects.
So it's not obvious that this is the cause of Blender not to launch
on their system.

To use Python's environment vars, pass the argument:
--python-use-system-env

Note that this only impacts Python run-time environment variables
documented in `python --help`, Access from `os.environ` remains.
2020-01-17 03:36:29 +11:00
Julian Eisel
2cd3298fde Minor correction to previous commit 2020-01-16 17:31:09 +01:00
Julian Eisel
3cd1c8ccff Fix failing asserts in versioning with some pre 2.5 files
Old pre 2.5 files may have had non active spaces stored that doen't have
a header. The 2.5 versioning only added headers for active spaces, not
inactive (so invisible) ones.
Newer versioning code assumed there to always be a header though.

Inserted a version patch to make sure there's always a header now.

Fixes error reported to Debian,
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=949035.
2020-01-16 17:28:39 +01:00
09122883b2 Merge branch 'blender-v2.82-release' 2020-01-17 02:55:31 +11:00
abdaf2a4f5 Fix T53704: Error scaling f-curve handles by -1
The last handle wasn't corrected, also, there is no reason
to flip the handles while sorting (checking the same handles many times)
move this into it's own loop.
2020-01-17 02:40:10 +11:00
db33867270 Fix T71952, T70125: Blender Linux crash on startup with some tablets
It's not certain this fixes the issue since I can't reproduce the crash, but
the code was wrong in any case.

Thanks to Ray Molenkamp and Anonymous for finding this.
2020-01-16 16:14:57 +01:00
Julian Eisel
d52551401e Fix wrong usages of region align enumerations
`ARegion.alignment` unfortunately is a mixture of value and bitflag
enumerations. When checking for left/right/top/bottom region alignment,
the flags have to be masked out usually.
Most of the fixed cases here probably didn't cause issues in practice,
but could in fact break at any point when surrounding logic changes.

In fact the assert in #region_visible_rect_calc() failed in an older
file from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=949035. This
fixes it.
2020-01-16 16:13:15 +01:00
5b8c2301d8 Merge branch 'blender-v2.82-release' 2020-01-16 16:08:17 +01:00
d74f9c4b7b Fix T72887: Outliner crashes when after undo of some linking operation.
Outliner tree building code was not handling properly empty libraries
(i.e. Lib datablocks in our bmain which have no used actual data
anymore).

Main issue here is unclean states of indirect hierarchies of linking
involving several libraries after undo operation.

This is not a critical issue though, just annoying and untidy.
2020-01-16 16:07:16 +01:00
0461ff764a Fix EEVEE: Planar Reflection data has inverted facing
Unreported bug
2020-01-16 15:56:45 +01:00
faf563d27c Fix T71788 Invalid (pink) shader when using wireframe node
This was caused by the clip distance not being passed by the geometry
shader.
2020-01-16 15:56:45 +01:00
32f0bb0523 Fix T70766 EEVEE: Performance drop with node tree in 2.81 2020-01-16 15:56:45 +01:00
59d3e4357a Merge branch 'blender-v2.82-release' 2020-01-16 15:52:53 +01:00
7fc7df1bd3 CMake: Fix linking of ffmpeg_test on macOS
Part of the issue was missing library path to png library.
Other part was missing iconv passed to linker.
2020-01-16 15:52:19 +01:00
216291ddb3 Fix T68000: load previous settings error if config folder already exists
This happened when opening Blender and not clicking Load Previous Settings
or Next, and then reopening Blender again and using Load Previous Settings.
2020-01-16 15:50:53 +01:00
d4261760c7 Fluid: Fix for mesh velocities
Was using incorrect file format when reading mesh velocities from cache
2020-01-16 15:33:15 +01:00
59589457a5 Cleanup: Clarification of the Particle.uv_on_emitter() function docs
Just some rewording of the documentation of `Particle.uv_on_emitter()`,
so that it no longer refers to 'derived mesh' but 'evaluated mesh', and
document that it expects a modifier from an evaluated object.

No functional changes.
2020-01-16 14:58:45 +01:00
3c426feb12 Fix T73121: Blender crashes on accessing particle uv_on_emitter
Blender wasn't checking whether the passed modifier actually contained an
evaluated mesh, before accessing the mesh pointer.
2020-01-16 14:58:45 +01:00
e7e454f964 Merge branch 'blender-v2.82-release' 2020-01-16 09:16:46 -03:00
9a6551543b Fix crash with Proportional Edit Connected in UV editing
Caused by rB86a2ffc3ab32
2020-01-16 09:14:27 -03:00
Julian Eisel
003be8aa7c UI: Use same precision in "Move" redo panel as elsewhere
The floating "Move" redo panel showed transform values with less
precision than in other places (e.g. sidebar and properties editor).
With Millimeters as unit it would even round to full integers, which
may be an issue since you typically work at higher precisions with this
unit.

Note that this only applies to the visual precision, internally we use
full floating point `float`s still.

Fixes T70367.
2020-01-16 12:13:47 +01:00
Julian Eisel
25cb12dc71 UI: Show animation cancel button in all status-bars
Previously the button would only show up in the status-bar located in
the same window that had the screen with the animation timer.
I don't see a reason not to show the button in all status-bars instead,
other animation feedback is also displayed in all windows.

Fixes T72194.
2020-01-16 11:58:37 +01:00
dd4d27e907 Merge branch 'blender-v2.82-release' 2020-01-16 11:36:20 +01:00
3ee6d74f93 Fix T73125: Crash when opening a file containing a Line Style.
Dummy typo in rB2e6159a4.
2020-01-16 11:35:10 +01:00
2dfeb25c54 Cleanup: remove unused PYTHONPATH from freestyle
This accesses PYTHONPATH directly, ignoring Py_IgnoreEnvironmentFlag.
Remove since it's not used.
2020-01-16 21:04:09 +11:00
e17b075a65 Merge branch 'blender-v2.82-release' 2020-01-16 18:32:47 +11:00
6c91509745 Fix T73149: Adjust Last Operation uses horizontal layout
The horizontal layout was clipping text for some enums.
2020-01-16 18:27:23 +11:00
be521a7457 Merge branch 'blender-v2.82-release' 2020-01-16 16:44:10 +11:00
7570c07bfd Fix T73150: Python tooltips missing from toolbar 2020-01-16 16:26:50 +11:00
ef9e278b67 Cleanup: unused warnings 2020-01-16 16:25:12 +11:00
3de84f2f1b Merge branch 'blender-v2.82-release' 2020-01-16 15:40:00 +11:00
Stanislav Blinov
967ac9b6e6 Fix incorrect return value for mesh vertex connect 2020-01-16 15:33:21 +11:00
7f571aad22 Merge branch 'blender-v2.82-release' 2020-01-16 02:21:32 +01:00
Lukas Stockner
7d8a186335 Fix T73133: UDIM texture count in Eevee is limited by OpenGL
Based on @fclem's suggestion in D6421, this commit implements support for
storing all tiles of a UDIM texture in a single 2D array texture on the GPU.

Previously, Eevee was binding one OpenGL texture per tile, quickly running
into hardware limits with nontrivial UDIM texture sets.
Workbench meanwhile had no UDIM support at all, as reusing the per-tile
approach would require splitting the mesh by tile as well as texture.

With this commit, both Workbench as well as Eevee now support huge numbers
of tiles, with the eventual limits being GPU memory and ultimately
GL_MAX_ARRAY_TEXTURE_LAYERS, which tends to be in the 1000s on modern GPUs.

Initially my plan was to have one array texture per unique size, but managing
the different textures and keeping everything consistent ended up being way
too complex.

Therefore, we now use a simpler version that allocates a texture that
is large enough to fit the largest tile and then packs all tiles into as many
layers as necessary.

As a result, each UDIM texture only binds two textures (one for the actual
images, one for metadata) regardless of how many tiles are used.

Note that this rolls back per-tile GPUTextures, meaning that we again have
per-Image GPUTextures like we did before the original UDIM commit,
but now with four instead of two types.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6456
2020-01-16 02:06:49 +01:00
689a873029 Fix T72860: Mantaflow Fluid Sim fails when simulation starts after frame 1 2020-01-15 22:07:06 +01:00
848b28d71e Fix T72104 Blender selects faces outside of Clipping Region if X-Ray is off 2020-01-15 19:54:27 +01:00
588f2d2944 Fix T72970: [Mantaflow] When changing the domain settings, the current frame of the scene is set to 1 2020-01-15 18:55:40 +01:00
Julian Eisel
eca8bae671 Fix T51054: NULL-dereferences in crash-handler callback 2020-01-15 18:08:34 +01:00
Julian Eisel
ca49643f3c Fix T70965: Undo crash with specific file
Not sure how the WorkSpaceLayout.screen pointer could end up being NULL,
but apparently that happens, or at least happened with older files.

Rather than just adding NULL-checks, prefer not keeping around those
invalid layouts at all.
2020-01-15 17:48:45 +01:00
68462a9419 Fix T73111: Bake data of fluid causes crash of Blender 2020-01-15 17:22:00 +01:00
7e20d6930d Fluid: Additional fix for relative cache paths 2020-01-15 16:32:39 +01:00
cdd937c6dd Fluid: Fix T72971
Incorporated suggestions from the task discussion
2020-01-15 16:29:08 +01:00
adcc9d014c Fluid: Moved grid reset loop for inner obstacle cells from blenkernel code into Mantaflow
Having this loop in directly Manta is faster and potentially fixes issues T72783 and T72894.
2020-01-15 16:28:56 +01:00
f7fa6cd1da Fluid: Additional fix for relative cache paths
Added missing conversion from relative to absolute paths.
2020-01-15 16:28:43 +01:00
5f8b290eb8 Fluid: Fix for relative cache paths
Relative paths in the cache are no longer converted into absolute paths automatically.
2020-01-15 16:28:25 +01:00
542e0c67ba Fluid: Updated Mantaflow source files
The memory leak described in T72498 has been fixed in Mantaflow, the updated files should reflect this in Blender.
2020-01-15 16:27:55 +01:00
c27acbcfb7 Fix T71690: Skip enum item separators in uiItemEnumR_string_prop
Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D6589
2020-01-15 16:09:27 +01:00
d571e9055a Fluid: Fix T72971
Incorporated suggestions from the task discussion
2020-01-15 15:51:49 +01:00
2ff3877f71 Fluid: Moved grid reset loop for inner obstacle cells from blenkernel code into Mantaflow
Having this loop in directly Manta is faster and potentially fixes issues T72783 and T72894.
2020-01-15 15:51:49 +01:00
Julian Eisel
f842ffb107 Fix crash with some hidden regions after previous commit
E.g. in the default "Animation" workspace this would crash.
2020-01-15 15:24:43 +01:00
Julian Eisel
758361556b Fix invalid region rectangles, sanitize dynamic region size calulations
It was too easy to end up with invalid region rectangles and we were
badly protected against them, so that they were hard to catch.
In fact we still create a main region for the top-bar, which ended up
getting a region height of -1. While this doesn't seem to have caused
issues in practice, we should prevent them entirely.

So idea was that at the end of region layout resolving,
`BLI_rcti_is_valid()` should return `true` for the region rectangle.
Further changes here ensure this is true: The `RGN_FLAG_TOO_SMALL` flag
is now set whenever there is not enough space for a region or if it
would get a size of zero or less.

Note: Should the assert fail, please do not just disable it and try to
actually address the root of the issue.
2020-01-15 15:05:11 +01:00
3fa548f986 Fix T72871 Overlay: Spotlights cone is much smaller than before 2020-01-15 14:45:42 +01:00
aa3720ed82 Fix T72574 Overlay: 'Show Cone' for Spotlights not working anymore 2020-01-15 14:45:42 +01:00
Robert Guetzkow
0e94d8bbe0 Fix T72302: Only hide objects if their collection is visible
In Blender 2.80 Shift + H (`object_hide_view_set(unselected=True)`) used to
(temporarily) hide objects only if their collection was visible in the current
view layer.

This behavior was changed in rB0812949bbc3d7acfd1f20a47087ff973110aa177 (D5992)
by using `BASE_VISIBLE_DEPSGRAPH` for the decision which object's (temporary)
visibility should remain unchanged. Since the view layer visibility and depsgraph
visibility has been decoupled in said commit, the correct condition
to check is `BASE_VISIBLE_VIEWLAYER`.

This patch is a fix for T72302

Differential Revision: https://developer.blender.org/D6583
2020-01-15 12:21:45 +01:00
473bcff5cb Fix linking error with ffmpeg_test on Linux
The exact reason is unclear, but we might as well link just the few libraries
that are actually needed for ffmpeg.
2020-01-15 11:42:20 +01:00
5319b79965 Merge branch 'blender-v2.82-release' 2020-01-15 11:23:50 +01:00
6b7991edf4 Fix numaapi on PowerPC platforms
Seems that previous fix didn't work in all cases: Debian's build
environment didn't fully detect endianess, possibly due to typo,
possibly due to difference in various environments.

Using define magic from a more battle-tested project seems a safe
way to go.

There are more changes than just PPC since the upstream commit contains
full re-synchronization of all defines.

This commit updates numaapi to a latest library version from upstream.
2020-01-15 11:18:24 +01:00
79bd14d0fd Merge branch 'blender-v2.82-release' 2020-01-15 20:15:07 +11:00
c0793d6629 Fix T72419: 3D cursor placement flips axis with geometry orientation 2020-01-15 20:10:58 +11:00
9d7b2e3068 Merge branch 'blender-v2.82-release' 2020-01-15 10:01:25 +01:00
5977ed3470 Fix T68489: Shrinkwrap modifier with project not working for curves
rB4cde92303f3d made a MESH-only check (but that is no longer mandatory
since the Mesh is fetched by MOD_deform_mesh_eval_get instead of ctx-
>object->data now...). This would fail for projecting beveled curves
(resulting mesh missing), now also get the mesh for curves if we use
MOD_SHRINKWRAP_PROJECT (and only then).

Maniphest Tasks: T68489

Differential Revision: https://developer.blender.org/D6548
2020-01-15 09:56:56 +01:00
0c9f04f6b6 Merge branch 'blender-v2.82-release' 2020-01-15 09:54:24 +01:00
d68346eacf Fix T72803: Texture Paint: Shortcut 'Shift + S' Does Not Save an Image
'Shift + S' is taken by toggeling Smooth Stroke in the keymap, should be
'Shift + Alt + S' (this also goes more in line with other editors, where
Alt is added to the shortcut used by 'Save' to do 'Save As')

Maniphest Tasks: T72803

Differential Revision: https://developer.blender.org/D6572
2020-01-15 09:51:59 +01:00
1a28c142bf Merge branch 'blender-v2.82-release' 2020-01-15 09:46:40 +01:00
75100d0b94 Fix T72648: Texture Paint color sampling always samples only 1st tile
when using UDIMS

A more generic approach might be considered in the future (I assume
there are other operators around that need an update in shifting their
uvs) though.

Maniphest Tasks: T72648

Differential Revision: https://developer.blender.org/D6570
2020-01-15 09:40:48 +01:00
c8450c480f Merge branch 'blender-v2.82-release' 2020-01-15 19:08:02 +11:00
27c5fb6fc4 3D View: use compatible quaternions when placing the cursor
The compatible option was used for euler rotation but not quaternions.
2020-01-15 19:03:05 +11:00
6c0eeb1569 Merge branch 'blender-v2.82-release' 2020-01-15 17:16:34 +11:00
df36e1c5dd Fix T71091: Object restrict selection conflicts with pose selection
Support pose bone selection when the object has hide_select enabled.

This is consistent with how all other modes work.
2020-01-15 17:09:52 +11:00
41075589c0 Merge branch 'blender-v2.82-release' 2020-01-15 13:46:25 +11:00
dedceb9395 Cleanup: clang-format 2020-01-15 13:26:20 +11:00
Asher
e400cfe6bb WM: support keys F20-F24
This was already supported by GHOST on X11, WIN32.
macOS goes up to F20.
2020-01-15 13:23:23 +11:00
f164ea6eaa Fix bevel leaving vertex/edge selection in an invalid state 2020-01-15 12:33:23 +11:00
3edd8d5b07 DRW: Fix instance batch check
Thanks to @LazyDodo for the heads up.
2020-01-15 00:08:32 +01:00
1ec08999b6 Fluid: Additional fix for relative cache paths
Added missing conversion from relative to absolute paths.
2020-01-14 21:45:10 +01:00
d7afa23333 Merge branch 'blender-v2.82-release' 2020-01-14 20:33:31 +01:00
f4beab7192 Fix T73070: Disable falloff_shape in the Pose Brush
The Falloff property in the pose brush controls how much deformation
propagates through the ik chain, not by using the distance to the
vertices, so this option does not make sense (it does nothing in the
pose brush code and it disables the 3d paint cursor).

Reviewed By: jbakker

Maniphest Tasks: T73070

Differential Revision: https://developer.blender.org/D6574
2020-01-14 20:32:22 +01:00
5cc0f361f3 Merge branch 'blender-v2.82-release' 2020-01-14 20:27:39 +01:00
22a317347f Fix T73094: Check all vertices when recalculating the mask flags
When a node was partially/fully hidden, this was causing the mask flags
to update incorrectly because it was not checking all vertices, so they
were assigned the fully_masked state and not updating in the transform
tool and mesh filter.

Reviewed By: jbakker

Maniphest Tasks: T73094

Differential Revision: https://developer.blender.org/D6573
2020-01-14 20:26:29 +01:00
cb9f67e846 Merge branch 'blender-v2.82-release' 2020-01-14 20:23:46 +01:00
22f5edcf45 Fix T71712: Free the dynamic mesh preview when rebuilding the PBVH
The PBVH usually is rebuild after a topology change, so it does not make
sense to keep the previous dynamic mesh preview vertex list. This may
cause a crash is the number of vertices of the new mesh (and preview) is
larger previous one. Now the list is deleted with the PBVH and a new one
will be generated using the new mesh when the cursor is updated.

Reviewed By: jbakker

Maniphest Tasks: T71712

Differential Revision: https://developer.blender.org/D6476
2020-01-14 20:21:45 +01:00
468fad3ac7 Merge branch 'blender-v2.82-release' 2020-01-14 19:43:46 +01:00
eb9401e9af Cleanup: get rid of magic values for return flags of texture value getters. 2020-01-14 19:43:00 +01:00
f8b34d5ca4 test: Add basic codec test for ffmpeg.
This add a basic sanity check that validates
the features we use from ffmpeg are actually
available

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

Reviewed By: sybren
2020-01-14 11:31:02 -07:00
8e6c6e2ba1 Fix: Building with clang on windows.
The USD landing broke building with clang on windows
due to a couple of reasons:

1) Some incompatibilities in their headers [1] only one
of them was important for us and is included in our patchset
now.

2) clangs lld wanted the full path to the libusd_b library
when using the whole archive link option, while msvc can
figure it out from just the library name.

Tested with clang/msvc and msbuild and ninja generators

[1] https://github.com/PixarAnimationStudios/USD/issues/1030
2020-01-14 11:12:14 -07:00
Julian Eisel
c167e8ba18 Cleanup: Use new BLI_rct utilities to ensure valid rectangles
Technically this does a slight change to the check in wm_window.c: The
assert now also allows zero width/height rectangles.
2020-01-14 19:08:51 +01:00
Julian Eisel
e4bf08a363 Fix invalid min/max sizes of global areas after loading factory settings
Simply loading factory settings and dragging an area separator
immediately after would cause an assert because of these invalid sizes.

Seems that since rB07499c04f612 we correctly initialize DPI related
UserPref values with 0, which caused DPI dependant initialization of
global areas to set ScrArea.global.size_min/max to 0 too.
2020-01-14 19:08:51 +01:00
e2724abc22 Fix T72490 Collections: Exclude From View toggle causes segment violation 2020-01-14 17:59:40 +01:00
2a638e8c90 Merge branch 'blender-v2.82-release' 2020-01-14 17:49:04 +01:00
ff430dea66 Fix rendering motion blur scenes with OptiX failing with CUDA_ERROR_INVALID_CONTEXT
Commit baeb11826b switched memory
allocation for the motion transform to use CUDA directly, instead of going
through abstractions. But no CUDA context was set active before those
were called, so the calls failed. This fixes that by binding a context beforehand.
2020-01-14 17:48:16 +01:00
52c96b60a0 Merge remote-tracking branch 'origin/blender-v2.82-release' 2020-01-14 17:32:07 +01:00
4c1fb64123 Cleanup: added 'Versioning code until next subversion bump goes here'
The `do_versions_after_linking_280()` function was missing a placeholder
for the newly added versioning code. I copied the comments from the
`blo_do_versions_280()` function.

No functional changes.
2020-01-14 17:30:07 +01:00
a560a46f32 Fix T72625: Outliner visibility keying doesn't carry over from 2.79b
During development of Blender 2.80 the `Object.hide` property was removed,
and later reintroduced in rB5e968a996a53 as `Object.hide_viewport`. Of
course there are some technical details missing in this summary, but this
is the view that's given in the 2.80 release notes.

FCurves on `Object.hide` weren't updated in versioning code, resulting in
the property no longer being animated. This commit corrects the RNA path
of such FCurves.
2020-01-14 17:30:07 +01:00
d51dcaf104 Fix T73116 Crash on startup caused by implicit conversion in glsl
Old drivers does not support this. Promote everything to uint.
2020-01-14 17:26:35 +01:00
ca994239bc Merge branch 'blender-v2.82-release' 2020-01-14 16:55:44 +01:00
39d5d11e02 Fix T71402 EEVEE: Transparent material add volume scattering
This adds correct scattering handling by removing the extra light added
to opaque pass.

Also fix T69062 EEVEE alpha blend and volumetrics
2020-01-14 16:55:11 +01:00
ba5bbf14f9 Fix T71532 EEVEE: Hair UV/Color attributes not working 2020-01-14 16:55:11 +01:00
fca069a705 Fix T72547 Wireframe overlay clipping issues
The view vector was not correct in orthographic view.

Also reduce the curvature bias a little.
2020-01-14 16:55:11 +01:00
Julian Eisel
388d43d85a BLI_rct: Utilities for sanitizing coordinates (ensuring min <= max)
This might be useful in some places. Much of the code makes the implicit
assumption that the rectangle has valid coordinate order, good to make
it more explicit.
2020-01-14 16:30:38 +01:00
Jeroen Bakker
29ab2386c0 Fix T72200: Split Quad View Region Crash
When splitting a Quad View by dragging a corner an quad area can become
negative size because of a one pixel offset to calculate the start of
the area.

This patch solves this to make sure that there are no negative areas. By
adapting the `ARegion.winrct`.

Reviewed By: Severin

Differential Revision: https://developer.blender.org/D6579
2020-01-14 16:30:32 +01:00
51add8e6d0 Fix T72255: VSE video addition broken when using recursive filebrowser view.
Fairly straight-forward issue, multi-files selection already feature the
root directory to use, no need to extract it again from a full path...
2020-01-14 15:54:16 +01:00
473fc35c70 Merge remote-tracking branch 'origin/blender-v2.82-release' 2020-01-14 15:14:55 +01:00
9ad0b7f8c7 Fix T68480: Normalize All weights with lock Active bug
The original code had 0 as a magic number in the test whether the weight
belongs to a locked group, instead of comparing it to the actual group
number.

Thanks @mano-wii for providing the diff.
2020-01-14 15:13:39 +01:00
6f03e356fb Merge branch 'blender-v2.82-release' 2020-01-14 15:00:39 +01:00
Stefan Werner
042e4daa72 Cycles: Crash fix for random walk SSS with Embree. 2020-01-14 14:52:32 +01:00
3a1745235f Merge branch 'blender-v2.82-release' 2020-01-14 10:49:45 -03:00
0187735eea Fix T70606: 3D cursor oriented by geometry projects on objects displayed as bounds box and wire 2020-01-14 10:46:26 -03:00
d5c963bbc3 Fix T69105: reset the action blend mode to Replace in Bake Action.
This can't be done in Tweak mode since the setting is stored in the
tweaked strip, and the logic for finding it is not exposed to python.
2020-01-14 16:13:06 +03:00
283d76932a Fix T57159: don't exit tweak mode in Bake Action if reusing the action. 2020-01-14 16:13:06 +03:00
efa3605ec0 Merge remote-tracking branch 'origin/blender-v2.82-release' 2020-01-14 14:05:45 +01:00
d49fa504fd Fix T72861: Viewport Render Keyframes ignores Grease Pencil and Shape Keys
The Viewport Render Keyframes operator didn't include keyframes from
grease pencil animation or from mesh shape key animation (see T72861).

To find all related datablocks that could be considered as part of the
selected object, `BKE_library_foreach_ID_link(..., IDWALK_RECURSE)` is
used. To prevent relations like constraint targets from being visited,
the recursion is stopped when it finds a different object.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D6558
2020-01-14 14:01:25 +01:00
6d74775a47 Fix T70606: 3D cursor oriented by geometry projects on objects displayed as bounds box and wire 2020-01-14 09:39:46 -03:00
e2c8aa4971 Fluid: Fix for relative cache paths
Relative paths in the cache are no longer converted into absolute paths automatically.
2020-01-14 12:14:03 +01:00
597d6be61c Merge branch 'blender-v2.82-release' 2020-01-14 12:11:04 +01:00
ac723db57f Fix T71798: Full Copy Scene produce Orphan Data objects.
Never treat one of those horrorible 'IDs that are not real IDs' as
regular ID, and expect ID management code to do so. Unless there is a
very good reason, one should never explicitely pass those fake IDs to ID
management code directly.

In that specific case, user count is sort of 'disabled' in libquery
code, because master collections are not in bmain (`LIB_TAG_NO_MAIN`).
2020-01-14 12:07:24 +01:00
9954cbfca6 Fix T72063: Workbench Sculpt Render
When sculpting and doing a image render the workbench used the sculpt
batch what is created by a different GPU context and would not show up.

In debug builds an assert for this case is checked. I rechecked all
`use_sculpt_pbvh` that it also checked if it was rendering. Only the
workbench deferred didn't do this for the default render mode.

With this change the user can render a workbench render directly from
sculpt mode.
2020-01-14 11:03:45 +01:00
1bcb2bfd57 Merge branch 'blender-v2.82-release' 2020-01-14 17:12:27 +11:00
1e0b790364 Fix T70273: Auto-keyframe ignored by gizmos 2020-01-14 17:11:01 +11:00
43de11f323 Merge branch 'blender-v2.82-release' 2020-01-14 17:06:29 +11:00
fffba2b653 Cleanup: move property auto-keyframing to a generic API function
Prepare to call this from gizmos.
2020-01-14 17:05:59 +11:00
99912f15e8 Fluid: Updated Mantaflow source files
The memory leak described in T72498 has been fixed in Mantaflow, the updated files should reflect this in Blender.
2020-01-13 18:56:53 +01:00
e34d3e32dd Fix T71200: Build curve geometry in one piece
Currently a curve's beveled geometry is built with duplicate geometry
along the seams between the "front," "back," etc, sections of the
curve. This builds them in one piece, resulting in smooth geometry.

Other than the duplicate geometry, the vertex positions are the same
as before.

Reviewed By: campbellbarton, mano-wii

Differential Revision: https://developer.blender.org/D6562
2020-01-13 12:29:43 -05:00
4f7ad0050b Merge branch 'blender-v2.82-release' 2020-01-13 12:15:29 -05:00
c56526d8b6 Fix T71329: Bevel: Don't drop offsets to 'in plane' faces
offset_meet creates offset lines that can't be directly intersected, so
the average of the points on each offset line is 'dropped' onto the
faces around the beveled vertex, which can depend on where
the loop starts.

This fix skips faces with the same normals as the "in plane" faces from
build_boundary.

Reviewed By: howardt

Differential Revision: https://developer.blender.org/D6521
2020-01-13 12:12:12 -05:00
389fc62f6c Fix T72094: Multiple snap targets don't work when Increment is enabled
The `poll_modal_item` was too restrictive.
`!validSnap(t)` already solves these cases, but for better readability
(and efficiency), I found it best to keep the `tsnap.mode` test.
2020-01-13 13:47:05 -03:00
60c6a74ce1 Fix T72152 DRW_debug_sphere Not Working After Overlay Refactor 2020-01-13 17:40:55 +01:00
2359979141 Fix T73044 Crash in UV editor when changing UV selection modes
Thanks to @campbellbarton for the fix.
2020-01-13 17:29:31 +01:00
84825e4b50 Fix T72957 Crash using Eye dropper in Edit mode with X-ray 2020-01-13 16:53:40 +01:00
b8bdb8e9e9 DRW: Fix stencil being modified by passes that are read only
This is because even if the glStencilMask is 0x00 the GL_DECR_WRAP and
GL_INCR_WRAP states still works and will modify the stencil.

Fix T73046 Overlapping parts of wireframes don't render at all in workench
with shadows turned on.
2020-01-13 16:27:01 +01:00
820794e162 Overlay: Edit Mode: Fix vertices depth test not always on 2020-01-13 16:27:01 +01:00
efe119cd39 Merge branch 'blender-v2.82-release' 2020-01-13 15:58:42 +01:00
dfa3f51e52 Fix (unreported) broken PY API doc gen after recent GP changes.
As usual... Adding/removing members from context requires updates of the
API building script.
2020-01-13 15:58:05 +01:00
3fdc04d3ee Accepting patch D5357: Modifiers and operators automated testing.
Patch from Habib Gahbiche (zazizizou) moves the "run operator and
compare mesh to a golden" paradigm used in bevel and boolean tests
into a general framework that separates the test specs from the
blend files. Then adds some other operator and modifier tests using
the new framework. Diff D5357.id20724.diff was applied.
New .blend files, modifiers.blend and operators.blend are needed
in the tests/modeling svn directory; those were separately committed.
2020-01-13 07:11:45 -05:00
162cb74320 Fix T67305: Sculptmode Wireframe Coloring
When in sculptmode the wireframe coloring should always be disabled.
When an object was sculpted but had modifiers this was not detected and
the colors were still shown.

This fix will disable wireframe coloring for any object that is in
sculptmode.
2020-01-13 12:57:37 +01:00
a60606e467 Fix T73029: Crash transforming object
Was caused by recent animation backup added to depsgraph as a part of
another bugfix.

This commit effectively disables the animation backup, restoring bug
related on handlers, but makes it possible to interact with objects
again.

Will re-iterate over handlers+animated properties.
2020-01-13 12:16:23 +01:00
830150c7b9 Depsgraph: Guarantee order of backup of action and ID using it
It was possible to have object copy-on-write happening during
action's copy-on-write, which was causing access to a freed
memory from animation backup.

Solves crash reported in T73029.
2020-01-13 12:10:20 +01:00
3c1115ef7f Depsgraph: Fix wrong access to animated properties
Copy-on-write backuyp was trying to read float from an array property,
which is wrong.

This is part of T73029.
2020-01-13 12:03:01 +01:00
9d254fa17a Refactor: Make construction of resolved RNA path reusable
It is somewhat different from RNA_path_resolve_property_full(), mainly since it's
properly setting array index from the f-curve.
2020-01-13 12:00:44 +01:00
44231386e4 Fix T72250: Select Boundary Loop
Edge Index display were not showing up after performing
"Select Boundary Loops" when in face selection mode. The operation
tagged the mesh that the selection was changed, but in the end this
didn't do anything within the depsgraph.

The fix changes this to recalc the geometry of the object. What also
syncs the selectmode flags. A better solution would be to update the
select flags only. But that could be done as future work when we have a
performance problems.
2020-01-13 10:48:43 +01:00
1c81374c37 Fix T73062: Custom properties misaligned
The UI layout here was mistakingly made left aligned and very hard to read when viewed inside the Sidebar.
2020-01-13 09:38:49 +01:00
1b86b3c0f4 Fix T73069: Studiolights
Studiolights that were just created didn't had the
`STUDIOLIGHT_SPECULAR_HIGHLIGHT_PASS` flag. Without this flag the
studiolight the viewport didn't show the specular highlights and it
wasn't possible to switch the highlights on/off in the popover. After
reloading the studio lights this was possible.

This patch will always set the flag for any newly created, or being
edited studiolight, so the workbench render engine is fed with the right
data.
2020-01-13 09:22:00 +01:00
ddb958ae99 Cleanup: remove hack that set operator id in the wmEvent
This can be replaced by passing an argument.
2020-01-13 15:00:15 +11:00
d5042c4250 Cleanup: remove unused GPU_texture_from_preview function 2020-01-13 14:59:28 +11:00
f6aac92ab8 Merge branch 'blender-v2.82-release' 2020-01-12 17:27:47 +01:00
0ef881cc57 Fix T71620: broken particle collisions due to rB0666ece2e2f9
An optimisation in the collision system for cloth (static collisions),
broke the particle collisions, as they take motion into account. This
restores the moving BVH required for the particle collisions, while
keeping the optimisation for the cloth collisions.

Reviewed By: mano-wii

Maniphest Tasks: T71620

Differential Revision: https://developer.blender.org/D6560
2020-01-12 17:23:02 +01:00
d8ca0ea86d cleanup dead node elimination 2020-01-11 17:15:52 +01:00
f6c377aa5b remove unused nodes optimization 2020-01-11 16:35:35 +01:00
4684b69405 give nodes and sockets an id again 2020-01-11 16:09:06 +01:00
d46ac7934a add utility to debug allocated amount in monotonic allocator 2020-01-11 15:56:37 +01:00
238059ac2a store network more compactly 2020-01-11 15:51:06 +01:00
41df03637e store data in network builder more compactly 2020-01-11 15:34:52 +01:00
090ae9aefe avoid unnecessary type casting 2020-01-11 14:09:09 +01:00
6aa7a269ae remove nodes after constant folding 2020-01-11 13:21:18 +01:00
8ddf71d880 initial network builder refactor to enable support for removing nodes 2020-01-11 12:59:37 +01:00
2d7fee45d6 add method to access all nodes 2020-01-11 10:40:26 +01:00
01d9a2f71b Merge branch 'blender-v2.82-release' 2020-01-10 18:32:11 +01:00
1cb938ef2c Cycles: Fix viewport rendering when displaying as byte and not half float
Commit rB7e61e597253f3ca75f2fb86a57212ca750ffbbe8 broke viewport rendering when not displaying as halfs.
This fixes that by actually using the `scale` parameter that is passed into `film_map` and also de-duplicates code around it.

Differential Revision: https://developer.blender.org/D6557
2020-01-10 16:30:13 +01:00
89578a8f6e Fix OptiX acceleration structure failing to build in viewport
The `optixAccelBuild` API throws an error when the property to get compacted size is passed in
without the `OPTIX_BUILD_FLAG_ALLOW_COMPACTION` flag set. This is not currently hit
because `background` is always true (set in `mem_alloc`), but would become an issue once that
is sorted out, so fixing it now to be safe.
2020-01-10 16:03:11 +01:00
6915555906 Merge branch 'blender-v2.82-release' 2020-01-10 15:49:01 +01:00
1d149f6746 Fix T72470: OptiX render fails with scene with many translucent planes on Linux.
OptiX always uses record-all behavior for transparent shadow rays, but did not check
whether the maximum number of hits exceeded the shadow hit stack. This fixes that.
2020-01-10 15:47:51 +01:00
8e66183a98 USD Exporter: clarified export options in the UI
- "Only Export Selected Objects" → "Selection Only", as this is the
  standard used in other exporters.
- "Evaluation Mode" → "Use Settings for", as this is clearer for users
  who aren't as familiar with the technical details of the depsgraph.
- "Use Instancing" → "Instancing", and moved the checkbox to the end of
  the option list into its own box "Experimental". This looks a bit
  cleaner than just plonking "EXPERIMENTAL" in the checkbox label.
2020-01-10 15:43:01 +01:00
Julian Eisel
aacdf55a50 Cleanup: ARegion.sizex/y should not be used to access region size
This should only be used to change and recalculate region sizes in a DPI
independent way. To get the size with DPI applied, ARegion.winx/y should
be used instead.
Added note on this in comment.
2020-01-10 14:28:11 +01:00
Nathan Letwory
c91ebcd7ab Docs: roll version to 2.83 for master 2020-01-10 15:21:08 +02:00
9867106199 Fix T71491: Sculpt Brush Text Color
When text drawing is disabled in the viewport the color of the sculpt
brh is set to the last used one. In th Light theme this is black what
makes it totally not visible.

This change will render the brush text using `TEXT_HI` as this is the
last one set when the text overlay is on.
2020-01-10 12:14:03 +01:00
befc082736 Fix T71908: Animated properties are lost after frame-post handler
The issue was caused by special handling of animation update after
manual edits in frame_post handler: to avid loss of manual edits
done on top of animated property. This was done as a separate pass
for non-animation update after frame_post did modifications.

This caused some other side-effect: non-modified animated property
was re-setting to the value which is used in the viewport.

Idea of this solution is simple: preserve values which came from
animation update through copy-on-write process. The actual process
of this is a bit involved: need to decode RNA path and do it twice
since f-curve might point to a sub-data which pointer will change.
Since this is only done for non-active depsgraph (aka depsgraph
used for render pipeline) this is probably fine since all this
extra overhead is just a fraction of overall render process.

Differential Revision: https://developer.blender.org/D6330
2020-01-10 11:40:08 +01:00
Nathan Letwory
c3d6929e4f Version cycle 2.83, master is now in alpha and open for new work and features 2020-01-10 11:26:52 +02:00
Nathan Letwory
20ca8fddf8 Merge branch 'blender-v2.82-release' 2020-01-10 11:26:03 +02:00
Nathan Letwory
a72d823489 Version cycle to 2.83 alpha for master. 2020-01-10 11:25:54 +02:00
2ef08bd93e Cleanup: group event_query functions in header 2020-01-10 18:08:21 +11:00
db3968fd59 Cleanup: name wm_event_modalkeymap_begin/end
Relocate & name functions to make it clear calling begin
should be followed by a call to end.

Also group locking & report functions.
2020-01-10 17:54:35 +11:00
1a66b330ac Cleanup: move public event queries into their own file
event_system.c has been collecting a lot of different functionality,
move generic query/access functions into their own file,
since these are used by operators and other parts of the windowing code
and aren't part of low level event handling.

Also move public last-property API to wm_operators.c.
2020-01-10 17:54:30 +11:00
Nathan Letwory
95200045f3 Version 2.82 cycle to beta for bcon3, stabilizing period 2020-01-10 08:10:27 +02:00
04c588294d Cleanup: use doxy sections in wm_event_system.c 2020-01-10 16:34:39 +11:00
6eb9cc101b Correct last commit, restore the double-click state for modal events 2020-01-10 16:31:25 +11:00
0920c1684b Fix T72999: Fast keystrokes ignored for operators with modal keymaps
Logic to convert double-click events into press events wasn't running
in the case an operator had a modal keymap, causing bevel for e.g.
to ignore keys pressed quickly.

Change event handling logic so modal handlers never
receive double click events, so checks for press/release are reliable.

While this is an old issue for mouse events in practice it wasn't
a problem since the first event typically executed/canceled.
Support for keyboard double-click exposed the problem
for all modal operators that take numeric input.
2020-01-10 15:49:35 +11:00
62c6038531 Docs: explain logic behind wm_event_modalkeymap 2020-01-10 15:10:13 +11:00
7eaed14fae Fix T72948: Smooth active tool gizmo vibrates 2020-01-10 13:08:43 +11:00
ad69127859 Fix mesh randomize tool not running
Missing from recent update to execute immediately
when properties are set.
2020-01-10 13:03:12 +11:00
Nathan Letwory
9d95c035c5 Docs: 2.82 release description for Linux appdata 2020-01-09 21:46:58 +02:00
d54eebbfa7 support constant folding for vectors 2020-01-09 17:41:10 +01:00
f1fc372df1 move constant functions to separate file 2020-01-09 17:20:33 +01:00
c8afdc93f9 Merge branch 'master' into functions 2020-01-09 17:09:36 +01:00
9b920938bb Fix T71630: Add Delete Tracks to Edit menu in NLA editor
Reviewers: billreynish, lichtwerk

Differential Revision: https://developer.blender.org/D6550
2020-01-09 17:07:27 +01:00
7ac8f61dc1 USD Exporter: removed 'Export' from the exporter option labels
Most options were 'Export …', now they are just '…'.
For example, 'Export UV Maps' → 'UV Maps'.
2020-01-09 15:58:02 +01:00
04122c8eb2 USD Exporter: clarification of some comments in the code
No functional changes.
2020-01-09 15:47:08 +01:00
e55ffb28a9 USD Exporter: make it possible to debug-print arbitrary export graphs
This is useful for debugging things like the previous commit.

No functional changes to the actual USD exporter.
2020-01-09 15:47:07 +01:00
9f5f91d6bd USD Exporter: properly export objects whose parents are not exported
The exporter constructs an export hierarchy, and then traverses that
hierarchy from the root to the children. When an object is to be exported,
but its parent is not, it meant that this traversal from (great)parent to
children would skip these objects. This commit fixes that by inserting the
missing parents as 'transform only' into the hierarchy.
2020-01-09 15:47:05 +01:00
cf0f066c2d USD Exporter: removed 'Visible Objects Only' exporter option
The way the USD exporter currently works, it is not possible to export
invisible objects. As such, the 'Visible Objects Only' option was
confusing.

Exporting invisible objects means obtaining invisible evaluated objects
from the depsgraph, which is not something that's currently implemented.
Once that's done, we can reintroduce this option.
2020-01-09 15:46:46 +01:00
d98b38f97a USD Exporter: removed exclusion of 'Holdout' collections
This is in response to @brecht's remark in rBec62413f803e, where he
states that the approach was problematically interpreting the holdout
setting in a different way than what it was designed to do.

If we later want to add back a different "never include this in exports"
criterion, it can be easily done in
`AbstractHierarchyIterator::mark_as_weak_export()`. If such a criterion
should be file-format-specific, it can be done by overriding that
function in the file-format-specific subclass.
2020-01-09 15:46:46 +01:00
744a58918a Fix T72375: Crash when using spin tool
The original geometry referenced in `vtable` was deleted by the
`extrude_face_region` operator.
It is read soon after, so don't delete the original geometry
(param `use_keep_orig`).

This may have a small impact on performance.
2020-01-09 11:15:56 -03:00
Stefan Werner
2f1d3ba6da Cycles: Fixed OpenCL kernel build.
transform_direction() can't handle parameters in constant address space.
Creating a local copy of the parameter satisfies the OpenCL compiler.
CUDA and CPU compilers should be able to optimize this away I hope.
2020-01-09 14:40:24 +01:00
Stanislav Blinov
2eafae4e39 Fix T71295: Duplicate macro faulty after rotation
As per T71295, the "duplicate+move" macro fails to store TRANSFORM_OT_translate properties once it's been used with rotation. I believe this is due to it being re-initialized with incorrect properties, reading bogus values from stored TRANSFORM_OT_rotate properties.

Force storing of actual operator id name instead of one defined in the macro, which in turn forces a name mismatch on initialization.

Reviewed By: #modeling, campbellbarton

Maniphest Tasks: T71295

Differential Revision: https://developer.blender.org/D6413
2020-01-09 09:02:17 -03:00
002f5b826c Cycles: Disable fluid motion blur regression test
There are deeper issues than just updating the regression test .blend file
and the solution is dragging for far too long.

Considering this a known broken feature, which will either be fixed next week
or completely removed from the interface for the coming release.
2020-01-09 11:40:10 +01:00
f681e9ea49 Fix UV gizmos poll failing with multiple objects
Only the active objects UV selection was checked.
This also avoids checking UV selection for every poll call,
now this is only done on refresh.
2020-01-09 17:50:52 +11:00
ce5a5b553d Fix multiple UV gizmos being linked at once
This happened when reloading the file after using different gizmos.
2020-01-09 17:01:05 +11:00
ac4057b95a Gizmo: use pivot center for UV gizmos 2020-01-09 16:42:24 +11:00
73098d2ca5 Gizmo: improve 2D arrow select detection
Fixes issue where UV transform circle was being masked by the arrows.
2020-01-09 12:45:58 +11:00
7ae35a7369 Fluid: Fix broken motion blur for liquids
Added missing resize for vector that holds vert velocities
2020-01-09 01:15:40 +01:00
830aa758b4 Fix T72900: Mouse-move causes redraw when gizmos are hidden
Move redraw tagging to the gesture modal operator
to make sure this only runs when it's needed.

Caused by d591c8a350, which tagged the region to redraw when the
gizmos were tagged to refresh, however they wont redraw when hidden.
Thanks to @jbakker for finding the root cause.
2020-01-09 11:07:28 +11:00
99c798b8a6 Cleanup: centralize WM_gesture_end call
Prepare for adding extra logic on free (next).
2020-01-09 10:36:53 +11:00
533d146f48 Fix T72976: CRASH When Selecting Camera 2020-01-08 22:46:50 +01:00
915177f99a Industry Compat keymap: Fix gizmos stealing the Alt-key when navigating the viewport 2020-01-08 21:14:15 +01:00
c3b406a7c3 Revert recent change to the particles RNA, and only affect the UI.
Even though the name change is more correct, we don't want to change the API at this time.
2020-01-08 20:37:35 +01:00
Josh Belanich
e72ecaa371 Fix T66529: Cycles motion blur render errors with fast rotating objects
In transform_motion_decompose, successive quaternion pairs are checked to be
aligned such that their interpolation is rotation through the shortest angle
between them. If not, the first in the pair was flipped. This can cause
problems for sequences of more than 2 quarternions, since flipping the first
in a pair might misalign the previously pair, if unlucky.

Instead, this change flips the second in the pair, which is safe when
iterating forwards.

Differential Revision: https://developer.blender.org/D6537
2020-01-08 17:23:41 +01:00
6bca11a847 Fix build error in tests on Clang / macOS 2020-01-08 17:21:40 +01:00
15c463cee3 Fix T72954: Cycles gradient texture not clamped when using OSL 2020-01-08 16:57:16 +01:00
d5ca72191c Cycles: Add OptiX AI denoiser support
This patch adds support for the OptiX denoiser as an alternative to the existing NLM denoiser in Cycles. It's re-using the same denoising architecture based on tiles and therefore implicitly also works with multiple GPUs.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D6395
2020-01-08 16:53:11 +01:00
f1516e007d Fix T72288: Left click on empty space inside file browser resets scrolling
Wasn't checking if there actually is a selection.
2020-01-08 16:45:09 +01:00
Julian Eisel
f52d9a878d Fix T72878: Alphabetical sorting in Outliner sorts shorter names last
E.g. "Cube" would be placed after "Cube.001", which is not what you'd
expect. 2.80 handled this correctly.

Loosely based on D6525 by @radcapricorn, but found a bug in that and
prefered to do some further adjustments.

Also activates test for this case.
2020-01-08 16:08:10 +01:00
Julian Eisel
525b0e0ccb Tests: Natural string comparing (BLI_strcasecmp_natural())
Adds tests covering a good amount of common cases and corner cases for
`BLI_strcasecmp_natural()`.
Could of course always add more tests for more cases, but don't want to
spend too much time on this.
2020-01-08 16:08:10 +01:00
cea67064da Fix T62311: Metaball animation playback crash
This commit restores old metaball workaround which was forcing their
update from a single thread.

The root of the issue comes to the fact that metaball evaluation needs
to access metaballs from duplilists, so they are properly polygonized
with corresponding motherball which is outside of duplilist.

In a more ideal world this will be implemented in a way that will not
require iterating over all duplilists, but only through the ones which
actually contain metaballs for the given motherball. In practice this
ends up in a huge refactor in both relations builder (which meeds to
see whether there are metaballs in duplilists without actually
creating duplilist as it can not be done prior scene is evaluated)
and in metaballs area which need to use new relations information.
Additionally, metaball evaluation must become thread-safe, which is
currently not a case with dupli-object matrices. There might be issues
deeper in polygonization code which I am not aware of.

Having this forced single-thread evaluation is same as Blender 2.79
was doing.

Think it's better to have slower but simpler solution than to invest
time in refactoring area which requires deeper design changes.

Reviewed By: dfelinto

Differential Revision: https://developer.blender.org/D6539
2020-01-08 14:38:54 +01:00
75f82d28e3 Fix T72235: crash entering particle editmode with non-valid PTCacheEdit psys pointer
Caused by own rBe02ecd599bdc.
Can happen with e.g. cloth.

Also fixes T59583

Maniphest Tasks: T72235, T59583

Differential Revision: https://developer.blender.org/D6547
2020-01-08 13:33:46 +01:00
15ef1d4c80 Fix T72119: UV/Image Editor theme face colors with no effect
The `in int flag;` in `gpu_shader_2D_edituvs_faces_vert.glsl`
don't have the values `FACE_UV_ACTIVE` and `FACE_UV_SELECT`.

Add face flags then.

Original patch is from @EitanSomething

Differential revision: https://developer.blender.org/D6520
2020-01-08 09:21:39 -03:00
07a959067d Fix T72667: Collection delete hierarchy in edit-mode crashes
Also resolves T72848, although updating multiple windows doesn't work,
this matches 2.7x behavior.
2020-01-08 22:35:26 +11:00
010c551257 DNA: mark OrigSpace structs as run-time 2020-01-08 16:34:27 +11:00
b42b837b7e Cleanup: mesh data header
This file had become disorganized, it wasn't clear which structs/flags
were deprecated.

- Add comments explaining what each struct is for.
- Use doxy sections.
- Remove outdated notes, unused flags.
- Group custom-data.
- Group deprecated structs in their own section.

T
2020-01-08 16:34:24 +11:00
a32ee63660 Fix T72919: NDOF 'Free' orbit preference is ignored
Regression from 6288dbffb6.
2020-01-08 14:30:47 +11:00
0e37045f32 Cleanup: use paint/sculpt prefix in BKE_paint.h
PoseIKChain for example reads as if this is related to armature/pose
when it's a sculpting feature.
2020-01-08 12:59:48 +11:00
55daa0d444 Fix T72251: Add rotate brush as constrained by radius for automasking
This brush should be added to the set of brushes where we know which
vertices are going to be affected by the brush when starting the stroke.
This way we can limit the automasking only to those vertices instead of
flood filling the whole mesh from the active vertex.

All brushes that are not in this set will automask by flood filling the
mesh when starting the stroke. To improve this and make it work as most
users expect, we need a fast way to calculate topological distances on
high poly meshes.

Reviewed By: jbakker

Maniphest Tasks: T72251

Differential Revision: https://developer.blender.org/D6376
2020-01-07 17:11:18 +01:00
4f70af34e0 Fix T72647: Check if the PBVH type makes sense for the sampling mode
Before this it was possible to use the operator with Dyntopo sample mode
with a PBVH type GRIDS or FACES, causing a crash. Now we check first if
the PBVH type is correct before calling the sampling function.

We also check if the PBVH exists, which may also cause a crash.

Reviewed By: jbakker

Maniphest Tasks: T72647

Differential Revision: https://developer.blender.org/D6475
2020-01-07 17:10:02 +01:00
bc9c8c35e1 Fix T72830: Check if the mesh has mask data before extractig or slicing
This was causing a crash when the mesh does not have the mask data
initialized. I also added the same check to mask extract as it works the
same way.

Reviewed By: jbakker

Maniphest Tasks: T72830

Differential Revision: https://developer.blender.org/D6513
2020-01-07 17:03:59 +01:00
fdf89acc86 Sculpt: Pose Brush with Inverse Kinematics
This commits introduces the pose_ik_segments brush property in the Pose Brush. When increasing the IK segments count, the brush generates more segments and weights associations following the topology of the mesh. When moving the brush, these segments are transformed using an IK solver and they are used to deform the mesh.

When pressing Ctrl, the brush controls the segments' roll rotation instead of using the IK solver. The brush falloff controls how much rotation is propagated from the first to the last segment in the chain.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6389
2020-01-07 16:57:54 +01:00
bd766f8f06 Fix T72935: Applying transform to parent mesh changes rotation of children using quaternions
`ob->quat` is `v4`.
2020-01-07 12:42:37 -03:00
e665c2c893 Fix T69314: Broken Rotation to Deltas for Quaternions 2020-01-07 11:53:00 -03:00
0bd598d388 bmesh_intersect_edges: Remove unnecessary index setting 2020-01-07 11:53:00 -03:00
94d19d5ff5 GPencil: Fix unreported memory leak
Thanks to @dfelinto for his help
2020-01-07 14:14:19 +01:00
a99f6e5df1 GPencil: Remove memory allocation for triangles
This will be replaced later, so it's not logic allocate now.
2020-01-07 14:14:19 +01:00
122a0afa96 Blenlib: Add C++ guard for Queue 2020-01-07 13:49:10 +01:00
581a5ee0cc Edit Mesh: add comments to EDBM_op_finish
Was marked 'FIXME' however this only ever happens in exceptional cases.

Also comment why tagging is needed in this case.
2020-01-07 22:32:40 +11:00
bcfa1c3051 Depsgraph: Revert unwillingly staged change from previous commit
One of those days, sorry for the spam.
2020-01-07 12:26:17 +01:00
b6b5924e69 Depsgraph: Cleanup spelling
For some reason got sneaked into previous commit.
2020-01-07 12:25:16 +01:00
5be0b2bc4e Depsgraph: Refactor, make evaluation stages easier to extend
Currently should be no functional changes, but allows to extend it
for experiments or for real fixes.
2020-01-07 12:19:57 +01:00
8534fb1b01 Depsgraph: Cleanup, move private functions to anonymous namespace
Allows to have shorter definition lines.
2020-01-07 12:19:57 +01:00
2c9ca87cef Cleanup: Remove unused task scheduler constants 2020-01-07 12:19:57 +01:00
c128b30bd1 Edit Mesh: pass in Mesh instead of BMEditMesh to EDBM_update_generic
This avoids a list lookup in Main (recently added), passing in a mesh
instead of an edit-mesh, since the mesh links to the edit-mesh.
2020-01-07 22:14:36 +11:00
cb1f48ab7f Fix T69246: Outliner - Objects Filter Selected, Hidden and Active not
working properly

'outliner_extract_children_from_subtree()' (introduced in
rB40a1c671655c) was extracting the children of non-matching parents
regardless of their own matching state.

Now properly filter the subtree prior to extracting.

Maniphest Tasks: T69246

Differential Revision: https://developer.blender.org/D6517
2020-01-07 11:53:27 +01:00
b6bcfd2a6e GPencil: Remove is_annotation parameter
Now, the name of the operator is used.
2020-01-07 11:44:51 +01:00
fa3a0697b8 Annotations: Split annotation operators and pointer functions
This allows to have annotation panels and grease pencil object panel at the same time.

Differential Revision: https://developer.blender.org/D6467
2020-01-07 11:34:20 +01:00
e237b78b91 Fix T72499: UV Editor : Selection tools don't deselect when dragging on an empty space [face selection]
If pre-deselecting takes place, then flushing was not happening
('changed' never became true because no new faces were being selected).

This rectifies the logic. (also removed redundant double initialization
to false)

Maniphest Tasks: T72499

Differential Revision: https://developer.blender.org/D6459
2020-01-07 10:39:56 +01:00
b5cef9fc3f GPencil: Fix wrong keymap for Radius thickness (related to T72945) 2020-01-07 09:15:26 +01:00
11292edba6 BMesh: remove BMEditMesh.ob pointer
Remove this pointer since it's linking Mesh data back to the object,
where a single edit-mesh may have multiple object users,
causing incorrect assumptions in the code.

Resolves dangling pointer part of the T72667 crash,
although there are other issues which still need to be fixed.

In EDBM_op_finish and EDBM_update_generic,
full Main lookups have been added which should be replaced with mesh
argument or the update tagging moved elsewhere.
2020-01-07 17:47:17 +11:00
1ef59d0eb5 BMesh: remove BMEditMesh.ob use for ED_transform_snap_object_* API 2020-01-07 17:02:50 +11:00
32b7056acd BMesh: remove BMEditMesh.ob use for ED_mesh_mirror_* API 2020-01-07 15:39:08 +11:00
9d7abce359 BMesh: remove BMEditMesh.ob use for select mirror 2020-01-07 14:45:01 +11:00
8bdac377d8 BMesh: remove BMEditMesh.ob use for undo 2020-01-07 14:36:49 +11:00
e95c0fba09 BMesh: remove BMEditMesh.ob use BKE_editmesh_lnorspace_* API
Note that this is a bit clumsy having both edit-mesh and mesh,
BKE_editmesh_ensure_autosmooth & BKE_editmesh_lnorspace_update
are often called together, these could be made into a single functions.
2020-01-07 14:27:59 +11:00
6e39aeb2cd BMesh: remove BMEditMesh.ob use for draw manager 2020-01-07 14:06:33 +11:00
a8d11995bf BMesh: remove BMEditMesh.ob use for vert coord access, projection 2020-01-07 13:53:03 +11:00
592e245a90 BMesh: remove BMEditMesh.ob use for Bevel
The pointer is causing issues since two objects can share an edit-mesh,
removing in stages, see T72848.

Also fixes the material index being clamped by every object.
2020-01-07 13:41:03 +11:00
3a35301fd1 Fix T70821: Hair Radius Is Actually Hair Diameter
Renamed hair tip and root properties to be called diameter rather than radius. The old name was incorrect.
2020-01-06 21:54:56 +01:00
58e88d3816 Industry Compat keymap: Support MMB for immediate transform tool use again
Now this also works for the UV Editor

Note: Only the transform tools currently support this. I would like to make this work for all the tools with gizmos, but need to find the nicest way to do it.
2020-01-06 20:37:47 +01:00
04ddd6f717 Fix T72700: Missing flush vert visibility on sculpt undo
This was caused by a missing call to BKE_mesh_flush_hidden_from_verts()
when a SCULP_UNDO_HIDDEN undo step is processed.

Reviewed By: jbakker

Maniphest Tasks: T72700

Differential Revision: https://developer.blender.org/D6488
2020-01-06 16:59:22 +01:00
55fbb0fd69 BM_mesh_intersect: Match the mesh in Debug build with Release
Prevents regression in unit tests.
2020-01-06 12:33:46 -03:00
60c54be053 Fix/Cleanup invalid call to blendfile reading in UNDO_DISK.
Currently harmless since undo to disk is disabled, but that is not a
good reason to have invalid code.
2020-01-06 15:46:43 +01:00
7213c42b6e Fix BKE_mesh_validate_arrays invalidating face selection
Use `totpoly` instead of `totface`.

The original code was written for non-bmesh case and likely missed this
update.
2020-01-06 09:26:21 -03:00
24d46bdbf7 Gizmo: match UV editor gizmos more closely to the 3D view 2020-01-06 23:21:50 +11:00
3978568e45 Cleanup: remove unused 2D arrow gizmo
It's simpler to support a single gizmo type for 2D/3D.
2020-01-06 23:21:50 +11:00
0d67eb277f Gizmo: support 3D arrow gizmos in 2D spaces
Allows 2D arrows to be removed, since they work slightly differently
and don't support offset matrices.

Use these in the UV editor.
2020-01-06 23:21:45 +11:00
98e4fbc7cc Gizmo: use compatible scale values between 2D/3D gizmos
Make the UV editor gizmos the same size as the 3D view.
2020-01-06 23:08:27 +11:00
b7acb8690a Fix T72902: Whiskey Lake support
Users reported that Whiskey lake has the same issue as other intel
platforms where an extra glFlush is needed. This change will
add Whiskey Lake to that exception.

Patch provided by Philip Luk
2020-01-06 12:57:14 +01:00
7f3e121926 USD Exporter: removed from experimental features
There were two reasons the USD Exporter was listed as experimental:

- Originally there was no deduplication of mesh normals & UV coordinates
 (resolved in rBf5e00f735106b5ec635806a4c795a2bc46ae8369), and
- the way materials were exported was incompatible with instancing with
  USD 19.07. This seems to be resolved with the current version of USD
  (19.11).

Blender (more specifically, `makesdna`) doesn't seem to like empty DNA
structs, so I couldn't remove all properties from
`UserDef_Experimental`. Instead I have just kept `char _pad0[8]`.

Reviewed by: campbellbarton

Differential Revision: https://developer.blender.org/D6519
2020-01-06 12:41:15 +01:00
a6d01365e3 Fix crash opening specific files
For some reason socket flag and actual presence of link got out of sync.
Check for link to be present prior to access it.

Fixes crash opening file from T48684.
2020-01-06 11:52:35 +01:00
9483997472 Depsgraph: Fix wrong ID filtering
Was only using first ID instead of all of them.

Might have been causing issues when updating motion paths of
multiple objects.

Spotted by Jack C, thanks!
2020-01-06 09:23:20 +01:00
Maxim Vasiliev
e993667a46 Fix (unreported) critical mistake in Node copying code.
Nice reversed-logic mistake in rB693721cc7e7d.

How this could remain unnoticed for almost one year is fairly
mysterious, this should have basically broke all node tree copying,
would expect such bug to get reported within days, weeks at most...
Probably because that function is not that much used in current code.

Nice reminder also that those bloody nodetrees still need a lot of
cleanup/refactor/simplification when it comes to ID management code.

Reported/fixed as part of D6484, but this really needs its own commit.
2020-01-05 18:27:00 +01:00
b15f601d2c Edit Mesh: Use multithreading in other parts of Auto Merge & Split
In the Auto Merge & Split feature, multithreading was only used to
find duplicates between vertex and another vertex.

But with this patch, multithreading is now used to find intersections
etween edge and edge and between edge and vertex.

In my tests I noticed a performance improvement of around 180%
(0.017151 secs to 0.009373 secs)

Differential Revision: https://developer.blender.org/D6528
2020-01-05 14:22:59 -03:00
ebe177aead Industry Compat keymap: Fix Polybuild tool not working with this keymap
I ended up simply removing the gizmo entries here - they seem to be no longer needed.
2020-01-05 16:54:08 +01:00
c2c6d152ad Merge branch 'master' into functions 2020-01-05 16:37:20 +01:00
8df339438a Fix T72682: Regression when moving markers while holding ctrl
In 2.79 when moving a marker with `G` while holding `ctrl` the marker
would snap to one-second movements. This was (probably accidentally)
removed when the Timeline Editor was removed in rB5374865523faf253.

Reviewers: mano-wii

Differential Revision: https://developer.blender.org/D6527
2020-01-05 15:55:54 +01:00
485ff4b9bf Fix T72423: Incorrect tooltips in curve profile layout 2020-01-05 15:10:25 +01:00
295647212d Industry Compat keymap: Properly support Grease Pencil Edit Mode
Many things weren't working correctly in GP Edit Mode, such as select/deselect/invert all, basic tools, extrude, snap etc.

Now this mode works consistently with other modes.
2020-01-05 12:43:16 +01:00
85d43943dd GPencil: Add missing update in previous commit of task T72897 2020-01-05 09:47:51 +01:00
bbe7c278d2 CMake: enable FFTW for headless & bpy configurations
This caused the ocean modifier to be disabled.
2020-01-05 16:16:03 +11:00
3576056eea Cleanup: warning 2020-01-05 16:15:32 +11:00
5c66739b78 Fix T72897: Move Channels operator moves Grease Pencil Layers wrongly
This operator was pending of fix.
2020-01-04 22:02:21 +01:00
952bc89d6e BLI_kdopbvh: Deduplicate code
No need to create different callbacks for `BLI_task_parallel_range`,
these callbacks are called a few times.
2020-01-04 16:56:12 -03:00
66fdcd5f33 minor fixes 2020-01-04 16:38:09 +01:00
e3ee421314 better to string conversion for generic types 2020-01-04 16:21:03 +01:00
83308760a2 initial constant folding of multi function network 2020-01-04 16:07:59 +01:00
f526c8d303 rename Stack.empty to Stack.is_empty 2020-01-04 14:42:39 +01:00
819be3639c Industry Compat keymap: Support the recently added Drag option
This also simplifies the keymap a lot, since I can now remove a lot of hacky exceptions to make box select work with the gizmo-tools.
2020-01-04 14:33:11 +01:00
9fec9c6a0f Industry Compat keymap: Support 1-3 keys in the UV Editor when Sync Selection is enabled
This also makes it possible to hold Shift to enable multiple selection modes in Edit Mode
2020-01-04 14:26:26 +01:00
d95b52f1c9 cleanup link insertion 2020-01-04 14:25:53 +01:00
6b9e7dc585 simplify conversion insertion 2020-01-04 13:59:39 +01:00
bc48280fed refactor: extract methods 2020-01-04 13:42:39 +01:00
7a931deab2 simplify names 2020-01-04 13:37:27 +01:00
b7f6be1b8b simplify names 2020-01-04 13:27:56 +01:00
9c20241272 simplify names 2020-01-04 13:26:17 +01:00
b2fb025153 rename FunctionNodeTree to FunctionTree 2020-01-04 13:24:29 +01:00
5e49e3df6e move code into sub namespace 2020-01-04 13:23:35 +01:00
5bbc1b2e16 refactor: initial removal of FunctionTreeMFNetworkBuilder 2020-01-04 13:17:33 +01:00
0ac41dea7e BLI_bvhtree_overlap does not work multithreaded
`BLI_task_parallel_range` counts the number of tasks depending on the
number of items.

In the case of `BLI_bvhtree_overlap` the number of items is always
between 2 and 16, which makes it always run in single thread.

So, set the maximum number of items per thread to 1.

In my tests the cloth collision system (which calls that function)
went from 0.80fps to 0.88fps.

Differential Revision: https://developer.blender.org/D6523
2020-01-04 08:36:47 -03:00
8314e20139 BLI_bvhtree_overlap: Don't use BLI_task API when not needed
No functional change.
2020-01-04 08:34:10 -03:00
aad09525fb BLI_bvhtree_overlap: Fix wrong count of child nodes
As you can see, here is testing the "children" of `node1`.
So bvhtree is `tree1`.

This problem has never been observed because usually `tree_type`
of `tree1` equals `tree_type` of `tree2`.
2020-01-04 00:34:47 -03:00
025d13045a BLI_bvhtree_overlap: Make sure the number of nodes matches the number of threads 2020-01-03 23:06:07 -03:00
ad6c66fa3e Edit Mesh: Multithread support for Auto Merge & Split
Also collapsed edges are no longer used in the overlap test.
This greatly improves peformanse for cases where the distance tested is
relatively large.
2020-01-03 22:54:15 -03:00
5659c8e0bf BLI_bvhtree_overlap: Improve non-multithreaded usage
Although not using multithreading, the `thread` parameter in the
`BVHTree_OverlapCallback` callback always returned a value between the
"number of threads".

This parameter should always be 0 in such cases.

Also a `BLI_Stack` was created for each "thread" and used.
This small overhead is no longer seen.

Differential Revision: https://developer.blender.org/D6510
2020-01-03 22:48:12 -03:00
ea9282cbd6 extract class for managing the socket mapping 2020-01-03 15:02:41 +01:00
2c68bb3e51 cleanup naming 2020-01-03 14:43:00 +01:00
c505fc4d23 cleanup naming 2020-01-03 14:41:18 +01:00
4063e6c058 extract actual build step from builder 2020-01-03 14:30:47 +01:00
be23e6e2f2 extract members from builder 2020-01-03 14:21:17 +01:00
b7a8ef4b9f replace IdMultiMap with more generic IndexToRefMultiMap 2020-01-03 14:16:58 +01:00
1934749029 cleanup 2020-01-03 13:44:54 +01:00
35aaf2fe51 use IndexToRefMap instead of IndexMap 2020-01-03 13:40:31 +01:00
9c2e7a4e1c only map dummy sockets when function network has been created 2020-01-03 13:17:37 +01:00
e083ab2d02 remove unused method 2020-01-03 12:51:12 +01:00
2b00e17124 extract IdMultiMap data structure 2020-01-03 12:44:41 +01:00
089ee94b88 add missing hash function 2020-01-03 12:06:22 +01:00
ab3498b057 Merge branch 'master' into functions 2020-01-03 11:39:41 +01:00
9b74e648c5 Fix T71495: Some Textures with AnimData not visible in Dopesheet
T71495 describes two problems with animation of textures not showing up in
the dope sheet:

1. textures connected to force fields
2. textures of brushes

This patch resolves the first case.

An alternative would be to switch to iteration of dependencies using
`BKE_library_foreach_ID_link()`. This is a good idea to do at some point,
but adding these few lines was considerably easier & safer to do.
2020-01-03 11:02:35 +01:00
846c034323 UI: scale region hide threshold by zoom level
Resolves issue were it wasn't possible to have a single column toolbar
when zoomed out.
2020-01-03 16:40:10 +11:00
eb6ca6cf9f Fix gizmos flickering when resizing regions 2020-01-03 16:28:40 +11:00
e26a527770 Fix toolbar flickering on resize, inability to hide 2020-01-03 15:50:50 +11:00
ac7eb71089 UI: Improve toolbar width snapping
Allow narrower toolbar before snapping to two column layout.
2020-01-03 15:37:35 +11:00
d8dc310103 Keymap: default to gizmo drag when LMB select is in use
Enable by default since it allows selection
without gizmos getting in the way which is a common annoyance.

Although this has the drawback that subtle adjustments with
gizmos won't be detected until the drag threshold is reached.
2020-01-03 14:12:28 +11:00
b423b89127 Tool System: enable fallback tool by default
This defaults to selection when not using a gizmo.
The previous behavior to drag anywhere can be set in the tool settings
or by selecting the fallback tool (Alt-W).

See: T66304
2020-01-03 14:04:11 +11:00
a8ce9a143a Tool System: store the fallback tool for re-use
The fallback tool was run-time only data,
now it's stored in the blend file.
2020-01-03 12:34:55 +11:00
a854840e76 Fix T57111: Particle texture keyframes missing from Graph Editor
The entire particle system was skipped when the particle system itself did
not have any animation data. This caused the animation data on the texture
to be skipped.
2020-01-02 18:14:59 +01:00
311178fcf2 Fix T72821: Crash when IOD is removed from post-update callback
IDs recalc clear flag was accessing freed memory.

There is more detailed comment about solution in the code.
2020-01-02 17:19:29 +01:00
7d4fb6880e use BLI::parallel_for when creating tetrahedons 2020-01-02 17:14:30 +01:00
d238e6410f improve copying of generic data 2020-01-02 17:09:02 +01:00
de530a95dc Transform: Pose: Partial support for Auto IK + X-Mirror
Fix T69572

TODO: support `Relative-Mirror` as well.

Maniphest Tasks: T69572

Differential Revision: https://developer.blender.org/D5862
2020-01-02 12:53:46 -03:00
2e06a6bec3 Fix T72820: Linked objects jumping around during render
Was caused by 6183688c35 (thanks ronsn for nailing it down!).

The issue is that order of copy-on-write operations is not defined, so
can not use flags set by that operation to make decision.
2020-01-02 16:47:39 +01:00
187844f712 use StringMultiMap in more places 2020-01-02 16:37:17 +01:00
6732a03531 introduce StringMultiMap 2020-01-02 16:28:55 +01:00
8753f92cb2 utility to iterate over string map in parallel 2020-01-02 16:05:41 +01:00
461261c18d Fix T69207: Surface objects showed curves ADD menu (Shift+A) in editmode 2020-01-02 15:50:58 +01:00
0ebb98ab3d cleanup 2020-01-02 15:49:41 +01:00
30b50638a0 rename index_iterator to index_range 2020-01-02 15:22:20 +01:00
25fc970f44 move tbb wrappers to blenlib 2020-01-02 15:20:44 +01:00
1e2401a5ff more parallelization 2020-01-02 15:12:26 +01:00
2025065931 simulate particles in parallel 2020-01-02 14:58:39 +01:00
169bdd890f extract method 2020-01-02 14:43:46 +01:00
ecfed4d70f cleanup parallel for/invoke 2020-01-02 14:39:52 +01:00
8a8223c193 cleanup parallel for 2020-01-02 14:36:07 +01:00
1273af1bdd simulate particle systems in parallel 2020-01-02 14:31:38 +01:00
3e325b42bb run emitters in parallel 2020-01-02 14:23:12 +01:00
f12b544515 new multi map implementation that can deal with non trivial types 2020-01-02 14:06:21 +01:00
fb512bfa3d initial working version with ParticleSet 2020-01-02 13:18:12 +01:00
9583932538 Fix T70986: NLA strip Animated Influence does not respect Default Interpolation
Since we are already respecting the User Preference for 'auto_smoothing'
in 'BKE_nlastrip_validate_fcurves', we should also do this for default
interpolation and handles.

Maniphest Tasks: T70986

Differential Revision: https://developer.blender.org/D6490
2020-01-02 12:46:43 +01:00
Kevin Havranek
87e7ad197d Fix T71303: RMB outside context menu ignored 2020-01-02 18:06:11 +11:00
86832ececc Tool System: adjust Smooth/Randomize modal operator behavior
Previously the default values were left non-zero to avoid having to
update scripts. However, this meant it wasn't possible to setup
non-modal key bindings for smooth & randomize.

Now these operators follow logic of many other operators where setting
the value executes immediately, leaving unset runs modal.

Existing keymaps & scripts will need to be updated.

Addresses issue raised in f4a4ec8425.
2020-01-02 17:18:42 +11:00
b5dd73a48b Cleanup: remove redundant image assignment when ensuring UV's 2020-01-02 13:17:06 +11:00
e9ac784237 Cleanup: quiet const warnings 2020-01-02 13:08:20 +11:00
d27fb46715 EditMesh: Improve AutoMerge with Split Edges & Faces
Previously, compared to `Auto Merge` without `Split Edges & Faces`,
`Auto Merge` with this option ignored duplicates between selected
vertices. It only considered duplicates between selected vertices and
unselected vertices.

This is a regress and not a progress.

This commit implements this behavior, so this option matches the other
`Auto Merge`.
2020-01-01 21:06:59 -03:00
86a2ffc3ab Transform: Individual Origins: Create islands between only selected uvs.
Currently the islands are created depending only on the visible UVs.
This can be confusing because compared to Edit Meshes, islands are created based on the selected elements.

T68284 shows a case where this confusion is observed.

Differential Revision: https://developer.blender.org/D6502
2019-12-31 13:04:57 -03:00
0099355bc6 continue with ParticleSet 2019-12-31 16:48:01 +01:00
799fb759a7 improve particle set 2019-12-31 15:35:08 +01:00
0cda96f1be initial particle set 2019-12-31 14:59:58 +01:00
c2d3708224 introduce MutableAttributesRef 2019-12-31 14:59:48 +01:00
36221652a4 rename various types and variables 2019-12-31 14:17:44 +01:00
7ed83e0bee Move inlined node tree to functions folder 2019-12-31 13:53:48 +01:00
06e7d91f55 Merge branch 'master' into functions 2019-12-31 13:40:45 +01:00
56ef761381 Image Editor: Initialize Add Tile options from current tile
Previously, non-default alpha or float settings had be set manually.

With this change, the Add Tile and Fill Tile operators initialize
width, height, alpha and float from the currently selected tile
if it has a vaild ImBuf, otherwise from the first tile.
2019-12-30 19:20:54 +01:00
a38840a9b8 Cleanup: clang-format 2019-12-30 19:20:54 +01:00
0314561684 Sculpt: Add color alpha controls to the brush cursor
Previously the alpha was hardcoded to 0.7. Now it is possible to control
the cursor alpha by changing the alpha color of the cursor color
property. New alpha default is 0.9. This, with the new saturated colors,
should make the cursor more visible on highdpi screens.

I also removed the cache location preview as it is too visible right now
with the new alpha and color values.

Reviewed By: billreynish

Differential Revision: https://developer.blender.org/D6433
2019-12-30 16:42:25 +01:00
394b48029c Sculpt: Remove partial viewport updates from sculpt stroke code
Partial updates are not currently supported in the Workbench engine, so
we can skip the rect calculation during the stroke.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6444
2019-12-30 16:30:07 +01:00
6a54969cf1 Fix T72747: Increase minimum voxel size in the voxel remesher
This was causing an ArithmeticError in OpenVDB with a voxel size that
small.

Another solution could be scaling both the mesh and the OpenVDB grid
with opposite values to support a larger range of voxel sizes, but I
would like to have a better solution to the voxel remesher compatibility
with small objects.

Reviewed By: JacquesLucke

Maniphest Tasks: T72747

Differential Revision: https://developer.blender.org/D6498
2019-12-30 16:28:18 +01:00
62d131e962 Fix T72792: Crash with Vertex Groups + Weld Modifier after generative modifiers
Some generative modifiers remove the `CD_MDEFORMVERT` custom layer.
So make sure it exists in the mesh.
2019-12-30 11:25:09 -03:00
3b891989ac Fix T68131: Cycles bake panel code typo
```
NameError: name 'col' is not defined
```
2019-12-30 11:07:28 -03:00
4e0c2a8abd Merge branch 'master' into functions 2019-12-30 13:35:53 +01:00
f7fb1de41b Fix T72788: Crash Edit Custom Bone Object
In a recent refactor we splitted the lines extractor in `extract_lines` and
`extract_lines_loose`. When an object is in edit mode the extracted
lines loose also had to include a dummy bmesh edge iterator. This change
adds this missing dummy method.

Reviewed By: antoniov

Differential Revision: https://developer.blender.org/D6499
2019-12-30 13:34:15 +01:00
Jeroen Bakker
79476a9c0a Tracking: Selection Crash
Blender crashes when selecting a marker in the 3d viewport that is from the non active scene camera. This patch will solve this crash, but introduced a new scenario that isn't thought out. In the new scenario it is still hard to select a marker via the 3d viewport.

I would expect that when selecting a marker in this case would select the camera where the marker belongs to and select the marker that is under the mouse button.

Reviewed By: Sergey Sharybin

Differential Revision: https://developer.blender.org/D6360
2019-12-30 09:22:04 +01:00
04c0c92f87 use less generic tbb include 2019-12-28 13:28:06 +01:00
ad58b620b2 make surface hooks work in function deform/points modifiers 2019-12-28 12:23:17 +01:00
d7f18db74a fix evaluation of single input math function with constant input 2019-12-28 12:13:09 +01:00
1eca32bb84 improve usage of TBB 2019-12-28 11:29:34 +01:00
4601ea8f82 Merge branch 'master' into functions 2019-12-28 11:13:44 +01:00
c2a37867f2 UI: Remove leftover look dev (rename to HDRI preview)
In Blender 2.81 Look Dev was renamed to Material Preview
also the old look dev HDRIs could also be used in both
cycles and eevee. A more generic name was need.
2019-12-27 14:38:45 -06:00
d2dc4f8411 Transform: Use parent bone orientation if the bone has not size
As shown in the T68805, non-sized bones (such as the resulting extruded
bone) have no direction or orientation.

This can be bad for operators like `extrude_move` since the user might
want the resulting bone to be aligned with the bone that originated it.

The solution here is to get the parent bone orientation in the
transform operator if the bone has no size.

Differential Revision: https://developer.blender.org/D6486
2019-12-27 09:51:37 -03:00
d35a319687 Cleanup: clang-format 2019-12-26 20:15:58 +01:00
e4413dc72b Cycles: Use OIIO UDIM tag instead of %04d 2019-12-26 20:14:31 +01:00
f172441e30 UI: Add icons for Sculpt mode Topology & Multiplane Scrape tools 2019-12-26 19:51:02 +01:00
fa5e28ab08 Cycles: Support UDIMs with OSL shading 2019-12-26 00:32:16 +01:00
6657fcc783 Cleanup: Remove BLI_stringenc_path 2019-12-25 20:16:43 +01:00
9aab9970c6 Shrinkwrap: improve triangle boundary stability in Target Normal Project.
Rewrite the checks for determining if the solution is actually within
the triangle to fix stability issues when the correct solution is on
an edge, and step is very small, i.e. the solution is already very
close. Also, comment more clearly what is happening geometrically.

This should fix problems when vertices that should project exactly
onto an edge actually miss, resulting in weird spikes. This made
Target Normal Project unusable for the voxel remesher.
2019-12-25 13:15:31 +03:00
33eabb8220 Action Constraint: introduce a mix mode setting.
Currently the action channels are applied after the existing
transformation, as if the action controlled a child of the
bone. This is not very natural, but more importantly, the
transform tools are not designed to work conveniently with an
additional 'pseudo-child' transformation, resulting in effects
like an unexpected pivot location.

Implementing a Before mode that integrates the action channels
as if applied to a parent allows using the special transform
tool code intended for dealing with such constraints.

Note that in either mode, Action constraints should be added
in reverse order, putting a new constraint before the existing
ones that the Action was keyframed to work together.

In order to implement the option, extract a utility from
the Copy Transform constraint code for combining transforms
with special anti-shear scale handling that matches the
Aligned Inherit Scale mode.

The Before mode also requires switching the constraint to
the Local owner space, while the After mode can still use the
World space for efficiency as before. Since the constraint
doesn't have an Owner space option in the UI, this has to be
handled in an RNA setter.

For full backward compatibility, the original simple matrix
multiplication mode is preserved as the third option, but it
is not recommended due to creating shear.

Differential Revision: https://developer.blender.org/D6297
2019-12-24 19:58:09 +03:00
9378debd26 Docs: clarify wire-frame tool-tip 2019-12-24 22:59:07 +11:00
2ba9572d9e Cleanup: remove unused statvis code & struct members
This code has been moved into the draw manager.
2019-12-24 22:40:07 +11:00
4c295ad478 install_deps.sh: No longer forcing Alembic sources to be redownloaded
For no apparent reason, when building Alembic the script would always
re-download and re-extract the Alembic source code. This is no longer the
case, and it now only happens if the source directory is missing. Since the
source directory name contains the Alembic version, it will automatically
trigger a download+extract when the version changes.
2019-12-24 12:10:54 +01:00
d616938449 install_deps.sh: show which parameter is wrong
Previously, when an unknown parameter was passed to `install_deps.sh`,
the script would just show "Wrong parameter!" without any context. This
can make it hard to figure out what's exactly going wrong. Now it prints
which parameter it thinks is wrong.
2019-12-24 12:10:54 +01:00
3e1dc56365 Object: 'Affect Only Origins' support for Snapping 2019-12-24 16:01:08 +11:00
c1f6a49ae4 Fix snapping pose mode bugs
- Object/pose checks were performed in same loop,
  so selected pose bones were moved instead of the object.
- Snap selected to cursor/active incorrectly used unique object-data.
2019-12-24 15:55:35 +11:00
0bc964c93d Cleanup: use doxy sections for view3d_snap 2019-12-24 15:55:25 +11:00
Robert Guetzkow
d9ec25844b Fix T72636: Error with matrix multiplication in freestyle modifier
The //Distance from Object// and //Distance from Camera// modifiers still used the old 2.79 matrix multiplication syntax.

Differential Revision: https://developer.blender.org/D6468
2019-12-23 23:40:09 -03:00
af2be110c3 Fix T72402: Decimate f-curves fails with co-linear key-frames 2019-12-24 12:20:34 +11:00
b450ba84d9 Cleanup: correct filenames in comments 2019-12-24 09:37:21 +11:00
f46ba1a7e0 Fix T72578: overwrite not animatable in 2.8x
This was disabled as part of b66ae8259e which disabled
animation for display mode and other cases where it doesn't make sense.

However it's useful to be able to overwrite frame ranges,
adding this back.
2019-12-24 09:03:04 +11:00
Jean First
6c2eeba0c7 Fix T72382: Arrow keys fail in search menu 2019-12-24 07:55:38 +11:00
2ff996040d Fix T72555: Brush Radius/Size and Strength not linked on header tools settings when Unified Brush is active
Patch by Demeter Dzadik

Differential Revision: https://developer.blender.org/D6473
2019-12-23 17:28:47 +01:00
50b478e328 Fix Py API doc generation after Mantaflow merge. 2019-12-23 15:19:03 +01:00
708045eb40 Fix utility function used for wrong vector size
Both source and destination are 2D vectors.
2019-12-23 09:34:09 +01:00
b888711e50 Fix T72443: Support time remapping for camera-markers 2019-12-23 17:28:15 +11:00
bf4f376060 simplify some names 2019-12-22 15:04:13 +01:00
ee8dfc0062 replace time span with float interval 2019-12-22 14:21:25 +01:00
335b5bc540 cleanup influences collector 2019-12-22 13:53:24 +01:00
7250dfeb2e cleanup 2019-12-22 13:44:27 +01:00
feb938dfb8 remove task c++ wrapper in favor of tbb 2019-12-22 13:42:46 +01:00
6aa82d1686 Object: 'Affect Only Origins' support for 'Clear Transform'
Resolves T70410
2019-12-22 23:34:42 +11:00
6929d8aa59 Object: extract data transform container into own API 2019-12-22 23:34:42 +11:00
4b8cd2cebd use tbb for parallel code 2019-12-22 13:22:55 +01:00
64b707eb67 use IndexMask in more places 2019-12-22 12:48:55 +01:00
f85c4ca3ae cleanup 2019-12-22 12:40:44 +01:00
a80ffa4bc5 cleanup usage of IndexMask 2019-12-22 12:37:42 +01:00
866894454f use IndexMask in more places 2019-12-22 12:32:43 +01:00
717beed8d7 cleanup naming 2019-12-22 12:26:34 +01:00
03dbcd82a4 cleanup naming 2019-12-22 11:10:54 +01:00
9c68e2ecc9 speedup multi function evaluation 2019-12-22 10:58:28 +01:00
a0892bb690 Fix crash in delaunay triangulation due to epsilon issues. 2019-12-21 12:23:02 -05:00
51d8d790d7 GPencil: Hide dopesheet slider options for Annotations 2019-12-21 16:00:11 +01:00
c1242874c9 Fix: NaN error in smoothminf function 2019-12-21 03:28:38 +00:00
4d0a91d03d Fluid: Ensure GIL in conversion function 2019-12-21 00:35:23 +01:00
f9e65fcea7 Textures: Support UDIM images
This adds UDIM support to e.g. the Displacement modifier.

The implementation is straightforward: If the image is tiled, lookup the
tile based on UVs and shift the UVs into the tile's coordinates.
2019-12-20 21:46:36 +01:00
e9093a6e49 Fix T72445: Cycles crash with Displacement maps in OSL
The UDIM commit accidentally removed a check that skipped Image updates
if the image was managed by OSL.
2019-12-20 20:28:16 +01:00
9a8f840c31 Fix T72471: Cycles AOV support breaks passes with divide_type
The problem is described in a comment in the change.
Short version: If a pass was used as a divide_type but also requested
explicitly (e.g. diffuse color), it was added to the passes list
twice because the names of the two requests didn't match.
Then, when searching for the pass to divide by, the wrong one (not
the one that the kernel was writing to) was picked.
2019-12-20 19:53:13 +01:00
a2d6dfc026 Fix: Build error with clang on windows.
A bug in llvm < 9.0.1 causes the compiler to crash when
openmp is enabled. Since mantaflow uses tbb we can safely
disable this flag temporarily for this module.

Reviewed By: sebbas

Differential Revision: https://developer.blender.org/D6446
2019-12-20 10:50:40 -07:00
b4b25eac9a access event filter duration in node tree 2019-12-20 17:43:13 +01:00
39112a4f7b UI: Remove orphan datablocks directly from File->Clean Up menu
Actually, to purge orphans datablock you need go to Outliner, enable Orphan mode and press Purge button (that sometimes is out of the view because the window is too narrow).

To have this option hidden make very difficult to users use and understand what means orphan data, so this patch just adds a new Clean Up menu to File menu with this option. This menu could be used in the future for more clean up options. To have a general Clean Up menu is common used in other softwares.

Reviewed By: billreynish, mont29

Differential Revision: https://developer.blender.org/D6445
2019-12-20 17:35:26 +01:00
bed1a7cdb7 change some pointers to references 2019-12-20 17:09:23 +01:00
6600c532c4 change particle function evaluation api 2019-12-20 17:01:14 +01:00
81573c53b6 replace compare node 2019-12-20 16:43:04 +01:00
d00557bd19 use IndexMask in more places 2019-12-20 16:37:50 +01:00
dca21ef42f start improving custom events 2019-12-20 16:19:38 +01:00
70ada64a98 use index mask in event interface 2019-12-20 15:44:47 +01:00
d40031df15 remove event storage concept 2019-12-20 15:39:17 +01:00
adfd43db6b new Node Instance Identifier node 2019-12-20 15:22:21 +01:00
aabe38f06c change names displayed in search 2019-12-20 15:03:10 +01:00
a183cc3c4e handle not-found linked groups better 2019-12-20 14:59:33 +01:00
5804f18b1f Cleanup: in ID name management code: root_name -> base_name.
`root_name` did not really meant much here, `base_name` is much more
accurate.
2019-12-20 14:29:35 +01:00
46607bc09d ID Management: Improve speed of code used when creating/renaming and ID.
This commit affects `id_sort_by_name()` and `check_for_dupid()` helper:
* Add a new parameter, `ID *id_sorting_hint`, to `id_sort_by_name()`,
  and when non-NULL, check if we can insert `id` immediately before or
  after it. This can dramatically reduce time spent in that function.
* Use loop over whole list in `check_for_dupid()` to also define the
  likely ID pointer that will be neighbor with our new one.

This gives another decent speedup to all massive addition cases:

| Number and type of names of IDs  | old code | new code | speed improvement |
| -------------------------------- | -------- | -------- | ----------------- |
| 40K, mixed (14k rand, 26k const) |      39s |      33s |               18% |
| 40K, fully random                |      51s |      42s |               21% |
| 40K, fully constant              |      40s |      34s |               18% |

Combined with the previous commits, this makes massive addition of IDs more
than twice as fast as previously.
2019-12-20 14:29:35 +01:00
4cc8201a65 ID Management: Improve speed of code used when creating/renaming and ID.
This commit affects `check_for_dupid()` helper:
* Add a special, quicker code path dedicated to sequential addition of a
  large number of IDs using the same base name.

This gives a significant speedup to adding 'randomly'-named IDs:

| Number and type of names of IDs  | old code | new code | speed improvement |
| -------------------------------- | -------- | -------- | ----------------- |
| 40K, mixed (14k rand, 26k const) |      49s |      39s |               26% |
| 40K, fully random                |      51s |      51s |                0% |
| 40K, fully constant              |      71s |      40s |               78% |

Note that 'random' names give no improvement as expected, since this new code
path will never be used in such cases.
2019-12-20 14:29:35 +01:00
2aab727009 ID Management: Improve speed of code used when creating/renaming and ID.
This commit affects `check_for_dupid()` helper:
* Further simplify the general logic of the code (we now typically only do
  one loop over the list of data-blocks, instead of two).

This gives a significant speedup to adding 'randomly'-named IDs:

| Number and type of names of IDs  | old code | new code | speed improvement |
| -------------------------------- | -------- | -------- | ----------------- |
| 40K, mixed (14k rand, 26k const) |      62s |      49s |               27% |
| 40K, fully random                |      76s |      51s |               49% |
| 40K, fully constant              |      77s |      71s |                8% |

Note that 'constant' names give little improvement, as in that case the first
loop over the list of IDs (checking whether base given name was already in use)
was aborting very quickly.
2019-12-20 14:29:35 +01:00
4ed3a62d0f ID Management: Fix/Sanitize code used when creating or renaming an ID.
This commit affects `check_for_dupid()` helper:
* Fix (serious though rare) bug where several IDs could end up with
  exact same name (happened with over 10k IDs with same very long name).
* Fix (relatively harmless) func reporting it did not change the given
  name when it actually had truncated it.
* Sanitize handling of supported min/max number suffixes (it now handles
  between 1 and 1 billion, which should be way more than enough).
* Sanitize general logic to (hopefully!) make it easier to follow.
* General cleanup (naming, comments, variables scope, remove dead code, etc.).

Note that general performances here remain the same, there is no
measurable gain or loss. Algorithm remain also the same globally.

Attempt to use a GHash to speed up checks of used names proved to be
much worse, just building the GHash would already take as much time as
the whole process with current code...
2019-12-20 14:29:35 +01:00
d840658078 ID Management: Improve speed of code used when creating/renaming and ID.
This alone can make e.g. adding 40k IDs with default name (i.e. 'fully
constant' case in table below) about 15-20% faster:

| Number and type of names of IDs  | old code | new code | speed improvement |
| -------------------------------- | -------- | -------- | ----------------- |
| 40K, mixed (14k rand, 26k const) |      75s |      62s |               21% |
| 40K, fully random                |      90s |      76s |               18% |
| 40K, fully constant              |      94s |      77s |               22% |

Idea is to use a first pass, where we just check one item every nth ones,
until we have found the chunk in which we want to insert the new item,
then do a basic linear comparison with all items in that chunk as before.

Also, list is now walked backward, as in most common 'massive insertion'
cases new ID's names have higher number, hence ends up towards the end of
the list.

This new sorting function can be between a few percents and 50% quicker than
original code, depending on various factors (like length of common parts of
ID names, whether new IDs should be added towards the end or not, how high
in numbering we are, etc.).

Note: another, full bisecting approach was also tried, which gives a massive
reduction of comparisons (from n items to log2(n)), but it only gave minor
improvements of speed from original fully linear code, while adding a fair
amount of complexity to the logic. Only case it was shining was the unlikely
'very long, almost similar ID names' case (since `strcasecmp()` is rather
costly then).
2019-12-20 14:29:35 +01:00
9984dd332f ID Management: Add some basic tests regarding name handling.
Those tests are here mostsly to ensure ID name management is working as
expected (the code ensuring we never have two ilocal data-blocks of the
same type with the same name in a .blend file).

Note: Currently fails in some cases, fixes are incoming.

Note: Ideally this would be in C, but we already have too many tests
linking the whole Blender and its libraries, this is becoming a real
pain to link debug + ASAN + tests build these days... So until we find a
better way to handle those dependencies, sticking to simple python
scripts.
2019-12-20 14:29:35 +01:00
3b65445f4e Merge branch 'master' into functions 2019-12-20 14:21:54 +01:00
9a1bbca5b1 Remove empty header added by accident 2019-12-20 23:05:50 +11:00
96f9334857 Fix T71844: Outliner: show_active doesn't expand armature to show active bone
Since rB6bc6d016c5e7, outliner was not opening back up from the found
active element (but only its ID instead -- all occurances of this ID in
any collection).

Now expand from the active element as well (but only do this for the
first occurance of the corresponding ID)

Maniphest Tasks: T71844

Differential Revision: https://developer.blender.org/D6329
2019-12-20 12:47:36 +01:00
130ebfe43c Cleanup: simplify transform cursor DPI scaling 2019-12-20 18:23:41 +11:00
50a56f566f Cleanup: split transform cursor drawing into their own files 2019-12-20 18:19:56 +11:00
c5a7644717 Fix T71817: Preferences tagged dirty by 'Enabled Add-ons Only' 2019-12-20 15:16:29 +11:00
c0dd9908ff Fix T72577: vert/weight paint 'Orbit Around' & 'Frame Selected' fail
Caused by 14acac0bb7
2019-12-20 14:20:42 +11:00
c3782ebf44 Fix IC-keymap doesn't allow MMB to run the active tool
Now the keymap can be configured so both the fallback and active
tool can be activated at once - when configured not to conflict.
2019-12-20 11:09:55 +11:00
110f1cb1d6 Cleanup: clang-format 2019-12-20 10:46:24 +11:00
334ddce17c Cleanup: spelling 2019-12-20 10:46:17 +11:00
9a9f39e466 Cleanup: remove redundant 'char *' casts 2019-12-20 10:42:57 +11:00
6ccef2aa7e Cleanup: use BLI_bitmap type 2019-12-20 10:42:32 +11:00
ecfb7eab0c Fix (unreported) hair particle 'Delete Edit' missing children hair
updates in particle editmode

Particles themselves were cleared correctly but this was not tagging
batch cache dirty.

Might move this to a utility function later [since it is used in more
places], but that is for after going over some more reports...

Reviewers: sergey

Differential Revision: https://developer.blender.org/D5925
2019-12-19 20:59:11 +01:00
0647232ac5 Fix particle editmode undo not doing proper updates when child particles
are visible

Not freeing PTCacheEdit and tagging batch cache dirty on undo will have
a couple of consequences. This patch fixes:
- crash deleting a particle, then undo
- basically any edit (combing, ...), then undo will leave child hairs
untouched
- adding hairs (through mirror, add tool, ...), then undo will leave
'orphaned' child hairs

See also D5755 for a related discussion

Fixes the crasher mentioned in T69000

Might move this to a utility function later [since it is used in more
places], but that is for after going over some more reports...

Reviewers: sergey

Differential Revision: https://developer.blender.org/D5912
2019-12-19 20:58:22 +01:00
66d773c2e7 Fix cloth triangle area calculation being wrong
Before the area calculated was for the resulting quad, not the triangle.
So just simply divide the result by 2.
2019-12-19 16:14:21 +01:00
7dd6e034f1 Animation: Added option to playblast only keyframes of selected objects
This feature makes it possible to do a viewport render (a.k.a.
playblast) by only rendering those frames on which the selected objects
have a keyframe.

The frames to render are stored in a `BLI_bitmap`, which has a bit for
each frame set to 0 (skip) or 1 (render). An alternative approach would
be to construct a set of all keyframes to render, but that would make
both constructing the list and looking up frames in the list more
complex.

The only thing this feature does is skip OpenGL rendering of a frame. As
a result, 'skipped' frames are still included in the output, but just
use the render result of the last-rendered frame. This is exactly what's
described in T72229.

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

Reviewed By: zeddb

Design task: T72229
2019-12-19 16:00:10 +01:00
a549241728 bring back functionality of old actions 2019-12-19 15:52:10 +01:00
26e4f4a8c4 Fix T71795: Unproject with high clipping range sometimes results in nans
Differential Revision: https://developer.blender.org/D6311
2019-12-19 11:45:02 -03:00
b3c93cfe90 initial ParticleAction class 2019-12-19 14:59:43 +01:00
35ee68ab69 fix when there is no nodelib 2019-12-19 14:58:11 +01:00
6caf9be863 remove variation input of age reached node 2019-12-19 14:35:40 +01:00
56fc0f411f Fix T72473: Particle hair: X mirror UI doesnt show 'topology mirror'
option (even though it is being used for the ADD brush)

Add the option to the UI in that single case.

Maniphest Tasks: T72473

Differential Revision: https://developer.blender.org/D6418
2019-12-19 14:21:38 +01:00
1b6e9574a6 leave group when active node is not selected 2019-12-19 14:14:26 +01:00
e0afee86b3 Fix T72128: Overlay: Edge indices stacking on top of edge measurements
Make indices accommodate into the measures of edgelength and edgeangle
so this results in a nice stack of up to three rows.

Maniphest Tasks: T72128

Differential Revision: https://developer.blender.org/D6357
2019-12-19 13:53:56 +01:00
701338d31c Fix T63407: 'Select linked' operator in UV editor is broken in when multi-object-editing contains an empty mesh
Since BM_uv_vert_map_create would return NULL for an empty mesh, code
would then return from uv_select_linked_multi [where it should just skip
and continue instead...]

Maniphest Tasks: T63407

Differential Revision: https://developer.blender.org/D6441
2019-12-19 13:41:02 +01:00
e8990fd220 cache node group names in .blend file 2019-12-19 13:21:06 +01:00
a1f79adde9 improve debug dot output 2019-12-19 13:17:38 +01:00
6cc8f3cd71 remove builtin group nodes 2019-12-19 13:11:33 +01:00
3c519d4917 new Join Text List node 2019-12-19 12:58:07 +01:00
9d885235eb better float3 printing 2019-12-19 12:38:37 +01:00
e97a45ef8c replace Kill Particle node with group 2019-12-19 12:24:51 +01:00
74eeb7a759 improve debug dot output 2019-12-19 12:12:24 +01:00
ed64bcfb71 remove Particle Info node 2019-12-19 11:53:30 +01:00
c78896e675 cleanup 2019-12-19 11:47:43 +01:00
aae54f903c fix path filter 2019-12-19 11:46:33 +01:00
98376bc8ee automatically load node groups from nodelib 2019-12-19 11:41:21 +01:00
150d76aa7b handle unknown node better 2019-12-19 11:24:38 +01:00
3d4f0fe7fe remove mockup nodes 2019-12-19 11:17:23 +01:00
e733615650 remove actions that can be build as node groups 2019-12-19 10:52:12 +01:00
54fe936849 remove unused action 2019-12-19 10:37:21 +01:00
136ac83c82 change IndexMask constructor 2019-12-19 10:37:13 +01:00
7b0ddb2420 replace MFMask with IndexMask 2019-12-19 10:11:31 +01:00
076cedc777 Fix error drawing topbar popovers without a brush 2019-12-19 20:05:40 +11:00
f7611126b6 Fix error drawing paint UI without a brush
Note that this removes image_paint.detect_data from
UnifiedPaintPanel.get_brush_mode, I can't see why it's needed,
it causes issues where the texture paint UI isn't used when it can be.
2019-12-19 20:05:40 +11:00
717283c038 Merge branch 'master' into functions 2019-12-19 09:49:43 +01:00
4440739699 Fix T72236: UV Stretching Overlay
The ratio for area stretching was packed into an unsigned int, but could
contain negative numbers. This flipped the negative numbers to high
positive numbers and rendered the wrong color in the stretching overlay.

I can remember during {T63755} I had to flip the sign to get the
correct result, but couldn't find out why that was needed. Now I know.

Reviewed By: fclem, mano-wii

Differential Revision: https://developer.blender.org/D6440
2019-12-19 08:34:31 +01:00
0971f56bac UI: use DPI scale for transform cursors 2019-12-19 16:48:45 +11:00
c14e352d2c Fix error in recent gizmo tweak workaround 2019-12-19 15:50:48 +11:00
7ba1489bd7 Cleanup: use 'context' to make panels show in their section
All panels were calling poll to draw in their section causing a lot of
repeated boiler plate poll functions.

Also rename 'PreferencePanel' to 'CenterAlignMixIn'
since this is it's purpose.
2019-12-19 13:30:18 +11:00
f98e2c0427 Cleanup: add sections to preferences UI script
Makes navigating between sections easier, order some classes
which were in the wrong section.
2019-12-19 13:20:37 +11:00
da6929488a Fix panel for USD experimental showing for all sections 2019-12-19 09:47:13 +11:00
9ae097e239 Animation: Clarified tooltip for Viewport Render Animation
The tooltip was static, so it was the same for viewport-rendering the
current frame and for the entire animation. It is now different for
those two.

The structure of `screen_opengl_render_description()` is such that it
allows for adding a new description for a soon-to-come feature (T72229).
2019-12-18 16:31:49 +01:00
d591c8a350 Gizmo: add the ability to postpone refreshing while tweaking
This resolves a logical problem using tweak as a fallback tool.
See: T66304#828742

The select action would immediately show the gizmo underneath it,
then the tweak would be handled by the gizmo instead of moving the item
under the cursor.

Currently this works by hiding the gizmo until the tweak event ends.
While it's simpler to check if the gizmo received a mouse-down event,
it causes flickering before each drag event which feels like a glitch.

This is optional for each gizmo type because there are cases where this
can be useful to activate the gizmo immediately (mesh rip for example).
2019-12-19 01:53:15 +11:00
15c15d95e9 fix missing include 2019-12-18 15:21:26 +01:00
f72a4ab0af Remove Explode Particle node 2019-12-18 15:03:15 +01:00
a7ce3fc324 use Tab to open/close groups 2019-12-18 14:59:27 +01:00
7329734ec2 fix file load error 2019-12-18 14:59:09 +01:00
5467f3de3a Cleanup: use wrapper function for gizmo group refresh
Allows for adding checks before/after refresh, not yet added.
2019-12-19 00:42:54 +11:00
838dc349ca Cleanup: const warning, unused var 2019-12-19 00:21:50 +11:00
545e1b60f1 implement start-stop mode in Float Range node 2019-12-18 13:53:16 +01:00
61f4a7d1f5 Fix T72372: color picker is unreliable with large "clip end" values
By my tests, `planes_from_projmat` proved to be more accurate than the current solution.

Differential Revision: https://developer.blender.org/D6434
2019-12-18 09:41:14 -03:00
5c90bec61e simplify socket identifiers 2019-12-18 13:38:51 +01:00
ec6fc1aaec support for inserting group nodes from search 2019-12-18 13:34:26 +01:00
409d3f4880 Workbench: Force Vertex Colors in Paint Mode
Vertex colors behaved differently as the paint overlay mixed the colors
in display mode and the results was multiplied on top of the original
shading.

This patch will align the implementation to texture painting where the
colors are drawn by the workbench engine so the correct shading is
applied.

This also means that we don't show the vertex colors overlay when not
in solid mode.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6436
2019-12-18 13:31:12 +01:00
17d18351c6 extract method to find callable trees 2019-12-18 13:17:49 +01:00
1c7e0b1755 improve node layout of group nodes 2019-12-18 13:11:48 +01:00
9fa91b8719 support for sampling random vectors in a sphere 2019-12-18 13:04:45 +01:00
c6cf1082cb new Multiply Vector with Float node 2019-12-18 12:53:02 +01:00
68b8979137 new Vector from Value node 2019-12-18 12:39:02 +01:00
4c5332cae7 new Random Vectors node 2019-12-18 12:31:19 +01:00
ceb5471884 improve Random Vector node 2019-12-18 12:11:02 +01:00
375ac4f37a new Random Vector node 2019-12-18 11:42:42 +01:00
06adff95b4 cleanup Spawn Particles node 2019-12-18 11:18:55 +01:00
6bb09a50fb support for computing vectors per particle 2019-12-18 11:06:55 +01:00
8bab865539 Fix T72289: FreeStyle python error
Introduced by {T67981}. We changed the python API for curve evaluation.
Freestyle still used the old call that failed. This patch updates
FreeStyle to use the new API. I checked other areas in freestyle but it
seemed to be the only `evaluate` for curves that is called directly.

Reviewed By: zeddb

Differential Revision: https://developer.blender.org/D6430
2019-12-18 11:00:50 +01:00
2a35383bb0 Fix T72353: Camera Limits Visibility
Due to recent refactoring of the overlay unification the camera limits
were also visible when the overlays were turned off. This was because
the `draw_extra` had an exception for when looking through the camera.

This change also takes the global hide overlays into account. So now the
camera limits will not be drawn when overlays are turned off. This also
fixed other camera related overlay drawing.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6394
2019-12-18 10:59:35 +01:00
b30a722f2d Fix T72124: LookDev Sphere Rendering
Due to the refactoring of the overlay engine the draw caches were
changed. The sphere batch used to have positions and normals. After the
refactoring it didn't had the normals anymore. The normals are needed
for shading. As they were not there the look dev spheres were rendered
black.

This change add the `nor` attribute to `DRW_cache_sphere_get` batch.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6393
2019-12-18 10:56:26 +01:00
298b0cd863 Remove Action Context concept for now 2019-12-18 10:04:53 +01:00
e810f4dd7b Merge branch 'master' into functions 2019-12-18 09:54:06 +01:00
a6b1c158c9 Cleanup: remove unused gesture event. 2019-12-18 15:47:48 +11:00
31b9ddd876 Fix error assigning the fluid particle flag to the wrong member 2019-12-18 12:57:28 +11:00
0019216722 Fix linking errors WITH_MOD_FLUID=OFF, again
Expose BKE_fluid_modifier_* functions for readfile versioning.
2019-12-18 12:52:15 +11:00
bdbcb0df10 Image Editor: Load UDIMs even if secondary tile is selected
Previously the user had to select the 1001 tile for this to work,
now any tile will work as long as the 1001 tile still exists on disk.
2019-12-18 01:51:47 +01:00
87dba476fb Cleanup: use ELEM macro 2019-12-18 11:32:26 +11:00
0149b76dc6 Cleanup: warnings 2019-12-18 11:32:14 +11:00
850aa3a6cf Image Editor: Disable tile operators if tile 1001 is missing 2019-12-18 01:05:02 +01:00
e0cd5b980f Image Editor: Add option to create multiple tiles at once
Any existing tiles will be skipped.
2019-12-18 00:52:06 +01:00
11d9271804 Image Editor: Add option to fill UDIM tiles during creation 2019-12-18 00:15:19 +01:00
9a12f97f26 Fix T72487: Painting on unitialized UDIM tile crashes
The UDIM commit accidentally removed the check for whether an ImBuf exists
before trying to paint on it.
2019-12-18 00:04:47 +01:00
e6a5e5077b Fluid: Fix placement of flag reset
Flag reset needs to be placed outside the object loop
2019-12-18 00:02:29 +01:00
5ad465c87f Fix T72430: GPencil normalize command crashes blender
When the stroke weights array was NULL, the function crash. Just check NULL value.
2019-12-17 19:54:34 +01:00
e998cb2c2e Sculpt: Use more saturated colors in the cursor
The previous cursor colors were chosen to match the toolbar icon color,
but the contrast on top of the default matcaps was not enough. This
commit uses more saturated colors, which are more visible on top of the
default matcaps.

Reviewed By: jbakker, billreynish

Differential Revision: https://developer.blender.org/D6194
2019-12-17 19:45:19 +01:00
a04573f4aa Fluid: Fix that maps old smoke and fluid modifiers to new manta modifier 2019-12-17 18:00:27 +01:00
0b60fb5ec2 GPencil: Cleanup - Remove duplicated code 2019-12-17 17:27:49 +01:00
7267d1fe30 GPencil: Fix brush panels after UI reorganization
With the brush reorganization included in D5928, the brush panels had covered the topbar and make impossible to use the drawing tools.

Now, the options are grouped in Stroke popover, similar to Sculpt.

Also fixed some missing or wrong texts.
2019-12-17 17:14:16 +01:00
5f79e0d8f7 USD: Only show in experimental features when built with USD support
Previously the USD Exporter was always visible in the Experimental Features
user preferences tab, even when Blender was built with `WITH_USD=OFF`.
2019-12-17 17:00:18 +01:00
a601f54ba2 USD Exporter: show export options by default
There are options for the exporter that are relevant for each export, for
example the choice between Viewport or Render settings, or whether to
export the current frame or an animation. It's better to have the options
panel opened by default.
2019-12-17 17:00:18 +01:00
64116ca15a Fix unreported: Crash when confirms GRAPH_OT_decimate
`dgo` is MEM_freed just before.
2019-12-17 12:42:48 -03:00
aa7c1cdb7f UI: Prevent crash when opening file browser with mouse not in window
When the mouse is not inside the Blender window, `CTX_wm_area(C)` returns
`NULL`, but this wasn't checked for.
2019-12-17 15:55:48 +01:00
7830ea29c2 Fix T68665: FCurve group disappear on Curve/Surface object data
When going from EDIT to OBJECT mode, Blender updates the object data from
the edit-mode data. This took care of renaming FCurves that animate Curve
control points when control points are added/removed, but this didn't keep
the FCurve groups intact. Since the FCurve groups are tightly connected to
the Action channels, it's hard to keep the group pointers intact during
this process. Instead of making the code even more complex in an attempt to
do that, I implemented a function (`BKE_action_groups_reconstruct()`) that
rebuilds the group channel pointers.

The call to `action_groups_add_channel()` had to be removed because it
updates the the next/prev pointers of the FCurve while we're looping over
them, causing infinite loops.
2019-12-17 15:22:29 +01:00
3a5562151f Cleanup: Animation: mark function parameter as const
`fcurve_path_rename(..., rna_path, ...)` doesn't change `rna_path` at all,
so it can be marked as `const char *`.

No functional changes.
2019-12-17 15:22:29 +01:00
2d1cd3076f fix missing update 2019-12-17 15:05:39 +01:00
ced689a43a new Random Floats node 2019-12-17 14:48:05 +01:00
84c1e57dfe Fix T72507: Depth of bones missing for navigation
Regression introduced in rBb11272a0
2019-12-17 10:34:49 -03:00
d16d58e6f9 show position attribute by default 2019-12-17 13:52:45 +01:00
79c5b4d4af fix socket drawing 2019-12-17 13:36:53 +01:00
ccc8d664fc initial Spawn Action node 2019-12-17 13:28:38 +01:00
71124e192f minor changes 2019-12-17 13:27:49 +01:00
e1e1069b45 initial spawn node ui 2019-12-17 12:04:09 +01:00
57ab7cefdd introduce ScopedVector 2019-12-17 11:48:33 +01:00
bd5be7c70a Rename TemporaryVector/Array to LargeScopedVector/Array 2019-12-17 11:40:26 +01:00
bda4a284d2 Fluid: Fix particle settings type 2019-12-17 11:39:23 +01:00
0144b11673 Support inline storage in BLI::Array 2019-12-17 11:35:13 +01:00
ae44dad2e1 cleanup 2019-12-17 11:18:25 +01:00
4b62d98984 Fluid: Fix python script after refactor
Missing part in 2564e2a2ad.
2019-12-17 11:13:00 +01:00
c03bb9db0d store name of node and sockets in dummy node 2019-12-17 11:13:00 +01:00
1fd9485a51 set dot background color utility 2019-12-17 11:12:19 +01:00
54229b8e82 support for removing execute sockets 2019-12-17 10:39:32 +01:00
eba730f986 Simplify execute socket naming 2019-12-17 10:09:25 +01:00
bde06da223 Manta: Fix using path as an input and output
It is not guaranteed that the function will give correct result
in such an overlapping inputs.

@sebbas please verify this.
2019-12-17 09:47:12 +01:00
fba5b503f5 fix after merge 2019-12-17 09:46:17 +01:00
9a3b370061 Merge branch 'master' into functions 2019-12-17 09:34:13 +01:00
7d2d2ffa76 Cleanup: spelling 2019-12-17 16:30:39 +11:00
8ebc6be43d Cleanup: de-duplicate tool gizmo 2019-12-17 16:30:39 +11:00
aa1af7f8e4 Fix T72416: Tool settings ignored when activated from gizmo 2019-12-17 14:55:41 +11:00
2564e2a2ad Cleanup: RNA naming
- Use abbreviations min/max
  this is used throughout the existing API.
- Rename use_adaptive_stepping to use_adaptive_timesteps
  since this is used with timesteps_min/max it's clearer
  to use matching terms.
2019-12-17 14:49:11 +11:00
8676491090 Cleanup: de-duplicate check for un-baked guide
Also simplify particle combined export checks
2019-12-17 14:33:01 +11:00
de8a19077e Cleanup: rename effec -> effector
Effector is already used elsewhere for this purpose.
2019-12-17 14:06:47 +11:00
ca277d7d60 Cleanup: renaming guiding -> guide
The term guide makes sense on it's own in this context.
2019-12-17 14:00:19 +11:00
79e51d9e5f Cleanup: replace verbose checks with read-only attributes
These attributes checked for any baked / baking
since this is a common test that was performed in layout code.

Also follow our naming convention - using an 'is_/has_' prefix
in this case since "cache_baked_data" reads as if it's used to access
the baked data.
2019-12-17 13:03:52 +11:00
a977cb0445 Cleanup: use single quotes for enum values 2019-12-17 12:55:56 +11:00
647d54a36d Cleanup: remove unused variables 2019-12-17 12:53:45 +11:00
db043e7e5b Cleanup: naming for BKE_fluid particle functions
Create/Destroy are more commonly paired terms in BLI/BKE API's.
2019-12-17 12:17:57 +11:00
f7745b15b7 Cleanup: use uint 2019-12-17 12:14:52 +11:00
d61d68a310 Cleanup: remove redundant string initialization
Fixed sized strings are always initialized & this is not done
elsewhere before calling BLI_path_join.

Remove since it's not needed and makes it read as if the function
might not initialize the output argument.
2019-12-17 12:11:28 +11:00
814a11be59 Cleanup: use snake case variable & function names 2019-12-17 12:04:57 +11:00
23940ff1e1 Cleanup: conform header guards to Blender's style 2019-12-17 11:42:19 +11:00
7f00b3a711 Cleanup: split smoke drawing out into it's own file
gpu_draw.c had generic sounding utility functions which were specific
to smoke drawing.

Split into it's own file so the functionality is clearly separated.
2019-12-17 11:35:26 +11:00
1ef6be3686 Cleanup: redundant struct declarations 2019-12-17 10:15:22 +11:00
f4d7d5e75d Cleanup: sort struct declarations 2019-12-17 10:08:47 +11:00
bc92d05522 Cleanup: sort file lists 2019-12-17 10:07:44 +11:00
9c82eac2c8 Cleanup: use BKE_fluid prefix for fluid API 2019-12-17 10:00:45 +11:00
5d1245cca9 PyAPI: disable threading hack when fluid is disabled 2019-12-17 09:55:25 +11:00
7e15638cce Cleanup: style, always use braces 2019-12-17 09:53:25 +11:00
96ebdbc90f Fix deprecated DNA define checks
Also remove dead code which checked for SPACE_TIME.
2019-12-17 09:49:23 +11:00
bcd38b398c Cleanup: remove contributors, license begin/end & doxy file argument
This had already been removed for all source files,
recent patches re-introduced them.
2019-12-17 09:27:01 +11:00
11e4eafd9b Cleanup: compiler warnings 2019-12-17 09:12:03 +11:00
831b85efb2 Cleanup: clang-format 2019-12-17 08:58:43 +11:00
4f1abcb06f Cleanup: remove redundant headers 2019-12-17 08:57:06 +11:00
3da429aa87 Cleanup: replace 'if 0' with 'DEBUG_PRINT' define
Allows enabling debug prints in this file easily,
differentiates it from code which has been disabled for other reasons.

Also remove unused DEBUG_TIME.
2019-12-17 08:54:03 +11:00
79c3e8db26 Fix linking errors WITH_MOD_FLUID=OFF 2019-12-17 08:47:06 +11:00
714e48ec55 GPencil: Fix unreported missing onion skin in renders
When the option was enabled, the onion was not render as expected.
2019-12-16 18:54:36 +01:00
043cac5d20 Mantaflow [Part 12]: Updated docs
Updated diff with latest changes from fluid-mantaflow branch

Reviewed By: sergey

Maniphest Tasks: T59995

Differential Revision: https://developer.blender.org/D5620
2019-12-16 16:39:50 +01:00
ceba74dcd7 Mantaflow [Part 8]: Customization for particle system
The particle system needs some tweaks so that it can be used for particles created in Mantaflow (i.e. to read both FLIP and secondary particles from Mantaflow).

Reviewed By: sergey

Maniphest Tasks: T59995

Differential Revision: https://developer.blender.org/D3857
2019-12-16 16:39:04 +01:00
7bd3d2be08 Mantaflow [Part 5]: Update other /intern packages
Cycles needs some smaller updates so that the up-res smoke wavelet noise and the liquid mesh speed vector export work correctly.

Reviewed By: mont29

Maniphest Tasks: T59995

Differential Revision: https://developer.blender.org/D3854
2019-12-16 16:37:57 +01:00
d27ccf990c Mantaflow [Part 6]: Updates in /blender/source
A collection of smaller changes that are required in the /blender/source files. A lot of them are also due to variable renaming.

Reviewed By: sergey

Maniphest Tasks: T59995

Differential Revision: https://developer.blender.org/D3855
2019-12-16 16:37:01 +01:00
7b87d3d34e Mantaflow [Part 11]: Updated entire smoke.c code
Probably the most significant changes are in smoke.c.

New functionality includes:
- support for adative time steps (substeps)
- write flow objects to grid structure so that Mantaflow can generate levelsets
- no more distinction between FLUID_3D and WTURBULENCE objects. Everthing that communicates with Mantaflow now lives in a FLUID object.

Reviewed By: sergey

Maniphest Tasks: T59995

Differential Revision: https://developer.blender.org/D3861
2019-12-16 16:35:41 +01:00
db8726dfd5 Mantaflow [Part 9]: Updated rna smoke code
All new simulation parameters need to be registered in the RNA. Especially for liquids a lot of new ones need to be added.

Reviewed By: sergey

Maniphest Tasks: T59995

Differential Revision: https://developer.blender.org/D3858
2019-12-16 16:35:01 +01:00
eb98cbb8c5 Fix: Missing category in IMAGE_PT_paint_settings_advanced panel
Addresses raised concern in fb74dcc5d6
2019-12-16 16:34:16 +01:00
829a83262f Mantaflow [Part 7]: Added bake configuration
Similarly to physics_fluid.c (in same directory) which handled the baking process for Elbeem, there is now physics_manta.c which handles it for Mantaflow.

There are two types of jobs: one for baking and another for freeing. The generic jobs will be used to bake / free specific parts of the simulation (e.g. bake mesh, free particles, etc.).

The jobs are only being used in the "modular" cache mode where the simulation has to be baked in parts.

Reviewed By: sergey

Maniphest Tasks: T59995

Differential Revision: https://developer.blender.org/D3856
2019-12-16 16:33:54 +01:00
41fd60db16 Mantaflow [Part 4]: Adapted build config
Smaller changes in the build files to reflect the new Mantaflow macro.

Reviewed By: sergey

Maniphest Tasks: T59995

Differential Revision: https://developer.blender.org/D3853
2019-12-16 16:32:25 +01:00
9064655a70 Mantaflow [Part 10]: Updated fluid modifier settings
All the new fluid simulation parameters need to be added the according structs (i.e. domain settings, flow settings).

Reviewed By: sergey

Maniphest Tasks: T59995

Differential Revision: https://developer.blender.org/D3860
2019-12-16 16:31:22 +01:00
4235fe37d6 Mantaflow [Part 3]: Customized UI for Manta fluids
With Mantaflow the current smoke modifier UI will accommodate both smoke and liquids.

In addition, there is now an option for Mantaflow liquids in the quick effects section ("Quick Liquid").

Reviewed By: sergey

Maniphest Tasks: T59995

Differential Revision: https://developer.blender.org/D3852
2019-12-16 16:30:10 +01:00
2aa4301c88 Mantaflow [Part 2]: Added fluid wrapper files
Files from /intern/mantaflow handle the communication between core Blender code and Mantaflow itself. It's the bridge to communicate with Mantas Python functions.

Code from /intern/mantaflow/intern/strings/ is pure Manta code and would likely need less attention in the review.

Reviewed By: sergey

Maniphest Tasks: T59995

Differential Revision: https://developer.blender.org/D3851
2019-12-16 16:29:08 +01:00
4ff7c5eed6 Mantaflow [Part 1]: Added preprocessed Mantaflow source files
Includes preprocessed Mantaflow source files for both OpenMP and TBB (if OpenMP is not present, TBB files will be used instead).

These files come directly from the Mantaflow repository. Future updates to the core fluid solver will take place by updating the files.

Reviewed By: sergey, mont29

Maniphest Tasks: T59995

Differential Revision: https://developer.blender.org/D3850
2019-12-16 16:27:26 +01:00
Lukas Stockner
6a3f2b30d2 Fix T72467: Crash when using many (>64) images in a shader
Previously this limit was rather high, but with UDIMs it's fairly easy
to reach this many images. Even though this exceeds the texture limit
on most hardware as far as I can tell, it should at least not crash.

The old code uses a fixed array which overflows eventually, this fix
replaces the array with a GSet.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6416
2019-12-16 16:09:01 +01:00
8d16dc029e Fix T72474: UDIM breaks box mapping in Cycles
The ImageTextureNode incorrectly used the tile slot encoding for box-
mapped textures as well. Since box-mapping always generates UVs that
lie in the 1001 tile, there's no need to support tiles here.
2019-12-16 12:53:03 +01:00
bbc97fc533 Fix T72440: Dragging & dropping color in the Image Editor crashes
This was caused by a call to paint_2d_bucket_fill that I missed in the
UDIM changes.

Now, this feature does not only not crash, but it even works with tiled
images!
2019-12-16 12:41:53 +01:00
Dalai Felinto
01608f5348 Fix typo in UDIM operator (always capitalize UI labels) 2019-12-16 10:44:36 +01:00
f3dadd4115 UI: de-duplicate mask context menu
- Use the clip mask context menu for the image editor.
- Remove redundant CLIP_MT_mask_handle_type_menu.
- Remove "Add" items (was only in image mask context menu)
  as the convention is not to include these in the context menu.
2019-12-16 16:48:51 +11:00
e720661b7d Cleanup: move mask menu out of bl_operators
This file only defined a single mask menu, move the definition
along-side the other mask menus.
2019-12-16 16:31:57 +11:00
85f8690555 Cleanup: remove redundant dynamic tool expansion
The tools passed to _tools_flatten, _tools_flatten_with_tool_index
already have dynamic tool items expanded, so there is no need to check
for callable tool items.
2019-12-16 15:40:20 +11:00
165afb3ad0 Cleanup: pep8, unused vars, line length 2019-12-16 14:54:32 +11:00
31ac2e292e Cycles: Fix one-tile UDIM rendering
The code checked for the presence of more than one tile before
substituting the tile number into the filename, so if a one-tile
UDIM was used (or all but one tile were culled), the substitution
was skipped and as a result the file was not found.

With this change, the code explicitly tracks whether substitution
is required, avoiding this problem.

This also fixes another problem: The Environment texture never
does substitution since it doesn't support UDIMs, but before the
syncing code still inserted the placeholder into the filename if the
user selected a tiled background image.
2019-12-16 04:09:53 +01:00
5a97a74c69 Cleanup: whitespace 2019-12-16 13:49:11 +11:00
80062e6305 Cleanup: use static sets 2019-12-16 13:43:45 +11:00
3b163483c4 Industry Compat keymap: Fix paint mode context menus 2019-12-15 19:46:34 +01:00
dfe965bee2 UI: tweaks to the brush Stroke panel
- Make sure the spacing controls are together
  - Add separators around the dash controls
2019-12-14 21:41:29 +01:00
fb74dcc5d6 UI: Brush Settings overhaul
This makes a number of changes to the tool settings brush UI:

  - All brush-related controls are now grouped together, so you can see which items are brush settings are which are not. Previously it was all jumbled together.
  - The brush picker is in a separate panel, so that you can switch brushes without worrying about the settings, or vice versa.
  - Custom Icon settings moved from the Display settings(now known as Cursor) to the Brushes panel.
  - UnifiedPaintSettings panels are removed and the contained options are now next to their relevant setting with a globe icon toggle. This is not displayed in the header.
  - 2D Falloff and Absolute Jitter toggles were changed into enums, to make it clearer what happens when they are on or off.
  - Adjust Strength for Spacing option was in the Options panel in some modes, but in the Stroke panel in others. It is now always under Stroke.
  - Display (now Cursor) panel was reorganized, settings renamed.
  - 2-option enums are annoying as a drop-down menu, so they are now drawn with expand=True.
  - Smooth Stroke and Stabilizer options in grease pencil and other paint modes are now both called "Stabilize Stroke", for consistency and clarity.
  - De-duplicated some drawing code between various painting modes' brush options. I tried to keep de-duplication reasonable and easy to follow.
  - A few more tweaks - see D5928 for the extensive list.

Most of the patch is written by Demeter Dzadik, with some additions by myself

Differential Revision: https://developer.blender.org/D5928
Reviewers: Pablo Dobarro, Bastien Montagne, Matias Mendiola
2019-12-14 18:48:18 +01:00
2b84a7d5b0 fix wrong comparison 2019-12-14 18:33:39 +01:00
f31dc22ebb fix some warnings 2019-12-14 18:25:42 +01:00
34d06de0dc remove some old tests 2019-12-14 18:07:18 +01:00
b6945930e8 remove unused functionality 2019-12-14 17:57:19 +01:00
67724f884a use new indices functions 2019-12-14 17:50:33 +01:00
b52c4ddfb9 more low level generic CPPType functions 2019-12-14 17:44:56 +01:00
16206b66a2 Industry Compat keymap: Add support for the context menu PC keyboard key 2019-12-14 17:31:43 +01:00
017e028784 Industry Compat keymap: Fix issue in UV editor Box Select tool
Shift-dragging with the Box Select tool would also select the nearest point.

Using a Click instead of Press event for selection (just like the default keymap) fixes this.
2019-12-14 17:16:42 +01:00
617ab7847f add more functions to CPPType 2019-12-14 17:16:05 +01:00
2225dab801 optimize fill operation 2019-12-14 17:06:07 +01:00
e1a662ee3a optimize float range 2019-12-14 16:53:51 +01:00
f0cb97c9a3 cleanup 2019-12-14 16:49:21 +01:00
5419ae4d83 optimize generic extend operation 2019-12-14 16:19:16 +01:00
fc30d4e272 support for removing sockets in Select node 2019-12-14 15:36:00 +01:00
21ebaf9bc6 initial Select node 2019-12-14 15:28:13 +01:00
a1b0d7e982 print warning when inputs incorrectly depend on particles 2019-12-14 14:46:40 +01:00
510da24778 keep track of contexts used by function network 2019-12-14 14:46:21 +01:00
2646b9016f more utility functions for vector and stack 2019-12-14 14:45:37 +01:00
cd2385f608 refactor signature builder 2019-12-14 14:02:33 +01:00
5381fbc1a3 turn attribute name into an input socket 2019-12-14 13:15:28 +01:00
f8cdc5ac4c USD: on Apple disable USD if library cannot be found
When building with `WITH_USD=ON` on Apple but the USD library cannot be
found, the CMake script now just sets `WITH_USD=OFF`.
2019-12-14 12:53:37 +01:00
d720463300 support nicer drawing of sockets 2019-12-14 12:18:17 +01:00
776562623c new Multi Execute node 2019-12-14 11:35:27 +01:00
8a41c15bf9 prevent trails and explosion in a the same particle system 2019-12-14 11:29:49 +01:00
46b29a75a0 remove unused code 2019-12-14 11:10:55 +01:00
984ba7e943 Merge branch 'master' into functions 2019-12-14 11:02:49 +01:00
9b871683b1 Fix T72412: Weld Modifier: Merged edges not displayed in wireframe 2019-12-13 21:47:54 -03:00
c6ba941339 Fix T72409: Remove references to Unified use_pressure_size and use_pressure_strength
This was causing errors to show in the terminal.

Reviewed By: campbellbarton

Maniphest Tasks: T72409

Differential Revision: https://developer.blender.org/D6407
2019-12-13 21:35:51 +01:00
764857eb37 fix: find IDs used by output sockets as well 2019-12-13 19:42:49 +01:00
dc0d0d3936 Merge branch 'master' into functions 2019-12-13 19:40:19 +01:00
c4203ef17d USD: disabled unit test that fails on the buildbot
I can't fix this quickly right now, so I'd rather drop the entire test
for now.
2019-12-13 18:59:23 +01:00
e6c40bc9e1 USD: Simplified unit test and made it work on Windows as well 2019-12-13 18:59:23 +01:00
38ad1c4d33 Image Editor: Increase size of Add Tile popup 2019-12-13 15:31:11 +01:00
322555faa3 USD: Remove file created in unit test after the test is done
No functional changes in the USD exporter, just some cleanup code added
to the unit test.
2019-12-13 15:08:44 +01:00
f5e00f7351 USD: more efficient mesh & curve writing
- The default value of USD attributes is now only set on the first sample.
  Previously this was done for every sample (so the final default was the
  last value, rather than the first value).
- More use of the sparse value writer, now also for UV coordinates, mesh
  normals, and curve points.
2019-12-13 15:08:44 +01:00
02f23ab685 Cycles: Fix compilation of the Render Graph test 2019-12-13 15:00:22 +01:00
82755f5137 Gizmo: add gizmos for UV transform translate/rotate/scale 2019-12-13 22:43:48 +11:00
ec62413f80 USD: Introducing a simple USD Exporter
This commit introduces the first version of an exporter to Pixar's
Universal Scene Description (USD) format.

Reviewed By: sergey, LazyDodo

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

- The USD libraries are built by `make deps`, but not yet built by
  install_deps.sh.
- Only experimental support for instancing; by default all duplicated
  objects are made real in the USD file. This is fine for exporting a
  linked-in posed character, not so much for thousands of pebbles etc.
- The way materials and UV coordinates and Normals are exported is going
  to change soon.
- This patch contains LazyDodo's fixes for building on Windows in D5359.

== Meshes ==

USD seems to support neither per-material nor per-face-group
double-sidedness, so we just use the flag from the first non-empty
material slot. If there is no material we default to double-sidedness.

Each UV map is stored on the mesh in a separate primvar. Materials can
refer to these UV maps, but this is not yet exported by Blender. The
primvar name is the same as the UV Map name. This is to allow the
standard name "st" for texture coordinates by naming the UV Map as such,
without having to guess which UV Map is the "standard" one.

Face-varying mesh normals are written to USD. When the mesh has custom
loop normals those are written. Otherwise the poly flag `ME_SMOOTH` is
inspected to determine the normals.

The UV maps and mesh normals take up a significant amount of space, so
exporting them is optional. They're still enabled by default, though.
For comparison: a shot of Spring (03_035_A) is 1.2 GiB when exported
with UVs and normals, and 262 MiB without. We probably have room for
optimisation of written UVs and normals.

The mesh subdivision scheme isn't using the default value 'Catmull
Clark', but uses 'None', indicating we're exporting a polygonal mesh.
This is necessary for USD to understand our normals; otherwise the mesh
is always rendered smooth. In the future we may want to expose this
choice of subdivision scheme to the user, or auto-detect it when we
actually support exporting pre-subdivision meshes.

A possible optimisation could be to inspect whether all polygons are
smooth or flat, and mark the USD mesh as such. This can be added when
needed.

== Animation ==

Mesh and transform animation are now written when passing
`animation=True` to the export operator. There is no inspection of
whether an object is actually animated or not; USD can handle
deduplication of static values for us.

The administration of which timecode to use for the export is left to
the file-format-specific concrete subclasses of
`AbstractHierarchyIterator`; the abstract iterator itself doesn't know
anything about the passage of time. This will allow subclasses for the
frame-based USD format and time-based Alembic format.

== Support for simple preview materials ==

Very simple versions of the materials are now exported, using only the
viewport diffuse RGB, metallic, and roughness.

When there are multiple materials, the mesh faces are stored as geometry
subset and each material is assigned to the appropriate subset. If there
is only one material this is skipped.

The first material if any) is always applied to the mesh itself
(regardless of the existence of geometry subsets), because the Hydra
viewport doesn't support materials on subsets. See
https://github.com/PixarAnimationStudios/USD/issues/542 for more info.

Note that the geometry subsets are not yet time-sampled, so it may break
when an animated mesh changes topology.

Materials are exported as a flat list under a top-level '/_materials'
namespace. This inhibits instancing of the objects using those
materials, so this is subject to change.

== Hair ==

Only the parent strands are exported, and only with a constant colour.
No UV coordinates, no information about the normals.

== Camera ==

Only perspective cameras are supported for now.

== Particles ==

Particles are only written when they are alive, which means that they
are always visible (there is currently no code that deals with marking
them as invisible outside their lifespan).

Particle-system-instanced objects are exported by suffixing the object
name with the particle's persistent ID, giving each particle XForm a
unique name.

== Instancing/referencing ==

This exporter has experimental support for instancing/referencing.

Dupli-object meshes are now written to USD as references to the original
mesh. This is still very limited in correctness, as there are issues
referencing to materials from a referenced mesh.

I am still committing this, as it gives us a place to start when
continuing the quest for proper instancing in USD.

== Lights ==

USD does not directly support spot lights, so those aren't exported yet.
It's possible to add this in the future via the UsdLuxShapingAPI. The
units used for the light intensity are also still a bit of a mystery.

== Fluid vertex velocities ==

Currently only fluid simulations (not meshes in general) have explicit
vertex velocities. This is the most important case for exporting
velocities, though, as the baked mesh changes topology all the time, and
thus computing the velocities at import time in a post-processing step
is hard.

== The Building Process ==

- USD is built as monolithic library, instead of 25 smaller libraries.
  We were linking all of them as 'whole archive' anyway, so this doesn't
  affect the final file size. It does, however, make life easier with
  respect to linking order, and handling upstream changes.
- The JSON files required by USD are installed into datafiles/usd; they
  are required on every platform. Set the `PXR_PATH_DEBUG` to any value
  to have the USD library print the paths it uses to find those files.
- USD is patched so that it finds the aforementioned JSON files in a path
  that we pass to it from Blender.
- USD is patched to have a `PXR_BUILD_USD_TOOLS` CMake option to disable
  building the tools in its `bin` directory. This is sent as a pull
  request at https://github.com/PixarAnimationStudios/USD/pull/1048
2019-12-13 10:27:40 +01:00
6fc016d963 Gizmo: fix button 2D hotspot size
Happened when used in 2D view.
2019-12-13 15:52:39 +11:00
123744e432 Cleanup: unused function, spelling 2019-12-13 09:06:57 +11:00
ce87abbc95 Cleanup: clang-format 2019-12-13 09:02:21 +11:00
c30d6571bb Add support for tiled images and the UDIM naming scheme
This patch contains the work that I did during my week at the Code Quest - adding support for tiled images to Blender.

With this patch, images now contain a list of tiles. By default, this just contains one tile, but if the source type is set to Tiled, the user can add additional tiles. When acquiring an ImBuf, the tile to be loaded is specified in the ImageUser.
Therefore, code that is not yet aware of tiles will just access the default tile as usual.

The filenames of the additional tiles are derived from the original filename according to the UDIM naming scheme - the filename contains an index that is calculated as (1001 + 10*<y coordinate of the tile> + <x coordinate of the tile>), where the x coordinate never goes above 9.
Internally, the various tiles are stored in a cache just like sequences. When acquired for the first time, the code will try to load the corresponding file from disk. Alternatively, a new operator can be used to initialize the tile similar to the New Image operator.

The following features are supported so far:
- Automatic detection and loading of all tiles when opening the first tile (1001)
- Saving all tiles
- Adding and removing tiles
- Filling tiles with generated images
- Drawing all tiles in the Image Editor
- Viewing a tiled grid even if no image is selected
- Rendering tiled images in Eevee
- Rendering tiled images in Cycles (in SVM mode)
- Automatically skipping loading of unused tiles in Cycles
- 2D texture painting (also across tiles)
- 3D texture painting (also across tiles, only limitation: individual faces can not cross tile borders)
- Assigning custom labels to individual tiles (drawn in the Image Editor instead of the ID)
- Different resolutions between tiles

There still are some missing features that will be added later (see T72390):
- Workbench engine support
- Packing/Unpacking support
- Baking support
- Cycles OSL support
- many other Blender features that rely on images

Thanks to Brecht for the review and to all who tested the intermediate versions!

Differential Revision: https://developer.blender.org/D3509
2019-12-12 18:40:37 +01:00
5c83319029 new Find Non Close Points node 2019-12-12 18:28:14 +01:00
d7a8a60688 UI: Add extra bevel options to popover from tool settings bar
Also adds a generic popover that can be used whenever an active tool has too
many settings than can fit in the horizontal area. The popover calls the active
tool's draw_settings with "extra" set to True.
2019-12-12 11:56:20 -05:00
c8d121bf35 Cleanup: Typo 2019-12-12 12:04:57 -03:00
0f04bf8cd6 Cleanup: Follow the commenting convention
Capital letter and full stop.
2019-12-12 12:03:27 -03:00
302d692b0b Cleanup: Rename variables (_tot -> _len) 2019-12-12 12:01:37 -03:00
d7d365f6eb new Get List Elements node 2019-12-12 15:34:53 +01:00
b716661366 support for vertex weights in Sample Object Surface node 2019-12-12 14:59:39 +01:00
Dalai Felinto
afcdea3961 UI: Remove User Preference "Enable All Experimental Features"
Users should be able to know explicitly what they are testing.

By having them all enabled we run into a scenario where a new
experimental feature may have been introduced, and the user
is now using it without being even aware of that.

Differential Revision: https://developer.blender.org/D6404
2019-12-12 14:12:07 +01:00
Dalai Felinto
31a3b57037 Cleanup: Fix typo in user preference code 2019-12-12 14:12:07 +01:00
77d82ed1fd macOS: add missing info to code signing instructions regarding key files
The instructions for this part are not exactly clear, but better to document
what took us a while to figure out to get a new system set up for signing.
2019-12-12 13:58:22 +01:00
102fcba855 Revert "Fix T72064, T72158: weight paint shows X/Y/Z symmetry options that don't work"
It seems it does work along multiple axes in some cases, but not at all. So
restored the UI for now, waiting for a better fix.

This reverts commit 9569425b02.
2019-12-12 13:50:46 +01:00
4de6eafba3 sample hooks on surface 2019-12-12 13:05:08 +01:00
Lukas Stockner
3437c9c3bf Cycles: perform clamping per light contribution instead of whole path
With upcoming light group passes, for them to sum up correctly to the combined
pass the clamping must be more fine grained.

This also has the advantage that if one light is particularly noisy, it does
not diminish the contribution from other lights which do not need as much
clamping.

Clamp values on existing scenes will need to be tweaked to get similar results,
there is no automatic conversion possible which would give the same results as
before.

Implemented by Lukas, with tweaks by Brecht.

Part of D4837
2019-12-12 13:04:43 +01:00
85b7d397f7 Fix T72380: New Weld Modifier is crashing when used after a Vertex Weight Modifier
It happened when the vertex group was empty.
2019-12-12 08:59:51 -03:00
ba5aedea8f MacOS release: Fix typo in codesign instructions 2019-12-12 11:56:00 +01:00
ee52b2f7d8 Merge branch 'master' into functions 2019-12-12 11:17:04 +01:00
059f7413c4 Cleanup: redundant NULL checks, simplify tool fallback arg checks 2019-12-12 21:09:22 +11:00
379bb0706c Fix fallback tool for tools that don't define their own keymaps
Needed for UV editor transform tool.
2019-12-12 20:54:56 +11:00
e653f8fbb1 UI: Use property split layout for absolute shape keys
Differential Revision: https://developer.blender.org/D6390
Author: Mikhail Rachinskiy (alm)
Reviewed By: William Reynish, Campbell Barton
2019-12-12 17:30:24 +09:00
132a932ef2 Gizmo: use fallback tool for curve/armature edit modes 2019-12-12 18:39:34 +11:00
2f1b891dd9 Fix tool fallback being ignored with transform gizmos
This only worked once the gizmo was displayed.
2019-12-12 18:39:34 +11:00
464d3e905d Industry Compat keymap: Add Remesh shortcuts 2019-12-12 16:38:03 +09:00
03bd44a1ca Fix error in recent context menu update
Some of them are panels, not menus.
2019-12-12 16:53:11 +11:00
da09bbc3dd Cleanup: some variables had unused naming but were used 2019-12-12 15:50:26 +11:00
8aadba6ef0 UI: increase size of fallback tool popover 2019-12-12 13:32:15 +11:00
80c156a8d5 UI: remove dummy tool drawing functions
Caused extra empty space to be created with no contents.
2019-12-12 13:30:23 +11:00
f050fa3253 Modifier: New Weld Modifier
Part of T70240

This is the initial implementation of Weld Modifier.
New features will be added later.

ToDo:
- Seams: restrict welding to vertices along boundary edges.
- Edge Collapse: collapse edges below the length threshold.
- New icon.
- Some customdata are not being correctly interpolated.

Differential Revision: https://developer.blender.org/D6383
2019-12-11 22:31:20 -03:00
dc3a165ae0 BLI_bvhtree_overlap_ex: add 'max_interactions' parameter
No functional changes.
Allows more performance control and is important for Weld Modifier.
2019-12-11 22:21:24 -03:00
b03066f7ee Cleanup: disable debug print define in override code.
Thanks to Blazej Floch (@bfloch) for the head-up.
2019-12-11 19:53:46 +01:00
6d3cd34bd5 fix compile error 2019-12-11 17:13:16 +01:00
7878adf49c DrawManager: Disable Clipping in material/rendered mode
Viewport: Disable Clipping For EEVEE and External Renderers

Currently it is possible that, when using viewport clipping, the display and tools communicate
different information to the user then the renderer does. The reason is
that the renderer does not support viewport clipping. Both EEVEE and
Cycles do not support it.

This patch will disable the clipping in all the tools and drawing code
when the viewport drawing mode is `Material Preview` or `Rendered`.

This patch introduces a `RV3D_CLIPPING_ENABLED` util that checks if
clipping is enabled for the given `rv3d` and `v3d`. Also in places where
it was needed we added the `ViewContext` as a carrier for the `View3D`
and `RegionView3D`.

There are a few areas in the tooling (select, projection painting) that
still needs to be tackled after this patch.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6047
2019-12-11 16:58:14 +01:00
df783a4ee1 access emitter time info in node tree 2019-12-11 16:32:48 +01:00
4d72f25e9a make vertex group name an input socket 2019-12-11 16:05:47 +01:00
61e0e93644 Industry Compat keymap: Fix and remove keymap conflict
Scale Cage was using the same shortcut as Insert Scale Keyframe (Shift-R)
This isn't neccessary anyway since you can use the same key to cycle the tools.
2019-12-11 23:58:55 +09:00
5d8036c675 access position and normal directly in Closest surface hook node 2019-12-11 15:50:06 +01:00
03bde25be9 fix context in vectorized functions 2019-12-11 15:27:53 +01:00
3a1aec54a7 cleanup 2019-12-11 15:20:21 +01:00
2a25a0bd60 cleanup 2019-12-11 15:08:54 +01:00
a080464e31 extract function vectorizer to separate file 2019-12-11 15:03:19 +01:00
95e0ea69a2 extract customizable functions into separate file 2019-12-11 14:59:14 +01:00
a678e0df39 remove unused code 2019-12-11 14:55:32 +01:00
5d686b19a5 extract particle input functions from others 2019-12-11 14:52:48 +01:00
a908d95d9f extract surface hook functions to separate file 2019-12-11 14:48:40 +01:00
423060ac2f optimize closest surface hook on object node 2019-12-11 14:37:36 +01:00
fa942b5e6f optimize get weight on surface 2019-12-11 14:24:32 +01:00
f4a9e125bf optimize get normal on surface node 2019-12-11 14:16:10 +01:00
642fa43b13 optimize get position on surface node 2019-12-11 14:10:55 +01:00
e60516bdee cleanup 2019-12-11 14:03:13 +01:00
980b128b37 cleanup 2019-12-11 14:00:39 +01:00
bd92ed7e11 optimize single value case 2019-12-11 13:58:08 +01:00
bf85e6a637 improve grouping of similar indices 2019-12-11 13:53:53 +01:00
Robert Guetzkow
a1bd78b488 Add missing draw state check to OVERLAY_edit_mesh_draw
Fix for T72309. The crash was caused by a missing check of the draw state, which resulted in dereferencing of a null pointer.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6380
2019-12-11 13:37:30 +01:00
35989c6715 convert image to socket 2019-12-11 13:01:55 +01:00
7683641a7f Depsgraph: add missing #include to DEG_depsgraph_query.h
The `DEG_depsgraph_query.h` file uses the `ITER_BEGIN` and `ITER_END`
macros defined in `BLI_iterator.h` without including that header.

No functional changes.
2019-12-11 12:24:12 +01:00
aa10876c62 vectorize surface hook nodes 2019-12-11 12:18:56 +01:00
f5e37af5a8 Cycles/OpenCL: Remove NULL PTR Workaround
In the current OpenCL implementation we have a work-around for platforms
that didn't support NULL pointers. We used to replace all NULLs and
empty arrays with a pointer to a single byte on the OpenCL Device.

During investigation of {T65924} it was asked to remove this work-around
for testing. This change improves the render times.

    SCENE              | BEFORE | AFTER
   --------------------+--------+-------
   bmw27               | 108    | 89
   barbershop_interior | 867    | 673
   classroom           | 270    | 173
   fishy_cat           | 244    | 196
   koro                | 249    | 207
   pavillon_barcelona  | 582    | 414

Note that this change does not fix T65924 it just improves the
rendering performance for OpenCL. We haven't tested this patch on all
platforms so we should keep an eye out on the tracker.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D6391
2019-12-11 11:59:21 +01:00
6dd8723620 fix memory leak 2019-12-11 11:42:30 +01:00
e985b20a77 more generic way to add per element and global contexts 2019-12-11 11:36:40 +01:00
d6f8ebf1f0 Merge branch 'master' into functions 2019-12-11 10:52:23 +01:00
28c554ec27 initial static class id system 2019-12-11 10:50:08 +01:00
57d2d8ac05 CMake: recent removal of linked libs gave errors in some cases
While I can't redo the error, it looks to be related to tbb & mkldnn.

Adding back in this case for now.
2019-12-11 20:36:57 +11:00
eaa0c567fc make element contexts non virtual 2019-12-11 10:21:44 +01:00
9e056e8fd4 Merge branch 'master' into functions 2019-12-11 09:10:17 +01:00
7f36db35ce UI: show tool cycling shortcuts in the toolbar 2019-12-11 18:09:39 +11:00
576d385ddb PyAPI: add utility functions get the size from an evaluated string
Allows including null bytes in the resulting string.
2019-12-11 18:04:44 +11:00
f52d60a21d Fix bpy.extras.object_data_add use without an active space 2019-12-11 16:13:44 +11:00
5cd6aa4bc9 Docs: expand comments in versioning code
Help ensure we update all necessary areas when version bumping.
2019-12-11 13:51:29 +11:00
d1631c9f03 Fix T72340: Version bump for recent Userdef changes
Updates blender subversion in order to properly handle recent userdef theme changes.

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

Reviewed by Campbell Barton
2019-12-10 16:31:37 -08:00
63d521432e Cleanup: spelling 2019-12-11 10:56:53 +11:00
e0fbea9c0d Overlay Engine: Armature: Fix bones disapearing with custom bone color
This seems to only affect some drivers. Rendering to multiple targets
without all output variables defined seems to be undefined behavior.
Thanks to gaiaclary for reporting on blendercoders.
2019-12-11 00:26:52 +01:00
73ed33953a don't register keymap in background mode 2019-12-11 00:10:44 +01:00
032c685472 fix endless recursion 2019-12-10 23:42:03 +01:00
a7d26bdc33 add external data cache to emitter function 2019-12-10 23:32:18 +01:00
5685b0a72a support for accessing id data blocks from emitter function 2019-12-10 23:26:45 +01:00
5dada6b465 new birth time modes for custom emitter 2019-12-10 23:20:50 +01:00
b93d0f8975 support for removing sockets in custom emitter 2019-12-10 22:59:47 +01:00
60b3fc8239 better handling of attribute name collisions 2019-12-10 22:53:32 +01:00
f961ef3e6b improve ui of Custom Emitter node 2019-12-10 22:52:54 +01:00
Lukas Stockner
e760972221 Cycles: support for custom shader AOVs
Custom render passes are added in the Shader AOVs panel in the view layer
settings, with a name and data type. In shader nodes, an AOV Output node
is then used to output either a value or color to the pass.

Arbitrary names can be used for these passes, as long as they don't conflict
with built-in passes that are enabled. The AOV Output node can be used in both
material and world shader nodes.

Implemented by Lukas, with tweaks by Brecht.

Differential Revision: https://developer.blender.org/D4837
2019-12-10 20:44:46 +01:00
35b5888b15 Fix menu buttons not displaying down arrow with emboss=False 2019-12-10 20:33:27 +01:00
d91b7625cf fix warning 2019-12-10 18:19:23 +01:00
4df45d1c4c initial Custom Emitter node 2019-12-10 18:12:51 +01:00
Julian Eisel
4fa774b533 Fix: Fullscreen File Browser showing override warning on file open
Steps to reproduce were:
* Change File Browser display mode to fullscreen in Preferences
* File > Save As (make sure existing .blend is selected)
* File > Open
The file name would still be shown in red and the + and - icons would be
visible, which should only be the case for saving files, not opening.

Note that this change makes all `FileSelectParams.flag` values be reset
on re-opening a File Browser, which *may* in fact cause other issues.
It's easy to fix those though, and I'd prefer properly resetting the
flags and only keeping specific ones in that case.
2019-12-10 17:09:08 +01:00
826a132791 support nested properties in inferencer 2019-12-10 16:46:31 +01:00
24a7851fbe new Value node 2019-12-10 16:06:32 +01:00
Julian Eisel
c5767a24b9 Fix T71995: Texture Paint workspace crash with new scene
Issue likely caused by 8b31f6fb21.

With this, initializing the toolsystem (e.g. for a new workspace-scene
combination) would skip the entire create->initialize routine for
image/texture painting settings. Reason being that these are not
allocated, unlike other paint settings. So while correctly skipping the
create part, it also skipped the initialization, which was still needed.

This does further changes in related code to avoid NULL pointer
accesses.
2019-12-10 16:00:43 +01:00
daf119f2a7 initial support for custom particle attributes 2019-12-10 15:30:42 +01:00
4d0643a185 Fix T70447: 'WholeCharacter' Keying set doesn't key None properties
The issue is that `something.path_resolve('"custom_property"')` raises a
`ValueError` when the custom property is set to `None`. Since `None`
cannot be stored in a keyframe anyway, the property is now silently
skipped. Not having an explicit value is the closest we can get to
`None`. This of course breaks when the value should be `None` in between
not-`None` values, but I would consider that as a problem with the rig,
and not something Blender can fix.
2019-12-10 15:12:15 +01:00
4dccb3767a optimize some math nodes 2019-12-10 14:30:07 +01:00
ea5f871d29 deduplicate code 2019-12-10 14:17:55 +01:00
96a1bc2997 GPencil: Invert Simplify options
To follow the standard conventions, the simplify options for grease pencil are inverted now, so to disable the file, uncheck the fill option and not as before that must be checked..

Before it was confusing because the simplify was activated checking the option and this was opposite to the mesh simplify options.
2019-12-10 14:06:57 +01:00
4755ab5b50 optimize variadic math functions 2019-12-10 14:05:31 +01:00
e71fe924c5 Fix T71609: Resizing bone length to 0 gets it stuck to that size
The result of normalising the bone vector wasn't checked, so it resulted
in a zero-length vector being multiplied with the desired length. Choosing
an arbitrary vector prevents the bone being 'stuck' at zero length.

Thanks @mano-wii for the patch.
2019-12-10 14:01:40 +01:00
6d05b0910a optimize math functions a bit 2019-12-10 13:15:01 +01:00
daf290dcc8 CMake: fix linking Blender as a Python module
Remove direct links to Blender binary,
only link to the window manager and rely on indirect links
for everything else.
2019-12-10 23:14:56 +11:00
e5f9640223 remove some timers 2019-12-10 11:47:05 +01:00
32c25e8c89 Merge branch 'master' into functions 2019-12-10 11:29:00 +01:00
42a551d2dd Fix T72220: Hide Edit Overlays
The edit overlays were drawn dispite of the global hide overlays toggle.
This patch checks the global hide overlay toggle to see if it needs to draw
these overlays.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6371
2019-12-10 10:55:29 +01:00
3ea736fb4d Keymap: use the application key for the context menu
This gives keyboard access to the context menu which can be useful
when using accelerator keys to access items within it.
2019-12-10 17:55:29 +11:00
b7533f92e5 GHOST: add support for application/menu key
Support the application key on Linux & Windows.
2019-12-10 17:13:02 +11:00
dfb6af3011 Cleanup: extra semicolon, comma warnings 2019-12-10 12:01:58 +11:00
3a4fa40313 Fix T72258: Loading keymap crashes on startup 2019-12-10 11:56:22 +11:00
00e9241d49 Cleanup: header guards 2019-12-10 11:06:38 +11:00
cc70f7d048 Cleanup: undeclared variable warning 2019-12-10 11:06:17 +11:00
1a8642937d Fix T72272: Error setting tool in weight paint mode
Error from recent fallback tool support.
2019-12-10 08:15:43 +11:00
2b71f8cac5 Cleanup: remove duplicate variables
Previous code made it seem as if the original edit-object
was re-created after separating.
2019-12-10 06:57:32 +11:00
08d4e7e11c Edit Armature: match separate selection with meshes
- Existing objects remain selected.
- The content of the armatures is unselected.
2019-12-10 06:56:50 +11:00
15630c5a81 Fix separating bones on hidden layers 2019-12-10 06:56:50 +11:00
8bf7ca9fe3 Fix T72310: Separate bones creates empty armatures
Armatures that didn't contain any selected bones were still
creating armatures.
2019-12-10 06:56:35 +11:00
62ef59aa0c Add the ability to create internal springs to the cloth sim
This can be used to make closed surfaces behave more like a soft body.

Reviewed By: Jacques Lucke

Differential Revision: http://developer.blender.org/D5788
2019-12-09 19:18:10 +01:00
e77fdc62b7 Fix T72006: Clay brush with size pressure corrupts mesh
When size pressure is enabled, the radius may not be enough to sample
any vertices to calculate the area normal. This lead to a vector 0 plane
and a division by 0 when calculating the signed distance to the plane,
which produces a NaN that was being written to the vertex coordinates.

Reviewed By: brecht

Maniphest Tasks: T72006

Differential Revision: https://developer.blender.org/D6326
2019-12-09 17:01:13 +01:00
8a7851de3a Fix T72054: Sculpt Mode crash when using Relax Mesh Filter with Dyntopo enabled
This commit fixes 3 bugs:

- Fix the crash reported in T72054. The BMesh elem table and the vd.no was null, so we now ensure that the table exists before running any sculpt tool in dyntopo. The relax function also uses vd.fno in case that vd.no is not available.
- Fix missing updates of the bounding boxes when running the mesh filter. This can be optimized by running the updates only when the filter finishes. Without this, it is impossible to sculpt the user modifies the mesh too much with the filter.
- Fix incorrect solution of relax vertex when using EEVEE. Relaxing the mesh requires the updated normals after each iteration. This was done by the PBVH rendering code, but when running EEVEE it was using incorrect normals. Now normals are updated after each iteration.

Reviewed By: brecht

Maniphest Tasks: T72054

Differential Revision: https://developer.blender.org/D6333
2019-12-09 16:59:41 +01:00
448669a630 Fix T72092: Clay Strips Brush stroke crash with Brush Detail Size
Some other areas in the brush code outside sculpt mode assume that
pressure is multiplied directly on top of the initial size. This patch
calculates the pixel radius correctly using the brush size from sculpt
mode to get the dyntopo detail size.
When the new brush input system is in place, all these values will come
directly from the brush input code with all the custom curves applied
per brush, so all paint modes will have a correct brush behavior and all
this sculpt mode specific code won't be necessary.

Reviewed By: jbakker

Maniphest Tasks: T72092

Differential Revision: https://developer.blender.org/D6339
2019-12-09 16:57:39 +01:00
40e2f4469a Fix Mask Brush gradient artifacts
The old mask brush implementation was adding the brush value to the
previous vertex mask value and clamping the result. This leads to
visible artifacts in the mask gradient as the value approaches 0 or 1,
so it was not possible to paint a smooth mask with this brush.
Now we are also multiplying by the previous mask value before clamping,
fixing all those gradient artifacts.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6341
2019-12-09 16:56:05 +01:00
312b6fd713 Cleanup: Redundant variable assignment to self
Was triggering strict compiler warning.
2019-12-09 14:56:53 +01:00
baeb11826b Cycles: Add OptiX acceleration structure compaction
This adds compaction support for OptiX acceleration structures, which reduces the device memory footprint in a post step after building. Depending on the scene this can reduce the amount of used device memory quite a bit and even improve performance (smaller acceleration structure improves cache usage). It's only enabled for background renders to make acceleration structure builds fast in viewport.

Also fixes a bug in the memory management for OptiX acceleration structures: These were held in a dynamic vector of 'device_memory' instances and used the mem_alloc/mem_free functions. However, those keep track of memory instances in the 'cuda_mem_map' via pointers to 'device_memory' (which works fine everywhere else since those are never copied/moved). But in the case of the vector, it may decide to reallocate at some point, which invalidates those pointers and would result in some nasty accesses to invalid memory. So it is not actually safe to move a 'device_memory' object and therefore this removes the move operator overloads again.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6369
2019-12-09 14:32:12 +01:00
c9dc57be3a Fix T72145: Object.update_from_editmode crashes with empties
Also corrects the return value, where objects that don't have an
edit-mode returned true, making it seem as if object data was flushed.
2019-12-09 20:15:16 +11:00
3d5775b69a Gizmo: add view aligned gizmo for shear 2019-12-09 19:45:15 +11:00
4e4d350967 remove timer 2019-12-08 23:01:28 +01:00
2ce315c588 avoid computing the computing the same things many times 2019-12-08 23:01:21 +01:00
34d68139ac extend single elements when necessary 2019-12-08 22:01:31 +01:00
b09c2c7d00 Merge branch 'master' into functions 2019-12-08 21:31:53 +01:00
761111efb8 Fix T71878: Cycles crash with adaptive subdivision and empty mesh 2019-12-08 19:49:34 +01:00
52c834983f Fix T72282: Cycles OpenCL error after recent math node changes 2019-12-08 19:43:17 +01:00
f16bca7212 Fix T71480: crash with Eevee image texture node and clipping 2019-12-08 18:47:53 +01:00
5c234a558c Fix T72269: crash with Eevee and normal maps after recent math node changes
Reusing math node functions for normal map node caused problems.
2019-12-08 16:39:06 +01:00
03cb991618 Fix T72240: GLSL error with some old NVIDIA drivers, causing crash at startup 2019-12-08 14:59:07 +01:00
2901986b10 Fix T72252: crash running ocean bake in background mode 2019-12-08 13:44:46 +01:00
9569425b02 Fix T72064, T72158: weight paint shows X/Y/Z symmetry options that don't work
Only X-mirror is supported still. While we should support all these in the
future, the UI should match the current supported functionality.

Ref T65872
2019-12-08 13:27:00 +01:00
d82d19904b Industry Compat keymap: Support tool cycling for all tool shortcuts
This makes is so repeated key presses will cycle the tools in the same slot in the toolbar.
Users can tap Q repeatedly to switch selection tools, or press Ctrl-E repeatedly to enable the various Extrude tools, etc.
2019-12-08 13:05:31 +09:00
416e66c7fe Fix ShaderNodeCustomGroup.copy method being called too often
This is only supposed to happen when copying nodes that are part of the user
editable database, not temporary copies for the dependency graph.

The LIB_ID_COPY_LOCALIZE test was wrong because it is a combination of multiple
bitflags as pointed out by Bastien, and was actually redundant anyway since
LIB_ID_CREATE_NO_MAIN is part of it.
2019-12-07 20:38:17 +01:00
Bartosz Moniewski
074c00f9d6 Shaders: noise and wave distortion now work uniformly instead of diagonally
Previously Noise and Wave texture nodes would use noise functions within a [0,1]
range for distortion effects. We either add or subtract noise from coordinates,
never do both at same time. This led to the texture drastically shifting on the
diagonal axis of a plane / cube. This behavior makes the Distortion input hard
to control or animate. Capabilities of driving it with other texture are also
limited, diagonal shifting is very apparent.

This was fixed by offsetting the noise function to a signed range and making it
zero-centered. This way noise is uniformly added and subtracted from coordinates.
Texture pattern sticks to main coordinates which makes it way easier to control.

This change is not strictly backwards compatible, there is versioning to ensure
the scale of the distortion remains similar, but the particular pattern can be
a little different.

Differential Revision: https://developer.blender.org/D6177
2019-12-07 19:06:27 +01:00
9c1134015c UI: Custom Face Orientation Colors
Adds theme settings to allow change of front and back faces of the Face Orientation overlay

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

Reviewed by Jeroen Bakker
2019-12-07 08:16:45 -08:00
Charlie Jolly
958d0d4236 Shader Nodes: Add Interpolation modes to Map Range node
Modes: Linear interpolation (default), stepped linear, smoothstep and smootherstep.

This also includes an additional option for the **Clamp node** to switch between **Min Max** (default) and **Range** mode.

This was needed to allow clamping when **To Max** is less than **To Min**.

Reviewed By: JacquesLucke, brecht

Differential Revision: https://developer.blender.org/D5827
2019-12-07 12:52:42 +00:00
Charlie Jolly
0406eb1103 Maths Node: Additional functions
When creating shaders and using maths functions it is expected that Blender should match functions in other DCC applications, game engines and shading languages such as GLSL and OSL.

This patch adds missing functions to the Blender maths node.

Ideally, it would be nice to have these functions available to vectors too but that is not part of this patch.

This patch adds the following functions trunc, snap, wrap, compare, pingpong, sign, radians, degrees, cosh, sinh, tanh, exp, smoothmin and inversesqrt.

Sign function is based on GLSL and OSL functions and returns zero when x == 0.

Differential Revision: https://developer.blender.org/D5957
2019-12-07 12:33:07 +00:00
a382054837 Merge branch 'master' into functions 2019-12-07 11:01:54 +01:00
6a78ace569 Cleanup: remove unused arguments 2019-12-07 16:37:02 +11:00
8b512414c5 Preferences: correct experimental flag use
Add utilities for checking when experimental features
should be used.
2019-12-07 13:20:37 +11:00
7c2217cd12 UI: File Browser Volumes and System Lists Icons
Allows each File Browser list item in Volumes and System to use individual icons.

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

Reviewed by Julian Eisel
2019-12-06 13:10:30 -08:00
a05b79e96d UI: disk to disc icon dat file rename
Changes file names of two icon 'dat' files to reflect previous identifier rename.

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

Reviewed by Julian Eisel
2019-12-06 12:16:20 -08:00
6ffcddc10a Tool System: experimental fallback tool support
Implement T66304 as an experimental option,
available under the preferences "Experimental" section.

- When enabled most tools in the 3D view have a gizmo.
- Dragging outside the gizmo uses the 'fallback' tool.
- The fallback tool can be changed or disabled in the tool options
  or from a pie menu (Alt-W).
2019-12-07 06:03:00 +11:00
7465078e63 Tool System: don't assert when showing tooltips in a different space
Needed to show fallback tool for the 3D view in the properties editor.
2019-12-07 05:57:47 +11:00
8a8b549e56 UI: only use toolbar draw-style for buttons with icons
This allows tool buttons to be used in menus or popovers
and show as regular button styles.
2019-12-07 05:57:47 +11:00
bd53c053f3 Gizmo: add optional background alpha for 2D button gizmo
This allows using the gizmo for a screen circle with a hollow
area in the center, useful for general dragging gizmos.
2019-12-07 05:57:47 +11:00
5e96b860a3 Windows: Fix failing tests due to missing manifest.
Tests were missing a manifest, and were importing the
wrong version of Microsoft.Windows.Common-Controls
causing blenloader_test, bmesh_core_test and alembic_test
to fail due a loader error.
2019-12-06 11:37:14 -07:00
dd4b98133e Fix T71342: macOS does not always use the discrete GPU for Blender
This reverts commit 3d9cc4d3f1. The commit
message and intent behind the commit is unclear. We generally want the
discrete GPU to be used for best performance, not the integrated GPU.
2019-12-06 19:21:02 +01:00
6df2ede341 Cleanup/Windows: Separate out the MS-CRT into a subfolder
In older versions the ms crt was only a few dlls, in recent versions
this jumped to over 40 leading to quite a bit of clutter in our
bin folder.

This change moves the CRT into its own folder.

For developers that generally already have the runtime globaly
available on their machine, there is a new cmake option
(WITH_WINDOWS_BUNDLE_CRT, default ON) that you can use to toggle
installing the runtime to the blender bin folder, and save some
time during the initial build, this option is off by default for
only the developer profile.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6132
2019-12-06 10:12:03 -07:00
19a89797c3 Fix crash when trying to decimate baked fcurve channels
No curve data was available for the modal decimate operator.
Added a check for when the curve has baked data.
2019-12-06 17:00:22 +01:00
593d972407 Fix T72215: Insert Blank Keyframe Active Layer) creates a new frame in all layers
The default parameter was saved and the next time the operator was used, if it was used all layers, the default value changed.
2019-12-06 16:30:28 +01:00
eeaf452381 Cleanup: clang-format 2019-12-07 01:35:53 +11:00
56dce4ae43 initital check for whether a function can be called once only 2019-12-06 13:55:03 +01:00
2390af8430 move class from header to cc 2019-12-06 13:34:52 +01:00
7c03565594 add utility to check if an input is only a single value 2019-12-06 13:30:10 +01:00
e93fe105d1 cleanup 2019-12-06 13:01:11 +01:00
de56346eee extract methods 2019-12-06 12:58:01 +01:00
a5790756e0 extract methods 2019-12-06 12:50:54 +01:00
94a280cb99 cleanup 2019-12-06 12:42:58 +01:00
039a1134cd cleanup data copying in network evaluation 2019-12-06 12:39:03 +01:00
ce35f42c0a simplify forwarding in network evaluation 2019-12-06 12:27:41 +01:00
6ec5ece968 cleanup naming 2019-12-06 11:50:10 +01:00
29106bdaee simplify allocation in multi function network evaluation 2019-12-06 11:48:40 +01:00
98d9f2bdfa store whether function depends on per element context 2019-12-06 11:35:34 +01:00
1996429dc6 Merge branch 'master' into functions 2019-12-06 11:25:26 +01:00
15abc9fe74 Draw: Removal of MultiSample Buffers
Multisample buffers were used for smooth line drawing. As we now have
an algorithm that doesn't need the multisample buffers we can remove
them.

The user preference for viewport multi_sampling is replaced by single
toggle overlay `use_overlay_smooth_wire`. By default this setting is
enabled as the new drawing is really quick (<1ms) and uses zero hacks.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6367
2019-12-06 07:45:07 +01:00
601eafd104 Fix T72118: Enable Windows 10 Non-client DPI Scaling
Enables Windows 10 feature that automatically adjusts non-client area (title bar) on high-DPI displays.

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

Reviewed by Brecht Van Lommel
2019-12-05 16:50:30 -08:00
61a02a7aa1 Cleanup: Windows Manifest usage.
We had a manifest file, but it was seemingly not used, some
settings were done using linker pragmas, some of them visual
studio would set by default for us, others where not set at all.

This patch changes:

- Single manifest file where we can maintain all settings in
a single location, removal of any linker pragmas related to
the manifest.

- Compatibly settings for win vista - win10, without this any
call to any of the GetVersion and related functions (GetVersionEx,
VerifyVersionInfo, IsWindowsXxxx) will by default say we are
on vista and OS specific optimizations in external libraries may
be missed.

-Rather than having it in the .RC file in an #ifdef which may
or may not trigger depending on the build tool used, we tell
cmake to treat it as a source file and it will do the right
thing for both the ninja and visual studio generators.

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

Reviewers: brecht
2019-12-05 12:15:04 -07:00
e1e1dad668 Merge branch 'master' into functions 2019-12-05 20:00:52 +01:00
Jim Eckerlein
9febff7e14 glTF: upgrade Draco to version 1.3.5 and add mesh skinning support
This will fix exporting meshes with armatures using Draco compression, like:
https://github.com/KhronosGroup/glTF-Blender-IO/issues/617

Differential Revision: https://developer.blender.org/D6342
2019-12-05 19:12:10 +01:00
05ef758f46 Cleanup: Workbench: Remove Double negation 2019-12-05 17:24:57 +01:00
f7bd56bf22 Workbench: Fix missing Clipping state when usint Alt+B clipping
Also make the code a bit more clear.
2019-12-05 17:24:57 +01:00
b50853611e UI: Add tooltips for modifiers
When adding a modifier to an object, the drop-down select box has the
same mouse-over tooltip for each modifier type: "Add a procedural
operation/effect to the active object". This isn't helpful when you
don't know what the modifier does from just reading the name.

This patch adds descriptions for most modifier types, so that it's
clearer what the modifiers do. The text was provided by @werwack after
discussion on DevTalk[1] and taken from the Blender Manual, and
subsequently updated by @billreynish and @HooglyBoogly.

Not all modifiers have a short one-line description in the manual, hence
those are still missing in this patch.

[1] https://devtalk.blender.org/t/ui-contextual-modifier-description-in-the-tooltips-of-the-add-modifier-dialog-window/10382

Reviewed By: billreynish

Differential Revision: https://developer.blender.org/D6352
2019-12-05 17:03:56 +01:00
fe605080ef Overlay Engine: Fix unreported crash on startup caused by new shader 2019-12-05 17:00:11 +01:00
9f48a04799 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-12-05 16:38:26 +01:00
b9f896f6f1 Overlay Engine: Armature: Use Wire AA on custom bone loose edges 2019-12-05 16:36:06 +01:00
d40579c62b Overlay Engine: Fix bone outline antialiasing 2019-12-05 16:36:06 +01:00
95ca3f6536 Fix T72169: "New File" loads UI, even when disabled
Partially reverts b500f42700, callers now set this flag.
2019-12-06 00:45:04 +11:00
d3dbacea08 open group interface panel from V pie menu 2019-12-05 14:14:36 +01:00
293c476822 initial support for reordering group inputs 2019-12-05 13:58:38 +01:00
70b3469c0e GPencil: Fix Stroke keeps selected when duplicate (unreported)
When use `Shift+D` the original stroke was unselected only at stroke level, but not at point level and the edit line kept selected.
2019-12-05 13:46:11 +01:00
d21a8dcae2 Overlay Engine: Fix crash in select mode with Lock Object Modes off
Fixes T72189: Crash when Lock Object Modes off and switching from Sculpt mode to Object mode
2019-12-05 13:32:04 +01:00
e57a0ec211 handle other socket types in operator 2019-12-05 13:14:23 +01:00
95b2871550 make it easier to create group outputs 2019-12-05 13:10:35 +01:00
d4d0360604 better default value initialization 2019-12-05 12:47:58 +01:00
eb9f980912 initial V shortcut to create group inputs 2019-12-05 12:43:41 +01:00
c402a4847b Cleanup: Silent Warnings
Silent unused variable warnings introduced by recent changes in the
overlay engine.
2019-12-05 12:35:02 +01:00
31c77326c9 Fix T72154: Background Camera Images
The Camera Background Images uses a alpha under blending. For alpha
under blending to work correctly the framebuffer containing the result
of the render engine needs to be active
(`DefaultFramebufferList.default_fb`) and the source blend color needs
to be premultiplied with alpha.

Due to recent refactoring this wasn't the case and it seemed that the
background image was drawn in front of the scene. This patch sets the
correct state so it seems to be drawn behind the scene.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6365
2019-12-05 12:15:27 +01:00
e2806b7429 Revert "Fix T71576 Mesh error on mutimaterial Meshes on legacy nvidia drivers"
This reverts commit cf77b67c45.
2019-12-05 12:02:24 +01:00
798b977d95 Overlay Engine: Outlines: Fix occluded alpha being too low 2019-12-05 11:59:52 +01:00
5356c90a46 Overlay Engine: Outlines: Bypass antialias path when not needed
Improve performance on low end hardware.
2019-12-05 11:58:24 +01:00
dd452a314a improve group node ui 2019-12-05 11:21:24 +01:00
cf77b67c45 Fix T71576 Mesh error on mutimaterial Meshes on legacy nvidia drivers
Differential Revision: https://developer.blender.org/D6351
2019-12-05 11:16:29 +01:00
6ba09f8515 Cleanup: Removes double notification 2019-12-05 10:23:07 +01:00
2f05c79db3 Fix T72182: Fade Layers Option does not work when activating a layer from Dope Sheet or Outliner
The layer was activated, but the datablock was not tagged to recalc GPU cache.
2019-12-05 10:19:49 +01:00
ab678735ab Merge branch 'master' into functions 2019-12-05 09:55:13 +01:00
f4b7d57551 Fix T72175: DrawManager Crash Large Objects
Introduced by 9c337fcfe2 mistaken that `MeshExtract.use_threading` set
to false means that no threading is used at all. This is not the case it
will still perform threading for large objects, it will only run the
different subtasks in serial.

Fixed by scheduling the `lines_loose` in the task_pool after the rest
have been executed. This is cleaner than the previous implementation as
it sticks more to the actual design.
2019-12-05 08:14:32 +01:00
722b8e4692 Industry Compat keymap: Use consistent shortcuts for sculpt mode masking
Use Ctrl-A and Ctrl-Shift-A for 'selecting' and 'deselecting' via the masking operators.
2019-12-05 15:30:43 +09:00
de7622b4b6 Industry Compat keymap: Support scroll wheel zooming also while Alt is held
Users are sometimes holding Alt to do view manipulation, in which case zooming with the scroll wheel would fail.
2019-12-05 15:22:49 +09:00
51bec2e5fe Industry Compat keymap: Fix Tweak tool in UV Editor (Unreported)
The Tweak tool wasn't working - it would start to box select instead.
2019-12-05 15:00:56 +09:00
a16a56e7d9 Industry Compat keymap: Support 1-4 keys for switching selection modes in the UV Editor
This is consistent with the 3d View. Oversight pointed out by users on the forums.
2019-12-05 14:38:19 +09:00
1b33e1f9ae Overlay Engine: Cleanup & enable line AA on in front passes
- Remove pd->view_default, was a leftover from TAA implementation
- Sanitize active_view switches.
- Sanitize framebuffers switches.
2019-12-05 00:43:37 +01:00
4949a62d4d Overlay Engine: Add back selectability of planar lightprobe data plane 2019-12-04 22:32:17 +01:00
4705aa4fe5 Overlay Engine: LightProbe: Simplify drawing of irradiance grid data
This separates it from the outline pass and fix a visibility bug
when extras were off.
2019-12-04 22:32:17 +01:00
a77fe7eb5c Overlay Engine: Outline: Simplify drawing code
Use obinfo ubo to compute outline color id.

Note this commit removes the planar probe outline on purpose.
2019-12-04 22:32:17 +01:00
6d3eb85f66 Overlay Engine: Simplify outline rendering by using the antialiasing pass
This use the overlay AA pass to antialias the selection outlines.

This also do all search and expand in one pass and reduce the computation
time and memory used (2 x 32bit/pixel buffer less).

Note that the aliasing is a bit worse than the old FXAA that we used to have.
2019-12-04 22:32:17 +01:00
e203f69bc3 Fix macOS bundling error with latest release, increase DMG disk space a little
Also adds more verbose output when notarization fails.
2019-12-04 19:21:23 +01:00
8b30847952 Fix T72076: Edit mode circle selection inconsistency with animation
The solution is to check for updates on `data->recalc`.
2019-12-04 15:07:35 -03:00
c44fdcfab2 fix node identifier when node is in a group 2019-12-04 17:10:31 +01:00
d5ec476e36 simplify influence generation from xnodes 2019-12-04 16:42:04 +01:00
985e3e8ddc simplify action building code 2019-12-04 16:03:15 +01:00
7868db9343 Make curve decimation only take into account the selected curve points
Previously the decimation would take the whole curve into account when
decimating and not just the selected part.

This also contains various smaller bug fixes for the fcurve decimation.

Reviewed By: Sybren

Differential Revision: http://developer.blender.org/D6286
2019-12-04 16:02:58 +01:00
f101aa6c4b fix naming after recent refactor 2019-12-04 15:32:30 +01:00
824c265938 Fix T72157: Overlay Hide Bone Relationship Lines
Bone relationship lines needs to be hidden in:

* object mode
* or when relationship lines are turned off

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6356
2019-12-04 15:18:43 +01:00
9c337fcfe2 Fix T72130: Wireframe Visible After Disabling
The lines index buffer can contain all edges (edit mode) or only loose
edges (object mode). When switching between these modes the wrong
content of the index buffer can be used.

This patch will clear the lines index buffer when a `loose_edges` is requested. Making sure it is always up to date.

Note that this is supporting an exising hack where the IBO is truncated
during the creation. We should find a different way how to solve these
kind of issues.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6349
2019-12-04 15:17:09 +01:00
186d74020e Fix T72156: Render Viewport Animation Meta Data
When using Render Viewport Animation the meta data
was only stamped when a float buffer was used. In recent changes it was
possible to use a char buffer for the result.

This commit will also support stamping of metadata using a char buffer.
2019-12-04 15:04:43 +01:00
ee58e62f23 rename Surface Location to Surface Hook 2019-12-04 15:04:10 +01:00
10ab0d66e8 GPencil: Fix error in previous patch
By error, a previous version of the patch was used and there was a small change in the order of the columns in dopesheet.
2019-12-04 14:34:44 +01:00
db26a32601 store emit location in particles 2019-12-04 14:27:11 +01:00
fff50bb3b4 GPencil: Cleanup duplicate Panel settings definition in previous commit 2019-12-04 14:23:07 +01:00
98ff6cfa57 GPencil: Add Opacity y Onion switch to Dopesheet
Add new icons and panels Grease Pencil Dopesheet to manage layers without having the properties panel visible.

Also, the icons are in the same order in Dopesheet, Layers and Material list to keep consistency.

As the number of columns for icons is limited to 3 and we also need use a factor, I have impleted the change using slider area. Also, the slider option is enabled by default for 2D Template.

See T72026 for more info.

Reviewed By: mendio, pepeland, billreynish

Differential Revision: https://developer.blender.org/D6328
2019-12-04 14:17:08 +01:00
2012ea2e9d add id handle lookups to function modifiers 2019-12-04 13:49:24 +01:00
c6a00f46ad pass around Object handles instead of pointers 2019-12-04 13:33:49 +01:00
907f72d4bc initial IDHandle implementation 2019-12-04 13:21:05 +01:00
182a56e3b0 improve SurfaceLocations members 2019-12-04 12:17:22 +01:00
e5e295beed fix when having emitter in node group 2019-12-04 11:53:15 +01:00
672b085264 Merge branch 'master' into functions 2019-12-04 11:33:48 +01:00
541d0fdba6 Add cloth pressure vertex group and unlock cloth shrink values range
Introduced a way to specify cloth pressure force influence with a vertex
group. This will allow users to only have pressure affect certain parts
of the mesh.

In addition to this, the "shrink factor" is now also unlocked to allow
negative values and thus allowing the cloth mesh to grow as well.

Reviewed By: Jaques Lucke

Differential Revision: http://developer.blender.org/D6347
2019-12-04 11:30:14 +01:00
b3f388dca9 UI: support Copy To Selected and Alt-Click for PropertyGroup members.
Rigify uses a property group to contain options of its rigs, so
currently it is impossible to use Alt-Click or Copy To Selected
to change a setting for multiple rigs at the same time.

The main problem here is that there is no efficient way to find
which bone the property group belongs to. To maintain performance,
implement this by checking the active bone if it is known. Copy
Data Path and related features still don't work, as data path
calculation can't use context.

Differential Revision: https://developer.blender.org/D6264
2019-12-04 12:23:41 +03:00
fda791ab12 Overlay Engine: Fix T72147 Blender crashes when Lock Object Modes off
Also fix sculpt mask inverted
2019-12-03 18:56:59 +01:00
574a59dfb0 Fix T72112: Perpendicular snapping with closest not working
The closest target is calculated only after a snap point is found.
So use `center_global` while the target is not calculated.
2019-12-03 12:20:41 -03:00
Jean First
b81939716d Fix T70378: Grease pencil armature modifier not normalizing weights as expected.
The function armature_vert_task had a special case for Vertex Paints in Grease Pencil data. This patch
removes this special case. Not sure why it was needed in the first place.

Reviewed By: antoniov

Maniphest Tasks: T70378

Differential Revision: https://developer.blender.org/D6348
2019-12-03 16:16:10 +01:00
dcded19507 Overlay: Armature: Fix Crash entering armature edit mode 2019-12-03 16:14:54 +01:00
d709399b64 new Get Normal on Surface node 2019-12-03 16:00:02 +01:00
7fb768e2c4 cleanup: remove unused class 2019-12-03 15:17:38 +01:00
f6e39cc95d add StringMap.add method 2019-12-03 15:11:46 +01:00
4127c7ff87 make execute and influence sockets work in groups 2019-12-03 15:07:40 +01:00
adb6be36e4 Buildbot: Correct timestamp argument for Windows codesign
The current authority we use RFC 3161 time stamp server,
so need to pass different command line argument.
2019-12-03 14:41:49 +01:00
ceab47f347 Cleanup: text-view comments, variable names, const args 2019-12-03 23:43:01 +11:00
aee9d9a4a4 Cleanup: unused variables 2019-12-03 23:26:20 +11:00
a51f7c8a50 Fix T72134: Adaptive UVs does not affect strokes that are already drawn
Now when change the setting the strokes are recalculated.

To do this, it was necessary to move the UV recalc to BKE module in order to share with Draw Engine. If the recalc it was done in draw engine, the factor was only calculated for evaluated version and there was a problem when draw a new sytroke.

Now, the RNA parameter recalc the original datablock instead of tag for be calculated in Draw Engine.
2019-12-03 12:09:47 +01:00
90529a8d4d Merge branch 'master' into functions 2019-12-03 11:55:39 +01:00
9c102058e1 new Get Image Color on Surface node 2019-12-03 11:51:47 +01:00
d6fe8cea73 DrawManager: Bounding Box Drawing
Fix for T72136: Bounding boxes were still drawn even with disabled
overlays. Also the outline displayed the original mesh

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6350
2019-12-03 11:28:01 +01:00
c7e64f67ed Cleanup: rename textview ymin/max
This is used for scrolling which wasn't obvious.
2019-12-03 19:59:11 +11:00
1fdea43c29 Fix minor errors with text view margins for console/info editor
- Margins used duplicate define between files.
- Cursor selection ignored margins.
- Cursor wasn't scaling with DPI.

Add a 'draw_rect' member which is the region rect with margins applied
to make these checks clearer.

This resolves issue pointed out in D6300,
which complicated further refactoring.
2019-12-03 19:53:40 +11:00
a81fdefdde Overlay: Wireframe: Improve Z-fighting / missing information stippling
To do this we do a half pixel offset in the normal direction.
However, we use the shading vertex normal instead of the geometric normal
(for speed) and this leads to imprecisions.

So we try to mitigate the common case and leave the corner cases as is.
2019-12-03 01:53:27 +01:00
37cd7b25dc Overlay: Wireframe: Fix Edges not being culled correctly 2019-12-03 01:06:40 +01:00
1e480840a2 Overlay: Fix vertex discard issue on Nvidia hardware
Instead of relying on undefined behavior to discard the line, we put the
vertex at the camera origin so that interpolation does not produce any
fragment. We don't use FLT_MAX as it also gives unpredicatble results on
NVidia.
2019-12-02 19:02:58 +01:00
df29e9c070 Fix T71596: Bug in io_utils api breaking only on windows.
Stupid mistake, 'original' filepath is a blender-flavored one, with
potentially weird things like the '//' relative 'header'... This can
work on linux (also it could have broken in other places too), but on
windows that is fully invalid path and python `os.path` library just
generates empty result here.

Simply using proper valid path instead fixes it...
2019-12-02 18:09:47 +01:00
6fd2e65295 Overlay: Wireframe: Fix missing loose edges in object mode 2019-12-02 17:44:49 +01:00
6d2bc870a7 Overlays: Fix dashed curves and loose edges 2019-12-02 17:33:21 +01:00
35217b4c06 Fix T72114 Overlays: Curves are not drawing anymore (objectmode) 2019-12-02 17:14:46 +01:00
Alessio Monti di Sopra
8b260fec0c UI: rename "Toggle ..." back to "Show Markers"
Change made in recent show marker refactor dc87d09b8b

On writing docs the term "Show" makes more sense.
2019-12-03 01:59:06 +11:00
7866512627 Overlay: Armature: Fix Crash when selecting in edit armature mode 2019-12-02 15:34:12 +01:00
014eb69cf8 Overlay Engine: Make thickwires (linesize > 1.0) using the Wire AA pass
This fixes the limitation of OSX not allowing glLineWidth with size > 1.0.
This however only fix the viewport wire drawing.
2019-12-02 14:35:49 +01:00
3e241af3ae Overlay Engine: Wireframe: Remove geometry shader and fragment discard
This Simplify and should also speedup the drawing a tiny bit.

We now discard the edges in the vertex shader by setting one of the verts
at vec4(0,0,0,0) to not produce any fragment
2019-12-02 14:35:49 +01:00
0f521ca4d9 Fix T72071: Crash on snap to edge
Caused when the vertices index is dirty due to some mesh editing
operation like Extrude
2019-12-02 10:30:37 -03:00
9516921c05 Overlay Engine: Refactor & Cleanup
This is the unification of all overlays into one overlay engine as described in T65347.

I went over all the code making it more future proof with less hacks and removing old / not relevent parts.

Goals / Acheivements:
- Remove internal shader usage (only drw shaders)
- Remove viewportSize and viewportSizeInv and put them in gloabl ubo
- Fixed some drawing issues: Missing probe option and Missing Alt+B clipping of some shader
- Remove old (legacy) shaders dependancy (not using view UBO).
- Less shader variation (less compilation time at first load and less patching needed for vulkan)
- removed some geom shaders when I could
- Remove static e_data (except shaders storage where it is OK)
- Clear the way to fix some anoying limitations (dithered transparency, background image compositing etc...)
- Wireframe drawing now uses the same batching capabilities as workbench & eevee (indirect drawing).
- Reduced complexity, removed ~3000 Lines of code in draw (also removed a lot of unused shader in GPU).
- Post AA to avoid complexity and cost of MSAA.

Remaining issues:
- ~~Armature edits, overlay toggles, (... others?) are not refreshing viewport after AA is complete~~
- FXAA is not the best for wires, maybe investigate SMAA
- Maybe do something more temporally stable for AA.
- ~~Paint overlays are not working with AA.~~
- ~~infront objects are difficult to select.~~
- ~~the infront wires sometimes goes through they solid counterpart (missing clear maybe?) (toggle overlays on-off when using infront+wireframe overlay in solid shading)~~

Note: I made some decision to change slightly the appearance of some objects to simplify their drawing. Namely the empty arrows end (which is now hollow/wire) and distance points of the cameras/spots being done by lines.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6296
2019-12-02 13:15:52 +01:00
Kevin Buhr
1f6c3699a8 Fix T72099: Exception drawing guide UI in quad view 2019-12-02 15:12:43 +11:00
f1ac64921b 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-11-30 20:33:23 +03:00
f0e7fd4ad6 GPencil: Fix unreported error when frame is zero in Time modifier
When the frame was zero, the frame number was clamped by error to 1.
2019-11-30 17:05:08 +01:00
9e8f68f4fa remove concept of particle function inputs from code 2019-11-30 15:34:38 +01:00
f9f6ab0251 remove remaining particle input nodes 2019-11-30 15:17:59 +01:00
a4cc5f1cbb make Is In Group a normal multi-function 2019-11-30 15:14:10 +01:00
d7b991aeb7 remove Particle Randomness node 2019-11-30 14:40:07 +01:00
f71eec7604 remove Surface Weight node 2019-11-30 14:38:01 +01:00
710c3b8312 new Get Weight on Surface node 2019-11-30 14:36:19 +01:00
a561a457dc initial Get Position on Surface node 2019-11-30 13:30:34 +01:00
5c0f1e1a4e GPencil: Fix unreported thickness does not scale when layer is parented
The thickness was using the object scale always, but when the  layer is parented, must use the parented object scale.
2019-11-30 11:46:24 +01:00
fcdf4b36c5 UI: group NDOF XYZ invert options 2019-11-30 19:21:25 +11:00
e9dd2abaef NDOF: invert axes by default
Matches 3D Connexion's reference software.
2019-11-30 19:20:06 +11:00
6d79ebebc5 Cleanup: remove unused NDOF icons 2019-11-30 18:52:32 +11:00
Alessio Monti di Sopra
dc87d09b8b UI: allow to hide markers region per editor
Instead of having the option to show marker lines,
make the marker region optional.

- Added a Show Markers entry in the View menu of the animation editors.
- If the markers region is not active then the Marker menu gets hidden.
- Removed marker menu from the driver editor
  and don't allow to use marker operators.
2019-11-30 17:08:04 +11:00
f478fef9d6 Fix T72000: Key shortcuts unavailable in popovers 2019-11-30 03:09:04 +11:00
56283464b8 Cleanup: Alembic: avoid unused parameter warning 2019-11-29 16:55:39 +01:00
9ea0eb0b95 Alembic export: assume that transforms are always animated
This is a partial rollback of f18ad385df. It
turned out to be more tricky to determine animatedness of an object.

This fixes T71986.
2019-11-29 16:31:02 +01:00
1321be0af9 GPencil: Fix error when interpolate sequence strokes with weights
When the final stroke was smaller than original stroke, the weights array must be resized, but by error the function used the original stroke pointer instead of the new stroke pointer and this corrupted the pointers.
2019-11-29 16:27:29 +01:00
3a5d398aaf Fix T72024: Transform Snap: Alingn Rotation distorts object
Occurs in edit mode when object has no uniform scale.
2019-11-29 12:06:16 -03:00
f63d65ae5a Tests: prevent failing assertion when running blendfile-loading test
Loading a blendfile allocates one or more windows that need to be freed.
Freeing those windows also calls `BKE_workspace_instance_hook_free()` to
free workspaces. However, in the `BlendfileLoadingBaseTest` test there are
no workspaces allocated. This caused an assertion failure, which was worked
around by not asserting when Blender is running in background mode.

Reviewed by @Severin via pair programming
2019-11-29 16:05:01 +01:00
846e402b08 Alembic: fixed unit test for exporter API change 2019-11-29 15:36:07 +01:00
4feced2f3e Refactor: Make animated RNA value read/write more reusable
Currently unused, but needed for coming fix.
2019-11-29 15:13:03 +01:00
64f311289a Cleanup: Remove unused function 2019-11-29 14:39:54 +01:00
d1166dcf31 Depsgraph: Refactor, split runtime backup into smaller files
It started to be a long code of all various cases in a single file,
which started to be really confusing.
2019-11-29 14:39:54 +01:00
fc2b966fc7 Refactor: Add C++ guard code to headers
C++ is used more and more, and it is becoming more and more annoying to
keep track of whether header have C++ guard or not.

Is easier and more clear to be consistent in all headers and have such
guards in all headers.
2019-11-29 14:39:54 +01:00
ff9d33a77c Alembic: clarification of 'visible objects only' export option tooltip
The visibility of the object is what counts, not just the visibility of
the collection.
2019-11-29 14:20:15 +01:00
d9e61ce195 Alembic: changed "Visible Layers" to "Visible Objects" in export options
There are no more 'layers' in Blender. I chose 'Visible Objects' rather
than 'Visible Collections' to be consistent with the other
'{Renderable,Selected} Objects Only' options.

No functional changes.
2019-11-29 14:15:07 +01:00
e7c7707ca9 Fix T71986: Alembic: object constraints animation no longer exported
`AbcTransformWriter::hasAnimation` recently became smarter than just
returning `true`, but wasn't quite smart enough yet. Constraints are now
considered a source of 'animation'.
2019-11-29 14:09:21 +01:00
be1f4d875f Fix T72013: Gpencil Interpolate strokes causes instant crash when material list is empty
The problem was the draw function tried to use the material and gpsettings and both were NULL.

Now, the default material is used.
2019-11-29 11:25:16 +01:00
b25bb2d7ec Archive build script: stop when creating archive fails
The `subprocess.call()` function doesn't check the exit status code of the
subprocess. Use `subprocess.check_call()` or `subprocess.run()` instead.
2019-11-29 10:37:43 +01:00
ae13bba24e Archive build script: fix compatibility with older tar on CentOS 7
On CentOS 7, `tar --use-compress-program='xz -9'` tries to run `xz -9` as
executable, rather than running `xz` with `-9` as argument. Passing the
`-9` option via the `XZ_OPT` environment variable, as suggested by
@campbellbarton in D6138, works fine.
2019-11-29 10:35:19 +01:00
9e168b63b4 GPencil: Add missing Overlay mode
The VERTEX mode was not checked in shaders and must be managed equals to MATERIAL mode.
2019-11-29 10:01:37 +01:00
e7e074235b EEVEE: Cleanup
Remove redundant defines.
2019-11-29 09:39:28 +01:00
53f27cdc20 UI: use popover for NDOF menu
Number sliders were being used in a menu which doesn't work very well.
2019-11-29 19:12:50 +11:00
caca7e5162 Cleanup: replace macros with functions 2019-11-29 18:46:46 +11:00
780342caaa Preferences: increase NDOF sensitivity
This was too slow taking around 8 seconds for a full revolution.
2019-11-29 18:41:07 +11:00
0a3339456b 3D View: fix NDOF rotation around object locking pan 2019-11-29 18:32:20 +11:00
ac15f5e9b0 Cleanup: comments, redundant normalize 2019-11-29 18:09:47 +11:00
77c7440540 CMake: Remove stray WITH_JACK in blender_release.cmake
Missed one in the previous commit.
2019-11-28 15:02:54 -07:00
7e9a827c58 CMake: Remove stray WITH_JACK in full configuration 2019-11-28 15:00:30 -07:00
bbd5f30ad6 Build: change CMake option defaults to match "make full"
Previously some important features like OpenSubdiv were disabled by default,
which caused confusion.

The purpose of disabling some of these features was to avoid potentiall build
errors on Linux. But with precompiled libraries, install_deps.sh and better
library availability checking this is hopefully not much of a problem anymore.

This makes "make full" obsolete, but it's kept to not break docs or shell
scripts that people may have, and the .cmake config file remains useful to
modify an existing build folder.

This also changes some option to only be available on platforms where they
are actually supported (WITH_JACK, WITH_TBB_MALLOC_PROXY and X11 options).

Fixes T69742

Differential Revision: https://developer.blender.org/D6306
2019-11-28 19:20:06 +01:00
9325e5d593 Fix T71990: Apply bone transform results differ in edit/object mode
When negative scaled matrices were used, the roll calculation
didn't match, when calling Armature.transform().
2019-11-29 05:15:18 +11:00
4e42a98edd 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-11-28 18:39:17 +01:00
f445f72eca Tests: Blendfile-loading test class
This new test class minimally sets up Blender so that it can load blend
files and construct a depsgraph without crashing.

Note that it hasn't been tested on very complex blend files, so it may
still crash when the loaded blend file references/requires uninitialised
data structures.

The test will certainly crash with Blend files created with Blender
older than 2.80, as the versioning code requires space types to be
registered. This is normally done by initialising the window manager,
which is not done in this test. The WM requires Python to run, which in
turn requires that Blender finds the release directory in the same
directory that contains the running executable, which is not the case
for GTest tests (they are written to `bin/tests/executablename`.

Reviewed By: sergey, mont29

Differential Revision: https://developer.blender.org/D6246
2019-11-28 17:41:32 +01:00
a8d29ad6e0 Fix T71558: Hair particles: Brush effect not occluded by emitter geometry 2019-11-28 13:41:11 -03:00
8caeae9f40 Fix crash if OptiX context creation fails in Cycles
When encountering an error during context creation, the "OptiXDevice" constructor aborts early.
This means the "cuda_stream" vector is never resized and the destructor iterated over non-existent data.
2019-11-28 17:07:14 +01:00
627a344635 Fix (unreported) broken python resgistrable classes checks logic.
Logic for registering and checking properties of registrable classes was
broken, allowing to ignore some errors.

Recent fix rBeb798de101a `broke` the result of the
pyapi_idprop_datablock test, because previously that test would fail
(i.e. suceed, as it is an 'expected to break test') for a reason it was
not designed to check.

This is the problem with that kind of tests - you cannot really check
that they are failing on the expected reason(s)...
2019-11-28 15:58:28 +01:00
66328c0f4f Console: remove shortcuts from console splash
Menu items can be used to find shortcuts instead of keeping
keymap items here.
2019-11-29 01:42:08 +11:00
47bb3c5d5d EEVEE: RenderLayers
Small change do not draw an unsupported renderpass in the viewport
2019-11-28 15:35:33 +01:00
70a32adfeb Fix assert in Cycles memory statistics when using OptiX on multiple GPUs
The acceleration structure built by OptiX may be different between GPUs, so cannot assume the memory size is the same for all.
This fixes that by moving the memory management for all OptiX acceleration structures into the responsibility of each device (was already the case for BLAS previously, now for TLAS too).
2019-11-28 13:57:02 +01:00
Jens
d4835b88b2 Buildbot: Migrate package archive format for Linux from tar.bz2 to tar.xz
xz compresses 25% better than bz2, reducing download times and server load.
The numbers:

blender-2.80-linux-glibc217-x86_64.tar.bz2 (release): 134 886 174 bytes
with xz:    96 181 604 bytes (-28.7%)
with xz -9: 93 871 548 bytes (-30.4%)

blender-2.81-7c1fbe24ca33-linux-glibc217-x86_64.tar.bz2 (beta): 173 600 363 bytes
with xz:    133 100 664 bytes (-23.3%)
with xz -9: 129 534 124 bytes (-25.4%)

xz also decompresses more than twice as fast as bz2, however compression needs
four times as long (on my 7-year-old laptop 3-4 minutes instead of <1).

Also xz has become more common than bz2, e.g. Debian/Ubuntu deb packages have
been xz-compressed for years, so the dpkg package manager as well as systemd
and grub all depend on liblzma being present, whereas bz2 is becoming more and
more optional.

Current Linux archives also include the UID/GID of whatever user account
happens to be used for building by the blender.org infrastructure. If someone
then installs these archives as root e.g. to /usr/local/... and doesn't pay
full attention the files remain owned by a regular user, which is a serious
security issue. This patch fixes that by setting the UID/GID to 0.

Differential Revision: https://developer.blender.org/D6138
2019-11-28 11:41:25 +01:00
320d8ab155 EEVEE: Viewport Renderpasses
This patch will allow the user to select the EEVEE renderpass to be
shown in the viewport by default the combined pass will be shown.

Limitations:

* Viewport rendering stores the result in a `RenderResult`. RenderResult
  is not aware of the type of data it holds. In many places where RenderResult
  is used it is assumed that it stores a combined pass and the display+view
  transform are applied.

  I will propose to fix this in a future patch. But that is still being
  designed and discussed.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6319
2019-11-28 09:12:28 +01:00
ffcf39e3b5 BMesh: reduce memory usage existing edit-mode
- Don't duplicate the original vertices.
- Free old geometry before allocating the new geometry.
2019-11-28 18:14:08 +11:00
716c089032 Fix separating mesh parts breaking vertex parents & hooks
Follow up on T71865 which only reported the issue for shape keys.
2019-11-28 17:33:53 +11:00
6288dbffb6 NDOF: support panning when orbiting
Also make orbit the default rotation mode.

Based on feedback from T67579, this seems one of the main
pain points users are experiencing.
2019-11-28 15:09:27 +11:00
Lukas Stockner
4659fa5471 Cycles: Scale denoising albedo contribution of Principled BSDFs according to average fresnel
The Principled BSDF uses Microfacet closures that include a fresnel term,
which are a special case since their weight tends to be near white even
if their average contribution is fairly low.

The sample weight is scaled by the average fresnel weight to account for
this, but the denoising albedo still used the unscaled weight.

This was fine for the original denoiser, but apparently OIDN can't handle
the resulting albedo pass well. Therefore, this commit adds the described
scaling to the albedo pass contribution as well.

This problem was described in T69770.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6289
2019-11-27 21:26:47 +01:00
7711231838 Fix T71865: Separating mesh parts breaks shape keys
This was an old bug which could be caused by saving after separating.
Changes from 79b703bb63 made this fail reliably.

Update shape key indices when they may be used again later.
2019-11-28 06:17:14 +11:00
e7502ee0aa Cleanup: bmesh conversion comments 2019-11-28 06:15:54 +11:00
Dalai Felinto
9c4cec2de9 Fix T71000: Statistics don't take collections hidden state into account
Simple fix, to mimic what we had pre-local collections. So this is not
fully representative of the current load of the scene.

I started a more complex route where we literally just count objects
that are visible (taking object type restriction, local collections,
local view, ...). But in the end it is a bit overkill considering that
we have plans to change the statistics.
2019-11-27 15:09:49 -03:00
34902f2008 Fix crash exiting edit-mode with an active basis shape key
Exposed by T71865, while the bug remains this resolves the crash.
2019-11-28 04:22:13 +11:00
945a752902 update closest location on object node 2019-11-27 18:15:48 +01:00
9e3006e507 Clay Brush: Input curves and update defaults
Updated defaults and pressure/size curves for the Clay brush.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6298
2019-11-27 17:33:51 +01:00
47645a8db6 Sculpt: Sample Voxel Size
This adds support to the current sculpt sample detail operator to sample
a voxel size for the voxel remesher when sculpting on regular meshes.

It provides an approximation of a voxel size that is going to preserve
the sampled sculpt details after remeshing. It is not going to be 100%
accurate in all cases as it relies on having consistent edge length in
the whole sculpt, but it saves a lot of time and avoids guessing the
voxel size by trying different values.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6251
2019-11-27 17:24:40 +01:00
9251b07720 Sculpt/Paint: Remove Unified SIZE_PRESSURE and ALPHA_PRESSURE
The relation between the pressure/size and the pressure/alpha is a
fundamental property that defines the behavior of a brush, so it does
not make sense to have it unified across all brushes. This applies both
for sculpting and painting.

Some of the new 2.82 brushes need pressure/size or pressure/alpha to be
enabled to work propely, while others don't. Users should not be
switching on and off this property manually when changing brushes if they
want to use unified size. This is also causing that some users are using
the brushes with an incorrect configuration.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6291
2019-11-27 17:17:46 +01:00
0e4014ef92 Sculpt/Paint: Move Elastic Deform Kelvinlets to BKE
After this commit it should be possible to share the same deformation
formulas that are used in the Elastic Deform brush with other areas of
Blender such as Grease Pencil or proportional editing.

This also removes a lot of code from sculpt.c that is not direclty
related to sculpting.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6281
2019-11-27 17:08:15 +01:00
28a70ff15c new surface location data type 2019-11-27 17:06:58 +01:00
b6d436ae28 Fix T71667: Use the Sculpt Mesh API in the Multires Smooth brush
This removes all multires code from the smooth brush and replaces it
with a new implementation that uses the sculpt mesh API. This makes the
code much easier to understand and maintain.

We could unify all the smooth brushes into a single implementation, but
mesh smoothing has code to deal with open boundaries that I don't want
to remove yet.

Most bugs and artifacts related to access neighbor grids should be fixed
(like T71667). This also fixes performance bugs such as T70689, that were
related to grid stitching after applying the brush.

Reviewed By: jbakker

Maniphest Tasks: T71667

Differential Revision: https://developer.blender.org/D6277
2019-11-27 17:02:02 +01:00
e85ab2cdc2 Fix T71868: Clay Strips brush collapsed geometry
We are now modifying the relation between pressure and radius using
custom functions to improve the brushes, but dyntopo was not prepared
for this. This fix sends the unmodified radius to dyntopo so it modifies
the geometry correctly.

Reviewed By: jbakker

Maniphest Tasks: T71868

Differential Revision: https://developer.blender.org/D6299
2019-11-27 16:55:13 +01:00
c9e7d8030f Fix typo in versiong code 2019-11-27 16:53:43 +01:00
Damien Picard
2ea8c81ac3 Text Object: change spacing now operates on selection
Without this, it's not practical to change spacing on large
blocks of text.
2019-11-28 02:26:57 +11:00
73fa066e8b Cleanup: Remove BIF_gl.h
BIF_gl.h included hacks like redefining glew functions and a constant.
The named constant `GLA_PIXEL_OFS` has been moved to `GPU_viewport.h`

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5860
2019-11-27 16:10:07 +01:00
83d3a7c12d Workbench: Performance
Small performance improvements by caching the world_ubo in the World.
It was detected that NVIDIA driver created threads to update the
world_ubo (304 bytes). This patch will reuse the previous created
ubo when not changed.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6087
2019-11-27 16:08:13 +01:00
98a4a08fce various automated variable renamings 2019-11-27 16:06:55 +01:00
2e6159a494 Curve: CurveMapping Extend Option
Extend options are currently stored per curve. This was not clearly
communicated to the user and they expected this to be a setting per
CurveMapping.

This change will move the option from `Curve` to `CurveMapping`. In
order to support this the API had to be changed.

BPY: CurveMap.evaluate is also moved to CurveMapping.evaluate what
breaks Python API. Cycles has been updated but other add-ons have
not. After release of 2.81 we can merge this to master and adapt
the add-ons.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D6169
2019-11-27 16:05:54 +01:00
6992fc0b3b Add 'EDBM_selectmode_disable_multi' and use in knifeproject
As a followup to rB6f4e595e9ba9 and as per @campbellbarton suggestion,
this adds EDBM_selectmode_disable_multi, similar to
EDBM_mesh_deselect_all_multi & EDBM_mesh_deselect_all, so other similar
uses don't need to be done in a loop.

Also, selected_objects isn't a reliable way to handle this case - since
objects can be in edit-mode & not selected, use
BKE_view_layer_array_from_bases_in_edit_mode_unique_data instead

Differential Revision: https://developer.blender.org/D6317
2019-11-27 15:55:32 +01:00
7959dcd4f6 RenderViewport: Texture Format
When doing viewport rendering the color management happens on the CPU.
This has overhead in downloading a float texture from the gpu and
performing color management on the CPU.

Based on the scene fileformat bit depth the result will be rendered to
a byte texture where the colormanagement happens on the GPU or a float
texture where the colormanagement happens on the CPU.

This is only done during `Viewport Render Animation` in other
cases a float texture is being used.

Baseline (HD render of wanderer.blend workbench engine no samples) 15.688038 s
After changes: 9.412880s

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6195
2019-11-27 15:54:15 +01:00
9d7f65630b EEVEE: GLSL Renderpasses
Most of the renderpasses in EEVEE used post-processing on the CPU. For
final image rendering this is sufficient, but when we want to display
the data to the user we don't want to transfer to the CPU to do post
processing to then upload it back to the GPU to display the result.

This patch moves the renderpass postprocessing to a GLSL shader.

This is the first step to do, before we will enable the renderpasses in the viewport.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6206
2019-11-27 15:50:54 +01:00
ea0b7dc6d1 make multifunction generation work with inlined node trees 2019-11-27 15:47:40 +01:00
a57e050f43 cleanup creation of group input nodes 2019-11-27 15:46:10 +01:00
17b63db4e2 EEVEE: Renderlayer artifacts
When rendering the Subsurface scattering lighting render layer with high
sample count render artifacts can appear. This patch will remove these
render artifacts by using a more precise texture format when samples
will be larger than 128. As with the new eevee-shadows it is more common
to use higher number of samples.

The reason why it was visible in the subsurface scattering is that every
sample could change the color. Adding different values will reduce
precision over the number of samples.

The subsurface color render layer also has this issue, but it is not noticeable as
the colors tend to be close to each other so the colors would
most of the time just shift the precision and hold up better.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6245
2019-11-27 15:40:07 +01:00
f1c994c555 Cleanup: move space text vars into a runtime struct
Also use more descriptive names.
2019-11-28 01:04:21 +11:00
f6cefbef22 Fix T30941: Add cloth air pressure simulation
This adds some basic simulation of internal air pressure inside of
closed cloth mesh objects.

Reviewed By: Jacques Lucke

Differential Revision: http://developer.blender.org/D5473
2019-11-27 15:01:15 +01:00
49c3eb8478 replace virtual with inlined tree 2019-11-27 14:42:15 +01:00
eb798de101 Clean/Fix remaining cases of props assignments in resgistrable structs def.
We still had a few deprecated assignements of `bpy.props.xxx` to class
members in our API documentation and one of our py tests. Annotations
are to be used now.

Also remove the section about `register_module` utils, this has been
removed in 2.8.

Fix T71877: Python API overview sample code warning: class MyMaterialProps contains a property which should be an annotation!
Fix T71876: Python API overview references old bpy.utils.register_module function
2019-11-27 12:19:10 +01:00
3fa2b85bfd 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-11-27 12:01:12 +01:00
50128e8e79 Avoid Brush user count increase when duplicates the Brush
When you create a new Brush, the user count is `2` (caller and fake user). The problem is when you duplicate a Brush, the user count grows to `3` and this is not correct, because is a new brush.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D6310
2019-11-27 11:29:38 +01:00
0281411b48 fix T69772 Collada importer creates wrong fcurves for skeletal animation 2019-11-27 11:18:38 +01:00
1c2f7b022a Cycles: Add Random Per Island attribute.
The Random Per Island attribute is a random float associated with each
connected component (island) of the mesh. It is particularly useful
when artists want to add variations to meshes composed of separate
units. Like tree leaves created using particle systems, wood planks
created using array modifiers, or abstract splines created using AN.

Reviewed By: Sergey Sharybin, Jacques Lucke

Differential Revision: https://developer.blender.org/D6154
2019-11-27 12:07:20 +02:00
fc1a073bcd refactor: collada importer: calculate fcurve index only once when creating an fcurve 2019-11-27 10:50:24 +01:00
529987089d Merge branch 'master' into functions 2019-11-27 10:19:26 +01:00
ceca20b798 color exported dot clusters randomly 2019-11-26 17:52:29 +01:00
02aef365ba add some noinline attributes 2019-11-26 17:26:53 +01:00
0a667c6614 cleanup 2019-11-26 17:12:06 +01:00
cfac0f5914 refactor: extract method 2019-11-26 17:10:46 +01:00
d33d8f5b20 refactor: extract methods 2019-11-26 17:01:39 +01:00
70fe3d8dea extract functions 2019-11-26 16:52:58 +01:00
288b562e46 cleanup 2019-11-26 16:41:31 +01:00
021650c4c0 cleanup 2019-11-26 16:34:28 +01:00
352afcd0b3 use array instead of map 2019-11-26 16:14:34 +01:00
413af94fd2 deduplicate node creation 2019-11-26 16:03:25 +01:00
4ade6cdfc0 initialize ids of xnodes 2019-11-26 15:33:38 +01:00
d148d2a447 free memory of inlined node tree 2019-11-26 15:27:27 +01:00
5d42b6a204 add accessor functions for inlined node tree 2019-11-26 13:30:10 +01:00
97a5f427d0 add clusters to inlined node tree dot export 2019-11-26 13:13:46 +01:00
48f2f3cea6 change cluster usage in dot exporter 2019-11-26 12:57:47 +01:00
abe3c18cf6 Merge branch 'master' into functions 2019-11-26 10:40:54 +01:00
0e1a4f39ac use generic dot export to export function networks 2019-11-24 15:24:46 +01:00
a4cf1eb035 export inlined node tree as dot graph 2019-11-24 14:58:43 +01:00
c0d0aff4da import dot export 2019-11-24 13:56:34 +01:00
8ae3debad0 node shape utility 2019-11-24 13:30:28 +01:00
0fea5c5d59 dot file export 2019-11-24 12:55:58 +01:00
afe4577256 initial InlinedNodeTree structure 2019-11-23 18:04:56 +01:00
1f52afb3fd new Vector.remove_first_occurence_and_reorder method 2019-11-23 17:25:41 +01:00
f63d9357bf new Vector.append_and_get_index function 2019-11-23 14:57:27 +01:00
2780bb1000 Merge branch 'master' into functions 2019-11-23 13:55:40 +01:00
0a7e29739d Merge branch 'master' into functions 2019-11-21 15:55:44 +01:00
89335330fa simplify some code 2019-11-21 15:42:06 +01:00
5c316f0910 remove unused code 2019-11-21 15:12:27 +01:00
47e7a8966e cleanup nodes mapping 2019-11-21 15:10:26 +01:00
d81273eaed cleanup 2019-11-21 14:46:26 +01:00
e36da5e16e cleanup 2019-11-21 14:38:14 +01:00
2335aaf58b improve naming 2019-11-21 14:29:03 +01:00
7f9e7c23e0 improve naming 2019-11-21 14:20:14 +01:00
7de6eb1b49 define multi function to node mapping 2019-11-21 14:08:54 +01:00
3ca095f1eb simplify vsocket to multi function mapping 2019-11-21 13:44:56 +01:00
92130916d5 fix network evaluation 2019-11-21 12:48:13 +01:00
92d4376c8e make VirtualNodeTree specific to one bNodeTree 2019-11-20 18:20:16 +01:00
00b4b90361 new try_lookup method for StringMap 2019-11-20 18:11:12 +01:00
6d71136e4a new vnode to multifunction mapping 2019-11-20 17:37:28 +01:00
2c83e550c4 change the node mapping a bit 2019-11-20 17:08:47 +01:00
0cf8799ef7 more utility functions 2019-11-19 14:34:03 +01:00
046204e7b2 extract preprocessed vtree data from builder 2019-11-19 13:38:25 +01:00
3d16a8193f improved debug error checking 2019-11-19 10:49:34 +01:00
1aef4b1298 cleanup parameter checks 2019-11-19 10:17:33 +01:00
ca19757aec refactor MFParamType 2019-11-17 12:10:48 +01:00
e81dbbaa2e add missing static keywords 2019-11-15 16:09:50 +01:00
2d4f8209a7 optimize Get Nearest Point when the object is the same for every element 2019-11-15 16:03:54 +01:00
3ecb692b43 fix task scheduling 2019-11-15 16:03:19 +01:00
ca1de7fe4c use more global external data cache 2019-11-15 15:30:12 +01:00
be57a27d6d fix Map Range clamping 2019-11-15 15:28:49 +01:00
459b54b45c remove unused code 2019-11-15 15:06:36 +01:00
9843ca071c prevent recursive node groups 2019-11-14 16:31:24 +01:00
5e72329889 make group defaults work 2019-11-14 15:39:00 +01:00
2423f1c531 add Random Float node 2019-11-14 15:20:07 +01:00
44320e9e08 remove unnecessarily complex code 2019-11-14 14:43:16 +01:00
057ec4bc97 remove unused nodes 2019-11-14 13:40:10 +01:00
4e61bfbb15 initial working function groups 2019-11-14 13:38:39 +01:00
758a751fb2 new group nodes 2019-11-13 15:29:00 +01:00
7398acb56d initial group input node 2019-11-13 14:55:42 +01:00
16f7804d5f bring back Clamp and Map Range nodes 2019-11-13 14:23:21 +01:00
ccfe2a2db1 initial Closest Point on Object node 2019-11-13 13:48:03 +01:00
03d7ba7055 Make Particle Info node a normal function 2019-11-13 12:40:12 +01:00
3235d6cd41 pass MFContext directly 2019-11-13 12:02:16 +01:00
4dfc1e9026 pass MFParams directly 2019-11-13 11:53:28 +01:00
ce59ef0ea9 pass MFMask directly 2019-11-13 11:29:31 +01:00
d5e9fa61d9 testing another way to use multi function contexts 2019-11-12 15:53:00 +01:00
112ffb49d1 fix default node tree 2019-11-12 14:26:21 +01:00
1ac1081953 remove other forces, they should be build using Particle functions 2019-11-12 14:16:36 +01:00
54b40587e4 output vector from Perlin Noise node 2019-11-12 14:15:59 +01:00
ad96830a4b support mapping input vsockets to multiple new sockets 2019-11-12 14:15:08 +01:00
1d69abe558 new Custom Force and Perlin Noise node 2019-11-12 11:00:19 +01:00
a924c1a401 Merge branch 'master' into functions 2019-11-12 10:08:57 +01:00
bb15b89375 Merge branch 'functions' into functions-experimental-refactor 2019-11-08 20:46:56 +01:00
ef2b03e317 Merge branch 'master' into functions 2019-11-08 20:46:43 +01:00
b6027a2f15 fix Is In Group input 2019-11-08 20:34:01 +01:00
a74a2882ed bring back compare node 2019-11-08 20:33:44 +01:00
3a3970c2e0 change uint8_t to bool 2019-11-08 19:50:23 +01:00
a708562177 move attribute defaults back into AttributesInfo 2019-11-08 19:48:04 +01:00
b9d42020be make function name more precise 2019-11-08 19:19:54 +01:00
fea9c7c1a3 cleanup 2019-11-08 19:15:21 +01:00
9cc27bd6ff remove a node 2019-11-08 18:49:49 +01:00
5f8bd0fa71 make switch node work again 2019-11-08 18:21:26 +01:00
de3d75110c bring back object mesh info node 2019-11-08 17:50:19 +01:00
2bae4dd503 remove some nodes for now 2019-11-08 17:33:29 +01:00
8e1ced7596 bring back color nodes 2019-11-08 17:32:20 +01:00
d47962f7a9 boolean math nodes 2019-11-08 17:11:29 +01:00
366a427f04 more vector math 2019-11-08 16:56:06 +01:00
fa7c300edc more vector math 2019-11-08 16:27:58 +01:00
e390a51cc7 bring back some vector math nodes 2019-11-08 16:12:43 +01:00
470a2ce330 fix compile error 2019-11-07 15:17:44 +01:00
4e0b5fd215 cleanup 2019-11-07 14:03:46 +01:00
eada832040 make AttributesInfo non copy and non movable 2019-11-07 13:59:47 +01:00
9116016f93 rename GET_TYPE to CPP_TYPE 2019-11-07 13:48:30 +01:00
bef3e0022c use monotonic allocator for network builder 2019-11-07 13:38:51 +01:00
a4a46d8a97 use monotonic allocator for vtree generation 2019-11-07 13:21:39 +01:00
1fb8e34c9c rename functions2 to functions 2019-11-07 11:57:35 +01:00
ae862db1f4 remove old function system 2019-11-07 11:54:00 +01:00
7884ae9bc3 port particle system to new functions system 2019-11-07 11:44:08 +01:00
856049d771 merge bparticles node tree into functions node tree 2019-11-06 16:08:20 +01:00
cccaca258b simplify naming 2019-11-06 13:05:26 +01:00
6e135618be use monotonic allocator to allocate functions 2019-11-05 15:54:44 +01:00
06e398f427 rename OwnedResources to ResourceCollector 2019-11-05 15:40:03 +01:00
2ae8040373 improve aligned allocation in monotonic allocator 2019-11-05 15:32:53 +01:00
7317074eb3 bring back some more math operations 2019-11-05 14:36:45 +01:00
ab2625529c bring back more math nodes 2019-11-05 14:17:35 +01:00
a35f5ff3c8 improve add/mul/min/max math nodes 2019-11-05 13:47:57 +01:00
3a4d9fa228 remove unused code 2019-11-05 11:56:37 +01:00
720edd0c30 cleanup 2019-11-05 11:53:24 +01:00
e0554f7f31 access time from node tree 2019-11-05 11:48:29 +01:00
55ecd940ac initial more generic context handling 2019-11-05 11:19:57 +01:00
07ac997f1c make Float Range node work again 2019-11-04 23:17:01 +01:00
09862e2b2f assert earlier when nodes were not inserted correctly 2019-11-04 23:16:46 +01:00
62cd4cca56 Merge branch 'functions' into functions-experimental-refactor 2019-11-04 22:09:23 +01:00
a63b896055 Merge branch 'master' into functions 2019-11-04 22:09:06 +01:00
f52e43554f simplify interface for generating functions from node trees 2019-11-03 16:32:23 +01:00
b1bee3ffc5 update Function Points modifier to use new system 2019-11-03 16:06:25 +01:00
d5bcdeef9f rename pack list socket declaration to something more generic 2019-11-03 15:31:30 +01:00
9fdef6ae5b attributes block container compression and utilities 2019-11-03 15:09:21 +01:00
5e20def930 cleanup function allocation 2019-11-03 14:30:45 +01:00
1a90ef6e58 cleanup builder 2019-11-03 14:19:05 +01:00
f1dfadb3cb initial MFContext usage 2019-11-03 14:12:34 +01:00
fa18a28277 move multi function context to separate file 2019-11-03 13:55:49 +01:00
30a1a0bf58 separate some files 2019-11-03 13:44:31 +01:00
146f6a827b add utility to destruct and reorder attribute arrays 2019-11-03 13:08:35 +01:00
da0169bca4 simplify CPPType construction 2019-11-03 12:08:34 +01:00
dafbb5daf7 properly align inline storage in vector and map 2019-11-03 11:37:10 +01:00
5a6da2c1b1 update attribute blocks 2019-11-02 21:31:56 +01:00
45fd15f824 initial attributes block container in functions2 2019-11-02 20:48:35 +01:00
61609e90d5 initial AttributesRef in functions2 2019-11-02 20:19:49 +01:00
8523b03473 cleanup 2019-11-02 19:22:05 +01:00
4a0b22d449 cleanup 2019-11-02 19:12:46 +01:00
2c8ad4ef0b cleanup 2019-11-02 19:07:37 +01:00
4b1532b064 move file 2019-11-02 18:53:29 +01:00
74e7816a22 move node inserters to separate file 2019-11-02 13:45:22 +01:00
8ed320be86 fix memory leak 2019-11-02 13:29:06 +01:00
ed727f3c0f refactor mapping from vtree to multi functions 2019-11-02 13:26:02 +01:00
100ff71944 New VirtualNodeTree implementation 2019-11-02 12:34:39 +01:00
ef636af49e move network generation to separate file 2019-11-01 20:31:13 +01:00
fcfa225e5d move multi function network evaluation to functions2 2019-11-01 20:14:01 +01:00
e778aba584 move VTreeMFNetworkBuilder to functions2 2019-11-01 20:02:51 +01:00
ed47df29e3 move VTreeMFNetwork to functions2 2019-11-01 19:56:11 +01:00
f91bd73986 remove code from blenkernel (now lives in functions2) 2019-11-01 19:51:34 +01:00
11808ee3c2 update functiondeform modifier to using functions2 2019-11-01 19:46:54 +01:00
e9fd7c335f move tuple to functions2 2019-11-01 19:37:25 +01:00
617d8ab8dc move multi function network to functions2 2019-11-01 19:32:52 +01:00
2b805f0ae8 move multi functions to functions2 2019-11-01 19:30:31 +01:00
72eb10b467 copy generic data structures to functions2 2019-11-01 19:11:53 +01:00
324537287f initial functions2 folder 2019-11-01 19:05:09 +01:00
6379f1d035 improve performance when iterating over mask indices 2019-11-01 14:37:58 +01:00
f354aebc6f cleanup name access 2019-11-01 14:35:44 +01:00
ae8332f7c6 introduce MFMask 2019-11-01 14:17:09 +01:00
3ba1c11f3b fix memory leak 2019-10-31 15:01:53 +01:00
5b60e21f1b make text socket work again 2019-10-31 14:57:40 +01:00
badad91ac3 make Object socket work again 2019-10-31 14:39:16 +01:00
92e04dcd15 rename placeholder to dummy 2019-10-31 14:15:27 +01:00
d218811e85 access function and parameter names 2019-10-31 14:11:11 +01:00
db0ee0fe36 further improve MultiFunction API 2019-10-31 13:51:05 +01:00
e09e429f57 cleanup MultiFunction API 2019-10-31 13:43:44 +01:00
cdd69f8e6d dot export 2019-10-31 13:32:53 +01:00
53d345a897 add missing implicit conversions 2019-10-31 13:15:33 +01:00
b7c516a121 add more primitive conversions 2019-10-31 12:55:23 +01:00
16150b75ac cleanup network generation code 2019-10-31 12:27:35 +01:00
5816f75544 initial automatic node vectorization 2019-10-31 11:44:01 +01:00
0ceef31d99 support for full pointer array in virtual list 2019-10-31 10:59:46 +01:00
568315b0b8 make Get List Element node work again 2019-10-30 16:39:33 +01:00
3baf1f7ffa remove unused code 2019-10-30 16:31:23 +01:00
be738fa181 make Pack List node work again 2019-10-30 16:27:53 +01:00
cdeb4ecf8e make some list nodes work again 2019-10-30 15:32:33 +01:00
98577ce2b2 initial non recursive multi-function evaluator 2019-10-30 14:01:00 +01:00
aec147ec74 new ArrayRef.first_index method 2019-10-29 16:52:38 +01:00
cdb7f3c192 change GenericVectorArray 2019-10-29 16:31:36 +01:00
269488d1c3 use virtual list list ref in multi functions 2019-10-29 15:46:25 +01:00
c6ebe25337 initial VirtualListListRef 2019-10-29 15:00:47 +01:00
353af1c51a Support for implicit conversions, float math node and int type 2019-10-29 13:32:22 +01:00
e1ca6c4129 Merge branch 'functions' into functions-experimental-refactor 2019-10-29 11:21:58 +01:00
cacbe466b2 Merge branch 'master' into functions 2019-10-29 11:15:49 +01:00
7bef9b83fb initial MultiFunction generation from node tree 2019-10-22 13:54:55 +02:00
dfa3ed8761 insert links function 2019-10-22 13:04:54 +02:00
73a709844b make VirtualNodeTree const in many places 2019-10-22 12:51:46 +02:00
bc8d442717 initial new node inserters 2019-10-22 11:47:29 +02:00
4adbf49d83 improve ArrayRef 2019-10-22 11:47:00 +02:00
59df914983 replace ArrayOrSingleRef with VirtualListRef 2019-10-20 15:55:33 +02:00
b04aed8db6 experimental VirtualListRef 2019-10-20 15:11:52 +02:00
fc1ca9a2e2 fixes 2019-10-20 14:53:17 +02:00
f6f4f2914c utility functions 2019-10-20 14:27:54 +02:00
4d61b8b1f9 initial VTreeMFNetwork and VTreeMFNetworkBuilder 2019-10-20 13:29:38 +02:00
31ecaf4a8a make MultiFunction const in more places 2019-10-18 17:49:12 +02:00
ff29177a4c make CPPType const everywhere 2019-10-18 17:47:02 +02:00
84baab05b2 remove unused code 2019-10-18 17:46:51 +02:00
838ac481f2 cleanup 2019-10-18 17:40:18 +02:00
5151d05625 cleanup 2019-10-18 17:37:33 +02:00
53d3d32992 use MF prefix in more places 2019-10-18 17:31:22 +02:00
9dbe43f044 start using MF prefix for some classes 2019-10-18 17:23:35 +02:00
36310012ff allow passing destruct_ptr to OwnedResources 2019-10-18 17:08:55 +02:00
2f6ea75758 move destruct_ptr to BLI 2019-10-18 16:46:15 +02:00
d0dd083cbb multi function with constant output 2019-10-18 15:08:20 +02:00
416d6a17dc first created and executed multi function graph 2019-10-17 17:53:04 +02:00
59dc9f1f1a implement initial conversion from builder to network 2019-10-17 16:35:09 +02:00
c2aea94511 give nodes and sockets ids 2019-10-17 15:21:10 +02:00
94d06d7094 initial network structure 2019-10-17 15:08:00 +02:00
2f02949798 initial multi function network builder 2019-10-17 14:19:21 +02:00
0d4a90000d Merge branch 'functions' into functions-experimental-refactor 2019-10-17 10:49:29 +02:00
b660768ae0 Merge branch 'master' into functions 2019-10-17 10:49:00 +02:00
586a9c14ad pass context into multi functions 2019-10-16 13:05:57 +02:00
376f4813dd experiment with an interface to specify external data dependencies 2019-10-16 12:57:21 +02:00
b08bcb1ef4 remove unused code 2019-10-16 12:37:30 +02:00
c1d570ebb1 separate concept of data types from parameter types 2019-10-16 12:19:38 +02:00
76655021c2 remove unused code 2019-10-16 12:19:22 +02:00
2b781131ed experimental AnyAllocator 2019-10-16 11:39:27 +02:00
4d08c352c3 cleanup 2019-10-16 11:39:16 +02:00
f4455b442c separate vector function 2019-10-15 15:52:53 +02:00
34a66dea4e Combine Vector multi function 2019-10-15 15:32:06 +02:00
9952cbc715 initial multi function node tree evaluation 2019-10-15 15:12:48 +02:00
0cc550108a new add vectors multi function 2019-10-15 12:32:05 +02:00
2c06ccec82 initial params builder 2019-10-15 12:05:43 +02:00
56ab056637 test function call 2019-10-13 22:04:01 +02:00
78aa2d5f02 further implement signature builder 2019-10-13 18:32:47 +02:00
a9a8741270 further develop Signature 2019-10-13 18:32:47 +02:00
f0b62c43ef start implementing Params 2019-10-13 18:32:47 +02:00
a1308c1f98 init stuff 2019-10-13 18:32:47 +02:00
42894aa3df don't use old function system for function deform modifier 2019-10-13 18:32:47 +02:00
8a3ce65044 fix 2019-10-13 18:32:47 +02:00
630d32b159 new socket type mapping 2019-10-13 18:32:47 +02:00
7588b4e493 separate declaration and implementation 2019-10-13 18:32:47 +02:00
745c6dec4d move functions to other file 2019-10-13 18:32:47 +02:00
59b077c020 fix test 2019-10-13 18:32:47 +02:00
cad83fee9f move multi function to separate header 2019-10-13 18:32:47 +02:00
9cd357768d fix 2019-10-13 18:32:47 +02:00
029e63093d fix 2019-10-13 18:32:47 +02:00
f84f8b2a02 combine lists 2019-10-13 18:32:47 +02:00
c696a29058 list lengths 2019-10-13 18:32:47 +02:00
2ef5959f8a GenericVectorArrayOrSingleRef 2019-10-13 18:32:47 +02:00
b38ee6daab generic array or single ref 2019-10-13 18:32:47 +02:00
b4130c3d2a more generic vector array functionality 2019-10-13 18:32:47 +02:00
1ee3c53ed2 prototyping vector array usage 2019-10-13 18:32:47 +02:00
c365ec7c61 initial GenericVectorArray 2019-10-13 18:32:47 +02:00
2efdb20b0b use allocator in MonotonicAllocator and use minimum allocation size 2019-10-13 18:32:47 +02:00
0627a6b2d5 cleanup 2019-10-13 18:32:47 +02:00
375a600b8b initial ArrayOrSingleRef implementation 2019-10-13 18:32:47 +02:00
909dc85f2f node functions 2019-10-13 18:32:47 +02:00
2892434cdf improve naming 2019-10-13 18:32:47 +02:00
5ab8cc2eaf add generic mutable array ref 2019-10-13 18:32:47 +02:00
2cfb80f68c cleanup 2019-10-13 18:32:47 +02:00
ffad150868 rename 2019-10-13 18:32:47 +02:00
cfaa0e566a rename TypeCPP to CPPType 2019-10-13 18:32:47 +02:00
326878d82c initial new function type 2019-10-13 18:32:47 +02:00
bdfc3e9a6b GenericArrayRef type 2019-10-13 18:32:47 +02:00
b75cdf36a8 new tuple implementation 2019-10-13 18:32:47 +02:00
55d0c80611 add more type attributes 2019-10-13 18:32:47 +02:00
302e1e9a86 initial cpp type 2019-10-13 18:32:47 +02:00
faf2184f52 Merge branch 'master' into functions 2019-10-13 18:12:07 +02:00
65e6598e7e avoid ambiguous call to make_unique 2019-09-27 16:59:04 +02:00
503fadaeb9 cleanup Tuple class 2019-09-27 15:40:40 +02:00
37bc9ffc53 remove using namespace BLI 2019-09-27 15:27:33 +02:00
123d945027 function is noncopyable and nonmovable 2019-09-27 15:17:53 +02:00
254b69417b remove refcounter from Function class 2019-09-27 15:15:10 +02:00
0102c06cb2 remove Falloff implementation
The plan is to achieve the same functionality in a different way
that allows more customization.
2019-09-27 14:14:39 +02:00
4086bf9823 make particle colors work again
This broke in rBa168c3d282083bb4.
2019-09-27 12:35:02 +02:00
d724444dba remove some debug prints 2019-09-27 12:33:26 +02:00
033924c630 Merge branch 'master' into functions 2019-09-27 10:58:21 +02:00
ab9a01313f add resources to data graph instead of function 2019-09-26 18:15:55 +02:00
ea6db832a0 utility to print resource names 2019-09-26 18:07:59 +02:00
2263656526 add resource via VTreeDataGraphBuilder 2019-09-26 17:57:02 +02:00
d31da8e870 data graph can own arbitrary resources now 2019-09-26 17:42:52 +02:00
727a8da77f make Function class a bit smaller 2019-09-26 17:35:59 +02:00
3bca19b38a separate owned resources container from function 2019-09-26 17:23:16 +02:00
387a97ae42 experimental lazy init for unique pointers 2019-09-26 16:46:52 +02:00
b65a28b9d7 use make_unique in some places 2019-09-26 16:18:53 +02:00
f2b2279c1a Remove owns_mem attribute from Tuple 2019-09-26 15:41:19 +02:00
cdcae9d22e remove run_destructors member from Tuple 2019-09-26 15:21:17 +02:00
5b0d883e50 remove refcount from TupleMeta 2019-09-26 15:02:07 +02:00
be2358fe61 remove refcounter from data graph 2019-09-26 14:35:42 +02:00
802c820334 improved static and dynamic type checking for function bodies 2019-09-26 14:05:16 +02:00
abed72f22c store tuple as resource in function 2019-09-26 13:49:11 +02:00
74fba99cc6 initial resource storage for functions 2019-09-26 13:35:06 +02:00
5460fa6efc store StringRef directly in function
That increases the size slightly, but is easier to debug
2019-09-26 12:46:51 +02:00
353d6112d2 use header guards 2019-09-26 12:06:20 +02:00
d942d6daa7 rename file 2019-09-26 12:03:29 +02:00
7ba7667d8e reduce error handling complexity 2019-09-26 11:04:27 +02:00
b34c174dfb Merge branch 'master' into functions 2019-09-26 10:43:33 +02:00
c3d30f2992 cleanup 2019-09-26 10:43:14 +02:00
6cdc6ce355 Merge branch 'master' into functions 2019-09-25 16:02:22 +02:00
d4e58e630c Replace Falloff with weight input 2019-09-23 12:08:36 +02:00
31a3dc769d start using monotonic allocator when parsing bparticles tree 2019-09-23 11:42:04 +02:00
89db5e8946 Merge branch 'master' into functions 2019-09-23 11:01:22 +02:00
e64fa963de initial particle group implementation 2019-09-22 15:05:45 +02:00
e0b82c6616 access influences collector from action parsers 2019-09-22 14:37:20 +02:00
5c733ab445 move responsibility of registering attributes to node frontend 2019-09-22 14:14:03 +02:00
fcd6a9ddcb allow only one collision per time step 2019-09-22 13:54:48 +02:00
93c0fdcd45 pass simulation state to interfaces 2019-09-22 13:54:30 +02:00
5eecfaf824 better distinction between particle simulation and system 2019-09-22 12:59:13 +02:00
63116f2c8c improved handling of moving colliders 2019-09-22 12:44:07 +02:00
ad8733038e Merge branch 'master' into functions 2019-09-22 12:01:54 +02:00
e397b67946 cleanup 2019-09-20 16:37:41 +02:00
97da5f31d4 move responsibility to ensure that attributes exist out of simulator 2019-09-20 16:32:59 +02:00
9c46c784d5 move attributes declaration out of simulate code 2019-09-20 16:21:02 +02:00
cdfb3d3a28 move responsibility of keeping track of particle ids 2019-09-20 16:09:01 +02:00
8d860d4a9b use shared particle allocator instead of one per thread 2019-09-20 16:00:26 +02:00
f1a7d102dc don't access particles state through allocator 2019-09-20 15:09:45 +02:00
cab2f0f6bd declare more attributes in same place 2019-09-20 15:04:00 +02:00
cb974c4c66 Merge branch 'master' into functions 2019-09-20 14:38:43 +02:00
691f2d449a Merge branch 'master' into functions 2019-09-19 10:34:45 +02:00
d2bd35eab4 fix usage of frame nodes 2019-09-19 10:34:13 +02:00
21889a5475 fix crash with negative emitter rate 2019-09-19 10:30:24 +02:00
c3e289440d Merge branch 'master' into functions 2019-09-18 17:42:59 +02:00
16d5919206 copy color to new particles in trails node 2019-09-17 15:27:24 +02:00
5b1d7afb9c new particle randomness input 2019-09-17 15:04:23 +02:00
df47dd16ce reorder menu entries 2019-09-17 14:02:27 +02:00
561450715b add missing nodes to menu 2019-09-17 13:49:38 +02:00
4d4eeedfa0 rename file 2019-09-17 13:49:24 +02:00
9fecdb3a45 use reference to indicate that action cannot be null 2019-09-17 12:43:59 +02:00
872ee8bbe0 add some node mockups 2019-09-17 12:32:44 +02:00
8d285ee398 Merge branch 'master' into functions 2019-09-17 09:56:59 +02:00
e6ef82180f add execute input to point emitter 2019-09-16 17:00:37 +02:00
d51f6b010d add execute input to initial grid emitter 2019-09-16 16:56:00 +02:00
afada870e7 rename to Influences 2019-09-16 16:43:21 +02:00
8a3348d49b make it easier to add a new particle system 2019-09-16 16:40:57 +02:00
b5d2265b60 remove unused functions 2019-09-16 11:57:59 +02:00
7e3e301bb1 more centralized ownership of actions 2019-09-16 11:39:43 +02:00
a3080c2bc3 don't crash when connecting certain sockets 2019-09-16 11:15:23 +02:00
609147a4d9 improve error handling of various nodes 2019-09-16 11:04:25 +02:00
6384a61a99 Add arrow and star operator to BLI::Optional 2019-09-16 11:04:05 +02:00
4a9bfa95ed centralize function evaluation a bit more 2019-09-16 10:51:08 +02:00
881b5377cf change ownership of name vectors 2019-09-16 10:41:37 +02:00
a5e1f95467 move system discovery to vtreedata 2019-09-16 10:33:13 +02:00
f54bf13cc1 missing file in cmakelists 2019-09-16 10:26:49 +02:00
f45badafd5 Merge branch 'master' into functions 2019-09-16 10:10:22 +02:00
5f5a7fcd62 fixes after merge 2019-09-15 12:46:14 +02:00
35de65ec81 Merge branch 'master' into functions 2019-09-15 12:42:24 +02:00
0d81bf5cb0 fixes after merge 2019-09-14 12:48:25 +02:00
345b86ca4e Merge branch 'master' into functions 2019-09-14 12:44:31 +02:00
4de668c30c Merge branch 'master' into functions 2019-09-14 12:41:02 +02:00
214964b2a0 Merge branch 'master' into functions 2019-09-13 17:08:02 +02:00
f21586cfa1 fix after rename 2019-09-13 16:32:28 +02:00
5b9ee5a55e use NamedTupleRef in more places 2019-09-13 15:47:35 +02:00
c5c05aa40b improve NameTupleRef abstraction 2019-09-13 14:55:48 +02:00
71184d2bc8 fix overflow in color conversion 2019-09-13 14:24:47 +02:00
e26301b30a Rename Particle Type to Particle System and Behaviors to Influences 2019-09-13 14:09:32 +02:00
2232300639 Merge branch 'master' into functions 2019-09-13 12:28:43 +02:00
a86dda2a80 fix cmake after merge 2019-09-13 12:27:35 +02:00
ef7f059216 Merge branch 'master' into functions 2019-09-13 12:16:59 +02:00
3c4d8b1f59 rename BLI_hash.hpp to BLI_hash_cxx.h 2019-09-12 17:13:10 +02:00
d24380dd43 remove unused function 2019-09-12 16:31:02 +02:00
3cdc35dfc4 test OutputTupleRef abstraction 2019-09-12 16:29:40 +02:00
9e9e150b74 size parameter in turbulence force node 2019-09-12 15:55:47 +02:00
592470b07b simplify code by changing ownership of particle functions 2019-09-12 15:45:55 +02:00
971ad95f2b solve merge conflicts 2019-09-12 14:59:16 +02:00
cabc40db81 Merge branch 'master' into functions 2019-09-12 14:49:38 +02:00
e23abea88d add license header to memory utils 2019-09-12 12:49:18 +02:00
7b4a2d578f rename BLI_memory.h to BLI_memory_utils_cxx.h 2019-09-12 12:48:36 +02:00
e7aa06520a change .cpp to .cc in blenlib 2019-09-12 12:45:55 +02:00
2e21ec0d88 change .hpp to .h in blenlib 2019-09-12 12:41:14 +02:00
54350b7db2 change .hpp to .h 2019-09-12 12:23:42 +02:00
590b231124 reflow comment 2019-09-12 12:21:40 +02:00
7825047f47 Merge branch 'master' into functions 2019-09-12 10:09:01 +02:00
1f957995f6 Fix birth moments of emitted particles 2019-09-11 17:59:45 +02:00
1b9cc8bfb1 Merge branch 'master' into functions 2019-09-11 17:46:43 +02:00
09ffcc5de1 initial Always Execute node 2019-09-11 17:24:47 +02:00
23de6e6960 new Falloff input for Turbulence Force 2019-09-11 16:05:51 +02:00
f082115395 Merge branch 'master' into functions 2019-09-11 15:17:11 +02:00
0f47a7d0d7 use Array instead of Vector 2019-09-11 13:29:17 +02:00
8d31f929db fix Array and add tests 2019-09-11 13:28:40 +02:00
a988a16e3d new Change Particle Position node 2019-09-11 11:36:52 +02:00
5743c0eab6 new Custom Event node 2019-09-11 11:24:45 +02:00
3f28239efe move events ui to same file 2019-09-11 10:55:37 +02:00
ef8775b676 allocate VTreeDataGraph on heap 2019-09-11 10:41:47 +02:00
880c5a4360 store size of vector in debug builds to ease debugging 2019-09-11 10:18:34 +02:00
cd48588cf6 Merge branch 'master' into functions 2019-09-11 09:50:12 +02:00
972760397f fix keymap registration 2019-09-10 17:41:32 +02:00
8024da670c testing initial bit array ref implementation 2019-09-10 17:02:23 +02:00
72a05f9f4f remove unnecessary inline keywords 2019-09-10 16:14:48 +02:00
29c7232f4f comments 2019-09-10 16:11:18 +02:00
bfdf90e68c quiet warning 2019-09-10 16:05:38 +02:00
ff3f7c5291 invert Mesh Distance Falloff 2019-09-10 15:59:20 +02:00
a9112c4932 do not register keymap in background mode 2019-09-10 15:46:53 +02:00
b928050af3 initial Mesh Distance Falloff node 2019-09-10 15:44:58 +02:00
01e97d117f initial experimental Mesh Force node 2019-09-10 14:23:52 +02:00
2c0397edfb Merge branch 'master' into functions 2019-09-10 13:26:17 +02:00
a911775cbe store attributes info directly instead of unique pointer 2019-09-10 13:02:12 +02:00
c339917d7f don't store attributes info ref directly in block 2019-09-10 12:56:54 +02:00
1b3ee092db move attributes block container stuff to same file again 2019-09-10 12:39:18 +02:00
b22dc19ce7 new Dot Production operation in vector math node 2019-09-10 12:18:58 +02:00
844c2c8a79 new Project operation in vector math node 2019-09-10 12:10:40 +02:00
147863ac7c Improve copy and move constructor of Vector 2019-09-10 11:54:03 +02:00
dcd84a1051 remove limit for index range arrays 2019-09-09 17:58:43 +02:00
cfb50f6581 implement multiple density modes in Mesh Emitter node 2019-09-09 17:22:54 +02:00
cdc432429f Falloff input in Drag Force node 2019-09-09 16:23:38 +02:00
5d319ba8ff new Drag Force node 2019-09-09 16:17:32 +02:00
706bd95ae8 Merge branch 'master' into functions 2019-09-09 15:45:19 +02:00
40e9cf9df8 initial new attributes block storage 2019-09-09 15:43:23 +02:00
c541e31931 cleanup some nonmovable and noncopyable functions 2019-09-09 12:17:28 +02:00
b2a449e783 test if it builds on buildbot without alembic tests 2019-09-09 11:51:35 +02:00
11d61f3d00 test moving functions to bf_functions 2019-09-09 11:41:07 +02:00
dc02a49fb7 test adding a virtual destructor to solve a linker issue 2019-09-09 11:33:54 +02:00
63133ee688 Merge branch 'master' into functions 2019-09-09 10:55:21 +02:00
da598e31eb support for outputting None/Points/Tetrahedons 2019-09-06 17:44:25 +02:00
e876360aaa Merge branch 'master' into functions 2019-09-06 17:07:59 +02:00
aa5ea9f0fe New UInt32 attribute type 2019-09-06 16:51:32 +02:00
5045219ca9 separate BParticles Output modifier 2019-09-06 16:34:21 +02:00
d30979dddb new Constant Falloff node 2019-09-06 15:51:03 +02:00
57ceacf8b4 move falloff implementations out of header 2019-09-06 15:42:54 +02:00
12663d2e21 cleanup boolean math 2019-09-06 15:34:03 +02:00
0b8514a99c fix memory leak 2019-09-06 15:32:04 +02:00
264719c0b4 simplify string type 2019-09-06 14:50:13 +02:00
213d807a08 deduplicate some code 2019-09-06 14:14:33 +02:00
524df333bc use correct wrapper for Object pointers 2019-09-06 12:49:42 +02:00
3d85989efa rename 2019-09-06 12:26:36 +02:00
199d201cce rename 2019-09-06 12:21:32 +02:00
f45791f436 remove unused class 2019-09-06 12:18:53 +02:00
a22b7177d2 improve llvm type info for shared immutable types 2019-09-06 12:17:16 +02:00
9ba1fce608 use specialized llvm type info for pointer references 2019-09-06 11:37:25 +02:00
4e2ee7e962 remove unused code 2019-09-06 11:27:58 +02:00
d0eafffed4 Initial Falloff implementation 2019-09-06 11:21:53 +02:00
6163ce3dee Merge branch 'master' into functions 2019-09-06 09:21:28 +02:00
02cdf856f6 fix attribute initialization 2019-09-05 19:07:08 +02:00
d226d46144 Merge branch 'master' into functions 2019-09-05 18:30:52 +02:00
58997f47af initial passive modifier mode
This allows creating separate meshes for the different particle types.
2019-09-05 18:30:36 +02:00
66c07705f9 Initial Size Over Time node 2019-09-05 16:58:35 +02:00
bc654dd3dd support for choosing uv layer by name 2019-09-05 16:21:32 +02:00
882e7e4903 cleanup usage of temporary allocator 2019-09-05 15:17:43 +02:00
f541e79196 add comments 2019-09-05 14:27:02 +02:00
942cf217c5 add some comments 2019-09-05 14:18:48 +02:00
02f4bf505a more comments 2019-09-05 12:53:58 +02:00
b39ddcd628 add some comments 2019-09-05 12:43:53 +02:00
5420375d4a return StringRef from virtual node/socket 2019-09-05 12:36:45 +02:00
f59ea9a10f support not-equal operator for StringRef 2019-09-05 12:35:27 +02:00
242e027dea cleanup Vector Adaptor 2019-09-05 12:27:13 +02:00
ded8e6f0af rename test files 2019-09-05 12:17:47 +02:00
d6ac3fd2f2 rename file 2019-09-05 12:14:57 +02:00
a61852a5e2 store size in IndexRange 2019-09-05 12:12:08 +02:00
1ed83f1004 use another constructor for IndexRange 2019-09-05 11:51:54 +02:00
d22cf2fd77 replace generic Range with IndexRange 2019-09-05 11:46:55 +02:00
3a17600bed move ChunkedRange to separate file 2019-09-05 11:30:48 +02:00
3939274a46 cleanup names 2019-09-05 11:20:22 +02:00
964ee85777 access surface color from chained action context 2019-09-05 11:15:40 +02:00
f58f26a35d cleanup vertex weight input provider 2019-09-05 11:00:50 +02:00
fd8244fb26 new Combine Behaviors node 2019-09-05 10:38:03 +02:00
a6d08dfccb Merge branch 'master' into functions 2019-09-05 10:05:08 +02:00
b14e8f35f7 vertices should have a unit length normal 2019-09-04 18:05:06 +02:00
1c8f6d8807 cleanup 2019-09-04 16:27:13 +02:00
5f91002b51 better time sampling in mesh emitter 2019-09-04 16:27:13 +02:00
0e528d5361 improve spacing of trail particles 2019-09-04 16:27:13 +02:00
30185113fd take triangle areas into account 2019-09-04 16:27:13 +02:00
f0c354c97a refactor triangle weight computation 2019-09-04 16:27:13 +02:00
6e828316b3 compute barycentric weights more centrally 2019-09-04 16:27:13 +02:00
d979cd2690 use Surface Info node instead of Collision Info 2019-09-04 16:27:13 +02:00
c665ef49ad store surface velocities in surface context 2019-09-04 16:27:13 +02:00
c718c9e6c5 refactor usage of MeshSurfaceContext 2019-09-04 16:27:13 +02:00
1b1292b7b1 assert that the number of temporary buffers does not grow unbounded 2019-09-04 16:27:13 +02:00
560b55c4c8 cleanup 2019-09-04 16:27:13 +02:00
22624ad774 cleanup handling of emitter action contexts 2019-09-04 16:27:13 +02:00
cb35556472 support slicing ArrayRef with range 2019-09-04 16:27:13 +02:00
185ef25243 temporarily remove unnecessary emitter sockets 2019-09-04 16:27:13 +02:00
848603d032 Merge branch 'master' into functions 2019-09-04 16:27:02 +02:00
db230d4833 skip matrix interpolation when not necessary 2019-09-04 11:33:56 +02:00
716cc34a87 move AttributesRef to BKE namespace 2019-09-04 11:09:36 +02:00
fbe0a3950f more accurate runtime type checking in debug builds 2019-09-04 10:51:06 +02:00
90aaf67e5a Merge branch 'master' into functions 2019-09-04 09:45:37 +02:00
0edb87c629 Merge branch 'master' into functions 2019-09-03 18:12:57 +02:00
4dd3773283 Merge branch 'master' into functions 2019-09-03 16:30:22 +02:00
8443f319e3 quiet warning 2019-09-03 16:22:55 +02:00
d3210c2547 deduplicate vertex weights input code 2019-09-03 16:17:22 +02:00
24a02ee51b initial action context chaining 2019-09-03 16:07:31 +02:00
fc0a7648b5 fix finding execute sockets 2019-09-03 16:07:03 +02:00
a72bcf11e0 new Surface Weights input node 2019-09-03 15:13:27 +02:00
3398112573 refactor how input providers are parsed 2019-09-03 14:06:57 +02:00
f7206f9910 cleanup iterating over AttributeRefs 2019-09-03 13:50:22 +02:00
b245562d0e better error handling when expected action context is not given 2019-09-03 12:34:45 +02:00
2491dc812f rename stride to size 2019-09-03 11:58:45 +02:00
ee8f58eb66 move particle function input providers to separate file 2019-09-03 11:56:49 +02:00
e3454c0708 new Change Particle Size node 2019-09-03 11:39:11 +02:00
61ec4a3d89 move change color/velocity node to same file 2019-09-03 11:20:04 +02:00
370a506ad0 refactor age reached event 2019-09-03 11:16:17 +02:00
c78acc85f3 initial variation input for age reached event 2019-09-03 11:07:17 +02:00
b9a2dc60e1 rename attribute reference classes
AttributeArrays -> AttributesRef
NewParticles -> AttributesRefGroup
2019-09-03 10:53:07 +02:00
b513079ee2 Merge branch 'master' into functions 2019-09-03 10:30:32 +02:00
410599dca2 reorganize where interfaces are declared 2019-09-02 19:01:33 +02:00
551ca28108 remove unused parameter 2019-09-02 18:13:24 +02:00
147d2dfac5 don't pass particle allocator using BlockStepData 2019-09-02 18:08:44 +02:00
1d15c51bf9 use annotation for properties 2019-09-02 17:58:19 +02:00
0d700d201a remove ParticleSet and ParticleSets abstraction 2019-09-02 17:56:14 +02:00
d2fe280a6e improved Change Particle Velocity node 2019-09-02 16:09:52 +02:00
fce176dbd0 fix mesh emitter action context 2019-09-02 15:40:13 +02:00
49b6e1dccf abstract mesh surface action context 2019-09-02 15:13:49 +02:00
27081694f9 rename 2019-09-02 15:07:24 +02:00
4d46c481ac Merge branch 'master' into functions 2019-09-02 14:42:45 +02:00
06565e21ea use action context in mesh emitter 2019-09-02 12:31:49 +02:00
e45fb9e735 use more generic mesh surface action context 2019-09-02 12:11:58 +02:00
e485f030e8 fix temporary deallocation 2019-09-02 12:05:16 +02:00
2412efdf89 simplify mesh emitter more 2019-09-02 11:33:20 +02:00
9ff4828501 cleanup mesh emitter 2019-09-02 11:20:22 +02:00
bde76782eb sample varying float4x4 2019-09-02 11:13:19 +02:00
36016e2960 extract triangle sampling 2019-09-02 11:02:24 +02:00
381ece9410 extract birth moment computation 2019-09-02 10:48:21 +02:00
5f31282c46 Merge branch 'master' into functions 2019-09-02 09:59:03 +02:00
acd7915371 fix computing cumulative distribution 2019-08-28 18:05:39 +02:00
a55745ba7f sample weighted triangles differently 2019-08-28 18:01:10 +02:00
42c58fe840 support allocating larger buffers with temporary allocator 2019-08-28 16:29:30 +02:00
ea068aeb22 start implementing vertex group support in emitter 2019-08-28 14:23:38 +02:00
bc218feff1 append n times function for vector adaptor 2019-08-28 14:23:10 +02:00
fac51ca754 store attribute indices in string map 2019-08-28 12:16:51 +02:00
6e5e1e7ee7 store Range in AttributeArrays 2019-08-28 10:50:55 +02:00
c238c179d7 Merge branch 'master' into functions 2019-08-28 10:25:02 +02:00
25e5488594 don't store particle name in particle sets structure 2019-08-27 17:40:20 +02:00
b52c3b3fc7 Initial string socket type
The internal implementation is working, but not very efficient yet (every string
is allocated separately without any cache). I'm still thinking about a better
solution, but for now having any working text socket is more important.
2019-08-27 17:22:47 +02:00
7ca34c3838 Merge branch 'master' into functions 2019-08-27 14:23:35 +02:00
0ee75f415a bring back transform interpolation for mesh emitter 2019-08-27 13:54:03 +02:00
d95073c9c7 roll back some changes regarding world transition handling 2019-08-27 13:48:51 +02:00
5a7dfe59da fix some more warnings 2019-08-27 12:24:25 +02:00
c5449eb30f avoid some warnings 2019-08-27 12:20:54 +02:00
e12b1cf8ce fix some warnings 2019-08-27 12:17:56 +02:00
a32472bd31 remove unnecessary semicolon 2019-08-27 11:55:47 +02:00
955c931b45 Merge branch 'master' into functions 2019-08-27 11:19:58 +02:00
5ef500c27b cleanup arrayref and stringref 2019-08-26 15:48:26 +02:00
645a54107c add missing include 2019-08-26 15:37:16 +02:00
cd0f866aef move time from ParticlesState to SimulationState 2019-08-26 15:21:10 +02:00
2cf9e5070a start updating how the world state is used 2019-08-26 14:54:20 +02:00
357be047aa build virtual node tree in constructor 2019-08-26 12:17:51 +02:00
bccd47ab4f remove particle block from interfaces 2019-08-26 11:58:01 +02:00
5a3a155438 remove StepDescription and ParticleType entirely 2019-08-26 11:33:50 +02:00
3f01ddd5d2 don't use ParticleType abstraction in simulation code 2019-08-26 11:09:31 +02:00
0c98f500e2 don't use StepDescription abstraction in simulation code 2019-08-26 10:49:47 +02:00
3c541ff26c initial step simulator abstraction 2019-08-26 10:27:20 +02:00
7b08fe78e5 move simulation state to separate file 2019-08-26 10:05:08 +02:00
9efc8d1d9f combine particle and world state in c api 2019-08-26 09:57:40 +02:00
a5260c143c implicitely convert StringRef to std::string 2019-08-26 09:37:04 +02:00
43b449fc18 add missing const 2019-08-26 09:27:49 +02:00
08f0727864 add missing const 2019-08-26 09:25:42 +02:00
f4e3d5f30e Merge branch 'master' into functions 2019-08-26 09:18:17 +02:00
23c31ec27d add float hash 2019-08-25 14:34:10 +02:00
2e712d4eec add test 2019-08-25 14:30:36 +02:00
7e4715a534 remove unused macro 2019-08-25 14:23:32 +02:00
58754850ca remove unused mempool 2019-08-25 14:19:31 +02:00
dbdd6b88ef unify hash tables a bit 2019-08-25 14:07:56 +02:00
c52a4316d0 update the hashing template 2019-08-25 13:58:01 +02:00
bb81caeb1e Fix build error 2019-08-24 21:28:36 +02:00
6d0dad6290 Update Vector implementation 2019-08-23 17:35:19 +02:00
1e74b276c4 don't inline grow for other data structures 2019-08-23 16:57:24 +02:00
d49f1f8772 don't inline grow functions 2019-08-23 16:52:24 +02:00
f35171a9a8 add some comments 2019-08-23 16:32:49 +02:00
a3d9fc20cf store usable slots in open addressing array 2019-08-23 16:25:43 +02:00
c52e381c8b Add license header 2019-08-23 16:06:07 +02:00
af89849067 replace magic number 2019-08-23 16:04:21 +02:00
4d2dcb6a5f Initial implementation of updated ui proposal 2019-08-23 15:41:33 +02:00
9c05112910 fix after merge 2019-08-23 10:12:22 +02:00
dc383b2bfd Merge branch 'master' into functions 2019-08-23 10:01:55 +02:00
c20301adf1 fix build error 2019-08-22 14:19:30 +02:00
ac4c2b3a48 Merge branch 'master' into functions 2019-08-22 12:14:56 +02:00
Eitan
9644f7c8c7 New boolean math node with And, Or and Not operation 2019-08-22 11:47:30 +02:00
1a0a642063 fix boolean c++/llvm conversion 2019-08-22 11:44:56 +02:00
b0034fd7a2 more comments 2019-08-21 18:24:05 +02:00
33949188a7 add some comments 2019-08-21 17:57:42 +02:00
fda6430d6a improve const correctness in many places 2019-08-21 17:38:54 +02:00
700ff7b073 Merge branch 'master' into functions 2019-08-21 17:29:22 +02:00
6f511f6722 Fix raw allocator
This allocator is necessary because sometimes we don't want to use
Blenders guarded allocator. Especially when an object lives longer
than the guarded allocator.
2019-08-21 14:44:09 +02:00
7f79bc3054 Merge branch 'master' into functions 2019-08-21 09:27:24 +02:00
8c95d02504 more tests 2019-08-20 18:45:26 +02:00
6c78f41a2f add StringMap tests 2019-08-20 18:31:19 +02:00
0b2164c5ed remove unused MappedArrayRef class 2019-08-20 18:12:20 +02:00
b45cd6b8bd implement an actual string map that does not rely on std::string 2019-08-20 18:08:17 +02:00
dc01c108d4 improve ArrayRef and StringRef 2019-08-20 18:07:31 +02:00
075a36ae95 Merge branch 'master' into functions 2019-08-20 18:05:44 +02:00
c26a23f245 fix set vector remove 2019-08-20 12:34:39 +02:00
f591503f32 Merge branch 'master' into functions 2019-08-20 09:57:12 +02:00
206495642f Merge branch 'master' into functions 2019-08-19 18:42:56 +02:00
a6b66db204 cleanup Map 2019-08-19 18:34:26 +02:00
ecb8d0bdae cleanup Set 2019-08-19 18:30:16 +02:00
a00101ae5d move hash table slot iterators out of class 2019-08-19 18:24:16 +02:00
6f79e52665 Initial support for custom allocators for containers 2019-08-19 18:18:20 +02:00
607942330c Merge branch 'master' into functions 2019-08-19 10:39:12 +02:00
38b973a679 New Map, Set and SetVector implementation
All tests are runnings still, but I need to do more testing in the upcoming days.
This implementation uses a different approach for sharing code between
the different structures. I tried different abstractions in the last weeks
and this is the best one I found so far.
2019-08-18 16:31:48 +02:00
de8a52dcee low level memory utilities in blenlib 2019-08-18 12:12:39 +02:00
b0ca3469ed Merge branch 'master' into functions 2019-08-18 12:05:11 +02:00
25ab857e4d Fix particle tetrahedon mesh generation 2019-08-18 12:05:00 +02:00
a8eb9448e7 Merge branch 'master' into functions 2019-08-16 15:03:06 +02:00
f52b66c7ec cleanup type usage 2019-08-14 15:32:26 +02:00
a0d9f387bb free types when Blender exits 2019-08-14 15:20:33 +02:00
e16afbe4f5 use guarded allocator for some core types 2019-08-14 14:59:24 +02:00
7921c6cb7e store types in global variables 2019-08-14 14:39:39 +02:00
def527c9b0 Do not use a reference counter for Types
Types can be expected to stay alive until Blender exists.
This also works well with the fact that they are identified
by their pointer.

Furthermore, the number of types is fairly low, but they
are passed around a lot. Maintaining a thread-safe reference
count seems to be unnecessary overhead.
2019-08-14 13:59:05 +02:00
f073f232cf improve map method names 2019-08-14 11:53:08 +02:00
b7bc639d00 add more license headers 2019-08-14 11:46:29 +02:00
d39f5109cc add license header to blenlib files 2019-08-14 11:44:11 +02:00
1ca951cb6f Merge branch 'master' into functions 2019-08-14 09:57:15 +02:00
8b0706a6c1 fix compile error 2019-08-13 13:27:43 +02:00
180d46c76e remove copy to clipboard 2019-08-13 11:43:20 +02:00
a1fef73075 Merge branch 'master' into functions 2019-08-13 11:28:49 +02:00
1ebfffa310 fix compile error on windows 2019-08-12 17:55:52 +02:00
artem ivanov
0b15817ad2 More Float Math operations
Differential Revision: https://developer.blender.org/D5433
2019-08-12 16:36:31 +02:00
Eitan
e0ebaf8f3c Add multiply and divide to vector math node
Differential Revision: https://developer.blender.org/D5430
2019-08-12 16:24:58 +02:00
8aa6ff8ec9 Reimplement the way many arrays are allocated
This new implementation is more generic and easier to use.
2019-08-12 15:50:08 +02:00
52578524bd remove AttributeArrayCore class
It worked well, but having it does not provide enough value
to justify the additional complexity.
2019-08-12 10:30:51 +02:00
00d456761f Merge branch 'master' into functions 2019-08-12 09:23:25 +02:00
8ef0c6b0df Merge branch 'master' into functions 2019-08-07 12:02:06 +02:00
b277709d53 comment some library functions 2019-08-07 12:00:23 +02:00
f8909cfab7 only wrap intrusive listbases for now 2019-08-07 11:40:16 +02:00
4457268059 add some comments 2019-08-07 11:14:14 +02:00
b429156131 experimental reloadable function inputs 2019-08-07 11:04:30 +02:00
2428486775 allocate aligned from monotonic allocator 2019-08-07 10:54:01 +02:00
468be50313 remove unnecessary small object optimization for monotonic allocator 2019-08-07 09:33:37 +02:00
e231654e24 cleanup llvm function type creation 2019-08-06 17:40:25 +02:00
b0585aa4d4 rename element_amount to size 2019-08-06 17:23:00 +02:00
b04ec4faa5 move function to correct file 2019-08-06 17:17:34 +02:00
b46e26cd34 Fix exception when using the node search 2019-08-06 16:17:35 +02:00
71ec8895b7 rename tuple folder to cpp 2019-08-06 11:59:36 +02:00
4022d8784c New list implementation
Instead of using a templated list, it is easier to use a "generic" list, that can
handle every type with a CPPTypeInfo extension. This simplifies the code quite
a bit, because templates can be avoided in many places.
This also makes it easier to add new types.

The list will still be refcounted and still have the shared immutability semantic.
So when a list has more than one user, it is immutable.
2019-08-06 11:54:49 +02:00
a0364a6227 rename files for consistency 2019-08-05 18:18:59 +02:00
2a7b684a8a Merge branch 'master' into functions 2019-08-05 17:17:16 +02:00
b3d5ef9971 remove unused function 2019-08-05 16:35:27 +02:00
bd56ee7a78 cleanup cpp type extension 2019-08-05 15:51:05 +02:00
18820b10fd rename file 2019-08-05 14:59:34 +02:00
39989cb106 rename multimap to multi_map 2019-08-05 13:43:00 +02:00
4f282b4216 Allow passing unlinked input handlers to graph generation 2019-08-05 13:13:09 +02:00
3ea03318bb fix compile error and warning on macos 2019-08-05 13:07:40 +02:00
d5546057f2 rename classes 2019-08-05 12:58:31 +02:00
31c6db7d2a separate unlinked input grouper from inserter 2019-08-05 12:51:32 +02:00
5b8feb038d simple multivector data structure 2019-08-05 12:49:21 +02:00
80ce0cd20f join map.lookup and map.lookup_ref 2019-08-05 12:10:00 +02:00
artem ivanov
d0cdadc81e More vector math operations: Subtract, Cross Product, Reflect 2019-08-05 11:50:00 +02:00
db88d6e1a5 fix auto vectorization when function does not have certain bodies 2019-08-05 11:49:15 +02:00
6b1e4f51c0 Merge branch 'master' into functions 2019-08-05 10:39:52 +02:00
05d85c52a2 rename 2019-08-02 19:18:13 +02:00
8e9323cafa experiment with different ways to group unlinked inputs 2019-08-02 19:12:13 +02:00
afe19d51e3 remember placeholder nodes after they are created 2019-08-02 18:57:19 +02:00
f149445d38 vector.fill_indices 2019-08-02 18:51:02 +02:00
c21f39578f easily create dot graph from vtree data graph builder 2019-08-02 17:42:45 +02:00
d51db9a526 don't create array ref from single value 2019-08-02 17:42:15 +02:00
fb034c8e14 fix dot export after recent changes 2019-08-02 17:41:45 +02:00
5176484fbc rename UnlinkedInputsHandler to InputInserter 2019-08-02 16:22:06 +02:00
71d8ebd201 refactor how information about the node tree is stored 2019-08-02 16:11:25 +02:00
375577cfb9 improve file names 2019-08-02 14:10:39 +02:00
92319905a0 unify mapping names 2019-08-02 14:07:14 +02:00
2f3ccb7e90 move all tree mappings into folder 2019-08-02 14:00:46 +02:00
d537af9303 execute action for new particles after explosion 2019-08-02 13:43:56 +02:00
2be7226e86 new rgba_b attribute type 2019-08-02 13:21:12 +02:00
d022328974 new float2 particle attribute type 2019-08-02 13:18:57 +02:00
7f802fb750 initial texture color access after collision 2019-08-02 12:56:10 +02:00
3411511499 new float2 and rgba_b types 2019-08-02 12:52:40 +02:00
645293e2d9 remove redundant values 2019-08-02 10:08:51 +02:00
c5caaafd7f move collision info and particle info node in same file 2019-08-02 09:37:37 +02:00
363ba2ee7a Merge branch 'master' into functions 2019-08-02 09:27:17 +02:00
219573de22 Fix: Build error with MSVC
Zero sized arrays not being at the end of struct/class makes MSVC sad
2019-08-01 15:25:07 -06:00
480e284250 Merge branch 'master' into functions 2019-08-01 18:24:20 +02:00
f0b7499750 support for default values for vectorized inputs 2019-08-01 18:19:58 +02:00
d63f673e05 move input handlers to separate file 2019-08-01 17:55:47 +02:00
b07626e48b fix use after free in python 2019-08-01 17:25:54 +02:00
79b85c1426 add ability to store socket values as constants in IR 2019-08-01 17:18:34 +02:00
787e97057a return function body instead of bool 2019-08-01 17:18:07 +02:00
eb403083c6 support that tuples own their meta data 2019-08-01 17:17:36 +02:00
d3763513ff remove timer 2019-08-01 16:35:23 +02:00
f9a555a60a don't load socket values dynamically 2019-08-01 16:35:06 +02:00
d91a5b69d9 cleanup socket loaders 2019-08-01 16:06:25 +02:00
46bd09b789 cleanup 2019-08-01 15:56:00 +02:00
faeb98b48e compute type of every socket only once 2019-08-01 15:36:37 +02:00
0b970bc160 fix fill constructor of vector 2019-08-01 15:36:16 +02:00
795bae3410 cleanup type mappings 2019-08-01 15:07:04 +02:00
e606316ed6 rename refresh to sync_tree 2019-08-01 14:55:55 +02:00
13dce85083 fix float math node inputs 2019-08-01 14:55:20 +02:00
0ef25d8001 cleanup 2019-08-01 14:36:52 +02:00
104df5f5f2 support color in Custom Emitter node 2019-08-01 14:16:12 +02:00
69a8699b54 fix use-after-free crash from python 2019-08-01 14:15:56 +02:00
3d1de1e44e cache enum items in python 2019-08-01 14:15:28 +02:00
ffbe506a55 rename DFGraphSocket to DataSocket 2019-08-01 13:33:40 +02:00
3d2e279b3d rename DataFlowGraph to just DataGraph 2019-08-01 13:30:13 +02:00
6dc48fd18d replace DataFlowGraphBuilder implementation 2019-08-01 13:26:34 +02:00
218fcf4473 replace another map with a vector 2019-08-01 10:28:30 +02:00
1fd26737b5 use virtual socket index to replace a map with a vector 2019-08-01 10:16:56 +02:00
2f948952b5 store an index per virtual socket 2019-08-01 10:16:36 +02:00
f6ef23ebe7 remove IndexedNodeTree data structure in favor of VirtualNodeTree 2019-08-01 09:59:55 +02:00
fe5356bf25 Merge branch 'master' into functions 2019-08-01 09:52:03 +02:00
4c8746a965 Merge branch 'master' into functions 2019-07-31 18:41:50 +02:00
28ba204e17 easy access to identifier of socket 2019-07-31 18:41:06 +02:00
56e541dba6 identify types with idname 2019-07-31 18:35:24 +02:00
27b365058e remove last remainings of GraphInserters 2019-07-31 18:28:14 +02:00
22bd4ad4fb move more code out of GraphInserters 2019-07-31 17:53:37 +02:00
7ffa849297 start removing graph inserters 2019-07-31 17:43:46 +02:00
385e61a122 cleanup VTreeDataGraph creation 2019-07-31 17:28:48 +02:00
a5bc1b002f rename file 2019-07-31 17:21:43 +02:00
8e8049fa28 move VTreeDataGraph to separate file 2019-07-31 17:18:29 +02:00
b1fb402e1b cleanup VTreeDataGraph 2019-07-31 17:11:26 +02:00
69b0da1987 rename BTreeGraphBuilder to VTreeDataGraphBuilder 2019-07-31 17:01:33 +02:00
ed4db612f8 new Combine Color node 2019-07-31 16:57:04 +02:00
3e406633f7 only compile when there are outputs 2019-07-31 16:49:12 +02:00
529b78160c move ui code of multiple nodes in the same file 2019-07-31 16:29:14 +02:00
38463de2d9 extract some methods from llvm array execution 2019-07-31 16:09:20 +02:00
b6e533a0d9 don't expose different array execution functions 2019-07-31 15:48:50 +02:00
0f80acd54b don't prepare execution stack when not necessary 2019-07-31 15:40:11 +02:00
0f3b50329c cleanup llvm ir when stack info is maintained 2019-07-31 15:18:36 +02:00
14bb065f13 support for compiling particle functions down to machine code 2019-07-31 14:54:28 +02:00
eaaa8610fa some llvm usage improvements 2019-07-31 14:27:30 +02:00
36f0132394 llvm does not permit void*, so replace all uses with i8* 2019-07-31 14:24:44 +02:00
670537ed8a initial tuple call array execution 2019-07-31 11:23:13 +02:00
bff87f3a9a fix merge conflict 2019-07-31 10:35:33 +02:00
5878add697 Merge branch 'master' into functions 2019-07-31 10:30:30 +02:00
3e0fd90605 use another strategy to create functions for unlinked inputs 2019-07-30 16:13:44 +02:00
042cc17bab clang-format 2019-07-30 15:06:22 +02:00
760e084791 show node search in menu 2019-07-30 14:59:28 +02:00
9d3a92d3e3 use background color for particle type node 2019-07-30 14:59:28 +02:00
e54acfa2ff rename 2019-07-30 14:59:28 +02:00
5841005187 add buttons to create particle type nodes 2019-07-30 14:59:28 +02:00
4f5093f403 renamed particle_modifier_output to particle_effector_output 2019-07-30 14:55:15 +02:00
26d0bbffa8 added point force node for particle nodes 2019-07-30 14:41:28 +02:00
773b6bbd42 rename modifier to effector in some places
That was missing in a previous commit.
2019-07-30 13:58:17 +02:00
c2e63d660b add color attribute type 2019-07-30 13:44:39 +02:00
33c29f35b8 simplify the way attribute information is stored 2019-07-30 13:27:37 +02:00
4bbee4acf2 new Change Particle Color node 2019-07-30 12:14:42 +02:00
99e5f16d4a new Separate Color node 2019-07-30 12:01:33 +02:00
093583620c new color socket type 2019-07-30 12:01:00 +02:00
d29052a514 make object an input in mesh collision event 2019-07-30 10:59:51 +02:00
937dde6060 fix wrong element size due to alignment 2019-07-30 10:59:34 +02:00
e41084f94a cleanup style 2019-07-30 10:20:40 +02:00
40b3c50837 Merge branch 'master' into functions 2019-07-30 10:08:15 +02:00
9fb73c42fd windows compile fixes - missing includes 2019-07-29 20:28:30 +02:00
c62b1850e3 rename "size_of_type" to just "size" 2019-07-29 17:55:52 +02:00
910431e382 start taking alignment of types into account when constructing tuples 2019-07-29 17:53:12 +02:00
bd514d20e0 remove more redundant code 2019-07-29 17:21:21 +02:00
e38e761ba6 remove more redundant code 2019-07-29 17:17:38 +02:00
b645fa8d12 remove more redundant code 2019-07-29 17:13:42 +02:00
0bf70bde16 rename try_get_T to try_get<T> 2019-07-29 17:07:03 +02:00
f78e2837ff change get_T to get<T> when accessing attributes 2019-07-29 17:03:32 +02:00
deecc8c6f8 fix error when using Call node 2019-07-29 16:43:11 +02:00
555d29a0fe initialize particles with IDs 2019-07-29 16:39:35 +02:00
c28a441a9d fix coyp paste error 2019-07-29 16:05:08 +02:00
74bdbb94e5 add integer attribute type 2019-07-29 15:48:59 +02:00
d2c1f7b9ca initial particles block id 2019-07-29 15:16:21 +02:00
aa1c4663a1 remove lots of redundant code 2019-07-29 15:08:05 +02:00
ac5bf8e4f9 initial age output in particle info node 2019-07-29 14:50:19 +02:00
e87cd0c807 introduce input provider interface 2019-07-29 14:02:04 +02:00
e2a6763be3 support for freeing particle function input arrays 2019-07-29 13:51:41 +02:00
c2461a8b87 extract method to create particle function input provider 2019-07-29 13:39:17 +02:00
f2d3539cb5 new particle function input providers abstraction 2019-07-29 13:30:55 +02:00
dbc453f414 extract methods from particle function evaluation 2019-07-29 12:30:59 +02:00
58c67cdde4 remove unnecessary typedef 2019-07-29 12:19:01 +02:00
4ed19b6b1e cleanup particle function builder 2019-07-29 12:16:55 +02:00
888aec8234 move particle function building to separate file 2019-07-29 12:07:08 +02:00
5a1a8fa917 handle inputs with no dependencies separately 2019-07-29 11:55:25 +02:00
ed2180832e use debug name checking again 2019-07-29 11:20:42 +02:00
904966b3ef particle function contains two functions: with/without dependencies 2019-07-29 11:14:38 +02:00
6e83213a5f utility to iterate over trivial particle indices 2019-07-29 10:06:48 +02:00
41f83ef571 scoped timer per element 2019-07-29 10:03:27 +02:00
a8c46c4bf0 fix after merge 2019-07-29 09:13:38 +02:00
1b274efd7c Merge branch 'master' into functions 2019-07-29 09:09:33 +02:00
248ee40712 Cleanup: Fix build error with msvc. 2019-07-25 15:18:33 -06:00
7db0b9c265 add utility to combine strings on the stack 2019-07-25 15:09:57 +02:00
7a3e5c1dad simplify creating particle function 2019-07-25 14:31:25 +02:00
9b3e1859ef simplify action builders 2019-07-25 14:20:36 +02:00
63a9949c27 compute particle functions more centrally for events 2019-07-25 10:18:22 +02:00
6c3afa7801 create particle function for force inputs more centrally 2019-07-25 10:06:03 +02:00
7e4c489778 use particle function for gravity force 2019-07-25 10:01:10 +02:00
c92dd7bed6 create particle function more centrally for offset handlers 2019-07-25 09:54:46 +02:00
7de561f930 Merge branch 'master' into functions 2019-07-25 09:42:45 +02:00
03f4489e4d Merge branch 'master' into functions 2019-07-24 19:19:46 +02:00
93b01da75e use threading again 2019-07-24 19:10:55 +02:00
3976570539 use particle function in Age Reached event 2019-07-24 19:07:55 +02:00
2d925db8b0 fix double free and optimize when particle function inputs have no dependencies 2019-07-24 19:07:38 +02:00
fd0226f614 handle type extensions as references instead of pointers by default 2019-07-24 17:52:22 +02:00
85536c5e75 use function bodies as references instead of pointers by default 2019-07-24 17:43:00 +02:00
f54507724f rename 2019-07-24 17:13:33 +02:00
54724cc5b3 simplify usage of particle functions 2019-07-24 17:12:13 +02:00
b60b193384 do more checks when debugging 2019-07-24 16:27:07 +02:00
299ba77cc9 fix false positive memory leak 2019-07-24 16:15:06 +02:00
c0fd3b6962 remove tests because their are more trouble than they are worth currently 2019-07-24 16:14:50 +02:00
dec218643e use particle function in turbulence node 2019-07-24 15:54:16 +02:00
1cc5f83442 introduce force interface 2019-07-24 15:46:30 +02:00
e468ca977e use particle function in trails node 2019-07-24 15:25:43 +02:00
d9f02f209b further simplify usage of particle function 2019-07-24 15:09:55 +02:00
f169a5eeb7 improve particle function 2019-07-24 15:06:07 +02:00
bdcca74b23 rename 2019-07-24 14:47:05 +02:00
1f79a069d3 move particle function to separate file 2019-07-24 14:44:36 +02:00
d4f57524be rename 2019-07-24 13:58:04 +02:00
89001688d6 rename EventInfo to ActionContext 2019-07-24 13:56:07 +02:00
2859cf6902 cleanup executing actions 2019-07-24 13:50:36 +02:00
bc9d51d048 expose collision normal in new Collision Info node 2019-07-24 13:33:12 +02:00
712701a4ef remember socket that triggered an action 2019-07-24 12:52:35 +02:00
f777ac8a52 use new function creation method for action and offset handlers 2019-07-24 12:36:13 +02:00
efa9b1cc41 use error handling for event nodes 2019-07-24 11:47:37 +02:00
5de6dca2f5 create function to compute force inputs 2019-07-24 11:43:28 +02:00
cb091c196f use better error handling for other emitters 2019-07-24 11:37:30 +02:00
d9348adb33 better error handling when creating function for emitter inputs 2019-07-24 11:33:15 +02:00
f1c69c71c6 move FunctionBuilder to separate file and add more methods 2019-07-24 11:32:40 +02:00
b1425fc68b namespace fix 2019-07-24 11:31:53 +02:00
556691b19a Improve error handling with ValueOrError class
We might want to use exceptions instead of this.
I'm not sure yet.
2019-07-24 10:58:11 +02:00
a0f9564d1b cleanup finding placeholder dependencies 2019-07-24 10:14:51 +02:00
c21d8bd0d9 cleanup finding node inputs 2019-07-23 19:03:49 +02:00
a18d338d3f minor improvements 2019-07-23 19:02:39 +02:00
a781b6fc3a rename BTreeDataGraph to VTreeDataGraph 2019-07-23 18:06:41 +02:00
17dd4e03b8 move function generation file to correct file 2019-07-23 18:04:27 +02:00
fa26630d87 fix uninitialized memory 2019-07-23 18:00:24 +02:00
937a448de2 Remove Composition data structure
This simplifies the code and speeds up accessing function
bodies and type extensions. Now, a lock is only necessary
when create new bodies or extensions.

This is achieved at the cost of having a slighly less generic
system, because we have to give e.g. different function body
types different IDs. Since the number of different types
is expected to be fairly low, this trade off is worth it.
2019-07-23 16:54:40 +02:00
d6a7832f6d simplify virtual node tree usage 2019-07-23 14:59:18 +02:00
9869bc3bc4 Merge branch 'master' into functions 2019-07-23 09:46:00 +02:00
d6b7aecbbc reorder lines 2019-07-22 17:58:31 +02:00
5bcc78ada9 remove builders that are not necessary for now 2019-07-22 17:57:20 +02:00
c900098170 remove unnecessary usings 2019-07-22 17:34:03 +02:00
51fb6b5098 remove unnecessary type definitions 2019-07-22 17:31:20 +02:00
5a269bfb57 remove "small" from test names 2019-07-22 17:19:35 +02:00
f0c164b861 rename SmallVector to Vector 2019-07-22 17:17:47 +02:00
a1ba33090b rename SmallMap to Map 2019-07-22 17:10:42 +02:00
6a63774f43 rename SmallMultiMap to MultiMap 2019-07-22 17:07:58 +02:00
d0d6f38754 rename SmallStack to Stack 2019-07-22 17:05:37 +02:00
f179b2dd30 rename SmallSetVector to SetVector 2019-07-22 16:59:52 +02:00
f9caf48eab Rename SmallSet to just Set
The fact that the data structure has small object optimization
is not important enough to justify a more complex name.
Following commits will rename other data structures.
2019-07-22 16:57:59 +02:00
f039c43f95 cleanup 2019-07-22 16:47:32 +02:00
4b42c112fd cleanup accessing rna of virtual node 2019-07-22 16:46:11 +02:00
3dfbbf606e cleanup accessing node names 2019-07-22 16:40:29 +02:00
9a4d125533 use virtual node tree for parsing particle system node trees 2019-07-22 16:35:49 +02:00
7d5ee7c689 start using virtual node tree to generate functions 2019-07-22 15:49:13 +02:00
c71997dd67 initial virtual node tree 2019-07-22 14:19:12 +02:00
fb26304aa2 ArrayRef.contains_ptr 2019-07-22 14:18:43 +02:00
8a69395d6a rename SocketBuilder to NodeBuilder 2019-07-22 12:41:02 +02:00
86fb4243d1 cleanup 2019-07-22 12:37:31 +02:00
ddf0b72870 make socket.data_type a class property 2019-07-22 12:32:51 +02:00
b7efaadb8e get socket data type from idname 2019-07-22 12:04:42 +02:00
227a28e9e5 remove dead code 2019-07-22 10:49:46 +02:00
b1d21db61b remove colored socket builder 2019-07-22 10:48:34 +02:00
6356f27a87 Merge branch 'master' into functions 2019-07-22 10:24:28 +02:00
fa9f34c056 show particle type names in nodes 2019-07-20 14:21:22 +02:00
1180996832 add ability to select output mesh type in modifier settings 2019-07-20 14:06:51 +02:00
dd47cbf3b7 use constant velocity integrator when there are no forces 2019-07-20 13:40:00 +02:00
0767dad328 rename function 2019-07-20 13:39:17 +02:00
9fa5d75d80 Fix moving sets and maps 2019-07-20 12:57:12 +02:00
ff398d29a6 Merge branch 'master' into functions 2019-07-20 11:53:07 +02:00
9a965af529 move offset handlers to separate file 2019-07-18 17:34:40 +02:00
49d2d8b47e add timer 2019-07-18 17:18:52 +02:00
10c81747fe splitup remainings of core.hpp 2019-07-18 17:16:40 +02:00
c23ccfc0ac separate files for particle state and allocator 2019-07-18 16:59:31 +02:00
0645752ab7 cleanup 2019-07-18 16:59:08 +02:00
bd49708841 rename target to new_particles 2019-07-18 16:49:20 +02:00
c67953c53e move particle set to separate file 2019-07-18 16:47:10 +02:00
182cc12015 fix trail creation for partial time steps 2019-07-18 16:39:28 +02:00
83e75345a2 simple rate input for Trail node 2019-07-18 16:19:31 +02:00
e29914292a missing destructor 2019-07-18 15:57:34 +02:00
6793bab243 use proper constructors for step description and particle type 2019-07-18 15:39:05 +02:00
2c0c758d72 make StepDescription class non-virtual 2019-07-18 15:30:48 +02:00
234f5d9407 make ParticleType class non-virtual 2019-07-18 15:28:08 +02:00
d0eed2a7ac change how particle types declare which attributes they need 2019-07-18 15:23:45 +02:00
023f477bdd rename AttributesInfoBuilder to AttributesDeclaration 2019-07-18 15:04:23 +02:00
8dd5be76c0 initial step desription builder 2019-07-18 14:59:07 +02:00
24c5a21977 remove redundant particle type name storage 2019-07-18 14:30:53 +02:00
f2737b927d rename ForwardListener to OffsetHandler 2019-07-18 14:04:38 +02:00
1272208b2b remove redundant information 2019-07-18 13:52:58 +02:00
d908edbc8a cleanup 2019-07-18 13:47:13 +02:00
9fd56bed3f cleanup 2019-07-18 13:44:29 +02:00
e47c49c872 remove redundant information 2019-07-18 13:40:36 +02:00
168f5964b6 remove redundant information 2019-07-18 13:37:04 +02:00
fe8cace993 use block step data in more places 2019-07-18 12:56:22 +02:00
ea6bbc1aec use step block data in more functions 2019-07-18 12:39:02 +02:00
d1f05d2415 use step block data in more functions 2019-07-18 12:22:47 +02:00
a6914c973f introduce BlockStepData as container for data that would have to be passed into many functions 2019-07-18 12:16:10 +02:00
7aa22a24a7 initial forwarding listeners + particle trail node
Still looking for a better name instead of Forwarding Listeners
2019-07-18 12:08:36 +02:00
4672d7aa83 Merge branch 'master' into functions 2019-07-18 10:37:40 +02:00
d6230d1563 don't always use cache for now since it makes testing more annoying 2019-07-17 18:01:25 +02:00
e800a2d5fa experimental initial grid emitter 2019-07-17 17:45:44 +02:00
0df9c55578 pass time step in from the modifier 2019-07-17 17:11:05 +02:00
a2b128a451 experimental Close By Points event 2019-07-17 16:46:13 +02:00
54f7163310 minor changes 2019-07-17 15:57:17 +02:00
09bc3a0aac Revert "use evaluated node tree"
This reverts commit eddb4d0af4.

Sometimes the evaluated node trees are not updated when the real
node tree changes. Use original trees until this is fixed.
2019-07-17 11:20:47 +02:00
da04c045fe velocity and size input for point emitter 2019-07-16 18:18:53 +02:00
ce2081e5b3 support for interpolated float values 2019-07-16 18:18:09 +02:00
06d8ed1a8a store color per particle 2019-07-16 17:59:20 +02:00
ec7054772b utility operators to create emitter and particle system trees 2019-07-16 17:33:13 +02:00
bd573cf2d7 use vector adaptor instead of pointer+length in fgraph tuple call 2019-07-16 16:29:13 +02:00
667b56f87b use "ifdef DEBUG" instead of "if DEBUG" 2019-07-16 16:28:49 +02:00
eddb4d0af4 use evaluated node tree 2019-07-16 16:12:56 +02:00
c41a9d0e88 fix fgraph tuple call 2019-07-16 16:12:06 +02:00
55a74c35dd fix vector math node 2019-07-16 15:59:42 +02:00
c35feef507 new node to get the vertices of a mesh 2019-07-16 15:36:22 +02:00
9a02226aa2 support for geometry dependencies of functions 2019-07-16 15:35:50 +02:00
f4dac36c05 extract another function for linking 2019-07-16 14:52:06 +02:00
a5b90dc661 extract method that links functions 2019-07-16 14:43:47 +02:00
70f8f3231b Custom Emitter functions can have inputs now 2019-07-16 14:33:08 +02:00
6a8985dfa5 utility to map multiple sockets 2019-07-16 13:22:58 +02:00
f0cc032f83 construct SmallVector from arbitrary containers 2019-07-16 13:04:26 +02:00
39ebd2fd1f more general function tree dependency discovery 2019-07-16 12:57:30 +02:00
8fec347121 more powerful custom emitter 2019-07-16 11:37:43 +02:00
f058e7b11a remove unnecessary check 2019-07-16 11:32:12 +02:00
8ba1856a13 fix bug in fgraph tuple call 2019-07-16 11:32:01 +02:00
38e223e392 initialize attributes by repeating a given array 2019-07-16 10:00:57 +02:00
f388fdc4f1 Merge branch 'master' into functions 2019-07-16 09:37:19 +02:00
36bd4e1225 get rid of static block size 2019-07-15 18:09:07 +02:00
e95c0078a2 initial custom function emitter 2019-07-15 17:56:02 +02:00
94d2a11636 more debug time checks 2019-07-15 17:25:19 +02:00
ad6fa16304 use more debug time checks 2019-07-15 17:19:02 +02:00
c5d18a0a8a check that indices correspond to correct outputs in debug build 2019-07-15 17:09:32 +02:00
6d208e3183 remove indirection 2019-07-15 16:54:47 +02:00
89a8b1f4f5 cleanup events 2019-07-15 16:51:23 +02:00
aefdc1807a cleanup emitters 2019-07-15 16:43:27 +02:00
b5a74ae166 remove a level of indirection 2019-07-15 16:23:42 +02:00
034956978e more boilerplate code removal 2019-07-15 16:18:59 +02:00
fa9bf0c5b1 cleanup 2019-07-15 16:15:06 +02:00
719357ffda revisit autorefcount 2019-07-15 16:07:24 +02:00
f2421c042e abstract interpolated vectors and matrices 2019-07-15 15:35:45 +02:00
0b3ff01ba4 bring back some emitter settings 2019-07-15 15:23:20 +02:00
39476c5ce3 remove boilerplate code for emitters 2019-07-15 15:18:35 +02:00
419f0de8d3 initialize emitter differently 2019-07-15 15:11:36 +02:00
25b3b122e6 experiment with remembering last point emitter position 2019-07-15 14:39:59 +02:00
2e1ba1c02a interpolate vectors 2019-07-15 14:37:37 +02:00
65f2000075 cleanup variable shadowing 2019-07-15 13:49:29 +02:00
3c979ed37e delete particles in same taskpool as simulation 2019-07-15 12:08:23 +02:00
89b625a0ce Merge branch 'master' into functions 2019-07-15 11:47:47 +02:00
b6b26efb9f Merge branch 'master' into functions 2019-07-12 15:06:01 +02:00
a84fcf8cde actually use threading... 2019-07-12 14:49:30 +02:00
60a2d39782 remove temporary code 2019-07-12 14:08:34 +02:00
45b4704df6 use function to compute point input of point emitter 2019-07-12 14:05:33 +02:00
3915ca912a remove unused code 2019-07-12 13:58:11 +02:00
82844c5f11 cleanup dependency builder 2019-07-12 13:51:20 +02:00
b6c1d3e1bd make updating depsgraph work again 2019-07-12 12:39:57 +02:00
fe4c294656 improve fgraph dependencies 2019-07-12 12:24:43 +02:00
b6820e4a87 fixes 2019-07-12 12:17:43 +02:00
da34e3476e cleanup 2019-07-12 12:02:26 +02:00
b0015fc7cd multimap fix 2019-07-12 12:00:39 +02:00
c77abe1e8d initial revised function dependency handling 2019-07-12 10:33:22 +02:00
5366c5c827 utility functions to access data flow graph 2019-07-12 10:27:52 +02:00
53d00eb08b simplify array printing 2019-07-12 10:14:27 +02:00
b124984220 fix when there are no triangles in mesh 2019-07-12 10:14:12 +02:00
3708e233b5 add multiple in multimap 2019-07-12 09:16:44 +02:00
5b7f49edc4 comment in stringmap 2019-07-11 16:34:53 +02:00
800a578ed7 use StringMap everywhere 2019-07-11 16:30:46 +02:00
12149d8e1b initial string map 2019-07-11 15:50:46 +02:00
05d742427f cleanup action builders 2019-07-11 15:39:06 +02:00
d8719603f8 pass build context instead of separate parameters 2019-07-11 15:30:13 +02:00
db6a45ce1f reorder functions 2019-07-11 15:21:11 +02:00
e0a7c11dd0 cleanup simple emitter builders 2019-07-11 15:14:12 +02:00
32e435bbc3 simplify event inserters 2019-07-11 14:44:01 +02:00
9f1c625056 cleanup force node handling 2019-07-11 14:29:17 +02:00
abb76708d1 simplify create function for node inputs 2019-07-11 13:47:53 +02:00
79ec9180e6 rename GeneratedGraph to BTreeDataGraph 2019-07-11 13:37:43 +02:00
57f7d83def cleanup executing actions for a subset 2019-07-11 12:47:05 +02:00
8eb57698c4 cleanup running action from event 2019-07-11 12:36:09 +02:00
401ff628bd settings size in point emitter is not necessary anymore 2019-07-11 12:28:31 +02:00
75cc874922 introduce attributes info builder 2019-07-11 12:24:06 +02:00
7a62e775bb simplify calling action from emitter 2019-07-11 11:46:10 +02:00
615269b749 rename modifiers to effectors 2019-07-11 11:20:15 +02:00
202708eeae run action on particle birth 2019-07-11 11:17:53 +02:00
5114a48fd7 correct usage of attribute offsets that are not available 2019-07-11 10:15:56 +02:00
35dcbf506d fill an array partially 2019-07-11 09:53:39 +02:00
ed9bc5f5c0 Merge branch 'master' into functions 2019-07-11 09:37:08 +02:00
5f02cc2d3a simple clear cache operator 2019-07-10 17:17:26 +02:00
5216bf6014 get rid of particles.range() 2019-07-10 16:53:39 +02:00
dee695f2da cleanup usage of particle indices 2019-07-10 16:45:05 +02:00
4d6b6ab7e3 fix wrong index access 2019-07-10 16:34:07 +02:00
d7fd4ed39c rename particle_indices to pindices 2019-07-10 16:30:45 +02:00
b5af31fb57 use particle indices to trigger particles 2019-07-10 16:28:43 +02:00
157f0aedcb remove unused code 2019-07-10 16:23:16 +02:00
37a3a41de8 cleanup 2019-07-10 16:21:28 +02:00
8e2ae56b25 access time factors to next event with particle indices 2019-07-10 16:19:31 +02:00
25e7319488 access next event indices with particle indices 2019-07-10 16:11:31 +02:00
18e8a12ef1 use particle indices to access remaining durations 2019-07-10 15:58:53 +02:00
9386bcb29a rename durations to remaining_durations 2019-07-10 15:45:28 +02:00
0135d47a06 compute remaining durations in every thread again 2019-07-10 15:43:10 +02:00
1f9186c270 store remaining durations instead of end times 2019-07-10 15:17:56 +02:00
85b8376829 pass array allocator to emitter and execute event interface 2019-07-10 14:56:44 +02:00
3d93967292 take event execute interface out of action interface 2019-07-10 14:35:57 +02:00
8b13cd86ec more centralized solution to getting an array ref for a range 2019-07-10 14:21:53 +02:00
ab0f8b46a6 use ParticleSets abstraction instead of emitter targets 2019-07-10 13:54:33 +02:00
8ea9f57601 simplify event execute interface 2019-07-10 12:59:20 +02:00
d00457ba64 cleanup ParticleAllocators class 2019-07-10 12:39:15 +02:00
ee70791626 rename BlockAllocator to ParticleAllocator 2019-07-10 12:35:20 +02:00
1104d30f9e remove intermediate class 2019-07-10 12:32:18 +02:00
d191a1cee7 start simplifying the emitter interface 2019-07-10 12:27:18 +02:00
d58a5ac3aa Merge branch 'master' into functions 2019-07-10 11:58:14 +02:00
f09794f280 size input for mesh emitter 2019-07-10 11:36:04 +02:00
b197bf5903 sync node trees when file is loaded 2019-07-10 11:33:33 +02:00
317a2ff1e9 unify float and float3 caching 2019-07-10 11:22:27 +02:00
d34c240ebf Cache particle blocks in container for reuse 2019-07-10 11:05:46 +02:00
804ea8fe82 store and cache size per particle 2019-07-10 10:26:48 +02:00
5e22b41ce1 normal and emitter velocity inputs 2019-07-09 17:07:56 +02:00
ab6106149f move world state to mesh emitter 2019-07-09 17:01:58 +02:00
7b674cc684 pass emitter object and rate into mesh emitter node 2019-07-09 16:56:19 +02:00
fa483d50d1 pass object into object transforms node 2019-07-09 16:23:57 +02:00
7c10fa0ac3 object list type 2019-07-09 16:20:40 +02:00
761090b9d4 object type in function system 2019-07-09 16:09:22 +02:00
0a07de8839 object data type in ui 2019-07-09 16:02:30 +02:00
1b1fcd79da basic caching system so that particles can be rendered 2019-07-09 15:56:38 +02:00
52040433a1 rename modifier 2019-07-09 13:48:00 +02:00
a9c1831b07 remove unused code 2019-07-09 13:33:06 +02:00
d2e4f94205 move action builders to separate functions 2019-07-09 13:32:20 +02:00
4b9b9c7813 simplify inserters 2019-07-09 13:24:16 +02:00
72913dbafc initial process node interface 2019-07-09 12:55:15 +02:00
6ab1d300d6 fix variable names 2019-07-09 12:29:30 +02:00
1bfe567129 new node_frontend interface 2019-07-09 12:27:26 +02:00
fb1fdbd217 remove unnecessary includes 2019-07-09 12:16:54 +02:00
43d037b086 move inserters to separate file 2019-07-09 12:13:34 +02:00
d845e15750 move integrator to seprate file 2019-07-09 12:02:11 +02:00
8364c3aafc move step description to separate file 2019-07-09 11:53:36 +02:00
81795f30b4 move world state to separate file 2019-07-09 11:44:37 +02:00
f3b06e8b15 taking emitter velocity into account 2019-07-09 11:23:06 +02:00
3d919e445a add ability to cache the world state to avoid stepping effects 2019-07-09 10:53:56 +02:00
9863f2bfec new map.add_override method 2019-07-09 10:53:14 +02:00
438aae9d0f remove Function from displace modifier (was only for testing) 2019-07-09 09:58:12 +02:00
30dee2dbd2 specify default inputs for some nodes 2019-07-09 09:50:07 +02:00
d94c249194 add ability to specify default values for data sockets 2019-07-09 09:49:55 +02:00
0d28e20bc3 move possibly empty arrays to end of struct for msvc compatibility 2019-07-09 09:32:35 +02:00
b01071a4f3 Merge branch 'master' into functions 2019-07-08 17:55:29 +02:00
435698e219 rename insert to add 2019-07-08 17:55:07 +02:00
ad7c91b346 new compare function 2019-07-08 17:34:48 +02:00
fed773cec6 random number node should have float instead of int input 2019-07-08 17:14:02 +02:00
9d79363098 move functions to correct file 2019-07-08 17:09:29 +02:00
317158e106 reintroduce unique_ptr for actions and events 2019-07-08 17:08:31 +02:00
6e86e314ef move action interface to separate file 2019-07-08 16:56:27 +02:00
65292981a4 improve ActionInterface 2019-07-08 16:50:28 +02:00
6dd1e480b5 initial Action interface 2019-07-08 16:21:44 +02:00
2a0abf0adf initial condition action 2019-07-08 16:09:32 +02:00
f7e7335123 improved event info usage 2019-07-08 15:39:54 +02:00
49e5434e94 initial collision event info 2019-07-08 15:13:57 +02:00
b293739f1f initial event info 2019-07-08 14:23:08 +02:00
c8816dbd31 StringRef.drop_prefix 2019-07-08 14:14:45 +02:00
6bfa473b60 simplify StringRef operator overloads 2019-07-08 14:02:19 +02:00
cba2b0367c stringref: iterate, startswith and endswith 2019-07-08 13:57:25 +02:00
1251ef30aa gather required attributes from particle type and events 2019-07-08 13:30:58 +02:00
fe697e5c1f SmallSet.add_multiple_new 2019-07-08 13:30:08 +02:00
db89c65746 remove separate EventFilter class 2019-07-08 12:57:39 +02:00
03e95e569b distribute tetrahedons in parallel 2019-07-08 12:43:39 +02:00
d71543bf60 new utility to process a range with multiple threads 2019-07-08 12:42:35 +02:00
fce3694f0d new ChunkedRange 2019-07-08 12:42:13 +02:00
d824cb4a7f allow using array allocator in integrator 2019-07-08 11:53:38 +02:00
16a23f4195 rename FixedArrayAllocator to just ArrayAllocator 2019-07-08 11:44:21 +02:00
7387e36267 simplify allocating arrays and vectors from fixed array allocator 2019-07-08 11:41:38 +02:00
fc412c78b4 comment on fixed array allocator 2019-07-08 11:08:23 +02:00
ef8cbccd54 simplify method names 2019-07-08 11:03:26 +02:00
5503207730 use scoped array allocations to simplify memory management 2019-07-08 11:00:41 +02:00
fff24d71f7 cleanup multimap 2019-07-08 10:37:28 +02:00
3c67bda1d2 Merge branch 'master' into functions 2019-07-08 09:56:40 +02:00
2e701cbaaf rename file to BLI_small_multimap 2019-07-06 18:01:23 +02:00
20bd3b5ed1 add vertex colors to tetrahedons for visualization 2019-07-06 17:30:00 +02:00
e852f7d356 create SmallVector from MappedArrayRef 2019-07-06 17:12:11 +02:00
6715600796 flatten float3 attribute of container 2019-07-06 16:49:12 +02:00
b832be6206 improved particle to tetrahedon conversion 2019-07-06 16:38:26 +02:00
b2188f052b initial particle info node 2019-07-06 15:36:02 +02:00
f204ea5624 Fix append_n_time reallocating every time 2019-07-06 15:14:51 +02:00
1d2adb08f8 Fix ArrayLookup for the case when all slots are used or dummies 2019-07-06 14:43:31 +02:00
f7e0f429e2 remove unused modifier properties 2019-07-05 18:07:12 +02:00
2746f423bd initial turbulence node 2019-07-05 17:38:29 +02:00
f67431d729 use gravity node in simulation 2019-07-05 16:56:40 +02:00
30c6880fe0 initial gravity force node ui 2019-07-05 16:39:29 +02:00
fa79121db2 initial mesh collision event node 2019-07-05 15:40:58 +02:00
d5f21d2aac cleanup age reached event inserter 2019-07-05 15:19:33 +02:00
7beef61562 get node of socket from indexed tree 2019-07-05 15:13:28 +02:00
57cb7849fa construct SmallStack from array 2019-07-05 15:03:48 +02:00
cc8ff01d8e deduplicate function create code 2019-07-05 14:49:18 +02:00
2c8e8d547f add speed input to explode node 2019-07-05 14:42:54 +02:00
681ae8d03c initial explode particle node 2019-07-05 14:38:35 +02:00
0380b22606 better handling of zero duration 2019-07-05 13:42:52 +02:00
452369f1b7 simulate more events per step, again 2019-07-05 12:57:03 +02:00
278dc870c0 allow event filters to add attributes to a particle type 2019-07-05 12:53:37 +02:00
f9edcf46b3 improved change direction action 2019-07-05 12:23:45 +02:00
873f483836 new change direction action 2019-07-05 11:15:57 +02:00
7de0213588 access element at index in listbase 2019-07-05 11:15:31 +02:00
821b7e5360 initial build action from nodes 2019-07-05 10:48:44 +02:00
fc490e4236 new action that does nothing 2019-07-05 10:38:58 +02:00
b71291c96d cleanup 2019-07-05 10:38:44 +02:00
e02befdd2c remove unnecessary IndexedBParticlesTree 2019-07-05 10:28:43 +02:00
5e7dc72f11 better function signature for inserters 2019-07-05 10:24:38 +02:00
057455726c new kill particle node ui 2019-07-05 10:14:01 +02:00
c5330b6d94 new control flow socket 2019-07-05 10:11:40 +02:00
9328e6f0bf Merge branch 'master' into functions 2019-07-05 09:53:41 +02:00
d3c5e882b0 Use monotonic allocator instead of more complex ones 2019-07-04 18:04:58 +02:00
16c92706d8 some comments for allocators 2019-07-04 17:33:46 +02:00
7f410f0655 initial replaceable unlinked inputs handler
Depending the use case, unlinked node inputs should be handled differently.
Sometimes, it is okay to load them from RNA on every call, but
sometimes they should also be hardcoded into the generated assembly.
2019-07-04 16:30:31 +02:00
cdd5d41e6e fix memory leak 2019-07-04 16:08:07 +02:00
3a0cfed4aa first time using the function nodes within bparticle nodes 2019-07-04 15:57:38 +02:00
82ae82488e cleanup data flow graph generation 2019-07-04 15:31:09 +02:00
e7ff5b1470 don't use output parameter when building data flow graph 2019-07-04 15:02:10 +02:00
7a6ab07e9e make it possible to build data flow graphs for any node tree 2019-07-04 14:49:53 +02:00
bee737bbad store list with non-reroute and non-frame nodes explicitely 2019-07-04 14:03:06 +02:00
d66644dd87 cleanup finding input and output nodes of function 2019-07-04 13:57:05 +02:00
be0ed93f99 use indexed node tree in more places 2019-07-04 13:44:33 +02:00
b06ed62500 initial age reached event node 2019-07-04 13:29:49 +02:00
8628f329e8 cleanup rna access 2019-07-04 11:34:49 +02:00
4ae4d125cd simple point emitter node for testing 2019-07-04 11:30:49 +02:00
c44a8e5ede initial emitter inserter 2019-07-04 11:17:21 +02:00
4cb0cb6a06 improve indexed node tree 2019-07-04 10:54:17 +02:00
96f4921704 refactor IndexedBParticlesTree 2019-07-04 10:32:57 +02:00
a6b5767d27 rename NodeTreeQuery to IndexedNodeTree 2019-07-04 10:29:35 +02:00
28c4b3e6f8 identify particle types with name instead of integer
While this might be less efficient, it is much more comfortable to work with.
Also it might be possible to make it a bit more efficient again in the future.
2019-07-04 10:20:32 +02:00
fefeaec48d Merge branch 'master' into functions 2019-07-03 19:11:23 +02:00
5aa6c03fbc use BLI_STATIC_ASSERT 2019-07-03 19:10:07 +02:00
f16c8eec40 optimize adding multiple new values to multimap 2019-07-03 19:02:49 +02:00
10437bba07 only use new multimap implementation 2019-07-03 19:01:14 +02:00
2df06e3172 fix issue with multiple links at same socket 2019-07-03 18:49:57 +02:00
d14073a5fc better multimap implementation for a specific use case 2019-07-03 18:42:29 +02:00
918cdba723 missing from last commit 2019-07-03 18:42:01 +02:00
33dda8463d improved lookup or insert functions for map 2019-07-03 18:41:16 +02:00
b9fee1a5d7 return index when value was inserted before 2019-07-03 17:09:33 +02:00
9af1aa48ab remove unnecessary template parameter 2019-07-03 16:56:01 +02:00
d9277bf1c4 support storing multiple connected sockets per socket 2019-07-03 16:35:36 +02:00
5db4d8269e add multiple new elements to multimap 2019-07-03 16:33:53 +02:00
d037390cd2 iterate keys of multimap 2019-07-03 16:13:35 +02:00
011e88d03c convert linked list to array for further processing 2019-07-03 15:57:56 +02:00
29413c894b class to simplify querying bparticle node tree 2019-07-03 15:51:39 +02:00
b80000f073 rename BNodeTreeLookup to NodeTreeQuery 2019-07-03 15:36:32 +02:00
9c7ef45214 Use float3 instead of custom vector type in function system 2019-07-03 15:34:47 +02:00
bf55ab38d8 comment on llvm builder and types 2019-07-03 15:16:22 +02:00
2448312278 comment on tuple-call 2019-07-03 15:01:54 +02:00
8840be2fb9 Merge branch 'master' into functions 2019-07-03 11:19:24 +02:00
aaef6e6e3a comment on tuple 2019-07-02 18:38:06 +02:00
7a7592e615 comment on CPPTypeInfo 2019-07-02 18:01:06 +02:00
c347373fc6 Comment on SourceInfo, FunctionGraph and DataFlowGraphBuilder 2019-07-02 17:51:10 +02:00
32fdee4444 comment on data flow graph 2019-07-02 17:41:56 +02:00
f5358bc122 comment on Function class 2019-07-02 17:27:00 +02:00
9a9b1e1595 separate declaration from implementation for Function type 2019-07-02 17:11:20 +02:00
6e786c85ea comment on type system 2019-07-02 17:01:14 +02:00
49804947e9 separate declaration and implementation of methods of type 2019-07-02 16:42:20 +02:00
b22a82869c get rid of using TypeVector 2019-07-02 16:33:12 +02:00
4fcd92f624 Tuple now has a weak reference to its metadata to prevent synchronization overhead 2019-07-02 16:31:34 +02:00
d94d68afde parse very simple bparticles node tree 2019-07-02 16:09:56 +02:00
5481e5119b use multimap to more generally store socket origins 2019-07-02 15:31:01 +02:00
1a7507709f get number of values stored per key in multimap 2019-07-02 15:30:32 +02:00
a0cff9838a utility to get nodes with idname 2019-07-02 15:05:38 +02:00
deb642d2ec disable bmesh unit test due to linker errors that I cannot fix now 2019-07-02 15:01:22 +02:00
e0af39a0dc construct SmallVector from ListBase 2019-07-02 15:00:38 +02:00
7db1888bf2 move node tree lookup utilities to BKE 2019-07-02 14:15:20 +02:00
a4fd3f7cc4 store pointer to node tree in modifier data 2019-07-02 12:51:32 +02:00
33e09fe233 initial particle type and mesh emitter node 2019-07-02 12:40:01 +02:00
d41e65e44c rename function_nodes folder to nodes and add bparticles tree type 2019-07-02 12:13:16 +02:00
d5b0df396a various small improvements 2019-07-02 12:02:54 +02:00
940776370c Merge branch 'master' into functions 2019-07-02 09:13:37 +02:00
59d9310b28 initial point randomization accross surface 2019-07-01 17:45:21 +02:00
77d8f118ef avoid stepping when the emitter is moving quickly 2019-07-01 17:29:14 +02:00
2e2fab2f3b cleanup 2019-07-01 17:12:10 +02:00
145e061bce minor cleanup 2019-07-01 17:02:26 +02:00
05027c4d41 cleanup bounce code a little 2019-07-01 16:57:43 +02:00
d7e2e5f99d remove comments that are more confusing than helpful 2019-07-01 15:53:46 +02:00
ad516eda2f cleanup event handling code 2019-07-01 15:47:56 +02:00
6ae9324ada comment on time span 2019-07-01 15:40:22 +02:00
8a6a59d99e comment on particle block 2019-07-01 15:36:15 +02:00
7e2418a877 rename block.size() to block.capacity() 2019-07-01 15:26:28 +02:00
7afeb9775a rename inactive to unused to avoid confusion 2019-07-01 15:25:09 +02:00
f52ff92cc3 rename block.slice() to block.attributes_slice() 2019-07-01 15:21:01 +02:00
ab0c7b8485 rename block.slice_all() to block.attributes_all() 2019-07-01 15:19:24 +02:00
f67bb0ad35 rename block.slice_active() to block.attributes() 2019-07-01 15:16:12 +02:00
c74de0c2e9 comment on particles container 2019-07-01 15:14:39 +02:00
b9baffc59d Comment on AttributeArraysCore and AttributeArrays 2019-07-01 15:02:39 +02:00
eb3fc2c23a comments for AttributeInfo 2019-07-01 14:48:27 +02:00
468e2b8e66 cleanup extracting all particle positions 2019-07-01 14:14:02 +02:00
0de90d6f88 make sure event data is not overwritten by later events 2019-07-01 14:01:06 +02:00
50802c0e6c comment remaining api functions 2019-07-01 13:43:27 +02:00
00bde8527d more comments on api 2019-07-01 12:59:59 +02:00
ac57332ddf access current simulation time through accessor 2019-07-01 12:42:08 +02:00
eb2da8bc5a improve attribute interface 2019-07-01 12:39:02 +02:00
6f069a03d1 new integrator interface 2019-07-01 12:20:55 +02:00
4bdc04e8fb comment particle system api 2019-07-01 12:12:05 +02:00
37c0e0e6e9 cleanup: separate declarations from implementations 2019-07-01 11:42:15 +02:00
a8eb1d28db start cleaning up core.hpp 2019-07-01 11:24:22 +02:00
585d6a51c0 initial api for threading with thread local data
This does look quite ugly so far, but it is still better than doing it manually every time.
2019-07-01 11:08:00 +02:00
6335c3dee8 change threading api 2019-07-01 10:16:29 +02:00
6289393f7b initial c++ api for parallel processing on top of BLI_task 2019-07-01 09:57:34 +02:00
d65427ca94 Merge branch 'master' into functions 2019-07-01 09:37:12 +02:00
2c3d53cf7f minor changes 2019-06-30 15:59:47 +02:00
3c5f321639 fix indices errors 2019-06-30 15:51:18 +02:00
af46f07ef5 initial bounce test 2019-06-30 15:21:43 +02:00
b7b2849c82 initial event storage 2019-06-30 14:34:31 +02:00
ae346fb579 bring back old test setup 2019-06-30 14:07:58 +02:00
4fb660d036 rename run_actions to execute_events 2019-06-30 13:55:20 +02:00
27149c94ee rename EventAction to Event + interface name changes 2019-06-30 13:54:22 +02:00
2618c497c5 rename old Event to EventFilter 2019-06-30 13:49:18 +02:00
3c80e4bc92 code for testing 2019-06-30 13:47:20 +02:00
59e58328ec multithread deletion of tagged particles 2019-06-30 13:42:31 +02:00
c839b2b7b5 use Vector Adapator to simulate to next event 2019-06-30 13:29:01 +02:00
ea5a9c8ec0 use array allocator in simulate_with_max_n_events function 2019-06-30 13:11:26 +02:00
88f5ba087a remove last event times for now 2019-06-30 12:17:23 +02:00
749af6d36c enable threading again 2019-06-30 12:10:40 +02:00
b60dcf9765 store fixed array allocator per thread 2019-06-30 11:51:03 +02:00
8e6bdabb00 always display nanoseconds for now 2019-06-30 11:27:18 +02:00
eb78369271 initial usage of fixed array allocator in simulation 2019-06-30 11:16:14 +02:00
686fa5ca84 utility to allocate attributes from array allocator 2019-06-30 11:12:02 +02:00
0fd83de6c3 new fixed array allocator 2019-06-30 11:11:34 +02:00
80a84f7c11 remove some timers 2019-06-30 11:00:48 +02:00
aaf4b00ba1 test impact of manual vectorization (2x speedup) 2019-06-30 10:40:31 +02:00
2ec577c75e separate methods of integrator 2019-06-30 10:40:08 +02:00
2f91feeb03 allocate attributes at 64 byte aligned addresses 2019-06-30 10:37:49 +02:00
78362edb49 optimization when indices are trivial 2019-06-30 09:55:54 +02:00
1e45e1b6b2 don't check for events when there are none 2019-06-30 09:53:24 +02:00
0bbf940965 better timing statistics 2019-06-30 09:49:10 +02:00
d183496162 cleanup: pass events instead of particle type 2019-06-30 09:26:04 +02:00
b6e0a11e41 prepare simulation for optimizations 2019-06-30 09:22:28 +02:00
a8473ead9e new emitter for testing 2019-06-30 09:21:56 +02:00
ffb79ef037 support printing timings in nanoseconds 2019-06-30 09:04:54 +02:00
e9b83d74d2 cleanup 2019-06-29 16:19:12 +02:00
d53b5af637 refactor high level simulation code 2019-06-29 16:17:01 +02:00
5f7e8e6670 refactor simulation main entry point 2019-06-29 16:04:42 +02:00
ee16f26610 remove unnecessary use of smart pointers 2019-06-29 15:56:25 +02:00
c2e13a2f94 combine event and action 2019-06-29 15:51:38 +02:00
19dda33497 optimization for the case when particle indices are trivial 2019-06-29 15:36:51 +02:00
8dd4082b27 easy access of first and last element in array ref 2019-06-29 15:36:13 +02:00
d206062e10 implicitely convert SmallSetVector to ArrayRef 2019-06-29 15:11:22 +02:00
1d031a92a5 define attributes as part of particle type 2019-06-29 15:05:15 +02:00
425d620d57 more generic way to apply attribute offsets 2019-06-29 14:14:48 +02:00
f77dfe6e94 cleanup: rename to attribute_offsets 2019-06-29 13:48:59 +02:00
b65783941c separate integrator from simulation 2019-06-29 13:44:00 +02:00
0f26e99517 bring back loop to simulate n events 2019-06-29 13:08:48 +02:00
506b6d7df9 temporarily unrolled event loop 2019-06-29 12:53:19 +02:00
efd91c4701 integrate particles of entire block instead of a particle set 2019-06-29 12:29:06 +02:00
21dfdbc58b Merge branch 'master' into functions 2019-06-28 17:42:08 +02:00
7e767d0858 initial experimental vector adaptor data structure 2019-06-28 17:41:15 +02:00
3be92ce31b function to simulate a block 2019-06-28 16:41:18 +02:00
bb537df8d0 cleanup remove unused return parameter 2019-06-28 15:46:15 +02:00
3dbd8b81ba compute ideal offsets only once per particle per time step
I have to bring back simulating multiple events per particle now.
2019-06-28 15:43:50 +02:00
6c5a2fecf6 refactor: move computation of ideal offsets up 2019-06-28 15:33:56 +02:00
4c85e861ea refactor applying remaining particle offsets 2019-06-28 15:31:36 +02:00
b0f2b24160 cleanup 2019-06-28 15:12:42 +02:00
40f65055e3 loop only over particles with events instead of all 2019-06-28 14:58:18 +02:00
624794e006 float3 * scalar operator 2019-06-28 14:46:15 +02:00
a0fcdb0f98 extract method to compute current time per particle 2019-06-28 14:29:16 +02:00
035d92dd1a faster temporary random number function 2019-06-28 14:20:04 +02:00
a4a69e605c improve interface for killing particles 2019-06-28 14:11:06 +02:00
105353359c improve birth time handling in action interface 2019-06-28 13:49:47 +02:00
c500e94670 cleanup handling of birth times in emitters 2019-06-28 13:30:36 +02:00
d2e050e5e1 experimental explode action 2019-06-28 12:50:16 +02:00
485b07dc55 give action access to current time per particle 2019-06-28 12:30:50 +02:00
58452b095d initial test for spawning new particles in an action 2019-06-28 11:32:08 +02:00
788297480f split EmitTarget into EmitTargetBase and TimeSpanEmitTarget 2019-06-28 10:53:15 +02:00
fad7613963 simulate newly created particles until there are no new ones 2019-06-28 10:45:15 +02:00
b928475df0 separate partial simulation of new particles from emitters 2019-06-28 10:34:38 +02:00
2835c8df6f allow SmallVector to use ArrayRef 2019-06-28 09:59:32 +02:00
83a8f830c0 simulate particles of all types at the same time 2019-06-28 09:16:09 +02:00
7326d0a3f8 Merge branch 'master' into functions 2019-06-28 08:56:38 +02:00
17441b327b use one block allocator per thread instead of per block 2019-06-27 17:03:44 +02:00
700c2c823a keep track of newly allocated blocks 2019-06-27 16:21:29 +02:00
58253b535f make Block Allocator part of action interface 2019-06-27 15:41:25 +02:00
dd55ac9128 cleanup: remove unnecessary state parameter 2019-06-27 15:30:56 +02:00
878028d385 make it easier for emitters to specify birth moments 2019-06-27 15:07:39 +02:00
42d70c8152 emitter decides at which time individual particles are spawned 2019-06-27 14:29:26 +02:00
ab136cb188 size-value constructor for SmallVector 2019-06-27 13:59:18 +02:00
f2ed497129 initialize attributes with default values 2019-06-27 13:46:03 +02:00
e858f2e9ff thread safe block creation and deletion 2019-06-27 13:27:52 +02:00
551ae21bff use block allocator to allow muliple emitters to emit into the same block 2019-06-27 13:25:01 +02:00
2fa66f6f96 move function from header to cpp 2019-06-27 12:40:33 +02:00
8349161f14 refactor emitter interface internals
The problem previously was that all the information about which
blocks contain the attributes was not accessible by the emitter.
2019-06-27 12:36:47 +02:00
db8c116f5c remove request_raw function from public emitter interface 2019-06-27 11:21:59 +02:00
938bd0edc4 ParticleSet should know the block it is in 2019-06-27 11:13:48 +02:00
40a2f975dc Merge branch 'master' into functions 2019-06-27 10:02:07 +02:00
06fab69664 visualize different particle types with vertex colors 2019-06-26 18:18:38 +02:00
ddb44cefbd figure out how to add vertex colors to a new mesh 2019-06-26 15:58:32 +02:00
6ea4623ea1 ability to store attribute defaults in AttributeInfo 2019-06-26 15:34:57 +02:00
1d807a8399 Allow emitters to emit multiple types of particles 2019-06-26 14:46:44 +02:00
6704c82293 new ActionInterface class 2019-06-26 14:12:12 +02:00
333d82ebc0 remove unused variable 2019-06-26 12:52:08 +02:00
165580c661 Update attribute arrays based on which attributes are required 2019-06-26 12:51:58 +02:00
9728f45e89 particles container has responsibility to allocate attribute arrays again 2019-06-26 12:06:22 +02:00
2d7673578e comment out unused variables 2019-06-26 11:41:12 +02:00
6736ce6a03 Merge branch 'master' into functions 2019-06-26 11:34:08 +02:00
059639e301 new EventInterface abstraction 2019-06-24 12:37:27 +02:00
c2e4c7490f take reference to emitter interface 2019-06-24 09:47:30 +02:00
4b5a23b096 rename EmitterHelper to EmitterInterface 2019-06-24 09:44:14 +02:00
c5744593ec rename pindex_of to get_particle_index 2019-06-24 09:40:51 +02:00
b12daf64ca separate tuple from tuple-call 2019-06-24 09:38:54 +02:00
450d3be01f Merge branch 'master' into functions 2019-06-24 09:13:21 +02:00
7c4208f8a9 Merge branch 'master' into functions 2019-06-21 18:52:00 +02:00
5f0286302e Comment methods of ArrayRef and StringRef 2019-06-21 18:51:37 +02:00
da5f1dd8e5 comment methods of some more data structures 2019-06-21 18:41:04 +02:00
b247fc7d46 comments for methods of SmallVector 2019-06-21 18:12:07 +02:00
a19a5f8675 initial code layout for updating the required attributes 2019-06-21 16:56:19 +02:00
3a87096f24 allocate attributes arrays in AttributeArraysCore 2019-06-21 16:48:19 +02:00
8ee05156e6 simulate all particle types with description 2019-06-21 16:21:25 +02:00
098cb4ceaa cleanup copying ArrayRef to pointer 2019-06-21 16:12:16 +02:00
cf81da2547 refactor towards supporting multiple particle types 2019-06-21 16:03:30 +02:00
ab51c0e7dc initial particle type intermediate class 2019-06-21 15:10:23 +02:00
3e5fb5d83e fix using wrong length 2019-06-21 14:56:13 +02:00
d5bc8a6840 support point and tetrahedon mesh creation 2019-06-21 14:45:41 +02:00
db06b3a0b4 comment to note invariants of particle indices arrays 2019-06-21 14:14:34 +02:00
da1524fca8 new ParticleSet abstraction: attribute arrays + particle indices 2019-06-21 14:09:59 +02:00
5a31c30b5c transform emitter mesh to world space 2019-06-21 13:28:17 +02:00
cae29a0d9d transform collision rays to object space 2019-06-21 13:23:55 +02:00
c9958be749 initial mesh collision event 2019-06-21 12:53:51 +02:00
1294a9b5b4 generate tetraeders for particles 2019-06-21 12:02:27 +02:00
9f53e98472 minor cleanup 2019-06-21 11:32:55 +02:00
a7a6fe3ebc initial double event avoidance 2019-06-21 11:19:16 +02:00
5d590fc1bb extract method to simulate multiple events per step 2019-06-21 11:00:48 +02:00
e5fa7e58ba Merge branch 'master' into functions 2019-06-21 10:24:06 +02:00
f1369dd6ac bring back multithreading support 2019-06-20 15:49:49 +02:00
ad051d46aa don't inline simulation functions to make profiles more useful 2019-06-20 15:20:55 +02:00
a29da3be76 remove outdated simulation code 2019-06-20 15:17:23 +02:00
82c4bdc6d0 move events and actions to separate files 2019-06-20 15:16:57 +02:00
f0cca10248 use mesh surface emitter again 2019-06-20 15:05:08 +02:00
0bf6fa4729 test multiple events 2019-06-20 14:56:42 +02:00
9c7c2d0de3 support for multiple events per particle per time step 2019-06-20 14:34:09 +02:00
0886cdb1fe support killing particles again 2019-06-20 14:23:39 +02:00
c7b1129e77 bring back event handling 2019-06-20 13:57:32 +02:00
bcc877e180 compress blocks after each simulation step 2019-06-20 12:51:07 +02:00
2a9316d33c actually free emitters etc. 2019-06-20 12:44:07 +02:00
831d5665b0 apply forces to particles again 2019-06-20 12:36:23 +02:00
cfb18bb6c3 Pass particle influences into the right functions 2019-06-20 12:21:30 +02:00
dd8d2517d6 separate emitters from particle influencers 2019-06-20 12:16:43 +02:00
5561684337 support emitting particles again 2019-06-20 12:10:07 +02:00
f7cca29528 bring back creating the combined positon array 2019-06-20 11:18:54 +02:00
c8bf758a9a restructure solver api
Now I have to bring back all the functionality that was there already.
2019-06-20 11:04:45 +02:00
c74934cbf9 remove abstractions that are wrong for now 2019-06-20 10:17:09 +02:00
10fe6f6037 Merge branch 'master' into functions 2019-06-20 09:43:01 +02:00
05969e5418 initial curve emitter 2019-06-19 12:24:20 +02:00
0a7715e308 move forces into separate file 2019-06-19 11:06:23 +02:00
3138c7c5d7 rename files 2019-06-19 10:39:02 +02:00
3134c78661 remove turbulence force to have less distorted profiles 2019-06-19 10:34:30 +02:00
20c7fa6bcc extract temporary method for old particle deletion 2019-06-19 10:34:08 +02:00
d43d28a348 avoid creating the same arrays many times 2019-06-19 10:29:58 +02:00
5554851f15 refactor moving particles to next event time 2019-06-18 18:23:10 +02:00
ae80a416bd extract methods to simulate to next event vs. to next frame 2019-06-18 16:45:18 +02:00
7b15ec8713 Integrate particles again after an event 2019-06-18 16:22:05 +02:00
647503ec47 remove specialized step function for new particles 2019-06-18 15:18:31 +02:00
7629b86581 use indices mask to update only certain particles 2019-06-18 15:02:59 +02:00
913e130897 naming cleanup 2019-06-18 14:26:57 +02:00
de5971b1df initial positional event abstraction 2019-06-18 14:21:35 +02:00
d600fb3a45 more explicit particle integration step 2019-06-18 14:02:32 +02:00
17bff65c6b Use multithreading when moving particles forward
Timings in my current test file (nanoseconds per particle per time step):
* Debug Build: 150ns
* Optimized Build: 47ns
* With threading: 9ns
2019-06-18 12:35:22 +02:00
962a64aaaa restructure simulation steps in solver 2019-06-18 12:03:46 +02:00
5d08ae535a Utility to convert SmallSet to SmallVector 2019-06-18 12:03:15 +02:00
dd856ee973 Cleanup: reorder some functions 2019-06-18 11:49:15 +02:00
e8e94a6800 Allow emitters to emit into separate buffers 2019-06-18 11:46:14 +02:00
14125d2652 minor emitter API improvement 2019-06-18 10:05:16 +02:00
155c1de9ad improved particle attribute handling 2019-06-17 15:52:04 +02:00
8482ee2be9 utilities to create a range before/after another 2019-06-17 15:51:06 +02:00
270f4cb1f0 SmallVector: Append N Times 2019-06-17 15:13:19 +02:00
125ff9f320 initial mesh surface emitter 2019-06-17 12:16:41 +02:00
e8ecbf3a42 Emit from other objects origin 2019-06-17 11:19:26 +02:00
b010464151 simple point emitter 2019-06-17 10:59:04 +02:00
e77d269088 Merge branch 'master' into functions 2019-06-17 10:14:23 +02:00
dd201e3fc3 Merge branch 'master' into functions 2019-06-13 11:31:10 +02:00
4faf2de83a initial particle action abstraction 2019-06-10 12:23:15 +02:00
aa05731607 compute new positions and velocities in separate buffer 2019-06-10 12:05:28 +02:00
81eecb252a cleanup naming 2019-06-10 12:04:16 +02:00
97ecf23069 ArrayRef.copy_from 2019-06-10 12:03:29 +02:00
8e3178e1f2 use NamedBuffers in more places 2019-06-10 11:11:32 +02:00
2d73ff2380 rename buffer accessors 2019-06-10 11:07:40 +02:00
c49ca5c99f rename Vec3 to float3 2019-06-10 10:53:36 +02:00
b5fda893ce add byte attribute type 2019-06-09 13:51:37 +02:00
bcc8a07fd3 experimental turbulence force 2019-06-09 13:18:55 +02:00
5da27a41c1 improve naming 2019-06-09 12:59:41 +02:00
da1eb092eb flag killed particles in step function 2019-06-09 12:55:26 +02:00
93e38f5f6b cleanup stepping a slice of particles 2019-06-09 12:45:24 +02:00
4ffc3c46a1 partial step newly emitted particles 2019-06-09 12:37:21 +02:00
a38b89ecb5 initial emitter info class 2019-06-09 11:58:00 +02:00
270cee3d4a fix old particle removal 2019-06-08 14:02:51 +02:00
dc26770356 keep track of time since simulation start 2019-06-08 14:00:24 +02:00
a4de314d20 ArrayRef take_front and take_back methods 2019-06-08 13:55:21 +02:00
c77945366c pass elapsed seconds into step function 2019-06-08 13:39:49 +02:00
f693a5b66d automatically initialize attributes the emitter does not care about 2019-06-08 13:30:33 +02:00
c76ed1781b method to fill an ArrayRef 2019-06-08 13:28:35 +02:00
941159fba5 emitter can decide which attributes it initializes 2019-06-08 12:59:04 +02:00
e3d3d2eec7 introduce concept of particle block slices 2019-06-08 12:38:30 +02:00
3fd4418cfd fix lazy init unit test 2019-06-08 12:37:49 +02:00
c0b36372d0 easy access last element in vector 2019-06-08 12:37:39 +02:00
3c04bdbddb cleanup naming and implement some destructors 2019-06-08 11:54:45 +02:00
17804e4ecb experiment with an emitter abstraction 2019-06-07 23:12:35 +02:00
dbc50aa156 initial deletion or particles and compression of blocks 2019-06-07 22:43:29 +02:00
c2fa4a33fa test NamedBuffersRef abstraction to separate components
More specifically this separates implementation details of
Forces and ParticleBlocks.
2019-06-07 18:07:54 +02:00
9351db7146 work-in-progress functions to compress a set of particle blocks 2019-06-07 17:50:33 +02:00
4c0e7a285a initial particles container 2019-06-07 17:18:18 +02:00
d0cbd39310 initial force implementation 2019-06-07 15:53:48 +02:00
2c519ceb63 simple Vec3 type 2019-06-07 15:53:12 +02:00
2bcf091ba9 control simulation with some properties 2019-06-07 15:13:11 +02:00
80ec80cb83 don't reset simulation when pausing playback 2019-06-07 12:34:15 +02:00
ed02e1d252 cleanup interface to solver 2019-06-07 12:30:39 +02:00
d3013152ce little bit more interesting particle movement 2019-06-07 12:24:28 +02:00
3d797d0070 splitup bparticles code into multiple files 2019-06-07 12:17:22 +02:00
41cbcf96e9 try a different approach to connect state to solvers 2019-06-07 12:00:02 +02:00
01196be661 initial particle system api test
Still not happy with the way solver-dependent state is handled.
2019-06-07 11:04:01 +02:00
741ed59745 very simple particles state reset logic 2019-06-06 17:43:23 +02:00
b61fce82f9 more consistent naming in C wrappers 2019-06-06 11:33:46 +02:00
c5850f6ef1 use runtime data in modifier 2019-06-06 11:21:31 +02:00
56a0a71649 new simulations folder with some test code 2019-06-06 10:42:01 +02:00
6f728beec9 Merge branch 'master' into functions 2019-06-06 10:10:35 +02:00
6262b2bf7c initial empty particle nodes modifier 2019-06-05 10:28:26 +02:00
0387abd20f better explanation for lazy-init macros 2019-06-05 10:05:27 +02:00
473b79b4c2 remove unused include 2019-06-05 09:58:01 +02:00
6ffab86a4d simplify naming for lazy init macros 2019-06-05 09:56:25 +02:00
63c4712450 lazy init: thread safe registration and utility to list all 2019-06-05 09:47:27 +02:00
4df64a4393 improve move semantic usage in BLI::Optional 2019-06-04 18:14:37 +02:00
6ac4a72b28 free cached vectorized functions 2019-06-04 18:05:15 +02:00
77df7c61e6 Destruct lazy initialized objects when Blender quits 2019-06-04 17:38:05 +02:00
b8cb48b630 Merge branch 'master' into functions 2019-06-04 16:31:37 +02:00
a5413ba0f8 sort includes 2019-05-28 15:18:19 +02:00
5ea27e3d14 cleanup SmallVector 2019-05-28 15:14:20 +02:00
a34761afc0 Reduce wasted space in Function class
This is achieved by storing strings in a single buffer instead
of using `std::string`, which does small object optimization
for every string individually. This optimization can be done
because all strings are known when the function is build and
don't change later on.
2019-05-28 12:11:11 +02:00
5c72fb6a34 implement == operator for StringRef 2019-05-28 11:42:53 +02:00
3913b81f9e construct StringRefNull from pointer and length 2019-05-28 11:15:50 +02:00
a02cf6a05b Merge branch 'master' into functions 2019-05-28 10:53:36 +02:00
68174cf0b2 Merge branch 'master' into functions 2019-05-23 17:27:26 +02:00
cbb8bd467b better cross platform exponent computation 2019-05-22 17:31:43 +02:00
8c37c378a4 more assertions in ArrayLookup 2019-05-22 17:21:12 +02:00
e59d0263ba create ArrayRef from std::vector and std::array 2019-05-22 17:11:09 +02:00
dac0f4864d cleanup SmallMap 2019-05-22 17:00:10 +02:00
28887080a5 ArrayRef constructor for SmallSet 2019-05-22 16:41:53 +02:00
3ab2a2af29 correct small object optimization for sets and maps 2019-05-22 16:37:07 +02:00
d5b707b6fb improve SmallStack class 2019-05-22 16:22:47 +02:00
9ec8e308e7 more efficient small vector extend 2019-05-22 16:16:34 +02:00
b3283176a0 fix memory leaks in unit tests 2019-05-22 16:05:01 +02:00
24c3b57ec3 remove unused StringCollection 2019-05-22 15:53:15 +02:00
7863cf89de cleanup ScopedTimer 2019-05-22 15:41:20 +02:00
900e7f6352 Merge branch 'master' into functions 2019-05-22 15:31:28 +02:00
bddc6999b0 support for caching auto vectorized functions 2019-05-20 11:19:06 +02:00
357fa4a5ba equality operator for functions 2019-05-20 11:07:41 +02:00
0338da1063 smallmap: lookup or insert using key function 2019-05-20 11:07:23 +02:00
341b078d91 allow creating small vector with different size from array ref 2019-05-20 11:06:53 +02:00
d8d6f2a521 smallmap: lookup or insert using callback 2019-05-20 10:55:15 +02:00
92a3a4e029 speedup when all types in tuple meta are trivially destructible 2019-05-20 09:51:33 +02:00
0b63963c5a llvm vectors are not stored as struct anymore 2019-05-20 09:42:29 +02:00
a10f336346 Merge branch 'master' into functions 2019-05-20 09:36:28 +02:00
1bde9ab004 remove signature and paramter classes 2019-05-17 12:02:22 +02:00
ffeea91347 don't use signature in function anymore 2019-05-17 11:59:40 +02:00
e0032e8446 remove more dependencies on signature and parameter types 2019-05-17 11:46:31 +02:00
d6eb9668a0 move more signature logic into function 2019-05-17 11:18:30 +02:00
3bc03102d8 Merge branch 'master' into functions 2019-05-17 11:11:49 +02:00
3cddf75818 use StringRef and ArrayRef in more places 2019-05-16 12:02:57 +02:00
9d92456c88 use ArrayRef in more places 2019-05-16 11:52:56 +02:00
9107197320 use ArrayRef in more places 2019-05-16 11:46:39 +02:00
0a66b12776 less usage of InputParameter and OutputParameter type 2019-05-16 11:40:12 +02:00
9de7d3fa45 use new FunctionBuilder instead of creating Signature manually 2019-05-16 10:46:57 +02:00
3f82445d43 windows build fix 2019-05-16 10:15:21 +02:00
eb74be102e Rename StridedArrayRef to MappedArrayRef 2019-05-15 18:03:08 +02:00
836a780649 Merge branch 'master' into functions 2019-05-15 17:55:11 +02:00
8ab87c1998 initial StringCollection class 2019-05-15 17:16:47 +02:00
39d4e0182c use string ref in llvm ir builder 2019-05-15 11:39:25 +02:00
23c1b1edc8 deduplicate string ref code 2019-05-15 11:38:06 +02:00
13e06e7670 use string ref in more places 2019-05-15 11:22:50 +02:00
6dedb028d8 use string ref in more places 2019-05-15 11:17:20 +02:00
3b6bed43cd use string ref for type names 2019-05-15 11:10:02 +02:00
92c1d9044c new StringRefNull class 2019-05-15 11:00:07 +02:00
6e4866465d initial StringRef class 2019-05-15 10:49:38 +02:00
dbced1d563 Merge branch 'master' into functions 2019-05-15 10:16:35 +02:00
4b6799394f Some documentation for the C++ data structures in BLI 2019-05-13 18:38:37 +02:00
f7fd87d9d2 Merge branch 'master' into functions 2019-05-13 10:05:30 +02:00
3cb181ffe0 utilities to access function parameters 2019-05-12 20:25:49 +02:00
f959f4d2b2 use ArrayRef in more places 2019-05-12 20:07:16 +02:00
f2e5ed0e34 missing from last commit 2019-05-12 20:04:36 +02:00
38531114f7 initial support for defaults when using auto vectorization 2019-05-12 20:04:16 +02:00
4a2193927d improve ArrayRef 2019-05-12 19:47:46 +02:00
a2ef8e34d5 support different list lengths in llvm vectorization 2019-05-12 17:53:41 +02:00
ec2c1e54ed print with stacktrace from IR 2019-05-09 13:20:29 +02:00
d9c7df2492 put current loop iteration on stack 2019-05-09 13:02:41 +02:00
9f6e0a74cb float comparison IR 2019-05-09 12:43:58 +02:00
192b5e9cfb simplify usage of construct builders 2019-05-09 12:29:00 +02:00
e0c2784327 support for calling printf from llvm ir 2019-05-09 12:23:12 +02:00
9880a1b366 printing from Ir cleanup 2019-05-09 10:57:30 +02:00
6151808f1b initial if then else construct helper 2019-05-09 10:45:07 +02:00
989c2691ac improve ir loop constructs 2019-05-09 10:31:22 +02:00
5fe4ad93bc more specialized iterations loop builder 2019-05-09 10:20:24 +02:00
dbb52fec27 initial for loop builder helper 2019-05-09 09:51:45 +02:00
6df353d805 Merge branch 'master' into functions 2019-05-08 18:06:43 +02:00
bbb3770be2 speedup size constructor of small vector 2019-05-03 12:42:50 +02:00
49131279ee generate more readable IR 2019-05-03 12:39:21 +02:00
c1267d9e01 allow passing function pointer name 2019-05-03 12:18:35 +02:00
4cd8792882 cleanup code builder interface 2019-05-03 12:16:00 +02:00
6ad32d6675 create llvm wrapper function for calls to pointers 2019-05-03 12:09:40 +02:00
4390091f8b utility to create a float constant 2019-05-03 11:38:33 +02:00
2a957e405d cleanup small vector 2019-05-03 11:37:58 +02:00
c38b9e12b2 Merge branch 'master' into functions 2019-05-03 10:43:49 +02:00
2a87cfd809 allocate function bodies within function 2019-05-02 11:39:42 +02:00
0ca57c14af rename extend to add_extension 2019-05-02 11:21:52 +02:00
5d4bf32c40 allocate type extensions in type directly
This makes sense, since every extension is owned
by a Type object. Also this improves thread safety.
2019-05-02 11:19:05 +02:00
9deeb8eb22 use centralized pool to reuse llvm contexts 2019-05-02 10:48:30 +02:00
676918e7a1 Merge branch 'master' into functions 2019-05-02 10:16:52 +02:00
6e652a42fc splitup llvm vectorization into multiple methods 2019-05-01 19:26:51 +02:00
640a744d54 start simplifying automatic vectorization 2019-05-01 19:12:04 +02:00
1ab8b7f658 move c functions to access lists to lists.cpp 2019-05-01 18:26:42 +02:00
28051e2754 rerun clang format on functions folder 2019-05-01 18:01:03 +02:00
bde00c4aed Merge branch 'master' into functions 2019-05-01 17:59:27 +02:00
576243ba39 Initial automatic function vectorization with llvm 2019-05-01 15:27:00 +02:00
f09f8ad61f move slicing functionality to ArrayRef 2019-05-01 11:39:05 +02:00
034639a877 initial vector slicing API 2019-05-01 10:57:26 +02:00
fd5d972efb Merge branch 'master' into functions 2019-05-01 10:20:10 +02:00
ffe0796c41 use first-class llvm vector for Vector type 2019-04-30 13:58:13 +02:00
e8e0e7bc69 rename SimpleLLVMTypeInfo to PackedLLVMTypeInfo 2019-04-30 12:48:44 +02:00
dc2979a942 cleanup LLVMBool type info 2019-04-30 12:42:26 +02:00
2524a5e509 new TrivialLLVMTypeInfo to simplify creating other types 2019-04-30 12:35:19 +02:00
45271f785a clear cached node states on file load 2019-04-30 12:07:20 +02:00
f5d0dbed20 move btree lookup class to separate file 2019-04-30 11:57:38 +02:00
3b00f6625c Merge branch 'master' into functions
This also removes dependency creation for function drivers
(due to merge conflicts that I could not resolve yet).
2019-04-30 10:55:36 +02:00
d1aa60da80 Merge branch 'master' into functions 2019-04-29 11:42:58 +02:00
0e0495cf32 Merge branch 'master' into functions 2019-04-29 10:52:11 +02:00
8f70d4986e splitup forwarding function 2019-04-28 21:15:43 +02:00
6c1e5d7f34 extract method that ensure all inputs 2019-04-28 19:30:39 +02:00
1aa827d496 extract method that ensures required inputs 2019-04-28 19:23:59 +02:00
b287de4e68 deduplicate stack setup code 2019-04-28 19:20:24 +02:00
f16e64435f deduplicate some code 2019-04-28 19:15:57 +02:00
26ce24b928 better type names 2019-04-28 19:12:26 +02:00
e80d9a5391 destruct unused values as early as possible 2019-04-28 18:56:16 +02:00
f48b9823a4 deduplicate code to setup tuples 2019-04-28 18:45:09 +02:00
1242de1b6d deduplicate some code 2019-04-28 18:38:47 +02:00
64210d6682 simplify stack info setup 2019-04-28 18:33:36 +02:00
049d66aa80 initial support for lazy inputs in new fgraph evaluation 2019-04-28 18:25:29 +02:00
da3d297b3f subscript operator for range 2019-04-28 17:50:44 +02:00
7b75b665d3 group node info into a struct 2019-04-28 15:06:23 +02:00
c9eb9f4ad1 fix error in last merge 2019-04-28 14:49:59 +02:00
df0b4a4d0e Merge branch 'master' into functions 2019-04-28 14:42:08 +02:00
c27bbb3eca use more correct type name 2019-04-27 23:59:33 +02:00
3f6357b970 initialize llvm for tests 2019-04-27 23:40:53 +02:00
93dea8967d unit test for Float Range function 2019-04-27 23:29:33 +02:00
5b6dde93e9 initial unit test for functions system 2019-04-27 23:18:14 +02:00
1db1ac121a reduce likelyhood for heap allocation in fgraph evaluation 2019-04-27 22:32:11 +02:00
b76f54e540 splitup graph evaluation in three parts 2019-04-27 22:23:23 +02:00
d01cc80b08 move more into the value storage abstraction 2019-04-27 22:16:28 +02:00
76c3bd772e move value storage into separate struct 2019-04-27 22:03:04 +02:00
e0531b4338 use macro for pointer offset 2019-04-27 20:21:41 +02:00
05985d98ff put values in a struct that are accessed together 2019-04-27 20:15:58 +02:00
833cdfdd0c remove unused socket flag 2019-04-27 19:58:30 +02:00
21f1e501a7 do less unnecessary data copies 2019-04-27 19:49:33 +02:00
bbede5b3bd copy computed value to fn_out immediatly 2019-04-27 19:34:49 +02:00
bae0d22e06 make it optional to run value destructors when tuple is destructed 2019-04-27 17:04:55 +02:00
eece95823c multipool tried to deallocate the wrong pointer 2019-04-27 12:55:07 +02:00
9ca8b7a444 initial non recursive evaluation of new data flow graph 2019-04-27 12:48:04 +02:00
a9efbd6bcd utility set functions 2019-04-27 12:21:13 +02:00
04a4f1aa4d extract ensure tuple calls function 2019-04-27 10:24:43 +02:00
ad168871b1 dot export for new data flow graph 2019-04-27 10:01:36 +02:00
4346e88286 Split up the data flow graph data structure
The main goal is to be able to traverse the graph very efficiently
once it is build. This is hard when the structure has to be dynamic
(i.e. it can be changed). The solution is to use a builder that
can dynamically construct the graph. Once everything is set up,
the graph is converted into the compact form for further use.
2019-04-26 19:21:28 +02:00
ccc4285dee Merge branch 'master' into functions 2019-04-26 17:09:11 +02:00
a8bc2fc2b7 Merge branch 'master' into functions 2019-04-25 09:57:14 +02:00
81b9187dda Merge branch 'master' into functions 2019-04-24 09:22:11 +02:00
844745da77 Simple range iterator with tests 2019-04-19 13:56:49 +02:00
34fda46a3e produce lookup statistics for map and set 2019-04-19 11:19:23 +02:00
866e9c31e9 socket builder utility function 2019-04-19 10:34:22 +02:00
6a7efc26bd support conversions in all directions between bool, int and float 2019-04-18 11:25:20 +02:00
12904214d1 update inferencing to new type rules 2019-04-18 11:01:17 +02:00
9b3e36f6c4 concept of conversion groups in type system 2019-04-18 10:42:39 +02:00
7178267f20 start using a better defined type system 2019-04-18 10:19:30 +02:00
2141478180 implicit conversions between float and integer lists 2019-04-18 09:42:29 +02:00
5333710282 Merge branch 'master' into functions 2019-04-18 09:13:01 +02:00
8c6457820b bring back llvm include dirs 2019-04-17 11:10:51 +02:00
bd54f55f3a add bf_functions to LIB 2019-04-17 11:00:22 +02:00
2213234715 Merge 'master' into 'functions' 2019-04-17 10:28:33 +02:00
9e1d43367c Merge 'master' into 'functions' 2019-04-17 10:26:56 +02:00
06a966ebe7 Merge 'master' into 'functions' 2019-04-17 10:25:47 +02:00
d348a27380 improved reuse of dummy slots in array lookup 2019-04-15 15:33:56 +02:00
b07b7d0a63 deduplicate some array lookup code 2019-04-15 15:03:23 +02:00
5d83b59751 splitup tests for set and set_vector 2019-04-15 14:48:07 +02:00
9bd835e1fb don't use linear search in SmallSetVector 2019-04-15 14:31:18 +02:00
4687f961f0 remove refcount class that is not used anymore 2019-04-15 14:26:16 +02:00
6615900384 pack list declaration handles implicitely convertable types 2019-04-15 10:39:05 +02:00
955dc9f977 add LIB to CMakeLists.txt 2019-04-15 10:33:39 +02:00
a628f1842b Merge branch 'master' into functions 2019-04-15 10:24:47 +02:00
158425fc61 use a multimap data structure to store links of output sockets 2019-04-11 13:47:01 +02:00
f92bc17cb3 utility to count the number of times an output socket is used 2019-04-08 18:57:01 +02:00
7e2f02b019 more generic function to find relevant sockets in a function graph 2019-04-08 18:35:58 +02:00
45917d435d utility functions for set and map 2019-04-08 18:34:35 +02:00
e352d7d3ca new Float Range node 2019-04-08 17:29:04 +02:00
750d47e4d9 fix inferencing of vectorized nodes 2019-04-08 17:06:11 +02:00
db03f3399c fix probing function 2019-04-08 17:03:24 +02:00
54d4464a29 remove "small" from some type names 2019-04-08 16:13:44 +02:00
5a1279fdce faster adding to array lookup 2019-04-08 16:01:16 +02:00
6742728ff1 don't use llvm fgraph execution for now 2019-04-08 12:39:03 +02:00
338d84676f cleanup array lookup structure 2019-04-08 12:35:30 +02:00
b26a74c470 method to pop item from map 2019-04-07 20:22:06 +02:00
d866113089 End all files with a newline 2019-04-07 19:44:27 +02:00
76a1e9bdb8 Merge branch 'master' into functions 2019-04-07 17:21:30 +02:00
f6f8323082 Fix Sin operation in Float Math node
The patch only fixed the python part. I added the c++ part.

Differential Revision: https://developer.blender.org/D4658
2019-04-07 17:17:29 +02:00
0f1b4d7c38 Use actual hash tables instead of linear search
The hash functions themselves are not optimized yet.
2019-04-07 17:01:31 +02:00
6f96045c2f rename ptr to rna to avoid confusing with actual pointers 2019-04-07 00:01:41 +02:00
9e8babf885 vectorize Float Math node 2019-04-06 23:54:06 +02:00
ece895e7d5 remove some redundency 2019-04-06 23:43:35 +02:00
be53a35ad3 allow lazy tuple call in fgraph ir generation 2019-04-06 23:42:57 +02:00
e38e04e9af cleanup vectorized node inserters 2019-04-06 23:24:12 +02:00
44d8980780 cleanup and vectorize Vector Math node 2019-04-06 23:07:12 +02:00
5ea3eca380 use function name prefix for inserters 2019-04-06 22:50:20 +02:00
954b2de3d5 improve method names 2019-04-06 22:42:52 +02:00
28f239a384 remove BuilderContext 2019-04-06 22:27:58 +02:00
decd4d8ecf rename Builder to GraphBuilder 2019-04-06 22:13:24 +02:00
d3b807ff02 move BuilderContext into Builder 2019-04-06 22:08:13 +02:00
87b472e1f6 use common prefix for type getters 2019-04-06 21:48:43 +02:00
586210c437 use common prefix for function getters 2019-04-06 21:44:10 +02:00
b4a3d036a9 cleanup auto vectorization function 2019-04-06 21:18:08 +02:00
49553de662 vectorized Separate Vector node 2019-04-06 21:06:06 +02:00
59116b27ea Merge branch 'master' into functions 2019-04-06 18:52:37 +02:00
c251ddeafc simplify execution stack management 2019-04-06 18:46:42 +02:00
362f8ec767 remove debug print 2019-04-06 18:14:26 +02:00
66e4eb795d higher level macro for tuple allocation 2019-04-06 18:12:48 +02:00
05e3ee5ae6 automatically destruct stack allocated tuples in c++ 2019-04-06 18:05:34 +02:00
5296f03f9f initial generic automatic vectorization, used in Combine Vector node 2019-04-06 17:21:07 +02:00
acbfda0c6b Implicit conversion from individual elements to lists 2019-04-06 15:23:17 +02:00
7c5cf3fd79 vectorized output sockets don't need a property 2019-04-06 14:58:29 +02:00
84670db6ea List Length node and fail early when socket types don't match 2019-04-06 12:00:35 +02:00
2e2f289d25 Vectorization support for Node UI 2019-04-06 11:05:40 +02:00
1456a030f4 initial IR for vector addition 2019-04-05 19:31:11 +02:00
0f42dd82ac new Vector Math node 2019-04-05 18:57:31 +02:00
cb158219e0 Generate LLVM IR for Mul and Sin 2019-04-05 18:44:01 +02:00
6fa863f6d9 Sin operation in Float Math node 2019-04-05 12:45:11 +02:00
3273d6be58 remove notes and unused variable 2019-04-05 12:31:34 +02:00
4a3720740d use the socket name directly, instead of a getter function 2019-04-05 12:29:07 +02:00
52ff44d02c Validate more aspects of the node tree while syncing 2019-04-05 12:10:30 +02:00
23a8864669 Splitup C API for separate components in different files 2019-04-05 11:32:34 +02:00
072fbb030a fix for reroute nodes 2019-04-04 17:53:37 +02:00
2865ca6fb6 Merge branch 'master' into functions 2019-04-04 17:49:29 +02:00
c789c5288d Fix: print python error message if there is one 2019-04-04 14:29:52 +02:00
dd5c352af5 More robust node tree update after changes
This implements a tree wide synching procedure, that corrects
all invalid things it can find. Also, trees are updated in
the correct order, when they depend on each other.
2019-04-04 14:26:20 +02:00
8675779372 Merge branch 'master' into functions 2019-04-03 19:01:49 +02:00
6ce1e30539 Merge branch 'master' into functions 2019-04-03 18:26:41 +02:00
4e84ea3da0 Merge branch 'master' into functions 2019-04-03 15:19:27 +02:00
2a8c7b8230 use cache to avoid building the same function ir twice 2019-04-03 11:55:11 +02:00
bcb6fa6e51 use better socket names in conversion to functions 2019-04-03 11:13:52 +02:00
ac7107df7c better socket name accessor function 2019-04-03 10:25:11 +02:00
d9097f7484 initial automatic update of call node 2019-04-03 10:05:26 +02:00
c1ba8dcd85 Fix 2019-04-02 12:35:49 +02:00
118ce79baf initial reroute support in graph conversion 2019-04-02 12:30:45 +02:00
6e78ef3ce5 initial support for reroutes in the ui 2019-04-02 11:29:31 +02:00
40d37cc8a0 Fix Get List Element node 2019-04-01 13:52:15 +02:00
9b2f1c0b38 fix modifier definition 2019-04-01 13:51:55 +02:00
212014e0d2 Merge branch 'master' into functions 2019-04-01 12:23:44 +02:00
7ace279696 cleanup pack list node converter 2019-04-01 10:42:13 +02:00
62059b465f improve Pack List node UI 2019-04-01 10:32:54 +02:00
c7447b51bd Pack List nodes have two inputs by default 2019-04-01 10:27:50 +02:00
02765a86cc create pack list node if certain type from search 2019-04-01 10:20:19 +02:00
62f4467a49 simple operators to create new function trees from modifier 2019-04-01 10:11:56 +02:00
25e1a10de6 type extension base class 2019-03-29 15:57:24 +01:00
7b210749bb simple operator to setup new function trees 2019-03-29 14:11:37 +01:00
b9a4ff5d38 Refactor node socket declaration 2019-03-29 13:56:14 +01:00
166e05b6ed store node in declaration 2019-03-29 09:53:36 +01:00
b958410308 cleanup 2019-03-29 09:39:12 +01:00
9f3ffe53bd name some virtual registers 2019-03-28 19:55:58 +01:00
b0f77c11d1 utility functions to optimize and print generated code 2019-03-28 19:55:44 +01:00
6af5d940db cleanup 2019-03-28 18:17:34 +01:00
bd480232ee remove LLVMCompiledBody 2019-03-28 18:09:46 +01:00
8259f92110 don't cache llvm type per context 2019-03-28 17:48:41 +01:00
6304ecbb06 ability to turn stack maintance on and off 2019-03-28 17:39:14 +01:00
40c12c675f move execution context pointer through llvm 2019-03-28 17:25:29 +01:00
b60be30ed5 cleanup pointer calls 2019-03-28 16:30:48 +01:00
cdf4591edb Improve interface of IR generators and wrap IRBuilder<> 2019-03-28 12:47:29 +01:00
c7bf98a186 push initial function caller information on execution stack 2019-03-28 09:50:12 +01:00
031bc7ca2d Use Vector List in Function Points modifier 2019-03-27 12:18:25 +01:00
721581c366 fix 2019-03-27 12:16:45 +01:00
925b0b732c show problems in separate problems panel 2019-03-27 11:36:26 +01:00
65ee9b6233 cleanup 2019-03-27 10:34:32 +01:00
439fdfcda7 initial ability to show warning messages in nodes 2019-03-27 10:30:55 +01:00
80a994776b use multi mempool for source information 2019-03-26 17:34:41 +01:00
aebddd0ed6 initial multi mempool 2019-03-26 17:34:12 +01:00
1a8bc27052 Use Blender's guarded allocators 2019-03-26 16:56:23 +01:00
0b2baaab1a missing include guards 2019-03-26 16:55:05 +01:00
895f68c8b2 fix panel idname 2019-03-26 11:28:59 +01:00
f0524205d6 Merge branch 'master' into functions 2019-03-26 11:23:05 +01:00
a90dca0ff5 also keep track of link sources 2019-03-26 11:20:33 +01:00
c23e2becdc print with traceback utility 2019-03-26 11:00:08 +01:00
72593ecaed cleanup 2019-03-26 10:51:49 +01:00
6b72c23e0a data flow graph manages source info allocation 2019-03-26 10:45:50 +01:00
024247797f keep track of original nodes 2019-03-26 10:33:10 +01:00
de7094a930 new SourceInfo class to keep track of where functions come from 2019-03-26 10:02:57 +01:00
9539b402b8 initial Execution Stack 2019-03-26 09:52:14 +01:00
8b777f5acf function should not be copied 2019-03-26 09:51:38 +01:00
9295e3bdde pass (currently empty) execution context into tuple call 2019-03-26 09:31:23 +01:00
bf8a98ffc5 experimental lazy fgraph evaluation 2019-03-25 09:57:44 +01:00
20e12025ea Merge branch 'master' into functions 2019-03-24 18:41:02 +01:00
9421bf6655 initial body type for lazy input evaluation 2019-03-24 18:40:23 +01:00
d79805e1db cleanup classes that are used in a composition 2019-03-24 17:29:06 +01:00
13ef2b1065 remove special type info for lists 2019-03-24 17:03:07 +01:00
f463cfb4c9 fix 2019-03-24 16:38:50 +01:00
c3a3b2e9b1 new Switch node 2019-03-24 16:16:59 +01:00
28a1b801b1 new Boolean type 2019-03-24 16:14:25 +01:00
b033626948 experimental byte code interpreter for function graph 2019-03-24 13:52:44 +01:00
0c15bc41b0 better naming 2019-03-24 13:52:14 +01:00
d819361cc5 simplify allocating tuple in prepared buffer 2019-03-24 11:31:33 +01:00
dc171b2a3e non recursive method to find required sockets 2019-03-24 10:41:01 +01:00
e77a8b97e1 initial support for calling subprograms 2019-03-22 11:57:03 +01:00
cf72da183d fail early when node inserter does not work 2019-03-22 11:52:49 +01:00
0efee91b63 rename tree type 2019-03-22 10:51:53 +01:00
95ccb24857 implement custom search terms for nodes 2019-03-22 10:21:01 +01:00
24d89e1cce better file naming 2019-03-21 18:44:47 +01:00
ad79af4843 typo 2019-03-21 18:40:36 +01:00
c6e4c29988 implement concept of implicit conversions 2019-03-21 12:17:35 +01:00
b31b4d5df8 cleanup 2019-03-21 12:16:14 +01:00
b52af3a031 refactor frontend data type definition system 2019-03-21 11:12:35 +01:00
8450e44cb6 move data type information into a separate file 2019-03-21 11:01:04 +01:00
fb038ebe53 refactor list decision inferencing 2019-03-21 10:56:11 +01:00
1a73618b36 cleanup file structure 2019-03-21 10:46:05 +01:00
8968155985 improve file name 2019-03-21 10:41:53 +01:00
5cc1bbd6de update tree automatically after changes 2019-03-21 10:39:57 +01:00
1ae0a8d760 Fix ListCPPTypeInfo 2019-03-20 20:03:45 +01:00
6db961e8b2 Merge branch 'master' into functions 2019-03-20 19:36:45 +01:00
1d64c35c3b allow removal of sockets from pack list node 2019-03-20 19:33:34 +01:00
e25a0c4bb3 remove dead code 2019-03-20 19:11:23 +01:00
81d5383ce2 save socket states 2019-03-20 19:07:35 +01:00
8788431086 allow changing type of Pack List node 2019-03-20 18:51:02 +01:00
1b90194608 allow declarations to draw in node 2019-03-20 18:16:55 +01:00
8d5f02a191 New Pack List Input operator 2019-03-20 18:11:56 +01:00
28fc08bff9 replace Append to List and Combine Lists nodes with Pack List 2019-03-20 18:06:27 +01:00
c59b457ee5 Merge branch 'master' into functions 2019-03-20 12:53:45 +01:00
46f5cf2b41 remove code that is not used currently 2019-03-20 12:53:04 +01:00
a2ca81bf6e initial version of less automatic inferencer 2019-03-20 12:46:30 +01:00
7533b4416e decision id cleanup 2019-03-19 17:11:49 +01:00
4c499e6d09 Merge branch 'master' into functions 2019-03-19 12:05:06 +01:00
fae338bf7c initial variadic list declaration 2019-03-19 12:03:47 +01:00
37bb26a217 cleanup list function generation 2019-03-19 11:06:38 +01:00
882ce6812f cleanup graph generation for combine lists and get list element 2019-03-19 10:51:46 +01:00
f7a9d8f447 cleanup Graph generation for Append to List node 2019-03-19 10:40:10 +01:00
c7e2b27199 Merge branch 'master' into functions 2019-03-18 16:08:50 +01:00
af2f924b11 Unified socket declaration system
Function input/output use the same structure to declare
sockets as other nodes now.

The type inferencer can be invoked in the panel on the
right in the node editor.

The list nodes work with floats, vectors and ints.
2019-03-18 16:05:21 +01:00
d0ae91b7c0 Merge branch 'master' into functions 2019-03-14 10:41:28 +01:00
dee5ee40e0 actually run the inferencer on a node tree 2019-03-13 16:21:30 +01:00
614c8be1d8 Use data type names instead of idname in c++ 2019-03-12 18:47:57 +01:00
51885aea9d simple inferencer in python with tests 2019-03-12 18:29:16 +01:00
185c80e9ba data type socket builder 2019-03-12 17:20:10 +01:00
255e1fe149 data type info 2019-03-12 16:48:00 +01:00
bd3334feaa allow more advanced socket declarations 2019-03-12 16:30:41 +01:00
c15103f454 steps towards a second list type 2019-03-11 17:58:36 +01:00
121189e560 disable some debug prints 2019-03-10 19:15:51 +01:00
163af9c8cb Merge branch 'master' into functions 2019-03-10 19:07:23 +01:00
a0627749b6 cleanup c wrapper 2019-03-10 18:59:44 +01:00
5a637fafd2 typo 2019-03-10 18:32:30 +01:00
391ee16746 new Combine Lists node 2019-03-10 18:29:00 +01:00
cfafdde927 use function to generate a list of floats 2019-03-10 18:10:53 +01:00
eaf5914496 allow float list input and output in frontend 2019-03-10 17:36:31 +01:00
a8cb18c644 new Function Points modifier for testing 2019-03-10 17:26:08 +01:00
b5f64cdb6e float list type in C interface 2019-03-10 16:28:14 +01:00
5ab0eca7c6 fgraph ir builder prefers precompiled ir if available 2019-03-10 16:21:24 +01:00
6281aa7f5d fix double value forwarding 2019-03-10 16:04:14 +01:00
5c916fa8f8 utility to copy dot format to clipboard 2019-03-10 15:49:15 +01:00
7fa6389d62 Get List Element and Append to List node 2019-03-10 15:38:11 +01:00
dcd90fae85 start implementing float list in frontend 2019-03-10 15:03:53 +01:00
9f850e5e4e get float list element function 2019-03-10 14:56:05 +01:00
5b3f7c09d2 cleanup 2019-03-10 14:55:34 +01:00
fe5c13386c use control2 as seed 2019-03-10 14:27:32 +01:00
4688ed1e28 use ctrl+A to open the node search 2019-03-10 14:27:22 +01:00
20f9248222 simple node search 2019-03-10 14:16:59 +01:00
657204dfce use auto load for registration 2019-03-10 13:57:37 +01:00
6c49690847 also allow heap allocation for tuples in C 2019-03-10 13:11:02 +01:00
57450b4fbe improve thread safety 2019-03-10 12:51:44 +01:00
1c844a694a cleanup 2019-03-10 12:17:37 +01:00
a53b2b4564 allow tuple stack allocation in C 2019-03-10 12:06:51 +01:00
ac02c2daf2 cleanup C wrapper 2019-03-10 10:44:20 +01:00
e57c3996bd store possible tuple meta in tuple call body 2019-03-10 10:26:19 +01:00
f6d994faac stack allocate tuple 2019-03-10 10:00:51 +01:00
0c8c082f9d improve shared lists 2019-03-09 16:11:10 +01:00
2e5df2cfa6 allow tuple call to modify fn_in 2019-03-09 14:22:14 +01:00
01d09210ff use shared list in tuple 2019-03-08 14:54:36 +01:00
75ecfd03ab more generic CPP and LLVM type info for lists 2019-03-08 14:31:50 +01:00
468f4f7985 Rename "Shared" to "AutoRefCount" 2019-03-08 14:09:29 +01:00
dcd4e2f767 more specific tuple access functions 2019-03-08 14:06:16 +01:00
151c9cd9ff make SharedImmutable work with the automatic refcounting 2019-03-08 13:56:50 +01:00
9697e81dab use intrusive refcounter because it simplifies things quite a bit 2019-03-08 13:42:55 +01:00
70534e5106 Merge branch 'master' into functions 2019-03-08 13:12:57 +01:00
d11b9c7239 cleanup 2019-03-07 11:38:48 +01:00
e60d04b129 rename RefCounted to RefCountedPtr 2019-03-07 11:22:50 +01:00
2c5ca6c7be refcounter cleanup 2019-03-07 11:17:49 +01:00
b0552bbe57 Merge branch 'master' into functions 2019-03-06 13:59:30 +01:00
51aa004a39 initial list types implementation 2019-03-06 13:59:00 +01:00
ebab49d135 define separate and combine vector nodes in terms of llvm ir 2019-03-06 11:37:54 +01:00
8b0c9e4331 don't hardcode llvm include dirs 2019-03-06 11:23:04 +01:00
4b39cbdeef fix "make full" on windows 2019-03-06 09:45:28 +01:00
8ba4f227ea remove printing 2019-03-05 15:22:56 +01:00
771074d848 improve ir wrapper for tuple call 2019-03-05 15:13:48 +01:00
b23cf5f41a put multiple unlinked inputs into a single function 2019-03-05 14:55:39 +01:00
8f5e6cf087 destruct tuple in wrapper 2019-03-05 13:48:00 +01:00
c4f1560ef3 Merge branch 'master' into functions 2019-03-05 13:36:52 +01:00
c1bad0da7a improve LLVMCompiledBody 2019-03-04 16:29:56 +01:00
3dcfe05354 build llvm ir for function graph 2019-03-04 16:14:45 +01:00
a6374a2896 missing renamings 2019-03-04 14:19:34 +01:00
5a81ea8dcd cleanup file naming 2019-03-04 14:16:15 +01:00
d8815d5b41 cleanup naming of function bodies and derive functions 2019-03-04 14:12:01 +01:00
f0d53df716 rename "LLVMGenBody" -> "LLVMGenerateIRBody" 2019-03-04 13:37:00 +01:00
7310c95ab7 Merge branch 'master' into functions 2019-03-04 13:29:50 +01:00
8a8b7d40ac deduplicate compilation code 2019-03-03 20:41:54 +01:00
21fc76b50d precompiled llvm function body 2019-03-03 20:13:24 +01:00
662b5ade05 generate separate wrapper functions 2019-03-03 15:03:56 +01:00
0e177a3b50 initial llvm wrapper for tuple call 2019-03-03 13:53:30 +01:00
149e6aa58c don't use SmallVector in tuple 2019-03-03 11:36:00 +01:00
c090a2f821 cleanup 2019-03-03 11:07:39 +01:00
e99f72ae6d common base class for function bodies 2019-03-03 10:56:57 +01:00
aa179bdfa3 separate tuple from its meta data 2019-03-02 22:00:47 +01:00
0ed75e7dbe only types know how they should be stored/loaded 2019-03-02 12:48:47 +01:00
910d7d4be0 compile llvm to tuple call 2019-03-02 12:14:06 +01:00
5ad9010ebf initial llvm integration (include path is still hardcoded...) 2019-03-01 19:30:20 +01:00
a42fe3e7df cleanup 2019-03-01 18:07:13 +01:00
a74e970b1d minor improvement 2019-03-01 17:30:22 +01:00
80efd2fed8 split core into multiple files 2019-03-01 17:19:36 +01:00
2cdb3d825a Merge branch 'master' into functions 2019-03-01 16:33:35 +01:00
8085925bc6 naming cleanup 2019-03-01 16:31:41 +01:00
1f504e3bd9 separate dependencies from tuple call body 2019-03-01 16:27:45 +01:00
73ceb30a98 cleanup 2019-03-01 16:08:57 +01:00
b25aa2c753 only equal types are allowed to be linked 2019-03-01 15:51:40 +01:00
7260d0333e fix 2019-03-01 15:44:13 +01:00
bdf1522fae move CPU specific stuff to backend folder 2019-03-01 15:34:11 +01:00
7333478220 refactor function generation from data flow nodes 2019-03-01 13:41:54 +01:00
4a502bef3c fix 2019-03-01 13:40:51 +01:00
d26f3663b1 Merge branch 'master' into functions 2019-03-01 10:32:36 +01:00
dd372c4d3d first test using optional value 2019-02-28 14:42:54 +01:00
c4d221b149 simple BLI::optional<T> type (C++11 compatible) 2019-02-28 14:18:06 +01:00
dbc584ea9c move some files 2019-02-28 14:01:47 +01:00
97997dd056 header cleanup 2019-02-28 12:40:20 +01:00
060a6c0e06 rename function headers 2019-02-28 12:31:34 +01:00
451884d2ea better separation between functions and nodes 2019-02-28 12:25:57 +01:00
367b065369 Merge branch 'master' into functions 2019-02-28 11:45:46 +01:00
5c72773a6d typo and minor improvement 2019-02-25 17:35:06 +01:00
b7ec20cc27 Merge branch 'master' into functions 2019-02-25 15:56:19 +01:00
3901ae2cb7 init defaults in tuple 2019-02-22 15:42:32 +01:00
e8187d58e5 Map Range node 2019-02-22 15:09:47 +01:00
9458baa8fe pass seed to driver function 2019-02-22 14:44:11 +01:00
c9a9e8670b pass index to function in displace modifier 2019-02-22 14:28:33 +01:00
5846212aab fix and cleanup 2019-02-22 14:27:53 +01:00
4108d2f4f9 integer socket 2019-02-22 14:27:34 +01:00
eaeda7dc6b remove unnecessary file 2019-02-22 13:53:47 +01:00
adba334093 utility function 2019-02-22 13:53:25 +01:00
36efb78551 improved naming 2019-02-22 13:42:41 +01:00
038a32ce1c Merge branch 'master' into functions 2019-02-21 16:56:36 +01:00
95f02d7806 new Driver Variable type that evaluates a function 2019-02-21 16:56:00 +01:00
be308462b4 vector socket actually works now 2019-02-21 16:54:41 +01:00
660ca276ca add function relations 2019-02-21 16:51:42 +01:00
daaa02f8b1 Use weight function in displace modifier 2019-02-21 14:32:59 +01:00
6593ba7e6b improved C function API 2019-02-21 14:27:10 +01:00
4f686995c8 read from original tree 2019-02-21 13:40:49 +01:00
2fbdd08636 Merge branch 'master' into functions 2019-02-20 17:20:01 +01:00
1472b4a77f simple to use function timer 2019-02-20 17:19:09 +01:00
de6a5ea3a0 clamp node as combination of min and max functions 2019-02-20 16:59:21 +01:00
d82a6a89b4 min and max of floats 2019-02-20 16:44:21 +01:00
72b67178dc vector distance node 2019-02-20 16:32:31 +01:00
dbd5c54510 debug print for functions 2019-02-20 16:21:40 +01:00
2218d7bf9e check function signature in modifier 2019-02-20 16:06:09 +01:00
e865bc730d check function signature with c wrapper 2019-02-20 15:48:22 +01:00
c4f39dd4aa remove some testing code 2019-02-20 15:34:52 +01:00
263bf06f66 annotation... 2019-02-20 15:25:48 +01:00
fa306a3c4a more generic float math node 2019-02-20 15:25:04 +01:00
08da311c74 dynamically add and remove sockets 2019-02-20 15:05:47 +01:00
513b7b3c78 add outputs dynamically 2019-02-20 14:21:54 +01:00
2ac967c63e typo 2019-02-20 13:48:06 +01:00
7699ea4d27 refactor graph generation 2019-02-20 13:44:03 +01:00
e3c61a30e1 refactor data flow graph generation 2019-02-20 12:50:58 +01:00
c1c17ba542 lookup_default 2019-02-20 12:49:44 +01:00
0267002a47 Merge branch 'master' into functions 2019-02-19 19:27:51 +01:00
dfdc955b1c cleanup 2019-02-19 17:54:57 +01:00
144a90688c better lazy init macro 2019-02-19 17:54:00 +01:00
a2ecba884a missing pragma once 2019-02-19 17:53:24 +01:00
e417f07ee2 use mempool to allocate nodes 2019-02-19 17:17:38 +01:00
66389f8933 inference list relations properly 2019-02-18 18:18:47 +01:00
cca48e2d00 different way to store Type Relations 2019-02-18 17:22:52 +01:00
d533afa17b all_equal tests 2019-02-18 17:21:23 +01:00
1a282bdca1 Signature.has_interface 2019-02-18 17:21:09 +01:00
6922161179 SmallVector::all_equal 2019-02-18 17:20:34 +01:00
a5cf0149dc Merge branch 'master' into functions 2019-02-18 16:24:46 +01:00
30d7e0814f fix SmallVector 2019-02-18 15:00:33 +01:00
c3b7bfbded use allowed namespace definition syntax only 2019-02-18 14:59:46 +01:00
7df89986a5 Merge branch 'functions-in-train' into functions 2019-02-17 21:17:11 +01:00
34e1684fa2 Merge branch 'master' into functions 2019-02-17 21:09:08 +01:00
47ea90771d initial type relations and improved inferencer 2019-02-17 17:44:21 +01:00
d93ecc84bb initial type inferencer 2019-02-17 15:54:00 +01:00
b166e18d56 small vector - remove and reorder 2019-02-17 15:49:43 +01:00
d7fca3e468 initial lazy init macro 2019-02-17 14:46:54 +01:00
e3cdeb80b1 MemPool 2019-02-17 14:17:48 +01:00
f2c8e39d29 small stack 2019-02-17 13:32:29 +01:00
27dd613a84 Merge branch 'master' into functions 2019-02-13 17:00:47 +01:00
aafe1034bb store node tree pointer in modifier
Unfortunately, there are still issues with the COW system resulting in a crash.
2019-02-12 19:20:45 +01:00
393f220f48 setup object dependencies correctly 2019-02-12 14:32:14 +01:00
79d2ea4f41 cleanup 2019-02-11 18:20:27 +01:00
139cdff657 object transforms node 2019-02-11 18:01:48 +01:00
10395fd00d separate vector node 2019-02-11 17:33:34 +01:00
e49edb2ef1 actually read socket value 2019-02-11 17:13:31 +01:00
fb3e05ff62 better usage of wrapper 2019-02-11 16:57:36 +01:00
548eb3a822 listbase wrapper 2019-02-11 16:51:33 +01:00
62cfea48a3 initial node tree to function conversion 2019-02-11 16:10:17 +01:00
caa03d7a5d cleanup 2019-02-10 20:14:26 +01:00
edad572189 FunctionGraph - a graph with specified inputs and outputs 2019-02-10 20:14:25 +01:00
8133fb0fad cleanup 2019-02-10 20:14:25 +01:00
4c1a59fa96 cleanup 2019-02-10 20:14:25 +01:00
49385f89b9 function input and output node 2019-02-10 20:14:25 +01:00
c4364f3499 initial node tree 2019-02-10 20:14:25 +01:00
791902b2d2 better dot exprot 2019-02-10 20:14:25 +01:00
785289594b SmallMap.add should not replace existing entries 2019-02-10 20:14:25 +01:00
ffdf77dd59 better naming 2019-02-10 20:14:25 +01:00
6ad32098af do not use this-> for prefixed member variables 2019-02-10 20:14:25 +01:00
34026205f0 store more type info in Type 2019-02-10 20:14:25 +01:00
5743ffc46f cmake fix 2019-02-10 20:14:25 +01:00
c3b0b85d47 move Composition to BLI 2019-02-10 20:14:25 +01:00
ac8555af9e Function and Type are final classes - can still be extended with Composition 2019-02-10 20:14:25 +01:00
999a802600 generate function from data flow graph 2019-02-10 20:14:25 +01:00
59d589e736 move concrete type definitions into separate translation unit 2019-02-10 20:14:24 +01:00
4c3941745a types don't have to be const everywhere 2019-02-10 20:14:24 +01:00
04350ca976 initial value iterator 2019-02-10 20:14:24 +01:00
ff59b09f02 cleanup 2019-02-10 20:14:24 +01:00
d5e675bddb append rvalue reference to smallvector 2019-02-10 20:14:24 +01:00
ecd2e2b454 move shared without incref and decref 2019-02-10 20:14:24 +01:00
a9c1796470 use shared ownership for functions and types 2019-02-10 20:14:24 +01:00
05f9492580 actually free elements in small vector 2019-02-10 20:14:24 +01:00
328a6e9c91 use shared ownership for functions and types 2019-02-10 20:14:24 +01:00
7773e1c2af better separation of concerns for shared objects 2019-02-10 20:14:24 +01:00
542caff21b custom reference counter that supports manual incref and decref 2019-02-10 20:14:24 +01:00
4d572be4e6 small set vector 2019-02-10 20:14:23 +01:00
74e40a8863 Tuple::copy_element 2019-02-10 20:14:23 +01:00
8d55ff177d extend set and vector data structure 2019-02-10 20:14:23 +01:00
fff8781973 dot export for data flow graph 2019-02-10 20:14:23 +01:00
252e46a346 input and output parameter class 2019-02-10 20:14:23 +01:00
010a4a76b5 data flow graph 2019-02-10 20:14:23 +01:00
434e2afe3c more generic dynamic composition of types and functions 2019-02-10 20:14:23 +01:00
5784e17ff7 renaming 2019-02-10 20:14:23 +01:00
617d35315c test dynamic composition instead of inheritance for functions 2019-02-10 20:14:23 +01:00
f63f7c1c86 minor fix, should be solved differently.. 2019-02-10 20:14:23 +01:00
d5e25680df separate actual core from cpu functions 2019-02-10 20:14:23 +01:00
6185d5fa7d typo 2019-02-10 20:14:23 +01:00
25ff42d7d5 use const ref parameter 2019-02-10 20:14:23 +01:00
317a2880f6 fill test 2019-02-10 20:14:23 +01:00
f4e7621ee7 don't construct unneeded objects in SmallVector 2019-02-10 20:14:22 +01:00
cbefe2ad55 initial SmallMap 2019-02-10 20:14:22 +01:00
0774265195 modifier fix 2019-02-10 20:14:22 +01:00
3012e7a3c2 Tuple structure (no copy/move functionality yet) 2019-02-10 20:14:22 +01:00
a22763349a use static size information to increase performance 2019-02-10 20:14:22 +01:00
4328946e12 work better with uninitialized memory + tests for SmallVector 2019-02-10 20:14:21 +01:00
be5c59f09a cleanup api a bit 2019-02-10 20:14:20 +01:00
a52d9b4bac actually deform something 2019-02-10 20:14:20 +01:00
59970cc12f move test code to new modifier 2019-02-10 20:14:20 +01:00
46a4cf3697 new deform modifier 2019-02-10 20:14:20 +01:00
ebc898756a deform function test 2019-02-10 20:14:20 +01:00
a9322b7e58 small buffer inherits small vector 2019-02-10 20:14:20 +01:00
54b8d6ba0b more const 2019-02-10 20:14:20 +01:00
a3aaf9d4f9 implement move semantics properly, hopefully 2019-02-10 20:14:20 +01:00
b36a4d7c72 first successful execution 2019-02-10 20:14:20 +01:00
178d41c250 fix 2019-02-10 20:14:20 +01:00
520d7cd663 better naming 2019-02-10 20:14:20 +01:00
bd44822f89 implement other small vector constructors 2019-02-10 20:14:20 +01:00
37e0362215 cleanup 2019-02-10 20:14:19 +01:00
9b3a4c1697 real SmallVector implementation + make types const 2019-02-10 20:14:19 +01:00
09a561aa25 more initial setup 2019-02-10 20:14:19 +01:00
7fbebda942 basic code structure 2019-02-10 20:14:19 +01:00
ade4c61063 function api design 2019-02-10 20:14:19 +01:00
2812 changed files with 512752 additions and 405477 deletions

5
.gitignore vendored
View File

@@ -42,4 +42,7 @@ Desktop.ini
/build_files/build_environment/downloads
# in-source buildbot signing configuration
/build_files/buildbot/codesign/config_server.py
/build_files/buildbot/codesign/config_server.py
# smoke simulation noise tile (generated)
waveletNoiseTile.bin

View File

@@ -97,6 +97,11 @@ cmake_policy(SET CMP0010 NEW)
# Input directories must have CMakeLists.txt
cmake_policy(SET CMP0014 NEW)
# Silence draco warning on macOS, new policy works fine.
if(POLICY CMP0068)
cmake_policy(SET CMP0068 NEW)
endif()
#-----------------------------------------------------------------------------
# Load some macros.
include(build_files/cmake/macros.cmake)
@@ -130,76 +135,6 @@ endif()
get_blender_version()
#-----------------------------------------------------------------------------
# Platform Specific Defaults
# list of var-names
set(_init_vars)
# initialize to ON
macro(option_defaults_init)
foreach(_var ${ARGV})
set(${_var} ON)
list(APPEND _init_vars "${_var}")
endforeach()
unset(_var)
endmacro()
# remove from namespace
macro(option_defaults_clear)
foreach(_var ${_init_vars})
unset(${_var})
endforeach()
unset(_var)
unset(_init_vars)
endmacro()
# values to initialize WITH_****
option_defaults_init(
_init_BUILDINFO
_init_CODEC_FFMPEG
_init_CYCLES_OSL
_init_IMAGE_OPENEXR
_init_INPUT_NDOF
_init_JACK
_init_OPENCOLLADA
_init_OPENCOLORIO
_init_SDL
_init_FFTW3
_init_OPENSUBDIV
)
# TBB malloc is only supported on for windows currently
if(WIN32)
set(_init_TBB_MALLOC_PROXY ON)
else()
set(_init_TBB_MALLOC_PROXY OFF)
endif()
# customize...
if(UNIX AND NOT APPLE)
# some of these libraries are problematic on Linux
# disable less important dependencies by default
set(_init_CODEC_FFMPEG OFF)
set(_init_CYCLES_OSL OFF)
set(_init_IMAGE_OPENEXR OFF)
set(_init_JACK OFF)
set(_init_OPENCOLLADA OFF)
set(_init_OPENCOLORIO OFF)
set(_init_SDL OFF)
set(_init_FFTW3 OFF)
set(_init_OPENSUBDIV OFF)
set(_init_OPENVDB OFF)
set(_init_OPENIMAGEDENOISE OFF)
elseif(WIN32)
set(_init_JACK OFF)
elseif(APPLE)
set(_init_JACK OFF)
endif()
#-----------------------------------------------------------------------------
# Options
@@ -226,7 +161,7 @@ if(APPLE)
option(WITH_PYTHON_FRAMEWORK "Enable building using the Python available in the framework (OSX only)" OFF)
endif()
option(WITH_BUILDINFO "Include extra build details (only disable for development & faster builds)" ${_init_BUILDINFO})
option(WITH_BUILDINFO "Include extra build details (only disable for development & faster builds)" ON)
if(${CMAKE_VERSION} VERSION_LESS 2.8.8)
# add_library OBJECT arg unsupported
set(WITH_BUILDINFO OFF)
@@ -240,20 +175,20 @@ mark_as_advanced(BUILDINFO_OVERRIDE_TIME)
option(WITH_IK_ITASC "Enable ITASC IK solver (only disable for development & for incompatible C++ compilers)" ON)
option(WITH_IK_SOLVER "Enable Legacy IK solver (only disable for development)" ON)
option(WITH_FFTW3 "Enable FFTW3 support (Used for smoke, ocean sim, and audio effects)" ${_init_FFTW3})
option(WITH_FFTW3 "Enable FFTW3 support (Used for smoke, ocean sim, and audio effects)" ON)
option(WITH_BULLET "Enable Bullet (Physics Engine)" ON)
option(WITH_SYSTEM_BULLET "Use the systems bullet library (currently unsupported due to missing features in upstream!)" )
mark_as_advanced(WITH_SYSTEM_BULLET)
option(WITH_OPENCOLORIO "Enable OpenColorIO color management" ${_init_OPENCOLORIO})
option(WITH_OPENCOLORIO "Enable OpenColorIO color management" ON)
# Compositor
option(WITH_COMPOSITOR "Enable the tile based nodal compositor" ON)
option(WITH_OPENIMAGEDENOISE "Enable the OpenImageDenoise compositing node" ${_init_OPENIMAGEDENOISE})
option(WITH_OPENIMAGEDENOISE "Enable the OpenImageDenoise compositing node" ON)
option(WITH_OPENSUBDIV "Enable OpenSubdiv for surface subdivision" ${_init_OPENSUBDIV})
option(WITH_OPENSUBDIV "Enable OpenSubdiv for surface subdivision" ON)
option(WITH_OPENVDB "Enable features relying on OpenVDB" ${_init_OPENVDB})
option(WITH_OPENVDB_BLOSC "Enable blosc compression for OpenVDB, only enable if OpenVDB was built with blosc support" ${_init_OPENVDB})
option(WITH_OPENVDB "Enable features relying on OpenVDB" ON)
option(WITH_OPENVDB_BLOSC "Enable blosc compression for OpenVDB, only enable if OpenVDB was built with blosc support" ON)
option(WITH_OPENVDB_3_ABI_COMPATIBLE "Assume OpenVDB library has been compiled with version 3 ABI compatibility" OFF)
mark_as_advanced(WITH_OPENVDB_3_ABI_COMPATIBLE)
@@ -312,14 +247,13 @@ endif()
# Modifiers
option(WITH_MOD_FLUID "Enable Elbeem Modifier (Fluid Simulation)" ON)
option(WITH_MOD_SMOKE "Enable Smoke Modifier (Smoke Simulation)" ON)
option(WITH_MOD_FLUID "Enable Mantaflow Fluid Simulation Framework" ON)
option(WITH_MOD_REMESH "Enable Remesh Modifier" ON)
option(WITH_MOD_OCEANSIM "Enable Ocean Modifier" OFF)
option(WITH_MOD_OCEANSIM "Enable Ocean Modifier" ON)
# Image format support
option(WITH_OPENIMAGEIO "Enable OpenImageIO Support (http://www.openimageio.org)" ON)
option(WITH_IMAGE_OPENEXR "Enable OpenEXR Support (http://www.openexr.com)" ${_init_IMAGE_OPENEXR})
option(WITH_IMAGE_OPENEXR "Enable OpenEXR Support (http://www.openexr.com)" ON)
option(WITH_IMAGE_OPENJPEG "Enable OpenJpeg Support (http://www.openjpeg.org)" ON)
option(WITH_IMAGE_TIFF "Enable LibTIFF Support" ON)
option(WITH_IMAGE_DDS "Enable DDS Image Support" ON)
@@ -328,23 +262,28 @@ option(WITH_IMAGE_HDR "Enable HDR Image Support" ON)
# Audio/Video format support
option(WITH_CODEC_AVI "Enable Blenders own AVI file support (raw/jpeg)" ON)
option(WITH_CODEC_FFMPEG "Enable FFMPeg Support (http://ffmpeg.org)" ${_init_CODEC_FFMPEG})
option(WITH_CODEC_SNDFILE "Enable libsndfile Support (http://www.mega-nerd.com/libsndfile)" OFF)
option(WITH_CODEC_FFMPEG "Enable FFMPeg Support (http://ffmpeg.org)" ON)
option(WITH_CODEC_SNDFILE "Enable libsndfile Support (http://www.mega-nerd.com/libsndfile)" ON)
# Alembic support
option(WITH_ALEMBIC "Enable Alembic Support" OFF)
option(WITH_ALEMBIC "Enable Alembic Support" ON)
option(WITH_ALEMBIC_HDF5 "Enable Legacy Alembic Support (not officially supported)" OFF)
# Universal Scene Description support
option(WITH_USD "Enable Universal Scene Description (USD) Support" OFF)
# 3D format support
# Disable opencollada when we don't have precompiled libs
option(WITH_OPENCOLLADA "Enable OpenCollada Support (http://www.opencollada.org)" ${_init_OPENCOLLADA})
option(WITH_OPENCOLLADA "Enable OpenCollada Support (http://www.opencollada.org)" ON)
# Sound output
option(WITH_SDL "Enable SDL for sound and joystick support" ${_init_SDL})
option(WITH_SDL "Enable SDL for sound and joystick support" ON)
option(WITH_OPENAL "Enable OpenAL Support (http://www.openal.org)" ON)
option(WITH_JACK "Enable JACK Support (http://www.jackaudio.org)" ${_init_JACK})
if(UNIX AND NOT APPLE)
option(WITH_JACK_DYNLOAD "Enable runtime dynamic JACK libraries loading" OFF)
if(NOT WIN32)
option(WITH_JACK "Enable JACK Support (http://www.jackaudio.org)" ON)
if(UNIX AND NOT APPLE)
option(WITH_JACK_DYNLOAD "Enable runtime dynamic JACK libraries loading" OFF)
endif()
endif()
if(UNIX AND NOT APPLE)
option(WITH_SDL_DYNLOAD "Enable runtime dynamic SDL libraries loading" OFF)
@@ -360,7 +299,7 @@ option(WITH_DRACO "Enable Draco mesh compression Python module (used for
# Camera/motion tracking
option(WITH_LIBMV "Enable Libmv structure from motion library" ON)
option(WITH_LIBMV_SCHUR_SPECIALIZATIONS "Enable fixed-size schur specializations." OFF)
option(WITH_LIBMV_SCHUR_SPECIALIZATIONS "Enable fixed-size schur specializations." ON)
mark_as_advanced(WITH_LIBMV_SCHUR_SPECIALIZATIONS)
# Logging/unbit test libraries.
@@ -376,7 +315,7 @@ option(WITH_FREESTYLE "Enable Freestyle (advanced edges rendering)" ON)
if(WIN32)
option(WITH_INPUT_IME "Enable Input Method Editor (IME) for complex Asian character input" ON)
endif()
option(WITH_INPUT_NDOF "Enable NDOF input devices (SpaceNavigator and friends)" ${_init_INPUT_NDOF})
option(WITH_INPUT_NDOF "Enable NDOF input devices (SpaceNavigator and friends)" ON)
if(UNIX AND NOT APPLE)
option(WITH_INSTALL_PORTABLE "Install redistributeable runtime, otherwise install into CMAKE_INSTALL_PREFIX" ON)
option(WITH_STATIC_LIBS "Try to link with static libraries, as much as possible, to make blender more portable across distributions" OFF)
@@ -412,7 +351,7 @@ mark_as_advanced(WITH_CPU_SSE)
option(WITH_CYCLES "Enable Cycles Render Engine" ON)
option(WITH_CYCLES_STANDALONE "Build Cycles standalone application" OFF)
option(WITH_CYCLES_STANDALONE_GUI "Build Cycles standalone with GUI" OFF)
option(WITH_CYCLES_OSL "Build Cycles with OSL support" ${_init_CYCLES_OSL})
option(WITH_CYCLES_OSL "Build Cycles with OSL support" ON)
option(WITH_CYCLES_EMBREE "Build Cycles with Embree support" OFF)
option(WITH_CYCLES_CUDA_BINARIES "Build Cycles CUDA binaries" OFF)
option(WITH_CYCLES_CUBIN_COMPILER "Build cubins with nvrtc based compiler instead of nvcc" OFF)
@@ -468,7 +407,11 @@ mark_as_advanced(WITH_ASSERT_ABORT)
option(WITH_BOOST "Enable features depending on boost" ON)
option(WITH_TBB "Enable features depending on TBB (OpenVDB, OpenImageDenoise, sculpt multithreading)" ON)
option(WITH_TBB_MALLOC_PROXY "Enable the TBB malloc replacement" ${_init_TBB_MALLOC_PROXY})
# TBB malloc is only supported on for windows currently
if(WIN32)
option(WITH_TBB_MALLOC_PROXY "Enable the TBB malloc replacement" ON)
endif()
# Unit testsing
option(WITH_GTESTS "Enable GTest unit testing" OFF)
@@ -549,7 +492,8 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
if(NOT MSVC)
find_library(COMPILER_ASAN_LIBRARY asan ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
else()
find_library( COMPILER_ASAN_LIBRARY NAMES clang_rt.asan-x86_64
find_library(
COMPILER_ASAN_LIBRARY NAMES clang_rt.asan-x86_64
PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\LLVM\\LLVM;]/lib/clang/7.0.0/lib/windows
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\LLVM\\LLVM;]/lib/clang/6.0.0/lib/windows
@@ -572,6 +516,10 @@ if(WIN32)
option(WINDOWS_PYTHON_DEBUG "Include the files needed for debugging python scripts with visual studio 2017+." OFF)
mark_as_advanced(WINDOWS_PYTHON_DEBUG)
option(WITH_WINDOWS_BUNDLE_CRT "Bundle the C runtime for install free distribution." ON)
mark_as_advanced(WITH_WINDOWS_BUNDLE_CRT)
endif()
# The following only works with the Ninja generator in CMake >= 3.0.
@@ -591,9 +539,6 @@ endif()
option(POSTINSTALL_SCRIPT "Run given CMake script after installation process" OFF)
mark_as_advanced(POSTINSTALL_SCRIPT)
# avoid using again
option_defaults_clear()
# end option(...)
@@ -669,29 +614,25 @@ endif()
# enable boost for cycles, audaspace or i18n
# otherwise if the user disabled
if(NOT WITH_BOOST)
# Explicitly disabled. so disable all deps.
macro(set_and_warn
_setting _val)
if(${${_setting}})
message(STATUS "'WITH_BOOST' is disabled: forcing 'set(${_setting} ${_val})'")
endif()
set(${_setting} ${_val})
endmacro()
set_and_warn(WITH_CYCLES OFF)
set_and_warn(WITH_INTERNATIONAL OFF)
set_and_warn(WITH_OPENVDB OFF)
set_and_warn(WITH_OPENCOLORIO OFF)
set_and_warn(WITH_QUADRIFLOW OFF)
elseif(WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_INTERNATIONAL OR
WITH_OPENVDB OR WITH_OPENCOLORIO)
# Keep enabled
else()
# Disable boost if not needed.
set_and_warn_dependency(WITH_BOOST WITH_CYCLES OFF)
set_and_warn_dependency(WITH_BOOST WITH_INTERNATIONAL OFF)
set_and_warn_dependency(WITH_BOOST WITH_OPENVDB OFF)
set_and_warn_dependency(WITH_BOOST WITH_OPENCOLORIO OFF)
set_and_warn_dependency(WITH_BOOST WITH_QUADRIFLOW OFF)
set_and_warn_dependency(WITH_BOOST WITH_USD OFF)
if(WITH_BOOST AND NOT (WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_INTERNATIONAL OR
WITH_OPENVDB OR WITH_OPENCOLORIO OR WITH_USD))
message(STATUS "No dependencies need 'WITH_BOOST' forcing WITH_BOOST=OFF")
set(WITH_BOOST OFF)
endif()
set_and_warn_dependency(WITH_TBB WITH_USD OFF)
set_and_warn_dependency(WITH_TBB WITH_OPENIMAGEDENOISE OFF)
set_and_warn_dependency(WITH_TBB WITH_OPENVDB OFF)
set_and_warn_dependency(WITH_TBB WITH_MOD_FLUID OFF)
# auto enable openimageio for cycles
if(WITH_CYCLES)
set(WITH_OPENIMAGEIO ON)
@@ -841,67 +782,14 @@ if(NOT CMAKE_BUILD_TYPE MATCHES "Release")
if(MSVC)
set(COMPILER_ASAN_LINKER_FLAGS "/FUNCTIONPADMIN:6")
endif()
set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS};${COMPILER_ASAN_LIBRARY}")
set(PLATFORM_LINKFLAGS "${COMPILER_ASAN_LIBRARY} ${COMPILER_ASAN_LINKER_FLAGS}")
set(PLATFORM_LINKFLAGS_DEBUG "${COMPILER_ASAN_LIBRARY} ${COMPILER_ASAN_LINKER_FLAGS}")
if(COMPILER_ASAN_LIBRARY)
set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS};${COMPILER_ASAN_LIBRARY}")
set(PLATFORM_LINKFLAGS "${COMPILER_ASAN_LIBRARY} ${COMPILER_ASAN_LINKER_FLAGS}")
set(PLATFORM_LINKFLAGS_DEBUG "${COMPILER_ASAN_LIBRARY} ${COMPILER_ASAN_LINKER_FLAGS}")
endif()
endif()
endif()
#-----------------------------------------------------------------------------
# Platform specifics
if(WITH_X11)
find_package(X11 REQUIRED)
find_path(X11_XF86keysym_INCLUDE_PATH X11/XF86keysym.h ${X11_INC_SEARCH_PATH})
mark_as_advanced(X11_XF86keysym_INCLUDE_PATH)
list(APPEND PLATFORM_LINKLIBS ${X11_X11_LIB})
if(WITH_X11_XINPUT)
if(X11_Xinput_LIB)
list(APPEND PLATFORM_LINKLIBS ${X11_Xinput_LIB})
else()
message(FATAL_ERROR "LibXi not found. Disable WITH_X11_XINPUT if you
want to build without tablet support")
endif()
endif()
if(WITH_X11_XF86VMODE)
# XXX, why doesn't cmake make this available?
find_library(X11_Xxf86vmode_LIB Xxf86vm ${X11_LIB_SEARCH_PATH})
mark_as_advanced(X11_Xxf86vmode_LIB)
if(X11_Xxf86vmode_LIB)
list(APPEND PLATFORM_LINKLIBS ${X11_Xxf86vmode_LIB})
else()
message(FATAL_ERROR "libXxf86vm not found. Disable WITH_X11_XF86VMODE if you
want to build without")
endif()
endif()
if(WITH_X11_XFIXES)
if(X11_Xfixes_LIB)
list(APPEND PLATFORM_LINKLIBS ${X11_Xfixes_LIB})
else()
message(FATAL_ERROR "libXfixes not found. Disable WITH_X11_XFIXES if you
want to build without")
endif()
endif()
if(WITH_X11_ALPHA)
find_library(X11_Xrender_LIB Xrender ${X11_LIB_SEARCH_PATH})
mark_as_advanced(X11_Xrender_LIB)
if(X11_Xrender_LIB)
list(APPEND PLATFORM_LINKLIBS ${X11_Xrender_LIB})
else()
message(FATAL_ERROR "libXrender not found. Disable WITH_X11_ALPHA if you
want to build without")
endif()
endif()
endif()
# ----------------------------------------------------------------------------
# Main Platform Checks
#
@@ -1011,6 +899,28 @@ if(NOT WITH_SYSTEM_EIGEN3)
set(EIGEN3_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/Eigen3)
endif()
if(WITH_OPENVDB)
list(APPEND OPENVDB_DEFINITIONS -DWITH_OPENVDB)
if(WITH_OPENVDB_3_ABI_COMPATIBLE)
list(APPEND OPENVDB_DEFINITIONS -DOPENVDB_3_ABI_COMPATIBLE)
endif()
list(APPEND OPENVDB_INCLUDE_DIRS
${BOOST_INCLUDE_DIR}
${TBB_INCLUDE_DIRS}
${OPENEXR_INCLUDE_DIRS})
list(APPEND OPENVDB_LIBRARIES ${OPENEXR_LIBRARIES} ${ZLIB_LIBRARIES})
if(WITH_OPENVDB_BLOSC)
list(APPEND OPENVDB_DEFINITIONS -DWITH_OPENVDB_BLOSC)
list(APPEND OPENVDB_LIBRARIES ${BLOSC_LIBRARIES} ${ZLIB_LIBRARIES})
endif()
list(APPEND OPENVDB_LIBRARIES ${BOOST_LIBRARIES} ${TBB_LIBRARIES})
endif()
#-----------------------------------------------------------------------------
# Configure OpenGL.
@@ -1034,7 +944,7 @@ if(WITH_GL_PROFILE_ES20)
)
endif()
list(APPEND BLENDER_GL_LIBRARIES OPENGLES_LIBRARY)
list(APPEND BLENDER_GL_LIBRARIES "${OPENGLES_LIBRARY}")
else()
set(OPENGLES_LIBRARY "" CACHE FILEPATH "OpenGL ES 2.0 library file")
@@ -1094,7 +1004,10 @@ else()
endif()
if(WITH_GL_EGL)
list(APPEND GL_DEFINITIONS -DWITH_GL_EGL)
find_package(OpenGL REQUIRED EGL)
list(APPEND BLENDER_GL_LIBRARIES OpenGL::EGL)
list(APPEND GL_DEFINITIONS -DWITH_GL_EGL -DGLEW_EGL -DGLEW_INC_EGL)
if(WITH_SYSTEM_GLES)
if(NOT OPENGLES_EGL_LIBRARY)
@@ -1104,7 +1017,7 @@ if(WITH_GL_EGL)
)
endif()
list(APPEND BLENDER_GL_LIBRARIES OPENGLES_EGL_LIBRARY)
list(APPEND BLENDER_GL_LIBRARIES ${OPENGLES_EGL_LIBRARY})
else()
set(OPENGLES_EGL_LIBRARY "" CACHE FILEPATH "EGL library file")
@@ -1144,10 +1057,6 @@ else()
list(APPEND GL_DEFINITIONS -DWITH_GL_PROFILE_CORE)
endif()
if(WITH_GL_EGL)
list(APPEND GL_DEFINITIONS -DWITH_EGL)
endif()
#-----------------------------------------------------------------------------
# Configure OpenMP.
if(WITH_OPENMP)
@@ -1219,10 +1128,6 @@ else()
list(APPEND GL_DEFINITIONS -DGL_ES_VERSION_1_0=0 -DGL_ES_VERSION_CL_1_1=0 -DGL_ES_VERSION_CM_1_1=0)
endif()
if(WITH_GL_EGL)
list(APPEND GL_DEFINITIONS -DGLEW_INC_EGL)
endif()
set(BLENDER_GLEW_LIBRARIES extern_glew_es bf_intern_glew_mx)
else()
@@ -1519,6 +1424,7 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
# flags to undo strict flags
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_PARAMETER -Wno-unused-parameter)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_VARIABLE -Wno-unused-variable)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_UNUSED_MACROS -Wno-unused-macros)
ADD_CHECK_C_COMPILER_FLAG(C_REMOVE_STRICT_FLAGS C_WARN_NO_MISSING_VARIABLE_DECLARATIONS -Wno-missing-variable-declarations)
@@ -1537,6 +1443,8 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_REORDER -Wno-reorder)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_COMMENT -Wno-comment)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNUSED_TYPEDEFS -Wno-unused-local-typedefs)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_UNDEFINED_VAR_TEMPLATE -Wno-undefined-var-template)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_REMOVE_STRICT_FLAGS CXX_WARN_NO_INSTANTIATION_AFTER_SPECIALIZATION -Wno-instantiation-after-specialization)
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
@@ -1791,6 +1699,7 @@ if(FIRST_RUN)
info_cfg_option(WITH_OPENVDB)
info_cfg_option(WITH_ALEMBIC)
info_cfg_option(WITH_QUADRIFLOW)
info_cfg_option(WITH_USD)
info_cfg_text("Compiler Options:")
info_cfg_option(WITH_BUILDINFO)

View File

@@ -545,7 +545,7 @@ update: .FORCE
$(PYTHON) ./build_files/utils/make_update.py
format: .FORCE
PATH="../lib/${OS_NCASE}/llvm/bin/:$(PATH)" \
PATH="../lib/${OS_NCASE}_${CPU}/llvm/bin/:../lib/${OS_NCASE}_centos7_${CPU}/llvm/bin/:../lib/${OS_NCASE}/llvm/bin/:$(PATH)" \
$(PYTHON) source/tools/utils_maintenance/clang_format_paths.py $(PATHS)

View File

@@ -64,7 +64,6 @@ include(cmake/jpeg.cmake)
include(cmake/boost.cmake)
include(cmake/blosc.cmake)
include(cmake/pthreads.cmake)
include(cmake/ilmbase.cmake)
include(cmake/openexr.cmake)
include(cmake/freetype.cmake)
include(cmake/freeglut.cmake)
@@ -92,21 +91,19 @@ include(cmake/python.cmake)
include(cmake/python_site_packages.cmake)
include(cmake/package_python.cmake)
include(cmake/numpy.cmake)
if(UNIX AND NOT APPLE)
include(cmake/usd.cmake)
if(UNIX)
# Rely on PugiXML compiled with OpenImageIO
else()
include(cmake/pugixml.cmake)
endif()
include(cmake/openimagedenoise.cmake)
include(cmake/embree.cmake)
if(WITH_WEBP)
include(cmake/webp.cmake)
endif()
if(WITH_EMBREE)
include(cmake/embree.cmake)
endif()
if(WIN32)
# HMD branch deps
include(cmake/hidapi.cmake)

View File

@@ -26,12 +26,6 @@ if(ALEMBIC_HDF5)
endif()
endif()
if(WIN32)
set(ALEMBIC_ILMBASE ${LIBDIR}/openexr)
else()
set(ALEMBIC_ILMBASE ${LIBDIR}/ilmbase)
endif()
set(ALEMBIC_EXTRA_ARGS
-DBUILDSTATIC=ON
-DLINKSTATIC=ON
@@ -44,13 +38,13 @@ set(ALEMBIC_EXTRA_ARGS
-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}
-DILMBASE_ROOT=${LIBDIR}/openexr
-DALEMBIC_ILMBASE_INCLUDE_DIRECTORY=${LIBDIR}/openexr/include/OpenEXR
-DALEMBIC_ILMBASE_HALF_LIB=${LIBDIR}/openexr/lib/${LIBPREFIX}Half${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DALEMBIC_ILMBASE_IMATH_LIB=${LIBDIR}/openexr/lib/${LIBPREFIX}Imath${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DALEMBIC_ILMBASE_ILMTHREAD_LIB=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmThread${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DALEMBIC_ILMBASE_IEX_LIB=${LIBDIR}/openexr/lib/${LIBPREFIX}Iex${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DALEMBIC_ILMBASE_IEXMATH_LIB=${LIBDIR}/openexr/lib/${LIBPREFIX}IexMath${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DUSE_PYILMBASE=0
-DUSE_PYALEMBIC=0
-DUSE_ARNOLD=0
@@ -100,6 +94,5 @@ add_dependencies(
external_alembic
external_boost
external_zlib
external_ilmbase
external_openexr
)

View File

@@ -29,13 +29,11 @@ set(BLOSC_EXTRA_ARGS
-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
)
endif()
# 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
)
ExternalProject_Add(external_blosc
URL ${BLOSC_URI}

View File

@@ -38,13 +38,13 @@ if(WIN32)
set(BOOST_BUILD_OPTIONS runtime-link=shared )
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/)
set(BOOST_HARVEST_CMD ${BOOST_HARVEST_CMD} && ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/include/boost-${BOOST_VERSION_NODOTS_SHORT}/ ${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_BUILD_OPTIONS toolset=darwin cxxflags=${PLATFORM_CXXFLAGS} linkflags=${PLATFORM_LDFLAGS} visibility=global --disable-icu boost.locale.icu=off)
set(BOOST_HARVEST_CMD echo .)
set(BOOST_PATCH_COMMAND echo .)
else()
@@ -72,6 +72,9 @@ set(BOOST_OPTIONS
--with-serialization
--with-program_options
--with-iostreams
-sNO_BZIP2=1
-sNO_LZMA=1
-sNO_ZSTD=1
${BOOST_TOOLSET}
)

View File

@@ -46,9 +46,7 @@ if(MSVC)
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/
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/clang/lib/ ${HARVEST_TARGET}/llvm/debug/lib/
)
endif()
ExternalProject_Add_Step(external_clang after_install

View File

@@ -32,7 +32,6 @@ ExternalProject_Add(external_freetype
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
)

View File

@@ -62,14 +62,8 @@ if(BUILD_MODE STREQUAL Debug)
# 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()
@@ -116,8 +110,6 @@ harvest(freetype/include freetype/include "*.h")
harvest(freetype/lib/libfreetype2ST.a freetype/lib/libfreetype.a)
harvest(glew/include glew/include "*.h")
harvest(glew/lib glew/lib "*.a")
harvest(ilmbase openexr "*")
harvest(ilmbase/include openexr/include "*.h")
harvest(jemalloc/include jemalloc/include "*.h")
harvest(jemalloc/lib jemalloc/lib "*.a")
harvest(jpg/include jpeg/include "*.h")
@@ -197,6 +189,9 @@ harvest(x264/lib ffmpeg/lib "*.a")
harvest(xvidcore/lib ffmpeg/lib "*.a")
harvest(embree/include embree/include "*.h")
harvest(embree/lib embree/lib "*.a")
harvest(usd/include usd/include "*.h")
harvest(usd/lib/usd usd/lib/usd "*")
harvest(usd/plugin usd/plugin "*")
if(UNIX AND NOT APPLE)
harvest(libglu/lib mesa/lib "*.so*")

View File

@@ -1,58 +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(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}
)
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()
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
)
endif()

View File

@@ -23,6 +23,8 @@ set(LLVM_EXTRA_ARGS
-DLLVM_TARGETS_TO_BUILD=X86
-DLLVM_INCLUDE_EXAMPLES=OFF
-DLLVM_ENABLE_TERMINFO=OFF
-DLLVM_BUILD_LLVM_C_DYLIB=OFF
-DLLVM_ENABLE_UNWIND_TABLES=OFF
)
if(WIN32)
@@ -38,6 +40,7 @@ ExternalProject_Add(ll
URL_HASH MD5=${LLVM_HASH}
CMAKE_GENERATOR ${LLVM_GENERATOR}
PREFIX ${BUILD_DIR}/ll
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/ll/src/ll < ${PATCH_DIR}/llvm.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/llvm ${DEFAULT_CMAKE_FLAGS} ${LLVM_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/llvm
)

View File

@@ -20,59 +20,45 @@ 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
else()
set(OPENEXR_EXTRA_ARGS
)
endif()
set(OPENEXR_EXTRA_ARGS
${OPENEXR_EXTRA_ARGS}
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DBUILD_TESTING=OFF
-DOPENEXR_BUILD_BOTH_STATIC_SHARED=OFF
-DILMBASE_BUILD_BOTH_STATIC_SHARED=OFF
-DBUILD_SHARED_LIBS=OFF
-DOPENEXR_BUILD_UTILS=OFF
-DPYILMBASE_ENABLE=OFF
-DOPENEXR_VIEWERS_ENABLE=OFF
-DILMBASE_LIB_SUFFIX=${OPENEXR_VERSION_BUILD_POSTFIX}
-DOPENEXR_LIB_SUFFIX=${OPENEXR_VERSION_BUILD_POSTFIX}
)
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
)
if(WIN32)
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
)
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
)

View File

@@ -106,13 +106,13 @@ set(OPENIMAGEIO_EXTRA_ARGS
-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}
-DILMBASE_INCLUDE_PATH=${LIBDIR}/openexr/
-DILMBASE_PACKAGE_PREFIX=${LIBDIR}/openexr/
-DILMBASE_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_HALF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Half${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IMATH_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Imath${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmThread${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Iex${OPENEXR_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
@@ -135,7 +135,6 @@ ExternalProject_Add(external_openimageio
add_dependencies(
external_openimageio
external_png external_zlib
external_ilmbase
external_openexr
external_jpeg
external_boost

View File

@@ -29,24 +29,20 @@ set(OPENVDB_EXTRA_ARGS
-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}
-DBlosc_INCLUDE_DIR=${LIBDIR}/blosc/include/
-DBlosc_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/
-DBlosc_ROOT=${LIBDIR}/blosc/
-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
-DOpenEXR_ROOT=${LIBDIR}/openexr
-DIlmBase_ROOT=${LIBDIR}/openexr
-DOPENEXR_LIBRARYDIR=${LIBDIR}/openexr/lib
# All libs live in openexr, even the ilmbase ones
-DILMBASE_LIBRARYDIR=${LIBDIR}/openexr/lib
-DOPENVDB_CORE_SHARED=Off
-DOPENVDB_BUILD_BINARIES=Off
)
if(WIN32)
@@ -54,15 +50,17 @@ if(WIN32)
# 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
-DCMAKE_CXX_STANDARD_LIBRARIES="${LIBDIR}/pthreads/lib/pthreadVC3.lib"
-DUSE_EXR=On
)
else()
# OpenVDB can't find the _static libraries automatically.
set(OPENVDB_EXTRA_ARGS ${OPENVDB_EXTRA_ARGS}
-DTbb_LIBRARIES=${LIBDIR}/tbb/lib/${LIBPREFIX}tbb_static${LIBEXT}
-DTbb_tbb_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}tbb_static${LIBEXT}
-DTbb_tbbmalloc_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}tbbmalloc_static${LIBEXT}
-DTbb_tbbmalloc_proxy_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}tbbmalloc_proxy_static${LIBEXT}
)
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
@@ -79,7 +77,6 @@ add_dependencies(
openvdb
external_tbb
external_boost
external_ilmbase
external_openexr
external_zlib
external_blosc

View File

@@ -20,7 +20,6 @@ if(WIN32)
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)

View File

@@ -18,7 +18,7 @@
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_FLEX_BISON -DFLEX_EXECUTABLE=${LIBDIR}/flexbison/win_flex.exe -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)
@@ -33,7 +33,7 @@ else()
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_ILMBASE_CUSTOM_LIBRARIES "${LIBDIR}/openexr/lib/Imath${OPENEXR_VERSION_POSTFIX}.lib^^${LIBDIR}/openexr/lib/Half{OPENEXR_VERSION_POSTFIX}.lib^^${LIBDIR}/openexr/lib/IlmThread${OPENEXR_VERSION_POSTFIX}.lib^^${LIBDIR}/openexr/lib/Iex${OPENEXR_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
@@ -50,20 +50,21 @@ set(OSL_EXTRA_ARGS
-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}
-DILMBASE_HOME=${LIBDIR}/openexr/
-DILMBASE_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_HALF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Half${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IMATH_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Imath${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmThread${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Iex${OPENEXR_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
-DOSL_BUILD_MATERIALX=OFF
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DOPENIMAGEIOHOME=${LIBDIR}/openimageio/
-DOPENIMAGEIO_INCLUDE_DIR=${LIBDIR}/openimageio/include
-DOPENIMAGEIO_LIBRARY=${OSL_OPENIMAGEIO_LIBRARY}
-DOPENIMAGEIO_INCLUDES=${LIBDIR}/openimageio/include
${OSL_FLEX_BISON}
-DCMAKE_CXX_STANDARD_LIBRARIES=${OSL_CMAKE_CXX_STANDARD_LIBRARIES}
-DBUILDSTATIC=ON
@@ -72,6 +73,7 @@ set(OSL_EXTRA_ARGS
-DSTOP_ON_WARNING=OFF
-DUSE_LLVM_BITCODE=OFF
-DUSE_PARTIO=OFF
-DUSE_QT=OFF
${OSL_SIMD_FLAGS}
-DPARTIO_LIBRARIES=
)
@@ -87,7 +89,6 @@ elseif(APPLE)
set(OSL_EXTRA_ARGS
${OSL_EXTRA_ARGS}
-DHIDE_SYMBOLS=OFF
-DPUGIXML_HOME=${LIBDIR}/pugixml
)
endif()
@@ -107,14 +108,13 @@ add_dependencies(
external_boost
ll
external_clang
external_ilmbase
external_openexr
external_zlib
external_flexbison
external_openimageio
)
if(UNIX AND NOT APPLE)
if(UNIX)
# Rely on PugiXML compiled with OpenImageIO
else()
add_dependencies(

View File

@@ -29,6 +29,7 @@ if(MSVC)
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}/python3${PYTHON_POSTFIX}.dll ${PYTARGET}/bin/python3${PYTHON_POSTFIX}.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/
@@ -47,6 +48,7 @@ if(MSVC)
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}/python3${PYTHON_POSTFIX}.dll ${PYTARGET}/bin/python3${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/

View File

@@ -43,7 +43,7 @@ if(WIN32)
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
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-venv --include-symbols ${PYTHON_EXTRA_INSTLAL_FLAGS} --copy ${LIBDIR}/python
)
else()

View File

@@ -19,8 +19,10 @@
set(SQLITE_CONFIGURE_ENV echo .)
set(SQLITE_CONFIGURATION_ARGS)
if(UNIX AND NOT APPLE)
set(SQLITE_LDFLAGS -Wl,--as-needed)
if(UNIX)
if(NOT APPLE)
set(SQLITE_LDFLAGS -Wl,--as-needed)
endif()
set(SQLITE_CFLAGS
"-DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_COLUMN_METADATA \
-DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS \

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 *****
set(USD_EXTRA_ARGS
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=OFF
-DBOOST_ROOT=${LIBDIR}/boost
-DTBB_INCLUDE_DIRS=${LIBDIR}/tbb/include
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/${LIBPREFIX}tbb_static${LIBEXT}
-DTbb_TBB_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}tbb_static${LIBEXT}
# This is a preventative measure that avoids possible conflicts when add-ons
# try to load another USD library into the same process space.
-DPXR_SET_INTERNAL_NAMESPACE=usdBlender
-DPXR_ENABLE_PYTHON_SUPPORT=OFF
-DPXR_BUILD_IMAGING=OFF
-DPXR_BUILD_TESTS=OFF
-DBUILD_SHARED_LIBS=OFF
-DPYTHON_EXECUTABLE=${PYTHON_BINARY}
-DPXR_BUILD_MONOLITHIC=ON
# The PXR_BUILD_USD_TOOLS argument is patched-in by usd.diff. An upstream pull request
# can be found at https://github.com/PixarAnimationStudios/USD/pull/1048.
-DPXR_BUILD_USD_TOOLS=OFF
-DCMAKE_DEBUG_POSTFIX=_d
# USD is hellbound on making a shared lib, unless you point this variable to a valid cmake file
# doesn't have to make sense, but as long as it points somewhere valid it will skip the shared lib.
-DPXR_MONOLITHIC_IMPORT=${BUILD_DIR}/usd/src/external_usd/cmake/defaults/Version.cmake
)
ExternalProject_Add(external_usd
URL ${USD_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${USD_HASH}
PREFIX ${BUILD_DIR}/usd
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/usd/src/external_usd < ${PATCH_DIR}/usd.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/usd -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${USD_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/usd
)
add_dependencies(
external_usd
external_tbb
external_boost
)
if(WIN32)
# USD currently demands python be available at build time
# and then proceeds not to use it, but still checks that the
# version of the interpreter it is not going to use is atleast 2.7
# so we need this dep currently since there is no system python
# on windows.
add_dependencies(
external_usd
external_python
)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_usd after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/usd/ ${HARVEST_TARGET}/usd
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/usd/src/external_usd-build/pxr/Release/libusd_m.lib ${HARVEST_TARGET}/usd/lib/libusd_m.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_usd after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/usd/lib ${HARVEST_TARGET}/usd/lib
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/usd/src/external_usd-build/pxr/Debug/libusd_m_d.lib ${HARVEST_TARGET}/usd/lib/libusd_m_d.lib
DEPENDEES install
)
endif()
else()
# USD has two build options. The default build creates lots of small libraries,
# whereas the 'monolithic' build produces only a single library. The latter
# makes linking simpler, so that's what we use in Blender. However, running
# 'make install' in the USD sources doesn't install the static library in that
# case (only the shared library). As a result, we need to grab the `libusd_m.a`
# file from the build directory instead of from the install directory.
ExternalProject_Add_Step(external_usd after_install
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/usd/src/external_usd-build/pxr/libusd_m.a ${HARVEST_TARGET}/usd/lib/libusd_m.a
DEPENDEES install
)
endif()

View File

@@ -32,47 +32,43 @@ set(JPEG_VERSION 1.5.3)
set(JPEG_URI https://github.com/libjpeg-turbo/libjpeg-turbo/archive/${JPEG_VERSION}.tar.gz)
set(JPEG_HASH 5b7549d440b86c98a517355c102d155e)
set(BOOST_VERSION 1.68.0)
set(BOOST_VERSION_NODOTS 1_68_0)
set(BOOST_VERSION 1.70.0)
set(BOOST_VERSION_NODOTS 1_70_0)
set(BOOST_VERSION_NODOTS_SHORT 1_70)
set(BOOST_URI https://dl.bintray.com/boostorg/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_NODOTS}.tar.gz)
set(BOOST_HASH 5d8b4503582fffa9eefdb9045359c239)
set(BOOST_HASH fea771fe8176828fabf9c09242ee8c26)
set(BLOSC_VERSION 1.14.4)
# Using old version as recommended by OpenVDB build documentation.
set(BLOSC_VERSION 1.5.0)
set(BLOSC_URI https://github.com/Blosc/c-blosc/archive/v${BLOSC_VERSION}.tar.gz)
set(BLOSC_HASH e80dfc71e4cba03b8d01ed0876547ffe)
set(BLOSC_HASH 6e4a49c8c06f05aa543f3312cfce3d55)
set(PTHREADS_VERSION 3.0.0)
set(PTHREADS_URI http://sourceforge.mirrorservice.org/p/pt/pthreads4w/pthreads4w-code-v${PTHREADS_VERSION}.zip)
set(PTHREADS_HASH f3bf81bb395840b3446197bcf4ecd653)
set(ILMBASE_VERSION 2.3.0)
set(OPENEXR_VERSION 2.4.0)
set(OPENEXR_URI https://github.com/AcademySoftwareFoundation/openexr/archive/v${OPENEXR_VERSION}.tar.gz)
set(OPENEXR_HASH 9e4d69cf2a12c6fb19b98af7c5e0eaee)
if(WIN32)
# Openexr started appending _d on its own so now
# we need to tell the build the postfix is _s while
# telling all other deps the postfix is _s_d
if(BUILD_MODE STREQUAL Release)
set(ILMBASE_VERSION_POSTFIX _s)
set(OPENEXR_VERSION_POSTFIX _s)
set(OPENEXR_VERSION_BUILD_POSTFIX _s)
else()
set(ILMBASE_VERSION_POSTFIX _s_d)
set(OPENEXR_VERSION_POSTFIX _s_d)
set(OPENEXR_VERSION_BUILD_POSTFIX _s)
endif()
else()
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)
else()
set(OPENEXR_VERSION_BUILD_POSTFIX)
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_VERSION 2.10.1)
set(FREETYPE_URI http://prdownloads.sourceforge.net/freetype/freetype-${FREETYPE_VERSION}.tar.gz)
set(FREETYPE_HASH 3adb0e35d3c100c456357345ccfa8056)
set(FREETYPE_HASH c50a3c9e5e62bdc938a6e1598a782947)
set(GLEW_VERSION 1.13.0)
set(GLEW_URI http://prdownloads.sourceforge.net/glew/glew/${GLEW_VERSION}/glew-${GLEW_VERSION}.tgz)
@@ -121,15 +117,15 @@ set(OPENCOLORIO_VERSION 1.1.0)
set(OPENCOLORIO_URI https://github.com/imageworks/OpenColorIO/archive/v${OPENCOLORIO_VERSION}.tar.gz)
set(OPENCOLORIO_HASH 802d8f5b1d1fe316ec5f76511aa611b8)
set(LLVM_VERSION 6.0.1)
set(LLVM_URI http://releases.llvm.org/${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.xz)
set(LLVM_HASH c88c98709300ce2c285391f387fecce0)
set(LLVM_VERSION 9.0.1)
set(LLVM_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/llvm-${LLVM_VERSION}.src.tar.xz)
set(LLVM_HASH 31eb9ce73dd2a0f8dcab8319fb03f8fc)
set(CLANG_URI http://releases.llvm.org/${LLVM_VERSION}/cfe-${LLVM_VERSION}.src.tar.xz)
set(CLANG_HASH 4e419bd4e3b55aa06d872320f754bd85)
set(CLANG_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/clang-${LLVM_VERSION}.src.tar.xz)
set(CLANG_HASH 13468e4a44940efef1b75e8641752f90)
set(OPENMP_URI http://releases.llvm.org/${LLVM_VERSION}/openmp-${LLVM_VERSION}.src.tar.xz)
set(OPENMP_HASH 4826402ae3633c36c51ba4d0e5527d30)
set(OPENMP_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/openmp-${LLVM_VERSION}.src.tar.xz)
set(OPENMP_HASH 6eade16057edbdecb3c4eef9daa2bfcf)
set(OPENIMAGEIO_VERSION 1.8.13)
set(OPENIMAGEIO_URI https://github.com/OpenImageIO/oiio/archive/Release-${OPENIMAGEIO_VERSION}.tar.gz)
@@ -139,9 +135,9 @@ set(TIFF_VERSION 4.0.9)
set(TIFF_URI http://download.osgeo.org/libtiff/tiff-${TIFF_VERSION}.tar.gz)
set(TIFF_HASH 54bad211279cc93eb4fca31ba9bfdc79)
set(OSL_VERSION 1.9.9)
set(OSL_VERSION 1.10.9)
set(OSL_URI https://github.com/imageworks/OpenShadingLanguage/archive/Release-${OSL_VERSION}.tar.gz)
set(OSL_HASH 44ad511e424965a10fce051a053b0605)
set(OSL_HASH a94f1e8506f7e8f5e993653de5c5fa00)
set(PYTHON_VERSION 3.7.4)
set(PYTHON_SHORT_VERSION 3.7)
@@ -153,9 +149,9 @@ set(TBB_VERSION 2019_U9)
set(TBB_URI https://github.com/01org/tbb/archive/${TBB_VERSION}.tar.gz)
set(TBB_HASH 584edbec127c508f2cd5b6e79ad200fc)
set(OPENVDB_VERSION 5.1.0)
set(OPENVDB_VERSION 7.0.0)
set(OPENVDB_URI https://github.com/dreamworksanimation/openvdb/archive/v${OPENVDB_VERSION}.tar.gz)
set(OPENVDB_HASH 5310101f874dcfd2165f9cee68c22624)
set(OPENVDB_HASH fd6c4f168282f7e0e494d290cd531fa8)
set(IDNA_VERSION 2.8)
set(CHARDET_VERSION 3.0.4)
@@ -303,9 +299,13 @@ set(SQLITE_VERSION 3.24.0)
set(SQLITE_URI https://www.sqlite.org/2018/sqlite-src-3240000.zip)
set(SQLITE_HASH fb558c49ee21a837713c4f1e7e413309aabdd9c7)
set(EMBREE_VERSION 3.2.4)
set(EMBREE_VERSION 3.8.0)
set(EMBREE_URI https://github.com/embree/embree/archive/v${EMBREE_VERSION}.zip)
set(EMBREE_HASH 3d4a1147002ff43939d45140aa9d6fb8)
set(EMBREE_HASH ac504d5426945fe25dec1267e0c39d52)
set(USD_VERSION 19.11)
set(USD_URI https://github.com/PixarAnimationStudios/USD/archive/v${USD_VERSION}.tar.gz)
set(USD_HASH 79ff176167b3fe85f4953abd6cc5e0cc)
set(OIDN_VERSION 1.0.0)
set(OIDN_URI https://github.com/OpenImageDenoise/oidn/releases/download/v${OIDN_VERSION}/oidn-${OIDN_VERSION}.src.zip)

View File

@@ -0,0 +1,100 @@
strict graph {
graph[autosize = false, size = "25.7,8.3!", resolution = 300, overlap = false, splines = false, outputorder=edgesfirst ];
node [style=filled fillcolor=white];
external_alembic -- external_boost;
external_alembic -- external_zlib;
external_alembic -- external_openexr;
external_blosc -- external_zlib;
external_blosc -- external_pthreads;
external_boost -- Make_Python_Environment;
external_clang -- ll;
external_ffmpeg -- external_zlib;
external_ffmpeg -- external_faad;
external_ffmpeg -- external_openjpeg;
external_ffmpeg -- external_xvidcore;
external_ffmpeg -- external_x264;
external_ffmpeg -- external_vpx;
external_ffmpeg -- external_theora;
external_ffmpeg -- external_vorbis;
external_ffmpeg -- external_ogg;
external_ffmpeg -- external_lame;
external_ffmpeg -- external_zlib_mingw;
external_numpy -- Make_Python_Environment;
external_opencollada -- external_xml2;
external_opencolorio -- external_boost;
external_opencolorio -- external_tinyxml;
external_opencolorio -- external_yamlcpp;
external_openexr -- external_zlib;
external_openimageio -- external_png;
external_openimageio -- external_zlib;
external_openimageio -- external_openexr;
external_openimageio -- external_openexr;
external_openimageio -- external_jpeg;
external_openimageio -- external_boost;
external_openimageio -- external_tiff;
external_openimageio -- external_opencolorio;
external_openimageio -- external_openjpeg;
external_openimageio -- external_webp;
external_openimageio -- external_opencolorio_extra;
external_openmp -- external_clang;
external_opensubdiv -- external_glew;
external_opensubdiv -- external_glfw;
external_opensubdiv -- external_clew;
external_opensubdiv -- external_cuew;
external_opensubdiv -- external_tbb;
openvdb -- external_tbb;
openvdb -- external_boost;
openvdb -- external_openexr;
openvdb -- external_openexr;
openvdb -- external_zlib;
openvdb -- external_blosc;
external_osl -- external_boost;
external_osl -- ll;
external_osl -- external_clang;
external_osl -- external_openexr;
external_osl -- external_openexr;
external_osl -- external_zlib;
external_osl -- external_flexbison;
external_osl -- external_openimageio;
external_osl -- external_pugixml;
external_png -- external_zlib;
external_python_site_packages -- Make_Python_Environment;
external_sndfile -- external_ogg;
external_sndfile -- external_vorbis;
external_sndfile -- external_flac;
external_theora -- external_vorbis;
external_theora -- external_ogg;
external_tiff -- external_zlib;
external_vorbis -- external_ogg;
blender-- external_ffmpeg;
blender-- external_alembic;
blender-- external_openjpeg;
blender-- external_opencolorio;
blender-- external_openexr;
blender-- external_opensubdiv;
blender-- openvdb;
blender-- external_osl;
blender-- external_boost;
blender-- external_jpeg;
blender-- external_png;
blender-- external_python;
blender-- external_sndfile;
blender-- external_iconv;
blender-- external_fftw3;
external_python-- external_python_site_packages;
external_python_site_packages-- requests;
external_python_site_packages-- idna;
external_python_site_packages-- chardet;
external_python_site_packages-- urllib3;
external_python_site_packages-- certifi;
external_python-- external_numpy;
external_usd-- external_boost;
external_usd-- external_tbb;
blender-- external_opencollada;
blender-- external_sdl;
blender-- external_freetype;
blender-- external_pthreads;
blender-- external_zlib;
blender-- external_openal;
blender-- external_usd;
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
# Files contains mixed line endings, patch needs to preserve them to apply.
opencollada.diff binary

View File

@@ -10,22 +10,84 @@ diff -Naur src/blosc/CMakeLists.txt external_blosc/blosc/CMakeLists.txt
endif(NOT Threads_FOUND)
else(WIN32)
find_package(Threads REQUIRED)
diff -Naur src/CMakeLists.txt external_blosc/CMakeLists.txt
--- src/CMakeLists.txt 2016-02-03 10:26:28 -0700
+++ external_blosc/CMakeLists.txt 2017-03-03 09:03:31 -0700
@@ -17,8 +17,8 @@
# do not include support for the Snappy library
# DEACTIVATE_ZLIB: default OFF
# do not include support for the Zlib library
-# PREFER_EXTERNAL_COMPLIBS: default ON
-# when found, use the installed compression libs instead of included sources
+# PREFER_EXTERNAL_ZLIB: default ON
+# when found, use the installed zlib instead of included sources
# TEST_INCLUDE_BENCH_SINGLE_1: default ON
# add a test that runs the benchmark program passing "single" with 1 thread
# as first parameter
@@ -80,29 +80,23 @@
"Do not include support for the SNAPPY library." OFF)
option(DEACTIVATE_ZLIB
"Do not include support for the ZLIB library." OFF)
-option(PREFER_EXTERNAL_COMPLIBS
- "When found, use the installed compression libs instead of included sources." ON)
+option(PREFER_EXTERNAL_ZLIB
+ "When found, use the installed zlib instead of included sources." ON)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
-if(NOT PREFER_EXTERNAL_COMPLIBS)
+if(NOT PREFER_EXTERNAL_ZLIB)
message(STATUS "Finding external libraries disabled. Using internal sources.")
-endif(NOT PREFER_EXTERNAL_COMPLIBS)
+endif(NOT PREFER_EXTERNAL_ZLIB)
if(NOT DEACTIVATE_LZ4)
- if(PREFER_EXTERNAL_COMPLIBS)
- find_package(LZ4)
- endif(PREFER_EXTERNAL_COMPLIBS)
# HAVE_LZ4 will be set to true because even if the library is
# not found, we will use the included sources for it
set(HAVE_LZ4 TRUE)
endif(NOT DEACTIVATE_LZ4)
if(NOT DEACTIVATE_SNAPPY)
- if(PREFER_EXTERNAL_COMPLIBS)
- find_package(Snappy)
- endif(PREFER_EXTERNAL_COMPLIBS)
# HAVE_SNAPPY will be set to true because even if the library is not found,
# we will use the included sources for it
set(HAVE_SNAPPY TRUE)
@@ -110,13 +104,13 @@
if(NOT DEACTIVATE_ZLIB)
# import the ZLIB_ROOT environment variable to help finding the zlib library
- if(PREFER_EXTERNAL_COMPLIBS)
+ if(PREFER_EXTERNAL_ZLIB)
set(ZLIB_ROOT $ENV{ZLIB_ROOT})
find_package( ZLIB )
if (NOT ZLIB_FOUND )
message(STATUS "No zlib found. Using internal sources.")
endif (NOT ZLIB_FOUND )
- endif(PREFER_EXTERNAL_COMPLIBS)
+ endif(PREFER_EXTERNAL_ZLIB)
# HAVE_ZLIB will be set to true because even if the library is not found,
# we will use the included sources for it
set(HAVE_ZLIB TRUE)
diff -Naur external_blosc.orig/blosc/blosc.c external_blosc/blosc/blosc.c
--- external_blosc.orig/blosc/blosc.c 2018-07-30 04:56:38 -0600
+++ external_blosc/blosc/blosc.c 2018-08-11 15:27:26 -0600
@@ -56,14 +56,7 @@
@@ -41,12 +41,7 @@
#include <inttypes.h>
#endif /* _WIN32 */
-/* Include the win32/pthread.h library for all the Windows builds. See #224. */
-#if defined(_WIN32)
- #include "win32/pthread.h"
- #include "win32/pthread.c"
-#else
- #include <pthread.h>
-#endif
-
+#include <pthread.h>
/* Some useful units */
#define KB 1024

View File

@@ -29,9 +29,6 @@ ENDIF()
SET(_blosc_SEARCH_DIRS
${BLOSC_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/lib/blosc
)

View File

@@ -29,9 +29,6 @@ ENDIF()
SET(_cppunit_SEARCH_DIRS
${CPPUNIT_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/lib/cppunit
)

View File

@@ -26,8 +26,8 @@ include(FindPackageMessage)
include(SelectLibraryConfigurations)
if( ILMBASE_USE_STATIC_LIBS )
set( _ilmbase_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
if(ILMBASE_USE_STATIC_LIBS)
set(_ilmbase_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
if(WIN32)
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
else()
@@ -124,7 +124,6 @@ set(IlmBase_generic_include_paths
/usr/include
/usr/include/${CMAKE_LIBRARY_ARCHITECTURE}
/usr/local/include
/sw/include
/opt/local/include
)
set(IlmBase_generic_library_paths
@@ -133,7 +132,6 @@ set(IlmBase_generic_library_paths
/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}
/usr/local/lib
/usr/local/lib/${CMAKE_LIBRARY_ARCHITECTURE}
/sw/lib
/opt/local/lib
)
@@ -249,7 +247,7 @@ if(ILMBASE_FOUND)
endif()
# Restore the original find library ordering
if( ILMBASE_USE_STATIC_LIBS )
if(ILMBASE_USE_STATIC_LIBS )
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_ilmbase_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
endif()

View File

@@ -29,9 +29,6 @@ ENDIF()
SET(_logc4plus_SEARCH_DIRS
${LOGC4PLUS_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/lib/logc4plus
)

View File

@@ -119,7 +119,6 @@ set(OpenEXR_generic_include_paths
/usr/include
/usr/include/${CMAKE_LIBRARY_ARCHITECTURE}
/usr/local/include
/sw/include
/opt/local/include
)
set(OpenEXR_generic_library_paths
@@ -128,7 +127,6 @@ set(OpenEXR_generic_library_paths
/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}
/usr/local/lib
/usr/local/lib/${CMAKE_LIBRARY_ARCHITECTURE}
/sw/lib
/opt/local/lib
)
@@ -232,7 +230,7 @@ if(OPENEXR_FOUND)
endif()
# Restore the original find library ordering
if( OPENEXR_USE_STATIC_LIBS )
if(OPENEXR_USE_STATIC_LIBS )
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_openexr_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
endif()

View File

@@ -29,9 +29,6 @@ ENDIF()
SET(_tbb_SEARCH_DIRS
${TBB_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/lib/tbb
)

View File

@@ -1,18 +0,0 @@
diff -NaurBb b/CMakeLists.txt a/CMakeLists.txt
--- b/CMakeLists.txt 2018-05-01 12:45:46 -0600
+++ a/CMakeLists.txt 2018-08-08 13:03:22 -0600
@@ -229,9 +229,12 @@
endif ()
string(REPLACE "/undef " "#undef "
FTCONFIG_H "${FTCONFIG_H}")
- file(WRITE "${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h"
- "${FTCONFIG_H}")
+else()
+ file(READ "${PROJECT_SOURCE_DIR}/include/freetype/config/ftconfig.h"
+ FTCONFIG_H)
endif ()
+file(WRITE "${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h"
+ "${FTCONFIG_H}")
# Create the options file

View File

@@ -0,0 +1,13 @@
--- a/lib/Support/Unix/Path.inc 2020-02-17 09:24:26.000000000 +0100
+++ b/lib/Support/Unix/Path.inc 2020-02-17 09:26:25.000000000 +0100
@@ -1200,7 +1200,9 @@
/// implementation.
std::error_code copy_file(const Twine &From, const Twine &To) {
uint32_t Flag = COPYFILE_DATA;
-#if __has_builtin(__builtin_available) && defined(COPYFILE_CLONE)
+ // BLENDER: This optimization makes LLVM not build on older Xcode versions,
+ // just disable until everyone has new enough Xcode versions.
+#if 0
if (__builtin_available(macos 10.12, *)) {
bool IsSymlink;
if (std::error_code Error = is_symlink_file(From, IsSymlink))

View File

@@ -16,6 +16,19 @@ index 95abbe2..4f14f30 100644
message("WARNING: Native PCRE not found, taking PCRE from ./Externals")
add_definitions(-DPCRE_STATIC)
add_subdirectory(${EXTERNAL_LIBRARIES}/pcre)
diff --git a/DAEValidator/CMakeLists.txt b/DAEValidator/CMakeLists.txt
index 03ad540..f7d05cf 100644
--- a/DAEValidator/CMakeLists.txt
+++ b/DAEValidator/CMakeLists.txt
@@ -98,7 +98,7 @@ if (WIN32)
# C4710: 'function' : function not inlined
# C4711: function 'function' selected for inline expansion
# C4820: 'bytes' bytes padding added after construct 'member_name'
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /Wall /WX /wd4505 /wd4514 /wd4592 /wd4710 /wd4711 /wd4820")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /Wall /wd4505 /wd4514 /wd4592 /wd4710 /wd4711 /wd4820")
else ()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Werror")
endif ()
diff --git a/DAEValidator/library/include/no_warning_begin b/DAEValidator/library/include/no_warning_begin
index 7a69c32..defb315 100644
--- a/DAEValidator/library/include/no_warning_begin
@@ -30,34 +43,8 @@ index 7a69c32..defb315 100644
# if defined(_MSC_VER) && defined(_DEBUG)
# pragma warning(disable:4548)
# endif
diff --git a/GeneratedSaxParser/src/GeneratedSaxParserUtils.cpp b/GeneratedSaxParser/src/GeneratedSaxParserUtils.cpp
index 1f9a3ee..d151e9a 100644
--- a/GeneratedSaxParser/src/GeneratedSaxParserUtils.cpp
+++ b/GeneratedSaxParser/src/GeneratedSaxParserUtils.cpp
@@ -1553,7 +1553,7 @@ namespace GeneratedSaxParser
#if defined(COLLADABU_OS_WIN) && !defined(__MINGW32__)
return _isnan( value ) ? true : false;
#else
-#ifdef isnan
+#if defined(isnan) || defined(__APPLE__)
return isnan( value );
#else
return std::isnan(value);
diff --git a/DAEValidator/CMakeLists.txt b/DAEValidator/CMakeLists.txt
index 03ad540f..f7d05cfb 100644
--- a/DAEValidator/CMakeLists.txt
+++ b/DAEValidator/CMakeLists.txt
@@ -98,7 +98,7 @@ if (WIN32)
# C4710: 'function' : function not inlined
# C4711: function 'function' selected for inline expansion
# C4820: 'bytes' bytes padding added after construct 'member_name'
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /Wall /WX /wd4505 /wd4514 /wd4592 /wd4710 /wd4711 /wd4820")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /Wall /wd4505 /wd4514 /wd4592 /wd4710 /wd4711 /wd4820")
else ()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Werror")
endif ()
diff --git a/DAEValidator/library/src/ArgumentParser.cpp b/DAEValidator/library/src/ArgumentParser.cpp
index 897e4dcf..98a69ff1 100644
index 897e4dc..98a69ff 100644
--- a/DAEValidator/library/src/ArgumentParser.cpp
+++ b/DAEValidator/library/src/ArgumentParser.cpp
@@ -6,10 +6,10 @@
@@ -74,3 +61,28 @@ index 897e4dcf..98a69ff1 100644
#endif
namespace opencollada
diff --git a/Externals/LibXML/CMakeLists.txt b/Externals/LibXML/CMakeLists.txt
index 40081e7..e1d1bfa 100644
--- a/Externals/LibXML/CMakeLists.txt
+++ b/Externals/LibXML/CMakeLists.txt
@@ -9,6 +9,7 @@ add_definitions(
-DLIBXML_SCHEMAS_ENABLED
-DLIBXML_XPATH_ENABLED
-DLIBXML_TREE_ENABLED
+ -DLIBXML_STATIC
)
if(USE_STATIC_MSVC_RUNTIME)
diff --git a/GeneratedSaxParser/src/GeneratedSaxParserUtils.cpp b/GeneratedSaxParser/src/GeneratedSaxParserUtils.cpp
index 1f9a3ee..d151e9a 100644
--- a/GeneratedSaxParser/src/GeneratedSaxParserUtils.cpp
+++ b/GeneratedSaxParser/src/GeneratedSaxParserUtils.cpp
@@ -1553,7 +1553,7 @@ namespace GeneratedSaxParser
#if defined(COLLADABU_OS_WIN) && !defined(__MINGW32__)
return _isnan( value ) ? true : false;
#else
-#ifdef isnan
+#if defined(isnan) || defined(__APPLE__)
return isnan( value );
#else
return std::isnan(value);

View File

@@ -117,3 +117,15 @@ diff '--ignore-matching-lines=:' -ur '--exclude=*.svn*' -u -r
if(OIDN_STATIC_LIB)
set(OIDN_LIB_TYPE STATIC)
else()
diff -Naur orig/core/api.cpp external_openimagedenoise/core/api.cpp
--- orig/core/api.cpp 2019-07-19 08:37:04 -0600
+++ external_openimagedenoise/core/api.cpp 2020-01-21 15:10:56 -0700
@@ -15,7 +15,7 @@
// ======================================================================== //
#ifdef _WIN32
-# define OIDN_API extern "C" __declspec(dllexport)
+# define OIDN_API extern "C"
#else
# define OIDN_API extern "C" __attribute__ ((visibility ("default")))
#endif

View File

@@ -1,13 +0,0 @@
--- idiff.cpp 2016-11-18 11:42:01 -0700
+++ idiff.cpp 2016-11-18 11:41:25 -0700
@@ -308,8 +308,10 @@
// printed with three digit exponent. We change this behaviour to fit
// Linux way
#ifdef _MSC_VER
+#if _MSC_VER < 1900
_set_output_format(_TWO_DIGIT_EXPONENT);
#endif
+#endif
std::streamsize precis = std::cout.precision();
std::cout << " " << cr.nwarn << " pixels ("
<< std::setprecision(3) << (100.0*cr.nwarn / npels)

View File

@@ -1,102 +1,73 @@
diff -Naur openvdb.orig/openvdb/CMakeLists.txt openvdb/openvdb/CMakeLists.txt
--- openvdb.orig/openvdb/CMakeLists.txt 2018-04-10 12:22:17 -0600
+++ openvdb/openvdb/CMakeLists.txt 2018-08-15 19:04:52 -0600
@@ -82,6 +82,9 @@
IF (WIN32 AND OPENVDB_DISABLE_BOOST_IMPLICIT_LINKING)
ADD_DEFINITIONS ( -DBOOST_ALL_NO_LIB )
ENDIF ()
+if(WIN32)
+ADD_DEFINITIONS ( -D__TBB_NO_IMPLICIT_LINKAGE )
+endif()
FIND_PACKAGE ( Blosc REQUIRED )
FIND_PACKAGE ( TBB REQUIRED )
@@ -195,6 +198,7 @@
${Ilmbase_HALF_LIBRARY}
${ZLIB_LIBRARY}
${BLOSC_blosc_LIBRARY}
+ ${EXTRA_LIBS}
diff -Naur orig/cmake/FindIlmBase.cmake openvdb/cmake/FindIlmBase.cmake
--- orig/cmake/FindIlmBase.cmake 2019-12-06 13:11:33 -0700
+++ openvdb/cmake/FindIlmBase.cmake 2020-01-16 09:06:32 -0700
@@ -225,6 +225,12 @@
list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES
"-${IlmBase_VERSION_MAJOR}_${IlmBase_VERSION_MINOR}.lib"
)
IF (WIN32)
@@ -225,13 +228,16 @@
${VDB_PRINT_SOURCE_FILES}
)
+if(NOT WIN32)
+ set(EXTRA_LIBS m stdc++ dl)
+endif()
+
TARGET_LINK_LIBRARIES ( vdb_print
openvdb_shared
${CMAKE_THREAD_LIBS_INIT}
${BLOSC_blosc_LIBRARY}
- m
- stdc++
- )
+ ${EXTRA_LIBS}
+)
SET ( VDB_RENDER_SOURCE_FILES cmd/openvdb_render/main.cc )
SET_SOURCE_FILES_PROPERTIES ( ${VDB_RENDER_SOURCE_FILES}
@@ -249,8 +255,7 @@
${Openexr_ILMIMF_LIBRARY}
${Ilmbase_ILMTHREAD_LIBRARY}
${Ilmbase_IEX_LIBRARY}
- m
- stdc++
+ ${EXTRA_LIBS}
)
SET ( VDB_VIEW_SOURCE_FILES
@@ -270,7 +270,7 @@
PROPERTIES
COMPILE_FLAGS "-DOPENVDB_USE_BLOSC ${OPENVDB_USE_GLFW_FLAG} -DGL_GLEXT_PROTOTYPES=1"
)
-IF (NOT WIN32)
+IF (FALSE)
ADD_EXECUTABLE ( vdb_view
${VDB_VIEW_SOURCE_FILES}
)
@@ -283,9 +288,8 @@
${GLFW_LINK_LIBRARY}
${GLFW_DEPENDENT_LIBRARIES}
${GLEW_GLEW_LIBRARY}
- m
- stdc++
- )
+ ${EXTRA_LIBS}
+ list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES
+ "_s.lib"
+ )
ENDIF ()
+ list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES
+ "_s_d.lib"
+ )
else()
if(ILMBASE_USE_STATIC_LIBS)
list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES
diff -Naur orig/cmake/FindOpenEXR.cmake openvdb/cmake/FindOpenEXR.cmake
--- orig/cmake/FindOpenEXR.cmake 2019-12-06 13:11:33 -0700
+++ openvdb/cmake/FindOpenEXR.cmake 2020-01-16 09:06:39 -0700
@@ -218,6 +218,12 @@
list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES
"-${OpenEXR_VERSION_MAJOR}_${OpenEXR_VERSION_MINOR}.lib"
)
+ list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES
+ "_s.lib"
+ )
+ list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES
+ "_s_d.lib"
+ )
else()
if(OPENEXR_USE_STATIC_LIBS)
list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES
diff -Naur orig/openvdb/CMakeLists.txt openvdb/openvdb/CMakeLists.txt
--- orig/openvdb/CMakeLists.txt 2019-12-06 13:11:33 -0700
+++ openvdb/openvdb/CMakeLists.txt 2020-01-16 08:56:25 -0700
@@ -193,11 +193,12 @@
if(OPENVDB_DISABLE_BOOST_IMPLICIT_LINKING)
add_definitions(-DBOOST_ALL_NO_LIB)
endif()
+ add_definitions(-D__TBB_NO_IMPLICIT_LINKAGE -DOPENVDB_OPENEXR_STATICLIB)
endif()
SET ( UNITTEST_SOURCE_FILES
@@ -392,8 +396,7 @@
TARGET_LINK_LIBRARIES ( vdb_test
${CPPUnit_cppunit_LIBRARY}
openvdb_shared
- m
- stdc++
+ ${EXTRA_LIBS}
)
# @todo Should be target definitions
if(WIN32)
- add_definitions(-D_WIN32 -DNOMINMAX -DOPENVDB_DLL)
+ add_definitions(-D_WIN32 -DNOMINMAX -DOPENVDB_STATICLIB)
endif()
ADD_TEST ( vdb_unit_test vdb_test )
@@ -422,7 +422,7 @@
ENDIF ()
##### Core library configuration
diff -Naur orig/openvdb/cmd/CMakeLists.txt openvdb/openvdb/cmd/CMakeLists.txt
--- orig/openvdb/cmd/CMakeLists.txt 2019-12-06 13:11:33 -0700
+++ openvdb/openvdb/cmd/CMakeLists.txt 2020-01-16 08:56:25 -0700
@@ -53,7 +53,7 @@
endif()
# Installation
-IF ( NOT WIN32 )
+IF ( FALSE )
INSTALL ( TARGETS
vdb_view
DESTINATION
diff -Naur openvdb.orig/openvdb/math/Coord.h openvdb/openvdb/math/Coord.h
--- openvdb.orig/openvdb/math/Coord.h 2018-04-10 12:22:17 -0600
+++ openvdb/openvdb/math/Coord.h 2018-08-15 20:32:43 -0600
@@ -35,6 +35,7 @@
#include <array> // for std::array
#include <iostream>
#include <limits>
+#define NOMINMAX
#include <openvdb/Platform.h>
#include "Math.h"
#include "Vec3.h"
if(WIN32)
- add_definitions(-D_WIN32 -DNOMINMAX -DOPENVDB_DLL)
+ add_definitions(-D_WIN32 -DNOMINMAX -DOPENVDB_STATICLIB)
endif()
# rpath handling
diff -Naur orig/openvdb/unittest/CMakeLists.txt openvdb/openvdb/unittest/CMakeLists.txt
--- orig/openvdb/unittest/CMakeLists.txt 2019-12-06 13:11:33 -0700
+++ openvdb/openvdb/unittest/CMakeLists.txt 2020-01-16 08:56:25 -0700
@@ -49,7 +49,7 @@
endif()
if(WIN32)
- add_definitions(-D_WIN32 -DNOMINMAX -DOPENVDB_DLL)
+ add_definitions(-D_WIN32 -DNOMINMAX -DOPENVDB_STATICLIB)
endif()
##### VDB unit tests

View File

@@ -1,15 +1,3 @@
diff -Naur OpenShadingLanguage-Release-1.9.9/src/cmake/flexbison.cmake external_osl/src/cmake/flexbison.cmake
--- OpenShadingLanguage-Release-1.9.9/src/cmake/flexbison.cmake 2018-05-01 16:39:02 -0600
+++ external_osl/src/cmake/flexbison.cmake 2018-08-23 15:42:27 -0600
@@ -77,7 +77,7 @@
DEPENDS ${${compiler_headers}}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
ADD_CUSTOM_COMMAND ( OUTPUT ${flexoutputcxx}
- COMMAND ${FLEX_EXECUTABLE} -o ${flexoutputcxx} "${CMAKE_CURRENT_SOURCE_DIR}/${flexsrc}"
+ COMMAND ${FLEX_EXECUTABLE} ${FLEX_EXTRA_OPTIONS} -o ${flexoutputcxx} "${CMAKE_CURRENT_SOURCE_DIR}/${flexsrc}"
MAIN_DEPENDENCY ${flexsrc}
DEPENDS ${${compiler_headers}}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
diff -Naur OpenShadingLanguage-Release-1.9.9/src/cmake/flexbison.cmake.rej external_osl/src/cmake/flexbison.cmake.rej
--- OpenShadingLanguage-Release-1.9.9/src/cmake/flexbison.cmake.rej 1969-12-31 17:00:00 -0700
+++ external_osl/src/cmake/flexbison.cmake.rej 2018-08-24 17:42:11 -0600
@@ -45,18 +33,6 @@ diff -Naur OpenShadingLanguage-Release-1.9.9/src/include/OSL/llvm_util.h externa
private:
class MemoryManager;
diff -Naur OpenShadingLanguage-Release-1.9.9/src/include/OSL/oslnoise.h external_osl/src/include/OSL/oslnoise.h
--- OpenShadingLanguage-Release-1.9.9/src/include/OSL/oslnoise.h 2018-05-01 16:39:02 -0600
+++ external_osl/src/include/OSL/oslnoise.h 2018-08-24 17:42:11 -0600
@@ -762,7 +762,7 @@
// packed into a float4. We assume T is float and VECTYPE is float4,
// but it also works if T is Dual2<float> and VECTYPE is Dual2<float4>.
template<typename T, typename VECTYPE>
-OIIO_FORCEINLINE T bilerp (VECTYPE abcd, T u, T v) {
+OIIO_FORCEINLINE T bilerp (VECTYPE& abcd, T u, T v) {
VECTYPE xx = OIIO::lerp (abcd, OIIO::simd::shuffle<1,1,3,3>(abcd), u);
return OIIO::simd::extract<0>(OIIO::lerp (xx,OIIO::simd::shuffle<2>(xx), v));
}
diff -Naur OpenShadingLanguage-Release-1.9.9/src/liboslexec/llvm_util.cpp external_osl/src/liboslexec/llvm_util.cpp
--- OpenShadingLanguage-Release-1.9.9/src/liboslexec/llvm_util.cpp 2018-05-01 16:39:02 -0600
+++ external_osl/src/liboslexec/llvm_util.cpp 2018-08-25 14:04:27 -0600

View File

@@ -0,0 +1,139 @@
diff -x .git -ur usd.orig/cmake/defaults/Options.cmake external_usd/cmake/defaults/Options.cmake
--- usd.orig/cmake/defaults/Options.cmake 2019-10-24 22:39:53.000000000 +0200
+++ external_usd/cmake/defaults/Options.cmake 2019-11-28 13:00:33.197957712 +0100
@@ -25,6 +25,7 @@
option(PXR_VALIDATE_GENERATED_CODE "Validate script generated code" OFF)
option(PXR_HEADLESS_TEST_MODE "Disallow GUI based tests, useful for running under headless CI systems." OFF)
option(PXR_BUILD_TESTS "Build tests" ON)
+option(PXR_BUILD_USD_TOOLS "Build commandline tools" ON)
option(PXR_BUILD_IMAGING "Build imaging components" ON)
option(PXR_BUILD_EMBREE_PLUGIN "Build embree imaging plugin" OFF)
option(PXR_BUILD_OPENIMAGEIO_PLUGIN "Build OpenImageIO plugin" OFF)
diff -x .git -ur usd.orig/cmake/defaults/Packages.cmake external_usd/cmake/defaults/Packages.cmake
--- usd.orig/cmake/defaults/Packages.cmake 2019-10-24 22:39:53.000000000 +0200
+++ external_usd/cmake/defaults/Packages.cmake 2019-11-28 13:00:33.185957483 +0100
@@ -64,7 +64,7 @@
endif()
# --TBB
-find_package(TBB REQUIRED COMPONENTS tbb)
+find_package(TBB)
add_definitions(${TBB_DEFINITIONS})
# --math
diff -x .git -ur usd.orig/pxr/base/lib/plug/initConfig.cpp external_usd/pxr/base/lib/plug/initConfig.cpp
--- usd.orig/pxr/base/lib/plug/initConfig.cpp 2019-10-24 22:39:53.000000000 +0200
+++ external_usd/pxr/base/lib/plug/initConfig.cpp 2019-12-11 11:00:37.643323127 +0100
@@ -69,8 +69,38 @@
ARCH_CONSTRUCTOR(Plug_InitConfig, 2, void)
{
+ /* The contents of this constructor have been moved to usd_initialise_plugin_path(...) */
+}
+
+}; // end of anonymous namespace
+
+/**
+ * The contents of this function used to be in the static constructor Plug_InitConfig.
+ * This static constructor made it impossible for Blender to pass a path to the USD
+ * library at runtime, as the constructor would run before Blender's main() function.
+ *
+ * This function is wrapped in a C function of the same name (defined below),
+ * so that it can be called from Blender's main() function.
+ *
+ * The datafiles_usd_path path is used to point to the USD plugin path when Blender
+ * has been installed. The fallback_usd_path path should point to the build-time
+ * location of the USD plugin files so that Blender can be run on a development machine
+ * without requiring an installation step.
+ */
+void
+usd_initialise_plugin_path(const char *datafiles_usd_path)
+{
std::vector<std::string> result;
+ // Add Blender-specific paths. They MUST end in a slash, or symlinks will not be treated as directory.
+ if (datafiles_usd_path != NULL && datafiles_usd_path[0] != '\0') {
+ std::string datafiles_usd_path_str(datafiles_usd_path);
+ if (datafiles_usd_path_str.back() != '/') {
+ datafiles_usd_path_str += "/";
+ }
+ result.push_back(datafiles_usd_path_str);
+ }
+
// Determine the absolute path to the Plug shared library.
// Any relative paths specified in the plugin search path will be
// anchored to this directory, to allow for relocatability.
@@ -94,9 +124,24 @@
_AppendPathList(&result, installLocation, sharedLibPath);
#endif // PXR_INSTALL_LOCATION
- Plug_SetPaths(result);
-}
+ if (!TfGetenv("PXR_PATH_DEBUG").empty()) {
+ printf("USD Plugin paths: (%zu in total):\n", result.size());
+ for(const std::string &path : result) {
+ printf(" %s\n", path.c_str());
+ }
+ }
+ Plug_SetPaths(result);
}
PXR_NAMESPACE_CLOSE_SCOPE
+
+/* Workaround to make it possible to pass a path at runtime to USD. */
+extern "C" {
+void
+usd_initialise_plugin_path(
+ const char *datafiles_usd_path)
+{
+ PXR_NS::usd_initialise_plugin_path(datafiles_usd_path);
+}
+}
diff -x .git -ur usd.orig/pxr/usd/CMakeLists.txt external_usd/pxr/usd/CMakeLists.txt
--- usd.orig/pxr/usd/CMakeLists.txt 2019-10-24 22:39:53.000000000 +0200
+++ external_usd/pxr/usd/CMakeLists.txt 2019-11-28 13:00:33.197957712 +0100
@@ -1,6 +1,5 @@
set(DIRS
lib
- bin
plugin
)
@@ -8,3 +7,8 @@
add_subdirectory(${d})
endforeach()
+if (PXR_BUILD_USD_TOOLS)
+ add_subdirectory(bin)
+else()
+ message(STATUS "Skipping commandline tools because PXR_BUILD_USD_TOOLS=OFF")
+endif()
diff -Naur external_usd_orig/pxr/base/lib/tf/preprocessorUtils.h external_usd/pxr/base/lib/tf/preprocessorUtils.h
--- external_usd_orig/pxr/base/lib/tf/preprocessorUtils.h 2019-10-24 14:39:53 -0600
+++ external_usd/pxr/base/lib/tf/preprocessorUtils.h 2020-01-14 09:30:18 -0700
@@ -189,7 +189,7 @@
/// Exapnds to 1 if the argument is a tuple, and 0 otherwise.
/// \ingroup group_tf_Preprocessor
/// \hideinitializer
-#if defined(ARCH_OS_WINDOWS)
+#if defined(ARCH_COMPILER_MSVC)
#define TF_PP_IS_TUPLE(sequence) \
BOOST_VMD_IS_TUPLE(sequence)
#else
diff -Naur external_usd_base/cmake/macros/Public.cmake external_usd/cmake/macros/Public.cmake
--- external_usd_base/cmake/macros/Public.cmake 2019-10-24 14:39:53 -0600
+++ external_usd/cmake/macros/Public.cmake 2020-01-11 13:33:29 -0700
@@ -996,6 +996,12 @@
foreach(lib ${PXR_OBJECT_LIBS})
string(TOUPPER ${lib} uppercaseName)
list(APPEND exports "${uppercaseName}_EXPORTS=1")
+ # When building for blender, we do NOT want to export all symbols on windows.
+ # This is a dirty hack, but USD makes it impossible to do the right thing
+ # with the default options exposed.
+ if (WIN32)
+ list(APPEND exports "PXR_STATIC=1")
+ endif()
endforeach()
foreach(lib ${PXR_OBJECT_LIBS})
set(objects "${objects};\$<TARGET_OBJECTS:${lib}>")

View File

@@ -126,6 +126,7 @@ if "%dobuild%" == "1" (
cmake --build . --target Harvest_Release_Results > Harvest_Release.txt
)
echo %DATE% %TIME% : Release Harvest done >> %StatusFile%
if "%NODEBUG%" == "1" goto exit
cd %BUILD_DIR%
mkdir %STAGING%\%BuildDir%%ARCH%D
cd %Staging%\%BuildDir%%ARCH%D

View File

@@ -24,6 +24,14 @@ import re
import subprocess
import sys
def is_tool(name):
"""Check whether `name` is on PATH and marked as executable."""
# from whichcraft import which
from shutil import which
return which(name) is not None
class Builder:
def __init__(self, name, branch):
self.name = name
@@ -42,7 +50,10 @@ class Builder:
self.command_prefix = []
elif name.startswith('linux'):
self.platform = 'linux'
self.command_prefix = ['scl', 'enable', 'devtoolset-6', '--']
if is_tool('scl'):
self.command_prefix = ['scl', 'enable', 'devtoolset-6', '--']
else:
self.command_prefix = []
elif name.startswith('win'):
self.platform = 'win'
self.command_prefix = []

View File

@@ -65,10 +65,14 @@ class AbsoluteAndRelativeFileName:
"""
Create list of AbsoluteAndRelativeFileName for all the files in the
given directory.
NOTE: Result will be pointing to a resolved paths.
"""
assert base_dir.is_absolute()
assert base_dir.is_dir()
base_dir = base_dir.resolve()
result = []
for filename in base_dir.glob('**/*'):
if not filename.is_file():

View File

@@ -18,9 +18,10 @@
# <pep8 compliant>
import os
from pathlib import Path
from codesign.util import ensure_file_does_not_exist_or_die
import codesign.util as util
class ArchiveWithIndicator:
@@ -69,9 +70,64 @@ class ArchiveWithIndicator:
self.archive_filepath = self.base_dir / archive_name
self.ready_indicator_filepath = self.base_dir / ready_indicator_name
def is_ready_unsafe(self) -> bool:
"""
Check whether the archive is ready for access.
No guarding about possible network failres is done here.
"""
if not self.ready_indicator_filepath.exists():
return False
# Sometimes on macOS indicator file appears prior to the actual archive
# despite the order of creation and os.sync() used in tag_ready().
# So consider archive not ready if there is an indicator without an
# actual archive.
if not self.archive_filepath.exists():
print('Found indicator without actual archive, waiting for archive '
f'({self.archive_filepath}) to appear.')
return False
# Read archive size from indicator/
#
# Assume that file is either empty or is fully written. This is being checked
# by performing ValueError check since empty string will throw this exception
# when attempted to be converted to int.
expected_archive_size_str = self.ready_indicator_filepath.read_text()
try:
expected_archive_size = int(expected_archive_size_str)
except ValueError:
print(f'Invalid archive size "{expected_archive_size_str}"')
return False
# Wait for until archive is fully stored.
actual_archive_size = self.archive_filepath.stat().st_size
if actual_archive_size != expected_archive_size:
print('Partial/invalid archive size (expected '
f'{expected_archive_size} got {actual_archive_size})')
return False
return True
def is_ready(self) -> bool:
"""Check whether the archive is ready for access."""
return self.ready_indicator_filepath.exists()
"""
Check whether the archive is ready for access.
Will tolerate possible network failures: if there is a network failure
or if there is still no proper permission on a file False is returned.
"""
# There are some intermitten problem happening at a random which is
# translates to "OSError : [WinError 59] An unexpected network error occurred".
# Some reports suggests it might be due to lack of permissions to the file,
# which might be applicable in our case since it's possible that file is
# initially created with non-accessible permissions and gets chmod-ed
# after initial creation.
try:
return self.is_ready_unsafe()
except OSError as e:
print(f'Exception checking archive: {e}')
return False
def tag_ready(self) -> None:
"""
@@ -82,14 +138,20 @@ class ArchiveWithIndicator:
If it is violated, an assert will fail.
"""
assert not self.is_ready()
self.ready_indicator_filepath.touch()
# Try the best to make sure everything is synced to the file system,
# to avoid any possibility of stamp appearing on a network share prior to
# an actual file.
if util.get_current_platform() != util.Platform.WINDOWS:
os.sync()
archive_size = self.archive_filepath.stat().st_size
self.ready_indicator_filepath.write_text(str(archive_size))
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)
util.ensure_file_does_not_exist_or_die(self.ready_indicator_filepath)
util.ensure_file_does_not_exist_or_die(self.archive_filepath)
def is_fully_absent(self) -> bool:
"""

View File

@@ -45,13 +45,16 @@
import abc
import logging
import shutil
import subprocess
import time
import zipfile
import tarfile
from pathlib import Path
from tempfile import TemporaryDirectory
from typing import Iterable, List
import codesign.util as util
from codesign.absolute_and_relative_filename import AbsoluteAndRelativeFileName
from codesign.archive_with_indicator import ArchiveWithIndicator
@@ -64,14 +67,14 @@ 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.
Create tar 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:
with tarfile.TarFile.open(archive_filepath, 'w') as tar_file_handle:
for file_info in files:
zip_file_handle.write(file_info.absolute_filepath,
arcname=file_info.relative_filepath)
tar_file_handle.add(file_info.absolute_filepath,
arcname=file_info.relative_filepath)
def extract_files(archive_filepath: Path,
@@ -82,8 +85,8 @@ def extract_files(archive_filepath: Path,
# 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)
with tarfile.TarFile.open(archive_filepath, mode='r') as tar_file_handle:
tar_file_handle.extractall(path=extraction_dir)
class BaseCodeSigner(metaclass=abc.ABCMeta):
@@ -133,6 +136,9 @@ class BaseCodeSigner(metaclass=abc.ABCMeta):
# This archive is created by the code signing server.
signed_archive_info: ArchiveWithIndicator
# Platform the code is currently executing on.
platform: util.Platform
def __init__(self, config):
self.config = config
@@ -141,12 +147,14 @@ class BaseCodeSigner(metaclass=abc.ABCMeta):
# 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')
self.unsigned_storage_dir, 'unsigned_files.tar', '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')
self.signed_storage_dir, 'signed_files.tar', 'ready.stamp')
self.platform = util.get_current_platform()
"""
General note on cleanup environment functions.
@@ -318,6 +326,9 @@ class BaseCodeSigner(metaclass=abc.ABCMeta):
self.copy_signed_files_to_directory(
unpacked_signed_files_dir, destination_dir)
logger_builder.info('Removing archive with signed files...')
self.signed_archive_info.clean()
############################################################################
# Signing server side helpers.
@@ -383,3 +394,61 @@ class BaseCodeSigner(metaclass=abc.ABCMeta):
logger_server.info(
'Got signing request, beging signign procedure.')
self.run_signing_pipeline()
############################################################################
# Command executing.
#
# Abstracted to a degree that allows to run commands from a foreign
# platform.
# The goal with this is to allow performing dry-run tests of code signer
# server from other platforms (for example, to test that macOS code signer
# does what it is supposed to after doing a refactor on Linux).
# TODO(sergey): What is the type annotation for the command?
def run_command_or_mock(self, command, platform: util.Platform) -> None:
"""
Run given command if current platform matches given one
If the platform is different then it will only be printed allowing
to verify logic of the code signing process.
"""
if platform != self.platform:
logger_server.info(
f'Will run command for {platform}: {command}')
return
logger_server.info(f'Running command: {command}')
subprocess.run(command)
# TODO(sergey): What is the type annotation for the command?
def check_output_or_mock(self, command,
platform: util.Platform,
allow_nonzero_exit_code=False) -> str:
"""
Run given command if current platform matches given one
If the platform is different then it will only be printed allowing
to verify logic of the code signing process.
If allow_nonzero_exit_code is truth then the output will be returned
even if application quit with non-zero exit code.
Otherwise an subprocess.CalledProcessError exception will be raised
in such case.
"""
if platform != self.platform:
logger_server.info(
f'Will run command for {platform}: {command}')
return
if allow_nonzero_exit_code:
process = subprocess.Popen(command,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
output = process.communicate()[0]
return output.decode()
logger_server.info(f'Running command: {command}')
return subprocess.check_output(
command, stderr=subprocess.STDOUT).decode()

View File

@@ -25,12 +25,17 @@ import sys
from pathlib import Path
import codesign.util as util
from codesign.config_common import *
if sys.platform == 'linux':
platform = util.get_current_platform()
if platform == util.Platform.LINUX:
SHARED_STORAGE_DIR = Path('/data/codesign')
elif sys.platform == 'win32':
elif platform == util.Platform.WINDOWS:
SHARED_STORAGE_DIR = Path('Z:\\codesign')
elif platform == util.Platform.MACOS:
SHARED_STORAGE_DIR = Path('/Volumes/codesign_macos/codesign')
# https://docs.python.org/3/library/logging.config.html#configuration-dictionary-schema
LOGGING = {

View File

@@ -24,7 +24,10 @@ from pathlib import Path
#
# This is how long buildbot packing step will wait signing server to
# perform signing.
TIMEOUT_IN_SECONDS = 240
#
# NOTE: Notarization could take a long time, hence the rather high value
# here. Might consider using different timeout for different platforms.
TIMEOUT_IN_SECONDS = 45 * 60 * 60
# Directory which is shared across buildbot worker and signing server.
#

View File

@@ -27,8 +27,43 @@ from pathlib import Path
from codesign.config_common import *
CODESIGN_DIRECTORY = Path(__file__).absolute().parent
BLENDER_GIT_ROOT_DIRECTORY = CODESIGN_DIRECTORY.parent.parent.parent
################################################################################
# Common configuration.
# Directory where folders for codesign requests and signed result are stored.
# For example, /data/codesign
SHARED_STORAGE_DIR: Path
################################################################################
# macOS-specific configuration.
MACOS_ENTITLEMENTS_FILE = \
BLENDER_GIT_ROOT_DIRECTORY / 'release' / 'darwin' / 'entitlements.plist'
# Identity of the Developer ID Application certificate which is to be used for
# codesign tool.
# Use `security find-identity -v -p codesigning` to find the identity.
#
# NOTE: This identity is just an example from release/darwin/README.txt.
MACOS_CODESIGN_IDENTITY = 'AE825E26F12D08B692F360133210AF46F4CF7B97'
# User name (Apple ID) which will be used to request notarization.
MACOS_XCRUN_USERNAME = 'me@example.com'
# One-time application password which will be used to request notarization.
MACOS_XCRUN_PASSWORD = '@keychain:altool-password'
# Timeout in seconds within which the notarial office is supposed to reply.
MACOS_NOTARIZE_TIMEOUT_IN_SECONDS = 60 * 60
################################################################################
# Windows-specific configuration.
# URL to the timestamping authority.
TIMESTAMP_AUTHORITY_URL = 'http://timestamp.digicert.com'
WIN_TIMESTAMP_AUTHORITY_URL = 'http://timestamp.digicert.com'
# Full path to the certificate used for signing.
#
@@ -36,7 +71,10 @@ TIMESTAMP_AUTHORITY_URL = 'http://timestamp.digicert.com'
#
# 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
WIN_CERTIFICATE_FILEPATH: Path
################################################################################
# Logging configuration, common for all platforms.
# https://docs.python.org/3/library/logging.config.html#configuration-dictionary-schema
LOGGING = {

View File

@@ -51,7 +51,7 @@ class LinuxCodeSigner(BaseCodeSigner):
self, file: AbsoluteAndRelativeFileName) -> bool:
if file.relative_filepath == Path('blender'):
return True
if (file.relative_filepath.parts()[-3:-1] == ('python', 'bin') and
if (file.relative_filepath.parts[-3:-1] == ('python', 'bin') and
file.relative_filepath.name.startwith('python')):
return True
if file.relative_filepath.suffix == '.so':

View File

@@ -0,0 +1,453 @@
# ##### 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 re
import stat
import subprocess
import time
from pathlib import Path
from typing import List
import codesign.util as util
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 = {'.dylib', '.so', '.dmg'}
# Prefixes of a file (not directory) name which are to be signed.
# Used to sign extra executable files in Contents/Resources.
NAME_PREFIXES_TO_BE_SIGNED = {'python'}
def is_file_from_bundle(file: AbsoluteAndRelativeFileName) -> bool:
"""
Check whether file is coming from an .app bundle
"""
parts = file.relative_filepath.parts
if not parts:
return False
if not parts[0].endswith('.app'):
return False
return True
def get_bundle_from_file(
file: AbsoluteAndRelativeFileName) -> AbsoluteAndRelativeFileName:
"""
Get AbsoluteAndRelativeFileName descriptor of bundle
"""
assert(is_file_from_bundle(file))
parts = file.relative_filepath.parts
bundle_name = parts[0]
base_dir = file.base_dir
bundle_filepath = file.base_dir / bundle_name
return AbsoluteAndRelativeFileName(base_dir, bundle_filepath)
def is_bundle_executable_file(file: AbsoluteAndRelativeFileName) -> bool:
"""
Check whether given file is an executable within an app bundle
"""
if not is_file_from_bundle(file):
return False
parts = file.relative_filepath.parts
num_parts = len(parts)
if num_parts < 3:
return False
if parts[1:3] != ('Contents', 'MacOS'):
return False
return True
def xcrun_field_value_from_output(field: str, output: str) -> str:
"""
Get value of a given field from xcrun output.
If field is not found empty string is returned.
"""
field_prefix = field + ': '
for line in output.splitlines():
line = line.strip()
if line.startswith(field_prefix):
return line[len(field_prefix):]
return ''
class MacOSCodeSigner(BaseCodeSigner):
def check_file_is_to_be_signed(
self, file: AbsoluteAndRelativeFileName) -> bool:
if file.relative_filepath.name.startswith('.'):
return False
if is_bundle_executable_file(file):
return True
base_name = file.relative_filepath.name
if any(base_name.startswith(prefix)
for prefix in NAME_PREFIXES_TO_BE_SIGNED):
return True
mode = file.absolute_filepath.lstat().st_mode
if mode & stat.S_IXUSR != 0:
file_output = subprocess.check_output(
("file", file.absolute_filepath)).decode()
if "64-bit executable" in file_output:
return True
return file.relative_filepath.suffix in EXTENSIONS_TO_BE_SIGNED
def collect_files_to_sign(self, path: Path) \
-> List[AbsoluteAndRelativeFileName]:
# Include all files when signing app or dmg bundle: all the files are
# needed to do valid signature of bundle.
if path.name.endswith('.app'):
return AbsoluteAndRelativeFileName.recursively_from_directory(path)
if path.is_dir():
files = []
for child in path.iterdir():
if child.name.endswith('.app'):
current_files = AbsoluteAndRelativeFileName.recursively_from_directory(
child)
else:
current_files = super().collect_files_to_sign(child)
for current_file in current_files:
files.append(AbsoluteAndRelativeFileName(
path, current_file.absolute_filepath))
return files
return super().collect_files_to_sign(path)
############################################################################
# Codesign.
def codesign_remove_signature(
self, file: AbsoluteAndRelativeFileName) -> None:
"""
Make sure given file does not have codesign signature
This is needed because codesigning is not possible for file which has
signature already.
"""
logger_server.info(
'Removing codesign signature from %s...', file.relative_filepath)
command = ['codesign', '--remove-signature', file.absolute_filepath]
self.run_command_or_mock(command, util.Platform.MACOS)
def codesign_file(
self, file: AbsoluteAndRelativeFileName) -> None:
"""
Sign given file
NOTE: File must not have any signatures.
"""
logger_server.info(
'Codesigning %s...', file.relative_filepath)
entitlements_file = self.config.MACOS_ENTITLEMENTS_FILE
command = ['codesign',
'--timestamp',
'--options', 'runtime',
f'--entitlements={entitlements_file}',
'--sign', self.config.MACOS_CODESIGN_IDENTITY,
file.absolute_filepath]
self.run_command_or_mock(command, util.Platform.MACOS)
def codesign_all_files(self, files: List[AbsoluteAndRelativeFileName]) -> bool:
"""
Run codesign tool on all eligible files in the given list.
Will ignore all files which are not to be signed. For the rest will
remove possible existing signature and add a new signature.
"""
num_files = len(files)
have_ignored_files = False
signed_files = []
for file_index, file in enumerate(files):
# Ignore file if it is not to be signed.
# Allows to manually construct ZIP of a bundle and get it signed.
if not self.check_file_is_to_be_signed(file):
logger_server.info(
'Ignoring file [%d/%d] %s',
file_index + 1, num_files, file.relative_filepath)
have_ignored_files = True
continue
logger_server.info(
'Running codesigning routines for file [%d/%d] %s...',
file_index + 1, num_files, file.relative_filepath)
self.codesign_remove_signature(file)
self.codesign_file(file)
signed_files.append(file)
if have_ignored_files:
logger_server.info('Signed %d files:', len(signed_files))
num_signed_files = len(signed_files)
for file_index, signed_file in enumerate(signed_files):
logger_server.info(
'- [%d/%d] %s',
file_index + 1, num_signed_files,
signed_file.relative_filepath)
return True
def codesign_bundles(
self, files: List[AbsoluteAndRelativeFileName]) -> None:
"""
Codesign all .app bundles in the given list of files.
Bundle is deducted from paths of the files, and every bundle is only
signed once.
"""
signed_bundles = set()
extra_files = []
for file in files:
if not is_file_from_bundle(file):
continue
bundle = get_bundle_from_file(file)
bundle_name = bundle.relative_filepath
if bundle_name in signed_bundles:
continue
logger_server.info('Running codesign routines on bundle %s',
bundle_name)
# It is not possible to remove signature from DMG.
if bundle.relative_filepath.name.endswith('.app'):
self.codesign_remove_signature(bundle)
self.codesign_file(bundle)
signed_bundles.add(bundle_name)
# Codesign on a bundle adds an extra folder with information.
# It needs to be compied to the source.
code_signature_directory = \
bundle.absolute_filepath / 'Contents' / '_CodeSignature'
code_signature_files = \
AbsoluteAndRelativeFileName.recursively_from_directory(
code_signature_directory)
for code_signature_file in code_signature_files:
bundle_relative_file = AbsoluteAndRelativeFileName(
bundle.base_dir,
code_signature_directory /
code_signature_file.relative_filepath)
extra_files.append(bundle_relative_file)
files.extend(extra_files)
return True
############################################################################
# Notarization.
def notarize_get_bundle_id(self, file: AbsoluteAndRelativeFileName) -> str:
"""
Get bundle ID which will be used to notarize DMG
"""
name = file.relative_filepath.name
app_name = name.split('-', 2)[0].lower()
app_name_words = app_name.split()
if len(app_name_words) > 1:
app_name_id = ''.join(word.capitalize() for word in app_name_words)
else:
app_name_id = app_name_words[0]
# TODO(sergey): Consider using "alpha" for buildbot builds.
return f'org.blenderfoundation.{app_name_id}.release'
def notarize_request(self, file) -> str:
"""
Request notarization of the given file.
Returns UUID of the notarization request. If error occurred None is
returned instead of UUID.
"""
bundle_id = self.notarize_get_bundle_id(file)
logger_server.info('Bundle ID: %s', bundle_id)
logger_server.info('Submitting file to the notarial office.')
command = [
'xcrun', 'altool', '--notarize-app', '--verbose',
'-f', file.absolute_filepath,
'--primary-bundle-id', bundle_id,
'--username', self.config.MACOS_XCRUN_USERNAME,
'--password', self.config.MACOS_XCRUN_PASSWORD]
output = self.check_output_or_mock(
command, util.Platform.MACOS, allow_nonzero_exit_code=True)
for line in output.splitlines():
line = line.strip()
if line.startswith('RequestUUID = '):
request_uuid = line[14:]
return request_uuid
# Check whether the package has been already submitted.
if 'The software asset has already been uploaded.' in line:
request_uuid = re.sub(
'.*The upload ID is ([A-Fa-f0-9\-]+).*', '\\1', line)
logger_server.warning(
f'The package has been already submitted under UUID {request_uuid}')
return request_uuid
logger_server.error(output)
logger_server.error('xcrun command did not report RequestUUID')
return None
def notarize_wait_result(self, request_uuid: str) -> bool:
"""
Wait for until notarial office have a reply
"""
logger_server.info(
'Waiting for a result from the notarization office.')
command = ['xcrun', 'altool',
'--notarization-info', request_uuid,
'--username', self.config.MACOS_XCRUN_USERNAME,
'--password', self.config.MACOS_XCRUN_PASSWORD]
time_start = time.monotonic()
timeout_in_seconds = self.config.MACOS_NOTARIZE_TIMEOUT_IN_SECONDS
while True:
output = self.check_output_or_mock(
command, util.Platform.MACOS, allow_nonzero_exit_code=True)
# Parse status and message
status = xcrun_field_value_from_output('Status', output)
status_message = xcrun_field_value_from_output(
'Status Message', output)
# Review status.
if status:
if status == 'success':
logger_server.info(
'Package successfully notarized: %s', status_message)
return True
elif status == 'invalid':
logger_server.error(output)
logger_server.error(
'Package notarization has failed: %s', status_message)
return False
elif status == 'in progress':
pass
else:
logger_server.info(
'Unknown notarization status %s (%s)', status, status_message)
logger_server.info('Keep waiting for notarization office.')
time.sleep(30)
time_slept_in_seconds = time.monotonic() - time_start
if time_slept_in_seconds > timeout_in_seconds:
logger_server.error(
"Notarial office didn't reply in %f seconds.",
timeout_in_seconds)
def notarize_staple(self, file: AbsoluteAndRelativeFileName) -> bool:
"""
Staple notarial label on the file
"""
logger_server.info('Stapling notarial stamp.')
command = ['xcrun', 'stapler', 'staple', '-v', file.absolute_filepath]
self.check_output_or_mock(command, util.Platform.MACOS)
return True
def notarize_dmg(self, file: AbsoluteAndRelativeFileName) -> bool:
"""
Run entire pipeline to get DMG notarized.
"""
logger_server.info('Begin notarization routines on %s',
file.relative_filepath)
# Submit file for notarization.
request_uuid = self.notarize_request(file)
if not request_uuid:
return False
logger_server.info('Received Request UUID: %s', request_uuid)
# Wait for the status from the notarization office.
if not self.notarize_wait_result(request_uuid):
return False
# Staple.
if not self.notarize_staple(file):
return False
return True
def notarize_all_dmg(
self, files: List[AbsoluteAndRelativeFileName]) -> bool:
"""
Notarize all DMG images from the input.
Images are supposed to be codesigned already.
"""
for file in files:
if not file.relative_filepath.name.endswith('.dmg'):
continue
if not self.check_file_is_to_be_signed(file):
continue
if not self.notarize_dmg(file):
return False
return True
############################################################################
# Entry point.
def sign_all_files(self, files: List[AbsoluteAndRelativeFileName]) -> None:
# TODO(sergey): Handle errors somehow.
if not self.codesign_all_files(files):
return
if not self.codesign_bundles(files):
return
if not self.notarize_all_dmg(files):
return

View File

@@ -26,6 +26,7 @@ from pathlib import Path
from typing import Optional
import codesign.config_builder
import codesign.util as util
from codesign.base_code_signer import BaseCodeSigner
@@ -33,10 +34,14 @@ class SimpleCodeSigner:
code_signer: Optional[BaseCodeSigner]
def __init__(self):
if sys.platform == 'linux':
platform = util.get_current_platform()
if platform == util.Platform.LINUX:
from codesign.linux_code_signer import LinuxCodeSigner
self.code_signer = LinuxCodeSigner(codesign.config_builder)
elif sys.platform == 'win32':
elif platform == util.Platform.MACOS:
from codesign.macos_code_signer import MacOSCodeSigner
self.code_signer = MacOSCodeSigner(codesign.config_builder)
elif platform == util.Platform.WINDOWS:
from codesign.windows_code_signer import WindowsCodeSigner
self.code_signer = WindowsCodeSigner(codesign.config_builder)
else:

View File

@@ -18,9 +18,28 @@
# <pep8 compliant>
import sys
from enum import Enum
from pathlib import Path
class Platform(Enum):
LINUX = 1
MACOS = 2
WINDOWS = 3
def get_current_platform() -> Platform:
if sys.platform == 'linux':
return Platform.LINUX
elif sys.platform == 'darwin':
return Platform.MACOS
elif sys.platform == 'win32':
return Platform.WINDOWS
raise Exception(f'Unknown platform {sys.platform}')
def ensure_file_does_not_exist_or_die(filepath: Path) -> None:
"""
If the file exists, unlink it.

View File

@@ -19,11 +19,12 @@
# <pep8 compliant>
import logging
import subprocess
from pathlib import Path
from typing import List
import codesign.util as util
from buildbot_utils import Builder
from codesign.absolute_and_relative_filename import AbsoluteAndRelativeFileName
@@ -52,8 +53,8 @@ class WindowsCodeSigner(BaseCodeSigner):
def get_sign_command_prefix(self) -> List[str]:
return [
'signtool', 'sign', '/v',
'/f', self.config.CERTIFICATE_FILEPATH,
'/t', self.config.TIMESTAMP_AUTHORITY_URL]
'/f', self.config.WIN_CERTIFICATE_FILEPATH,
'/tr', self.config.WIN_TIMESTAMP_AUTHORITY_URL]
def sign_all_files(self, files: List[AbsoluteAndRelativeFileName]) -> None:
# NOTE: Sign files one by one to avoid possible command line length
@@ -64,6 +65,14 @@ class WindowsCodeSigner(BaseCodeSigner):
# one go (but only if this actually known to be much faster).
num_files = len(files)
for file_index, file in enumerate(files):
# Ignore file if it is not to be signed.
# Allows to manually construct ZIP of package and get it signed.
if not self.check_file_is_to_be_signed(file):
logger_server.info(
'Ignoring file [%d/%d] %s',
file_index + 1, num_files, file.relative_filepath)
continue
command = self.get_sign_command_prefix()
command.append(file.absolute_filepath)
logger_server.info(
@@ -71,5 +80,5 @@ class WindowsCodeSigner(BaseCodeSigner):
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)
self.run_command_or_mock(command, util.Platform.WINDOWS)
# TODO(sergey): Report number of signed and ignored files.

View File

@@ -0,0 +1,41 @@
#!/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>
import logging.config
from pathlib import Path
from typing import List
from codesign.macos_code_signer import MacOSCodeSigner
import codesign.config_server
if __name__ == "__main__":
entitlements_file = codesign.config_server.MACOS_ENTITLEMENTS_FILE
if not entitlements_file.exists():
raise SystemExit(
'Entitlements file {entitlements_file} does not exist.')
if not entitlements_file.is_file():
raise SystemExit(
'Entitlements file {entitlements_file} is not a file.')
logging.config.dictConfig(codesign.config_server.LOGGING)
code_signer = MacOSCodeSigner(codesign.config_server)
code_signer.run_signing_server()

View File

@@ -30,15 +30,25 @@ import shutil
from pathlib import Path
from typing import List
import codesign.util as util
from codesign.windows_code_signer import WindowsCodeSigner
import codesign.config_server
if __name__ == "__main__":
logging.config.dictConfig(codesign.config_server.LOGGING)
logger = logging.getLogger(__name__)
logger_server = logger.getChild('server')
# TODO(sergey): Consider moving such sanity checks into
# CodeSigner.check_environment_or_die().
if not shutil.which('signtool.exe'):
raise SystemExit("signtool.exe is not found in %PATH%")
if util.get_current_platform() == util.Platform.WINDOWS:
raise SystemExit("signtool.exe is not found in %PATH%")
logger_server.info(
'signtool.exe not found, '
'but will not be used on this foreign platform')
logging.config.dictConfig(codesign.config_server.LOGGING)
code_signer = WindowsCodeSigner(codesign.config_server)
code_signer.run_signing_server()

View File

@@ -0,0 +1,542 @@
#!/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 #####
import argparse
import re
import shutil
import subprocess
import sys
import time
from pathlib import Path
from tempfile import TemporaryDirectory, NamedTemporaryFile
from typing import List
BUILDBOT_DIRECTORY = Path(__file__).absolute().parent
CODESIGN_SCRIPT = BUILDBOT_DIRECTORY / 'slave_codesign.py'
BLENDER_GIT_ROOT_DIRECTORY = BUILDBOT_DIRECTORY.parent.parent
DARWIN_DIRECTORY = BLENDER_GIT_ROOT_DIRECTORY / 'release' / 'darwin'
# Extra size which is added on top of actual files size when estimating size
# of destination DNG.
EXTRA_DMG_SIZE_IN_BYTES = 800 * 1024 * 1024
################################################################################
# Common utilities
def get_directory_size(root_directory: Path) -> int:
"""
Get size of directory on disk
"""
total_size = 0
for file in root_directory.glob('**/*'):
total_size += file.lstat().st_size
return total_size
################################################################################
# DMG bundling specific logic
def create_argument_parser():
parser = argparse.ArgumentParser()
parser.add_argument(
'source_dir',
type=Path,
help='Source directory which points to either existing .app bundle'
'or to a directory with .app bundles.')
parser.add_argument(
'--background-image',
type=Path,
help="Optional background picture which will be set on the DMG."
"If not provided default Blender's one is used.")
parser.add_argument(
'--volume-name',
type=str,
help='Optional name of a volume which will be used for DMG.')
parser.add_argument(
'--dmg',
type=Path,
help='Optional argument which points to a final DMG file name.')
parser.add_argument(
'--applescript',
type=Path,
help="Optional path to applescript to set up folder looks of DMG."
"If not provided default Blender's one is used.")
return parser
def collect_app_bundles(source_dir: Path) -> List[Path]:
"""
Collect all app bundles which are to be put into DMG
If the source directory points to FOO.app it will be the only app bundle
packed.
Otherwise all .app bundles from given directory are placed to a single
DMG.
"""
if source_dir.name.endswith('.app'):
return [source_dir]
app_bundles = []
for filename in source_dir.glob('*'):
if not filename.is_dir():
continue
if not filename.name.endswith('.app'):
continue
app_bundles.append(filename)
return app_bundles
def collect_and_log_app_bundles(source_dir: Path) -> List[Path]:
app_bundles = collect_app_bundles(source_dir)
if not app_bundles:
print('No app bundles found for packing')
return
print(f'Found {len(app_bundles)} to pack:')
for app_bundle in app_bundles:
print(f'- {app_bundle}')
return app_bundles
def estimate_dmg_size(app_bundles: List[Path]) -> int:
"""
Estimate size of DMG to hold requested app bundles
The size is based on actual size of all files in all bundles plus some
space to compensate for different size-on-disk plus some space to hold
codesign signatures.
Is better to be on a high side since the empty space is compressed, but
lack of space might cause silent failures later on.
"""
app_bundles_size = 0
for app_bundle in app_bundles:
app_bundles_size += get_directory_size(app_bundle)
return app_bundles_size + EXTRA_DMG_SIZE_IN_BYTES
def copy_app_bundles_to_directory(app_bundles: List[Path],
directory: Path) -> None:
"""
Copy all bundles to a given directory
This directory is what the DMG will be created from.
"""
for app_bundle in app_bundles:
print(f'Copying {app_bundle.name}...')
shutil.copytree(app_bundle, directory / app_bundle.name)
def get_main_app_bundle(app_bundles: List[Path]) -> Path:
"""
Get application bundle main for the installation
"""
return app_bundles[0]
def create_dmg_image(app_bundles: List[Path],
dmg_filepath: Path,
volume_name: str) -> None:
"""
Create DMG disk image and put app bundles in it
No DMG configuration or codesigning is happening here.
"""
if dmg_filepath.exists():
print(f'Removing existing writable DMG {dmg_filepath}...')
dmg_filepath.unlink()
print('Preparing directory with app bundles for the DMG...')
with TemporaryDirectory(prefix='blender-dmg-content-') as content_dir_str:
# Copy all bundles to a clean directory.
content_dir = Path(content_dir_str)
copy_app_bundles_to_directory(app_bundles, content_dir)
# Estimate size of the DMG.
dmg_size = estimate_dmg_size(app_bundles)
print(f'Estimated DMG size: {dmg_size:,} bytes.')
# Create the DMG.
print(f'Creating writable DMG {dmg_filepath}')
command = ('hdiutil',
'create',
'-size', str(dmg_size),
'-fs', 'HFS+',
'-srcfolder', content_dir,
'-volname', volume_name,
'-format', 'UDRW',
dmg_filepath)
subprocess.run(command)
def get_writable_dmg_filepath(dmg_filepath: Path):
"""
Get file path for writable DMG image
"""
parent = dmg_filepath.parent
return parent / (dmg_filepath.stem + '-temp.dmg')
def mount_readwrite_dmg(dmg_filepath: Path) -> None:
"""
Mount writable DMG
Mounting point would be /Volumes/<volume name>
"""
print(f'Mounting read-write DMG ${dmg_filepath}')
command = ('hdiutil',
'attach', '-readwrite',
'-noverify',
'-noautoopen',
dmg_filepath)
subprocess.run(command)
def get_mount_directory_for_volume_name(volume_name: str) -> Path:
"""
Get directory under which the volume will be mounted
"""
return Path('/Volumes') / volume_name
def eject_volume(volume_name: str) -> None:
"""
Eject given volume, if mounted
"""
mount_directory = get_mount_directory_for_volume_name(volume_name)
if not mount_directory.exists():
return
mount_directory_str = str(mount_directory)
print(f'Ejecting volume {volume_name}')
# Figure out which device to eject.
mount_output = subprocess.check_output(['mount']).decode()
device = ''
for line in mount_output.splitlines():
if f'on {mount_directory_str} (' not in line:
continue
tokens = line.split(' ', 3)
if len(tokens) < 3:
continue
if tokens[1] != 'on':
continue
if device:
raise Exception(
f'Multiple devices found for mounting point {mount_directory}')
device = tokens[0]
if not device:
raise Exception(
f'No device found for mounting point {mount_directory}')
print(f'{mount_directory} is mounted as device {device}, ejecting...')
subprocess.run(['diskutil', 'eject', device])
def copy_background_if_needed(background_image_filepath: Path,
mount_directory: Path) -> None:
"""
Copy background to the DMG
If the background image is not specified it will not be copied.
"""
if not background_image_filepath:
print('No background image provided.')
return
print(f'Copying background image {background_image_filepath}')
destination_dir = mount_directory / '.background'
destination_dir.mkdir(exist_ok=True)
destination_filepath = destination_dir / background_image_filepath.name
shutil.copy(background_image_filepath, destination_filepath)
def create_applications_link(mount_directory: Path) -> None:
"""
Create link to /Applications in the given location
"""
print('Creating link to /Applications')
command = ('ln', '-s', '/Applications', mount_directory / ' ')
subprocess.run(command)
def run_applescript(applescript: Path,
volume_name: str,
app_bundles: List[Path],
background_image_filepath: Path) -> None:
"""
Run given applescript to adjust look and feel of the DMG
"""
main_app_bundle = get_main_app_bundle(app_bundles)
with NamedTemporaryFile(
mode='w', suffix='.applescript') as temp_applescript:
print('Adjusting applescript for volume name...')
# Adjust script to the specific volume name.
with open(applescript, mode='r') as input:
for line in input.readlines():
stripped_line = line.strip()
if stripped_line.startswith('tell disk'):
line = re.sub('tell disk ".*"',
f'tell disk "{volume_name}"',
line)
elif stripped_line.startswith('set background picture'):
if not background_image_filepath:
continue
else:
background_image_short = \
'.background:' + background_image_filepath.name
line = re.sub('to file ".*"',
f'to file "{background_image_short}"',
line)
line = line.replace('blender.app', main_app_bundle.name)
temp_applescript.write(line)
temp_applescript.flush()
print('Running applescript...')
command = ('osascript', temp_applescript.name)
subprocess.run(command)
print('Waiting for applescript...')
# NOTE: This is copied from bundle.sh. The exact reason for sleep is
# still remained a mystery.
time.sleep(5)
def codesign(subject: Path):
"""
Codesign file or directory
NOTE: For DMG it will also notarize.
"""
command = (CODESIGN_SCRIPT, subject)
subprocess.run(command)
def codesign_app_bundles_in_dmg(mount_directory: str) -> None:
"""
Code sign all binaries and bundles in the mounted directory
"""
print(f'Codesigning all app bundles in {mount_directory}')
codesign(mount_directory)
def codesign_and_notarize_dmg(dmg_filepath: Path) -> None:
"""
Run codesign and notarization pipeline on the DMG
"""
print(f'Codesigning and notarizing DMG {dmg_filepath}')
codesign(dmg_filepath)
def compress_dmg(writable_dmg_filepath: Path,
final_dmg_filepath: Path) -> None:
"""
Compress temporary read-write DMG
"""
command = ('hdiutil', 'convert',
writable_dmg_filepath,
'-format', 'UDZO',
'-o', final_dmg_filepath)
if final_dmg_filepath.exists():
print(f'Removing old compressed DMG {final_dmg_filepath}')
final_dmg_filepath.unlink()
print('Compressing disk image...')
subprocess.run(command)
def create_final_dmg(app_bundles: List[Path],
dmg_filepath: Path,
background_image_filepath: Path,
volume_name: str,
applescript: Path) -> None:
"""
Create DMG with all app bundles
Will take care configuring background, signing all binaries and app bundles
and notarizing the DMG.
"""
print('Running all routines to create final DMG')
writable_dmg_filepath = get_writable_dmg_filepath(dmg_filepath)
mount_directory = get_mount_directory_for_volume_name(volume_name)
# Make sure volume is not mounted.
# If it is mounted it will prevent removing old DMG files and could make
# it so app bundles are copied to the wrong place.
eject_volume(volume_name)
create_dmg_image(app_bundles, writable_dmg_filepath, volume_name)
mount_readwrite_dmg(writable_dmg_filepath)
# Run codesign first, prior to copying amything else.
#
# This allows to recurs into the content of bundles without worrying about
# possible interfereice of Application symlink.
codesign_app_bundles_in_dmg(mount_directory)
copy_background_if_needed(background_image_filepath, mount_directory)
create_applications_link(mount_directory)
run_applescript(applescript, volume_name, app_bundles,
background_image_filepath)
print('Ejecting read-write DMG image...')
eject_volume(volume_name)
compress_dmg(writable_dmg_filepath, dmg_filepath)
writable_dmg_filepath.unlink()
codesign_and_notarize_dmg(dmg_filepath)
def ensure_dmg_extension(filepath: Path) -> Path:
"""
Make sure given file have .dmg extension
"""
if filepath.suffix != '.dmg':
return filepath.with_suffix(f'{filepath.suffix}.dmg')
return filepath
def get_dmg_filepath(requested_name: Path, app_bundles: List[Path]) -> Path:
"""
Get full file path for the final DMG image
Will use the provided one when possible, otherwise will deduct it from
app bundles.
If the name is deducted, the DMG is stored in the current directory.
"""
if requested_name:
return ensure_dmg_extension(requested_name.absolute())
# TODO(sergey): This is not necessarily the main one.
main_bundle = app_bundles[0]
# Strip .app from the name
return Path(main_bundle.name[:-4] + '.dmg').absolute()
def get_background_image(requested_background_image: Path) -> Path:
"""
Get effective filepath for the background image
"""
if requested_background_image:
return requested_background_image.absolute()
return DARWIN_DIRECTORY / 'background.tif'
def get_applescript(requested_applescript: Path) -> Path:
"""
Get effective filepath for the applescript
"""
if requested_applescript:
return requested_applescript.absolute()
return DARWIN_DIRECTORY / 'blender.applescript'
def get_volume_name_from_dmg_filepath(dmg_filepath: Path) -> str:
"""
Deduct volume name from the DMG path
Will use first part of the DMG file name prior to dash.
"""
tokens = dmg_filepath.stem.split('-')
words = tokens[0].split()
return ' '.join(word.capitalize() for word in words)
def get_volume_name(requested_volume_name: str,
dmg_filepath: Path) -> str:
"""
Get effective name for DMG volume
"""
if requested_volume_name:
return requested_volume_name
return get_volume_name_from_dmg_filepath(dmg_filepath)
def main():
parser = create_argument_parser()
args = parser.parse_args()
# Get normalized input parameters.
source_dir = args.source_dir.absolute()
background_image_filepath = get_background_image(args.background_image)
applescript = get_applescript(args.applescript)
app_bundles = collect_and_log_app_bundles(source_dir)
if not app_bundles:
return
dmg_filepath = get_dmg_filepath(args.dmg, app_bundles)
volume_name = get_volume_name(args.volume_name, dmg_filepath)
print(f'Will produce DMG "{dmg_filepath.name}" (without quotes)')
create_final_dmg(app_bundles,
dmg_filepath,
background_image_filepath,
volume_name,
applescript)
if __name__ == "__main__":
main()

View File

@@ -40,5 +40,5 @@ execute_process(
)
if(NOT exit_code EQUAL "0")
message( FATAL_ERROR "Non-zero exit code of codesign tool")
message(FATAL_ERROR "Non-zero exit code of codesign tool")
endif()

View File

@@ -45,7 +45,7 @@ def create_argument_parser():
def main():
parser = create_argument_parser()
args = parser.parse_args()
path_to_sign = args.path_to_sign
path_to_sign = args.path_to_sign.absolute()
if sys.platform == 'win32':
# When WIX packed is used to generate .msi on Windows the CPack will

View File

@@ -103,7 +103,7 @@ def cmake_build(builder):
if builder.platform == 'win':
command = ['cmake', '--build', '.', '--target', 'install', '--config', 'Release']
else:
command = ['make', '-s', '-j2', 'install']
command = ['make', '-s', '-j16', 'install']
print("CMake build:")
buildbot_utils.call(builder.command_prefix + command)

View File

@@ -64,7 +64,7 @@ def create_buildbot_upload_zip(builder, package_files):
sys.stderr.write('Create buildbot_upload.zip failed: ' + str(ex) + '\n')
sys.exit(1)
def create_tar_bz2(src, dest, package_name):
def create_tar_xz(src, dest, package_name):
# One extra to remove leading os.sep when cleaning root for package_root
ln = len(src) + 1
flist = list()
@@ -75,9 +75,20 @@ def create_tar_bz2(src, dest, package_name):
flist.extend([(os.path.join(root, file), os.path.join(package_root, file)) for file in files])
import tarfile
package = tarfile.open(dest, 'w:bz2')
# Set UID/GID of archived files to 0, otherwise they'd be owned by whatever
# user compiled the package. If root then unpacks it to /usr/local/ you get
# a security issue.
def _fakeroot(tarinfo):
tarinfo.gid = 0
tarinfo.gname = "root"
tarinfo.uid = 0
tarinfo.uname = "root"
return tarinfo
package = tarfile.open(dest, 'w:xz', preset=9)
for entry in flist:
package.add(entry[0], entry[1], recursive=False)
package.add(entry[0], entry[1], recursive=False, filter=_fakeroot)
package.close()
def cleanup_files(dirpath, extension):
@@ -98,14 +109,15 @@ def pack_mac(builder):
package_filepath = os.path.join(builder.build_dir, package_filename)
release_dir = os.path.join(builder.blender_dir, 'release', 'darwin')
bundle_sh = os.path.join(release_dir, 'bundle.sh')
buildbot_dir = os.path.join(builder.blender_dir, 'build_files', 'buildbot')
bundle_script = os.path.join(buildbot_dir, 'slave_bundle_dmg.py')
command = [bundle_sh]
command += ['--source', builder.install_dir]
command = [bundle_script]
command += ['--dmg', package_filepath]
if info.is_development_build:
background_image = os.path.join(release_dir, 'buildbot', 'background.tif')
command += ['--background-image', background_image]
command += [builder.install_dir]
buildbot_utils.call(command)
create_buildbot_upload_zip(builder, [(package_filepath, package_filename)])
@@ -149,8 +161,6 @@ def pack_linux(builder):
blender_executable = os.path.join(builder.install_dir, 'blender')
info = buildbot_utils.VersionInfo(builder)
blender_glibc = builder.name.split('_')[1]
blender_arch = 'x86_64'
# Strip all unused symbols from the binaries
print("Stripping binaries...")
@@ -161,13 +171,13 @@ def pack_linux(builder):
buildbot_utils.call(builder.command_prefix + ['find', py_target, '-iname', '*.so', '-exec', 'strip', '-s', '{}', ';'])
# Construct package name
platform_name = 'linux-' + blender_glibc + '-' + blender_arch
platform_name = 'linux64'
package_name = get_package_name(builder, platform_name)
package_filename = package_name + ".tar.bz2"
package_filename = package_name + ".tar.xz"
print("Creating .tar.bz2 archive")
package_filepath = builder.install_dir + '.tar.bz2'
create_tar_bz2(builder.install_dir, package_filepath, package_name)
print("Creating .tar.xz archive")
package_filepath = builder.install_dir + '.tar.xz'
create_tar_xz(builder.install_dir, package_filepath, package_name)
# Create buildbot_upload.zip
create_buildbot_upload_zip(builder, [(package_filepath, package_filename)])

View File

@@ -27,9 +27,6 @@ ENDIF()
SET(_alembic_SEARCH_DIRS
${ALEMBIC_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/lib/alembic
)

View File

@@ -17,9 +17,6 @@ ENDIF()
SET(_audaspace_SEARCH_DIRS
${AUDASPACE_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
)
# Use pkg-config to get hints about paths

View File

@@ -29,9 +29,6 @@ ENDIF()
SET(_blosc_SEARCH_DIRS
${BLOSC_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/lib/blosc
)

View File

@@ -25,9 +25,6 @@ ENDIF()
SET(_eigen3_SEARCH_DIRS
${EIGEN3_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
)
FIND_PATH(EIGEN3_INCLUDE_DIR

View File

@@ -29,10 +29,6 @@ ENDIF()
SET(_embree_SEARCH_DIRS
${EMBREE_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/embree
/opt/lib/embree
)

View File

@@ -29,9 +29,6 @@ ENDIF()
SET(_fftw3_SEARCH_DIRS
${FFTW3_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
)
FIND_PATH(FFTW3_INCLUDE_DIR

View File

@@ -28,7 +28,6 @@ ENDIF()
SET(_glew_SEARCH_DIRS
${GLEW_ROOT_DIR}
/usr/local
)
FIND_PATH(GLEW_INCLUDE_DIR

View File

@@ -444,7 +444,6 @@ if(NOT GFLAGS_FOUND)
/opt/local/var/macports/software # Mac OS X.
/opt/local/include
/usr/include
/sw/include # Fink
/opt/lib/gflags/include)
list(APPEND GFLAGS_CHECK_PATH_SUFFIXES
@@ -457,7 +456,6 @@ if(NOT GFLAGS_FOUND)
/usr/local/homebrew/lib # Mac OS X.
/opt/local/lib
/usr/lib
/sw/lib # Fink
/opt/lib/gflags/lib)
list(APPEND GFLAGS_CHECK_LIBRARY_SUFFIXES
gflags/lib # Windows (for C:/Program Files prefix).

View File

@@ -128,7 +128,6 @@ list(APPEND GLOG_CHECK_INCLUDE_DIRS
/opt/local/var/macports/software # Mac OS X.
/opt/local/include
/usr/include
/sw/include # Fink
/opt/lib/glog/include)
# Windows (for C:/Program Files prefix).
list(APPEND GLOG_CHECK_PATH_SUFFIXES
@@ -143,7 +142,6 @@ list(APPEND GLOG_CHECK_LIBRARY_DIRS
/usr/local/homebrew/lib # Mac OS X.
/opt/local/lib
/usr/lib
/sw/lib # Fink
/opt/lib/gflags/lib)
# Windows (for C:/Program Files prefix).
list(APPEND GLOG_CHECK_LIBRARY_SUFFIXES

View File

@@ -26,9 +26,6 @@ ENDIF()
SET(_hdf5_SEARCH_DIRS
${HDF5_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/lib/hdf5
)

View File

@@ -32,9 +32,6 @@ endif()
SET(_icu_SEARCH_DIRS
${ICU_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
)
# We don't need includes, only libs to link against...

View File

@@ -29,9 +29,6 @@ ENDIF()
SET(_jack_SEARCH_DIRS
${JACK_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
)
FIND_PATH(JACK_INCLUDE_DIR

View File

@@ -29,9 +29,6 @@ ENDIF()
SET(_jemalloc_SEARCH_DIRS
${JEMALLOC_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/lib/jemalloc
)

View File

@@ -49,6 +49,7 @@ if(NOT LLVM_ROOT_DIR)
OUTPUT_VARIABLE LLVM_ROOT_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(LLVM_ROOT_DIR ${LLVM_ROOT_DIR} CACHE PATH "Path to the LLVM installation")
set(LLVM_INCLUDE_DIRS ${LLVM_ROOT_DIR}/include CACHE PATH "Path to the LLVM include directory")
endif()
if(NOT LLVM_LIBPATH)
execute_process(COMMAND ${LLVM_CONFIG} --libdir

View File

@@ -29,9 +29,6 @@ ENDIF()
SET(_lzo_SEARCH_DIRS
${LZO_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
)
FIND_PATH(LZO_INCLUDE_DIR lzo/lzo1x.h

View File

@@ -62,9 +62,6 @@ SET(_opencollada_FIND_STATIC_COMPONENTS
SET(_opencollada_SEARCH_DIRS
${OPENCOLLADA_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/lib/opencollada
)

View File

@@ -35,9 +35,6 @@ SET(_opencolorio_FIND_COMPONENTS
SET(_opencolorio_SEARCH_DIRS
${OPENCOLORIO_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/lib/ocio
)

View File

@@ -47,9 +47,6 @@ SET(_openexr_FIND_COMPONENTS
SET(_openexr_SEARCH_DIRS
${OPENEXR_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/lib/openexr
)

View File

@@ -17,7 +17,6 @@ ENDIF()
SET(_opengles_SEARCH_DIRS
${OPENGLES_ROOT_DIR}
/usr/local
)
FIND_PATH(OPENGLES_INCLUDE_DIR

View File

@@ -29,9 +29,6 @@ ENDIF()
SET(_openimagedenoise_SEARCH_DIRS
${OPENIMAGEDENOISE_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/lib/openimagedenoise
)

View File

@@ -31,9 +31,6 @@ ENDIF()
SET(_openimageio_SEARCH_DIRS
${OPENIMAGEIO_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/lib/oiio
)

View File

@@ -29,9 +29,6 @@ ENDIF()
SET(_openjpeg_SEARCH_DIRS
${OPENJPEG_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
)
FIND_PATH(OPENJPEG_INCLUDE_DIR

View File

@@ -35,9 +35,6 @@ SET(_osl_FIND_COMPONENTS
SET(_osl_SEARCH_DIRS
${OSL_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/lib/osl
)
@@ -69,6 +66,22 @@ FIND_PROGRAM(OSL_COMPILER oslc
HINTS ${_osl_SEARCH_DIRS}
PATH_SUFFIXES bin)
get_filename_component(OSL_SHADER_HINT ${OSL_COMPILER} DIRECTORY)
get_filename_component(OSL_SHADER_HINT ${OSL_SHADER_DIR}/../ ABSOLUTE)
FIND_PATH(OSL_SHADER_DIR
NAMES
stdosl.h
HINTS
${OSL_ROOT_DIR}
${OSL_SHADER_HINT}
$ENV{OSLHOME}
/usr/share/OSL/
/usr/include/OSL/
PATH_SUFFIXES
shaders
)
# handle the QUIETLY and REQUIRED arguments and set OSL_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)

View File

@@ -34,9 +34,6 @@ SET(_opensubdiv_FIND_COMPONENTS
SET(_opensubdiv_SEARCH_DIRS
${OPENSUBDIV_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/lib/opensubdiv
/opt/lib/osd # install_deps.sh
)

View File

@@ -29,10 +29,6 @@ ENDIF()
SET(_openvdb_SEARCH_DIRS
${OPENVDB_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/openvdb
/opt/lib/openvdb
)

View File

@@ -26,9 +26,6 @@ ENDIF()
SET(_optix_SEARCH_DIRS
${OPTIX_ROOT_DIR}
"$ENV{PROGRAMDATA}/NVIDIA Corporation/OptiX SDK 7.0.0"
/usr/local
/sw # Fink
/opt/local # DarwinPorts
)
FIND_PATH(OPTIX_INCLUDE_DIR

View File

@@ -29,9 +29,6 @@ ENDIF()
SET(_pcre_SEARCH_DIRS
${PCRE_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
)
FIND_PATH(PCRE_INCLUDE_DIR pcre.h

View File

@@ -29,9 +29,6 @@ ENDIF()
SET(_pugixml_SEARCH_DIRS
${PUGIXML_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/lib/oiio
)

View File

@@ -71,7 +71,6 @@ STRING(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
SET(_python_SEARCH_DIRS
${PYTHON_ROOT_DIR}
"$ENV{HOME}/py${_PYTHON_VERSION_NO_DOTS}"
"/opt/py${_PYTHON_VERSION_NO_DOTS}"
"/opt/lib/python-${PYTHON_VERSION}"
)

View File

@@ -28,12 +28,6 @@ ENDIF()
SET(_sdl2_SEARCH_DIRS
${SDL2_ROOT_DIR}
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw # Fink
/opt/local # DarwinPorts
)
FIND_PATH(SDL2_INCLUDE_DIR

View File

@@ -29,9 +29,6 @@ ENDIF()
SET(_sndfile_SEARCH_DIRS
${LIBSNDFILE_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
)
FIND_PATH(LIBSNDFILE_INCLUDE_DIR sndfile.h

View File

@@ -29,9 +29,6 @@ ENDIF()
SET(_spacenav_SEARCH_DIRS
${SPACENAV_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
)
FIND_PATH(SPACENAV_INCLUDE_DIR

View File

@@ -29,9 +29,6 @@ ENDIF()
SET(_tbb_SEARCH_DIRS
${TBB_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
/opt/lib/tbb
)

View File

@@ -0,0 +1,73 @@
# - Find Universal Scene Description (USD) library
# Find the native USD includes and libraries
# This module defines
# USD_INCLUDE_DIRS, where to find USD headers, Set when
# USD_INCLUDE_DIR is found.
# USD_LIBRARIES, libraries to link against to use USD.
# USD_ROOT_DIR, The base directory to search for USD.
# This can also be an environment variable.
# USD_FOUND, If false, do not try to use USD.
#
#=============================================================================
# Copyright 2019 Blender Foundation.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# If USD_ROOT_DIR was defined in the environment, use it.
IF(NOT USD_ROOT_DIR AND NOT $ENV{USD_ROOT_DIR} STREQUAL "")
SET(USD_ROOT_DIR $ENV{USD_ROOT_DIR})
ENDIF()
SET(_usd_SEARCH_DIRS
${USD_ROOT_DIR}
/opt/lib/usd
)
FIND_PATH(USD_INCLUDE_DIR
NAMES
pxr/usd/usd/api.h
HINTS
${_usd_SEARCH_DIRS}
PATH_SUFFIXES
include
DOC "Universal Scene Description (USD) header files"
)
FIND_LIBRARY(USD_LIBRARY
NAMES
usd_m usd_ms
HINTS
${_usd_SEARCH_DIRS}
PATH_SUFFIXES
lib64 lib lib/static
DOC "Universal Scene Description (USD) monolithic library"
)
IF(${USD_LIBRARY_NOTFOUND})
set(USD_FOUND FALSE)
ELSE()
# handle the QUIETLY and REQUIRED arguments and set USD_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(USD DEFAULT_MSG USD_LIBRARY USD_INCLUDE_DIR)
IF(USD_FOUND)
get_filename_component(USD_LIBRARY_DIR ${USD_LIBRARY} DIRECTORY)
SET(USD_INCLUDE_DIRS ${USD_INCLUDE_DIR})
set(USD_LIBRARIES ${USD_LIBRARY})
ENDIF(USD_FOUND)
ENDIF()
MARK_AS_ADVANCED(
USD_INCLUDE_DIR
USD_LIBRARY_DIR
)
UNSET(_usd_SEARCH_DIRS)

View File

@@ -29,9 +29,6 @@ ENDIF()
SET(_xml2_SEARCH_DIRS
${XML2_ROOT_DIR}
/usr/local
/sw # Fink
/opt/local # DarwinPorts
)
FIND_PATH(XML2_INCLUDE_DIR libxml2/libxml/xpath.h

View File

@@ -12,9 +12,14 @@
#
#=============================================================================
macro(BLENDER_SRC_GTEST_EX NAME SRC EXTRA_LIBS DO_ADD_TEST)
macro(BLENDER_SRC_GTEST_EX)
if(WITH_GTESTS)
set(TARGET_NAME ${NAME}_test)
set(options SKIP_ADD_TEST)
set(oneValueArgs NAME)
set(multiValueArgs SRC EXTRA_LIBS COMMAND_ARGS)
cmake_parse_arguments(ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
set(TARGET_NAME ${ARG_NAME}_test)
get_property(_current_include_directories
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
PROPERTY INCLUDE_DIRECTORIES)
@@ -29,13 +34,23 @@ macro(BLENDER_SRC_GTEST_EX NAME SRC EXTRA_LIBS DO_ADD_TEST)
${CMAKE_SOURCE_DIR}/extern/gmock/include
)
unset(_current_include_directories)
add_executable(${TARGET_NAME} ${SRC})
if(WIN32)
set(MANIFEST "${CMAKE_BINARY_DIR}/tests.exe.manifest")
endif()
add_executable(${TARGET_NAME} ${ARG_SRC} ${MANIFEST})
target_include_directories(${TARGET_NAME} PUBLIC "${TEST_INC}")
target_include_directories(${TARGET_NAME} SYSTEM PUBLIC "${TEST_INC_SYS}")
target_link_libraries(${TARGET_NAME} ${ARG_EXTRA_LIBS} ${PLATFORM_LINKLIBS})
if(WITH_TBB)
# Force TBB libraries to be in front of MKL (part of OpenImageDenoise), so
# that it is initialized before MKL and static library initialization order
# issues are avoided.
target_link_libraries(${TARGET_NAME} ${TBB_LIBRARIES})
if(WITH_OPENIMAGEDENOISE)
target_link_libraries(${TARGET_NAME} ${OPENIMAGEDENOISE_LIBRARIES})
endif()
endif()
target_link_libraries(${TARGET_NAME}
${EXTRA_LIBS}
${PLATFORM_LINKLIBS}
bf_testing_main
bf_intern_eigen
bf_intern_guardedalloc
@@ -48,6 +63,9 @@ macro(BLENDER_SRC_GTEST_EX NAME SRC EXTRA_LIBS DO_ADD_TEST)
if(WITH_OPENMP_STATIC)
target_link_libraries(${TARGET_NAME} ${OpenMP_LIBRARIES})
endif()
if(UNIX AND NOT APPLE)
target_link_libraries(${TARGET_NAME} bf_intern_libc_compat)
endif()
get_property(GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(GENERATOR_IS_MULTI_CONFIG)
@@ -60,13 +78,19 @@ macro(BLENDER_SRC_GTEST_EX NAME SRC EXTRA_LIBS DO_ADD_TEST)
RUNTIME_OUTPUT_DIRECTORY "${TESTS_OUTPUT_DIR}"
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${TESTS_OUTPUT_DIR}"
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${TESTS_OUTPUT_DIR}")
if(${DO_ADD_TEST})
add_test(NAME ${TARGET_NAME} COMMAND ${TESTS_OUTPUT_DIR}/${TARGET_NAME} WORKING_DIRECTORY ${TEST_INSTALL_DIR})
if(NOT ARG_SKIP_ADD_TEST)
add_test(
NAME ${TARGET_NAME}
COMMAND ${TESTS_OUTPUT_DIR}/${TARGET_NAME} ${ARG_COMMAND_ARGS}
WORKING_DIRECTORY ${TEST_INSTALL_DIR})
# Don't fail tests on leaks since these often happen in external libraries
# that we can't fix.
set_tests_properties(${TARGET_NAME} PROPERTIES ENVIRONMENT LSAN_OPTIONS=exitcode=0)
endif()
if(WIN32)
unset(MANIFEST)
endif()
unset(TEST_INC)
unset(TEST_INC_SYS)
unset(TARGET_NAME)
@@ -74,13 +98,23 @@ macro(BLENDER_SRC_GTEST_EX NAME SRC EXTRA_LIBS DO_ADD_TEST)
endmacro()
macro(BLENDER_SRC_GTEST NAME SRC EXTRA_LIBS)
BLENDER_SRC_GTEST_EX("${NAME}" "${SRC}" "${EXTRA_LIBS}" "TRUE")
BLENDER_SRC_GTEST_EX(
NAME "${NAME}"
SRC "${SRC}"
EXTRA_LIBS "${EXTRA_LIBS}")
endmacro()
macro(BLENDER_TEST NAME EXTRA_LIBS)
BLENDER_SRC_GTEST_EX("${NAME}" "${NAME}_test.cc" "${EXTRA_LIBS}" "TRUE")
BLENDER_SRC_GTEST_EX(
NAME "${NAME}"
SRC "${NAME}_test.cc"
EXTRA_LIBS "${EXTRA_LIBS}")
endmacro()
macro(BLENDER_TEST_PERFORMANCE NAME EXTRA_LIBS)
BLENDER_SRC_GTEST_EX("${NAME}" "${NAME}_test.cc" "${EXTRA_LIBS}" "FALSE")
BLENDER_SRC_GTEST_EX(
NAME "${NAME}"
SRC "${NAME}_test.cc"
EXTRA_LIBS "${EXTRA_LIBS}"
SKIP_ADD_TEST)
endmacro()

View File

@@ -33,7 +33,7 @@ defs_precalc = {
"glColor3ubv": {0: 3},
"glColor4ubv": {0: 4},
"glColor4usv": {0: 3},
"glColor3usv": {0: 3},
"glColor4usv": {0: 4},
"glColor3fv": {0: 3},

View File

@@ -13,6 +13,9 @@ set(WITH_GTESTS ON CACHE BOOL "" FORCE)
set(WITH_LIBMV_SCHUR_SPECIALIZATIONS OFF CACHE BOOL "" FORCE)
set(WITH_PYTHON_SAFETY ON CACHE BOOL "" FORCE)
set(WITH_DOC_MANPAGE OFF CACHE BOOL "" FORCE)
if(WIN32)
set(WITH_WINDOWS_BUNDLE_CRT OFF CACHE BOOL "" FORCE)
endif()
# This may have issues with C++ initialization order, needs to be tested
# on all platforms to be sure this is safe to enable.

View File

@@ -18,7 +18,6 @@ set(WITH_LIBMV ON CACHE BOOL "" FORCE)
set(WITH_LIBMV_SCHUR_SPECIALIZATIONS ON CACHE BOOL "" FORCE)
set(WITH_COMPOSITOR ON CACHE BOOL "" FORCE)
set(WITH_FREESTYLE ON CACHE BOOL "" FORCE)
set(WITH_GHOST_XDND ON CACHE BOOL "" FORCE)
set(WITH_IK_SOLVER ON CACHE BOOL "" FORCE)
set(WITH_IK_ITASC ON CACHE BOOL "" FORCE)
set(WITH_IMAGE_CINEON ON CACHE BOOL "" FORCE)
@@ -29,12 +28,10 @@ set(WITH_IMAGE_OPENJPEG ON CACHE BOOL "" FORCE)
set(WITH_IMAGE_TIFF ON CACHE BOOL "" FORCE)
set(WITH_INPUT_NDOF ON CACHE BOOL "" FORCE)
set(WITH_INTERNATIONAL ON CACHE BOOL "" FORCE)
set(WITH_JACK ON CACHE BOOL "" FORCE)
set(WITH_LZMA ON CACHE BOOL "" FORCE)
set(WITH_LZO ON CACHE BOOL "" FORCE)
set(WITH_MOD_FLUID ON CACHE BOOL "" FORCE)
set(WITH_MOD_REMESH ON CACHE BOOL "" FORCE)
set(WITH_MOD_SMOKE ON CACHE BOOL "" FORCE)
set(WITH_MOD_FLUID ON CACHE BOOL "" FORCE)
set(WITH_MOD_OCEANSIM ON CACHE BOOL "" FORCE)
set(WITH_AUDASPACE ON CACHE BOOL "" FORCE)
set(WITH_OPENAL ON CACHE BOOL "" FORCE)
@@ -49,20 +46,18 @@ set(WITH_PYTHON_INSTALL ON CACHE BOOL "" FORCE)
set(WITH_QUADRIFLOW ON CACHE BOOL "" FORCE)
set(WITH_SDL ON CACHE BOOL "" FORCE)
set(WITH_TBB ON CACHE BOOL "" FORCE)
set(WITH_X11_XINPUT ON CACHE BOOL "" FORCE)
set(WITH_X11_XF86VMODE ON CACHE BOOL "" FORCE)
set(WITH_USD ON CACHE BOOL "" FORCE)
set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE)
# platform dependent options
if(UNIX AND NOT APPLE)
if(NOT WIN32)
set(WITH_JACK ON CACHE BOOL "" FORCE)
set(WITH_DOC_MANPAGE ON CACHE BOOL "" FORCE)
elseif(WIN32)
set(WITH_JACK OFF CACHE BOOL "" FORCE)
elseif(APPLE)
set(WITH_JACK ON CACHE BOOL "" FORCE)
# include("${CMAKE_CURRENT_SOURCE_DIR}/../platform/platform_apple_xcode.cmake")
endif()
if(UNIX AND NOT APPLE)
set(WITH_DOC_MANPAGE ON CACHE BOOL "" FORCE)
set(WITH_GHOST_XDND ON CACHE BOOL "" FORCE)
set(WITH_X11_XINPUT ON CACHE BOOL "" FORCE)
set(WITH_X11_XF86VMODE ON CACHE BOOL "" FORCE)
endif()

View File

@@ -10,7 +10,6 @@ set(WITH_HEADLESS ON CACHE BOOL "" FORCE)
# disable audio, its possible some devs may want this but for now disable
# so the python module doesn't hold the audio device and loads quickly.
set(WITH_AUDASPACE OFF CACHE BOOL "" FORCE)
set(WITH_FFTW3 OFF CACHE BOOL "" FORCE)
set(WITH_JACK OFF CACHE BOOL "" FORCE)
set(WITH_SDL OFF CACHE BOOL "" FORCE)
set(WITH_OPENAL OFF CACHE BOOL "" FORCE)

Some files were not shown because too many files have changed in this diff Show More