1
1

Compare commits

...

10030 Commits

Author SHA1 Message Date
784da45955 GLDebug: Trim NVidia debug output
These buffer detailed infos are not needed unless going deep into
perf. profiling, in which case you can still disable this compile option.

This makes user report log much more readable.
2020-09-05 16:47:31 +02:00
263ee86fb4 GLTexture: Fix texture creation when using direct state access
There was 2 errors:
- A texture object must have been bound to target_ before use with DSA funcs
- We need to use glTextureSubImage for DSA updating
2020-09-05 16:28:07 +02:00
Clément
d1479c437b GLTexture: Add Feedback loop check
The check is better than before as we take into
consideration the attached mip level.
2020-09-05 14:48:44 +02:00
Clément
0038b598cf Cleanup: GPUFramebuffer: Remove unused variable 2020-09-05 14:08:53 +02:00
Clément
efd00731f5 GLTexture: Add direct state access support 2020-09-05 14:08:02 +02:00
Clément
219e263b59 GLState: Add texture multibind and remove redundant binds 2020-09-05 14:06:50 +02:00
Clément
5265ed7be2 Math Utils: Add bitscan 64bit version 2020-09-05 14:04:00 +02:00
5b314f884d GPUTexture: OCIO: Workaround new missing bind error checking
We cannot change the texture bind point since the interface count
4/5 textures to bind. Changing the uniform to avoid one bind
make the system thinks one texture is missing.

Avoid this by creating a dummy texture and binding it to the empty
slot.
2020-09-05 02:55:30 +02:00
af095ab71f GPUDebug: Only enable resource checking in debug mode 2020-09-05 02:55:30 +02:00
6f998edf2a Cleanup: GPUTexture: Move debug messages outside of creation function
# Conflicts:
#	source/blender/gpu/intern/gpu_framebuffer.cc
2020-09-05 02:55:22 +02:00
bd081711d6 GPUTexture: Change texture creation API
This is to modernize the API:
- Add meaningful name to all textures (except DRW textures).
- Remove unused err_out argument: only used for offscreen python.
- Add mipmap count to creation functions for future changes.
- Clarify the data usage in creation functions.

This is a cleanup commit, there is no functional change.
2020-09-05 01:58:07 +02:00
42e5de3f4d Cleanup: GPUTexture: Remove use of GPU_texture_create_nD
Use creation + update function instead.
2020-09-04 23:13:12 +02:00
fd4f766d58 GLTexture: Add validation for empty slots before drawing
This is to have better error detection in debug builds.
This is not a replacement for a full check like in renderdoc but it
might catch some issues early on.
2020-09-04 22:19:36 +02:00
922abf37b2 OCIO: Use GPUTexture instead of OpenGL calls and remove gl dependency
Simple cleanup. Part of the Vulkan Port T68990.
2020-09-04 22:18:10 +02:00
cfba534403 GPUTexture: Implement back 3D texture resize
But this time implement it outside the texture module.
This makes more sense as only the volume textures need this feature.
2020-09-04 21:10:54 +02:00
1394c0b852 BLI: Math: Add equals_v3v3_int 2020-09-04 21:07:26 +02:00
Clément
84cb571c1f Cleanup: GPUTexture: Clean framebuffer attachment 2020-09-04 16:35:02 +02:00
Clément
34921b47f7 Cleanup: GPUFrameBuffer: Use Texture class instead of gl calls 2020-09-04 13:51:25 +02:00
5f7cc8cf51 GLTexture: Add back texture proxy check
Cleanup the feature itself:
- Check 3D textures size against the correct limit.
- Add check for compressed textures.
2020-09-04 02:45:55 +02:00
ffa351d533 GPUTexture: Add support for samplers
This just add back the support.
This commit also includes a bit of cleanup.
2020-09-04 02:45:55 +02:00
e58408cbaf GPUTexture: GL Backend Isolation
This is a massive cleanup needed for vulkan support T68990. It provides:

- More meaningful enums with conversion functions.
- Less hacky supports of arrays and cubemaps (all considered layered).
- More inline with the stateless design of vulkan and modern GL.
- Methods Fallbacks are using framebuffer functions that are wrapped
  instead of implementing inside the texture module.

What is not in there:
- API change.
- Samplers support (breaks a few effects).
2020-09-04 02:45:53 +02:00
19d056cb85 GPUFramebuffer: Encapsulate single attachement clear
This is in preparation of using it to clear single texture.

Also includes minor cleanups about not using tex target in
assert and adding enum operators.
2020-09-04 02:44:33 +02:00
da306fb2fc Cleanup: EEVEE: Use correct array size and use equals_v2v2_int 2020-09-04 02:41:57 +02:00
63b6e87d98 GPUTexture: Add skeleton of the new GLTexture class 2020-09-04 02:41:53 +02:00
f7e1c007ab GPUTexture: Remove bind to edit calls
This is going to be unecessary after the GPU opengl texture backend refactor.

For now add a save/restore mechanism to leave the state untouched.

Also remove some calls where the caller would bind to particular binding
point and set the shader uniform.
2020-09-04 02:39:05 +02:00
a96283ba51 Fix assert when cleaning constraints in the transform tool
When enabled, the modal key item "Clear Constraint" did not reset
the default orientation.

This does not bring changes in the user's point of view.
2020-09-03 17:57:58 -03:00
ff3a9852a7 Cleanup: Shorten the name of the Auto Constraint modal keymap
It was taking up too much space in the status bar.
2020-09-03 17:57:42 -03:00
953a031f15 UI: Fix use after free for instanced panel expansion
The "set_expand_from_list_data" function has to be called after updating
the panels' custom data pointers. Otherwise the wrong information is
retrieved in the best base and it will cause a crash in the worst case.
2020-09-03 14:33:44 -05:00
88b6dd1392 Fix missing cursor changes with "Lock Object Modes" disabled
Changing the active object would change the mode, but the necessary
toolsystem update to change the cursor was not run.

Steps to recreate were:
* Duplicate default cube
* Enter sculpt mode with one of the cubes
* Disable Edit > Lock Object Modes
* Select back-and-forth between the objects

Same would happen with other modes.
2020-09-03 21:04:17 +02:00
c7b00ef625 MSVC: Fix cmake warnings with MSVC updates
CMake caches the location of the CRT runtime in the
MSVC_REDIST_DIR variable, and uses it to copy the required
dll's during the install phase.

This variable is only initialized when it does not exist.
Leading to issues when compiler updates are installed and
the compiler version slightly changes, cmake still looks
in the old location for the runtime and warns about the
files not existing.

This change fixes the issue by checking if the redist dir
exists and if not unsets it so InstallRequiredSystemLibraries
can have another go at figuring out where they live.
2020-09-03 12:39:49 -06:00
19fff96ef5 Fix T80289: GPencil Opacity modifier not working
This error was introduced in the refactor of the modifier panels.
2020-09-03 20:17:09 +02:00
6d39fd94b4 Fix copy/paste error in Grease Pencil Draw operator tooltip
Also remove capitalization of the term "object".
2020-09-03 19:36:52 +02:00
340cbc7f15 Fix T79803: Wrong Distance To Edge 1D Voronoi
The current 1D Voronoi implementation for the Distance to Edge option
computes the distance to the cells instead. This patch fixes that and
compute the distance to the edge.

Reviewed By: JacquesLucke, brecht

Differential Revision: https://developer.blender.org/D8634
2020-09-03 18:56:27 +02:00
d2c52d4de2 Cleanup: Add/use function to disable buttons with a disabled hint
We do this in a couple of places, so it's worth having the logic wrapped
into a function.
Also, the only way to set the disabled hint for a button from outside of
`interface/` was through `UI_block_lock_set()`/`UI_block_lock_clear()`,
for which the usage isn't obvious when you just try to disable a single
button.
2020-09-03 17:46:23 +02:00
d8a80e5949 Revert "Fix T59358: Wrong status bar keymap for release confirms and right click select."
This reverts commit 17905e89a7.
Fix T80429: Transform Tools cannot be cancelled

rB17905e89 better filtered the key items that should appear in the
status bar.

But it is very restrictive since canceling is still possible in other
cases.


# Conflicts:
#	source/blender/editors/transform/transform.c
2020-09-03 12:33:44 -03:00
afb43b881c Sculpt: Face Set Extract Operator
This implements a Face Set Extract operator, which is similar to mask
extract. This operator uses a picker to select and Face Set in the mesh
and extract the geometry directly to a new object.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8599
2020-09-03 17:26:12 +02:00
c8e5924cbb UI: Expose important settings from file browser popovers
We have established a convention of exposing the most important
settings from popovers, then aligning a popover to control more
detailed settings.

The file browser has powerful display / filtering settings, but
they're hidden in popovers at the moment, so it's sometimes a pain
to use them. The "display as" options are now exposed to the left of
the display settings popover, and the "filter" toggle is exposed to
the left of the filter settings popover. This convention is familiar
and intuitive for users and makes interaction faster.

Note that the "show hidden" item in the filter popover still has an
effect if filtering is disabled.

This commit also:
 - Removes the icons in the "Sort By" enum
 - Uses property split for the "Sort By" enum
 - Very slightly increases the default width of the file browser
   window to make room for the new buttons.

Differential Revision: https://developer.blender.org/D8719
2020-09-03 10:02:09 -05:00
eb82b3947e Sculpt: Remove unused code in Clay Strips
This was doing a matrix inversion per vertex per stroke step and it was
unused.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8791
2020-09-03 16:47:18 +02:00
38737f780a Fix cloth brush not working with anchored stroke
All brushes except for grab need delta for tip orientation in order to
work with anchored stroke, not only snake hook, which is the one that
needs it always.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8789
2020-09-03 16:46:36 +02:00
c05715b03f Sculpt: Sculpt Face Set gestures tools
This implements the sculpt gesture lasso and box operators for face
sets. They work the same way as the mask gesture operator and tools.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8716
2020-09-03 16:44:40 +02:00
10d61f34bb Fix clang tidy errors in tests 2020-09-03 16:26:45 +02:00
519b2f937f BLI: add index_range method for StringRef 2020-09-03 16:26:45 +02:00
e7d3d0219b Fix T79718: Eevee OpenVDB render error when frames miss part of the grids
Improved fix that handles the distinct cases of missing grids and zero
size grids.
2020-09-03 16:12:30 +02:00
f0c376a52a Fix T80332: principle volume shader not working for world in Eevee
The handling of missing volume grids for the principled volume shader was
incomplete, different inputs need different default values.
2020-09-03 15:49:41 +02:00
Yevgeny Makarov
96439de784 UI: Reduce limits for the text size theme options
It was possible to increase the text size quite a lot, making text much
bigger than their containing widgets. These new limits makes the maximum
size of text be closer to the widget size.
Note that there needs to be some extra "wiggle room" since fonts may
have quite different glyph sizes. So you can still set the font size to
be slightly bigger than the widgets.

Addresses T80175 and T79059.
2020-09-03 15:42:44 +02:00
Philipp Oeser
f00cb93dbe Fix T63125: Gpencil: bones cannot be selected in weightpaint mode
Some underlying functionality was not ready for greasepencil:
- BKE_modifiers_get_virtual_modifierlist (now introduce dedicated BKE_gpencil_modifiers_get_virtual_modifierlist)
- BKE_modifiers_is_deformed_by_armature
- checks in drawing code
- checks in (pose) selection code

A couple of changes to make this work:
- `eGpencilModifierType_Armature` has to be respected (not only `eModifierType_Armature`)
- `OB_MODE_WEIGHT_GPENCIL` has to be respected (not only `OB_MODE_WEIGHT_PAINT`) --  (now use new `OB_MODE_ALL_WEIGHT_PAINT`)
- `gpencil_weightmode_toggle_exec` now shares functionality from `wpaint_mode_toggle_exec` -- moved to new `ED_object_posemode_set_for_weight_paint`

This patch will also set the context member "weight_paint_object" for greasepencil (otherwise some appropriate pose operators wont work when in weightpaint mode)

Reviewed By: campbellbarton

Maniphest Tasks: T63125

Differential Revision: https://developer.blender.org/D8483
2020-09-03 15:01:50 +02:00
a505a85873 Fix 3D text cursor alignment without any text
Part of fix for T80340.
2020-09-03 21:20:56 +10:00
930021129a Quick effects: avoid error in builds without OpenVDB
Differential Revision: https://developer.blender.org/D8626
2020-09-03 12:56:27 +02:00
a04ac5b52d Fix T80391: Overrides: wrong check in constraint poll
Condition was flipped, would allow actions on constraints coming from
library, but prevented actions on local constraints.

Mistake in rBS0b49fdd0ee0.

Maniphest Tasks: T80391

Differential Revision: https://developer.blender.org/D8793
2020-09-03 12:47:54 +02:00
09f966ad16 Fix mistake in recent font cleanup
7ff7a9c8fd missed incrementing the pointer used for initializing.
2020-09-03 20:14:55 +10:00
Stefan Werner
c8b84a13a5 Make deps: Disabled assembly for GMP on Apple/arm64.
This appears to be a configuration for which GMP has no assembly,
yet the default configure script tries to build it.
2020-09-03 10:11:59 +02:00
3cbfe96681 Object: add BKE_object_obdata_to_type utility function
Move functionality to get the object type from an ID
into it's own function.
2020-09-03 16:27:15 +10:00
c017e1cb67 Fix T80409: Walk rotation speed depends on view size
Use a fixed speed for rotating the view in walk mode,
Keep the current behavior for tablet input and fly mode.
2020-09-03 14:31:26 +10:00
fc6b0c6f85 Fix crash running remesh modifier without OpenVDB 2020-09-03 13:32:53 +10:00
2820f7be76 Fix T80340: Crash with an empty text with Text on Curve
Avoid divide by zero, based on D8780 by @lichtwerk.
2020-09-03 13:28:01 +10:00
7ff7a9c8fd Cleanup: remove redundant Y bounds calculation for text on path
Also correct some comments.
2020-09-03 12:28:22 +10:00
99c3ac17f2 Modifiers: default to exact boolean method ignoring build options
This change doesn't impact release builds,
in general avoid having defaults depend on build options
since it means files from different builds won't match.
2020-09-03 10:07:39 +10:00
14e2596d21 UI: pixel align axis navigation characters to resolve blurry text
Also increase text size from 11 to 12 since the default
font at 1.0 scale was a little fuzzy too.

Reviewed by: @pablovazquez

Ref D8781
2020-09-03 09:33:31 +10:00
Pablo Dobarro
89cdf4f75d Fix Cloth Snake Hook brush not using pressure
The Snake Hook deformation mode was using the same strength as grab (not
supporting pressure), but this deformation mode supports pressure.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8724
2020-09-02 22:33:24 +02:00
fb09bc3c35 Fix T80311: Sculpt Filters not working when using vertical split
All filters were using prevclicx, which is in screen coordinates and
mval[0], which is in region coordinates to get the filter strength.

This fixes the issue in all filters.

Reviewed By: Severin

Maniphest Tasks: T80311

Differential Revision: https://developer.blender.org/D8776
2020-09-02 22:30:59 +02:00
ba4a2a4c8b UI: Use instanced panel custom data instead of list index
For modifier shortcuts we added a "custom_data" field to panels.
This commit uses the same system for accessing the list data that
corresponds to each panel. This way the context is only used once
and the modifier for each panel can be accessed more easily later.

This ends up being mostly a cleanup commit with a few small changes
in interface_panel.c. The large changes in the UI functions are due
to the fact that the panel custom data is now passed around as a
single pointer instead of being created again for every panel.

The list_index variable in Panel.runtime is removed as it's now
unnecessary.

Differential Revision: https://developer.blender.org/D8559
2020-09-02 14:13:26 -05:00
ff7d742350 Quiet all warnings when building Bullet 2020-09-02 21:06:02 +02:00
4446c3a593 Sync Bullet to upstream
This syncs Bullet to the latest upstream git version as of writing this.
(commit 47b0259b9700455022b5cf79b651cc1dc71dd59e).
2020-09-02 20:41:30 +02:00
6f6f6ee186 Fix missing "extern_bullet" library when building rigidbodies 2020-09-02 19:44:29 +02:00
f5e55c3337 Cleanup: use bool instead of int in various places 2020-09-02 19:10:40 +02:00
f20f82ce3e Fix segfaults when deleting objects with upstream bullet lib
Blender tried to free objects twice from the bullet world sometime.

First we would implicity remove all objects when recreating the bullet
world and then explicity try to remove them again from the now empty
world.

This would wouldn't crash older bullet versions, but the recent versions
will as we will try to free objects that no longer exists in the bullet
world.

Also clear the cache on deletion as the object order changes.
Fix T77181: The cache clearing will fix this issue.
2020-09-02 18:35:16 +02:00
9b1f726248 Cleanup: general cleanup of node.c
- reduce variable scope
- use bool instead of int
- use LISTBASE_FOREACH
2020-09-02 18:28:17 +02:00
a8cf9d2f80 UI: Use property split layout for add torus operator
Continuing the work from D8326, this commit adds a property split
layout to the add torus operator. It also puts the properties common
to all object add operators at the bottom for consistency.

Differential Revision: https://developer.blender.org/D8748
2020-09-02 10:34:44 -05:00
4330f147d0 Fix unused variable warning on Windows with WITH_INPUT_IME disabled 2020-09-02 17:32:58 +02:00
c992fd3a3c Cycles: Support WITH_CYCLES_NATIVE_ONLY with MSVC
This change enables the developer option `WITH_CYCLES_NATIVE_ONLY`
for MSVC. This allows a developer to just build the cycles
CPU kernel for their specific system rather than all kernels,
speeding up development.

Other platforms have had this option for years, but MSVC lacks
the compiler switch to target the host architecture hence it
always build all kernels.

This change uses a small helper program to detect the required
flags.

Only AVX/AVX2 are tested, for the following reasons

- SSE2 is enabled by default and requires no flags
- SSE3/4 have no specific build flags for msvc
- AVX512 is not yet supported by cycles

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

Reviewed by: brecht, sergey
2020-09-02 09:19:44 -06:00
1082edfdfd Cleanup: Clang-format 2020-09-02 09:19:14 -06:00
279f7ad8ac Cleanup: Correction to previous cleanup commit
I somehow undid these changes again before committing, sorry for the
noise...
2020-09-02 16:31:23 +02:00
9c3fa99658 Cleanup: Correct argument names in comment
Names were changed in 66b12ef4ab, but the comment wasn't updated.
2020-09-02 16:26:23 +02:00
09ef199965 PY API doc: fix doc for new override option of properties.
Reported by Demeter Dzadik (@Mets) on blender.chat, thanks.

Candidate to be backported to a potential 2.90.1.
2020-09-02 14:59:58 +02:00
1aa54d4921 Make rigidbody simulation handle animated objects gracefully
The animated objects was not updated for each internal substep for the rigidbody sim.
This would lead to unstable simulations or very annoying clipping artifacts.

Updated the code to use explicit substeps and tie it to the scene frame rate.

Fix T47402: Properly updating the animated objects fixes the reported issue.

Reviewed By: Brecht, Jacques

Differential Revision: http://developer.blender.org/D8762
2020-09-02 14:20:41 +02:00
feb4b645d7 EEVEE: Shader tests for Depth of Field
This patch moves the EEVEE depth of field shaders to eevee_shaders.c and
adds them to the eevee shaders test suite.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D8771
2020-09-02 13:03:06 +02:00
d851b38185 Cleanup: improve internal function name in 'ngon_tessellate' 2020-09-02 19:33:47 +10:00
cf67ba848f WM: add use_factory_startup option to read homefile operator
There was no way to reset the current file to factory settings
without reloading the preferences (which disables & re-enables add-ons),
this slows down resetting files and can complicate tests.
2020-09-02 17:50:20 +10:00
428a1aaf73 UI: add back Layout.introspect
Add back this function, removed 2e14b7fb97.

Useful for checking operators used in menus.
2020-09-02 15:58:44 +10:00
89ed6b1293 UI: simplify tool-tip logic for operators
- Use WM_operatortype_description to get the operator description.
- Pass properties to WM_operatortype_name,
  so the operator name callback is used.
- Add UI_but_operatortype_get_from_enum_menu function
  to access the operator from enum menus.
- Change WM_operatortype_description to return NULL when there is no
  description, use WM_operatortype_description_or_name
  when either can be used.
2020-09-02 13:01:04 +10:00
ddea2f234f Fix crash accessing image space properties without an active window 2020-09-02 12:44:37 +10:00
957346694d Cleanup: spelling, rename attachement -> attachment 2020-09-02 10:04:50 +10:00
71aa3c864d Cleanup: spelling 2020-09-02 09:58:26 +10:00
ba188e7218 UI: Remove unecessary panel_free_block function
This function was called when the modifier list changes and the panel
list has to be rebuilt. Originally I thought it was necessary to to remove
the block immediately when the panel was removed, but we can just
leave it and it will be removed later in the UI drawing process.

Removing this results in fewer string lookups.
2020-09-01 17:29:17 -05:00
f6ab6dd91a Cleanup: Reduce indentation level and variable scope
Exit early in some functions to reduce indentation level, declare
variables where they are initialized, and also  clean up some
comment formatting.
2020-09-01 16:39:46 -05:00
Stefan Werner
009971ba7a Cycles: Separate Embree device for each CPU Device.
Before, Cycles was using a shared Embree device across all instances.
This could result in crashes when viewport rendering and material
preview were using Cycles simultaneously.

Fixes issue T80042

Maniphest Tasks: T80042

Differential Revision: https://developer.blender.org/D8772
2020-09-01 21:00:55 +02:00
f2d26409e8 Fix T80233: Extrude manifold can generate invalid geometry
Faces with only 2 sides were sometimes generated.
2020-09-01 15:25:30 -03:00
Imre Palik
f6dc6caa15 Fix Cycles build error when disabling some kernel features
Differential Revision: https://developer.blender.org/D8372
2020-09-01 19:14:31 +02:00
2930d4fcea Fix T80031: UI: Use a more specific label for stencil mask opacity
This is not the opacity of the vertex colors itself but of the stencil 
mask.

Follows up on rBbb4478f2fdd8426d6050bf7b7c09611afeb1bd14
2020-09-01 12:56:22 -04:00
d6a9783b71 Cleanup: GLFrameBuffer: Reduce indentation 2020-09-01 18:42:46 +02:00
7edd60b35b GLFramebuffer: Avoid calling method on a partially destroyed GLContext
This avoid an ASAN runtime error.
2020-09-01 18:42:37 +02:00
3c54db4a4e Audaspace: port compilation fix from upstream. 2020-09-01 18:12:48 +02:00
a92ab93c7d Fix T79553: StretchTo constraint: Apply Pose changes bone length
Recompute Rest Length stored in the StretchTo constraint after applying
the current pose as rest pose.

The "Apply Pose as Rest Pose" operator applies the evaluated pose as
rest pose, which means that the change in bone length from the StretchTo
constraint is applied to the rest pose. The bug was caused by the fact
that the StretchTo constraint wasn't updated for the new pose, and thus
still applied the same scale factor to the new pose, effectively
doubling its effect.

The "Apply Pose as Rest Pose" operator now forces a recompute of the
rest length cached in the StretchTo constraint data. As a result, the
length of the bone before and after the pose is applied remains the
same. The X and Z scale (perpendicular to the bone length) are reset to
1.0, as with the applied pose the bone isn't stretched or squashed any
more.
2020-09-01 17:57:42 +02:00
23767937ef USD: remove library initialisation hack
Remove the hack for library initialisation; this is no longer necessary
as the required information can be passed to the USD library after its
static initialisers have run.

This new approach is compatible with both the patched and original USD
library. This means that platform maintainers don't need to rebuild the
USD library until the next upgrade.

Manifest Task: https://developer.blender.org/T80320
2020-09-01 17:29:01 +02:00
fef1a6c54e USD: move library initialisation from main() to USD module
Initialize the USD library when used (instead of at startup), so that
this can happen inside the IO/USD module. This makes calls to the USD
library local to Blender's USD code.

Note that failure to find the USD JSON files will now only be reported
when the USD exporter is used, and not on every startup of Blender.

This is the first step in cleaning up the way Blender patches and
initialises the USD library.

Manifest Task: https://developer.blender.org/T80320
2020-09-01 17:28:05 +02:00
f1b10477c2 GPUOffscreen: Remove scissor and viewport state tracking
This was a workaround that is not needed anymore.

Fix FT80321 Cropped output with Viewport Render Animation
2020-09-01 17:22:57 +02:00
907a718ebe Fix T80224: Crash after duplicating and hiding vertices while using X Axis Mirror
The mirror map can reference a hidden vertex that is currently ignored
in the transformation.

Thus the mirror element array is not filled.
2020-09-01 12:13:34 -03:00
eb911610d0 Fix ugly alignment of "Mono" option in the Sequencer
Steps to reproduce were:
* Open Sequencer, add a sound strip
* In the sidebar, open the Adjust > Sound sub-panel
* Note the placement of the "Mono" item

The layout code would disable decorators if a property came from a
non-animatable data-block type. Doing so would mess up the alignment
where properties from different data-block types were be mixed.
This is not the case any more.

Note that when actually adding the decorator, a blank icon is inserted
to keep the alignment intact when the data-block type isn't animatable.
So the decorator is still not shown, but the alignment looks fine.

This may affect more cases. If so, and if that's an issue, the
decorators should be explicitly disabled.
2020-09-01 17:10:42 +02:00
ee393f9821 Fix (unreported) GPencil cannot deselect points with box/lasso select
Selecting in empty space wasnt considered as 'changed'.

Differential Revision: https://developer.blender.org/D8770
2020-09-01 17:03:09 +02:00
fec522be6a Fix T79941: mantaflow cache doesn't work with ' character in path
The fix is to escape the `'` character as well.

Reviewers: sebbas

Differential Revision: https://developer.blender.org/D8773
2020-09-01 16:33:32 +02:00
a708cdabe6 Fix T80328 Commit introduced build warnings in Windows 2020-09-01 16:16:48 +02:00
7e3967ed37 Gizmo: Navigate: Make use of UI_draw_roundbox_4fv
This improves circles AntiAliasing, and line antialiasing.

This keeps the old drawing method (3d spheres) for the selection pipeline.

This was suggested by @harley on devtalk.
2020-09-01 16:08:50 +02:00
998b680e5b UI: Widget: Add conservative raster to avoid cut widget borders
This avoids incorrect AA when the widget is not perfectly alligned with the
pixel grid.
2020-09-01 16:08:50 +02:00
31004ef48e Transform: Keymap: Enable Auto Constraint with Middle Mouse + Shift 2020-09-01 10:59:16 -03:00
c7287ffaec Transform: remove MOD_CONSTRAINT_PLANE
It conflicts with MOD_PRECISION and was not really working properly.
2020-09-01 10:50:50 -03:00
8170c92ed4 Fix constrain plane masking shift event
This prevented transformation with a precision modifier.
2020-09-01 10:38:37 -03:00
26d5c24f0a Fix T80258: UILayout.prop_search() issues with datablock names
If the search menu was used for a string property, and a data-block was
selected from the search, the value set would be an invalid name. The
property would get the modified UI string, not the proper data name set.

This problem was already once solved in rB249ccab111ac, but resurfaced
in rB937d89afba36.

Now only use the modified UI string if requires_exact_data_name is not
true.

Note: the comments in rB249ccab111ac [reg. library hints and string
properties, also that pointer properties are preferred over string
properties when dealing with IDs] still apply.

Reviewers: campbellbarton

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

(cherry picked from 2.90 commit
cb0b0416f4)
2020-09-01 15:24:26 +02:00
9259052e15 Fix T64267: 'Add Snap Point' does not work with Ctrl pressed 2020-09-01 09:53:35 -03:00
Germano Cavalcante
526fbdec3b Transform: Move some hardcoded keyitems to keymap_data in python
Keymaps must be customized by the user.

But this is not the case for hardcoded keymaps.

Also the repetition of hardcoded and user-defined keyitems may induce
the user to think they have made a mistake or it is a bug.

Differential Revision: https://developer.blender.org/D6454
2020-09-01 09:39:06 -03:00
Stefan Werner
17cf500101 Cycles: Fixed Cycles standalone build.
The node refactor in 429afe0c62 was missing in the standalone code.
2020-09-01 14:13:17 +02:00
07899ddd22 Fix double include of gmp.cmake
This fixes `make deps` complaining about the `extern_gmp` project being
defined twice.
2020-09-01 12:39:58 +02:00
d6d2897ef0 Sequencer: Fix crash caused by stereo rendering fix
Caused by rB2e908156d0c7

This was caused by the sequencer timeline area not using a GPUViewport
but still using `sequencer_draw_preview`.
2020-09-01 12:03:52 +02:00
991eb5f79c Cleanup: GPUContext: Remove unused functions 2020-09-01 12:03:52 +02:00
a6185e4fa5 OCIO: Make GLSL implementation use GPUUniformBuf to avoid debug errors
Now that we use internal state info, we require drawing that uses the
GPU api to use it throughout the whole pipeline. This is in order to
track the GL state and do our own error checking.
2020-09-01 12:03:52 +02:00
53a806f6df GPU: Move UBO binding validation to GL backend
This also make the validation quicker by tracking the currently
bound slots.
2020-09-01 12:03:52 +02:00
5ec0250df9 EEVEE: Volumetric: Fix Mesa Compiler error
The compiler does not seems to understand the `const` in the
function declaration and complains about non constant indexing
of unsized array.
2020-09-01 12:03:52 +02:00
ccf476f8af EEVEE: Volumetric: Fix missing UBO
This is undefined behavior on certain system.
2020-09-01 12:03:52 +02:00
f818d1d636 Cleanup: Fix warnings in our intern bullet api wrapper
No functional changes.
2020-09-01 12:01:50 +02:00
Stefan Werner
45da7ce177 Cycles: Followup fixes for node ownership refactor.
There were some places where nodes still would end up without owners.

See D8540 and 429afe0c62
2020-09-01 11:47:54 +02:00
e8be55a485 Fix: Active rigidbodies would not recive updates after the stopped being animated
Because depsgraph isn't rebuild for animated properies, we have to
assume that active bodies will always want to have updates from the
rigidbody simulation.
2020-09-01 11:41:44 +02:00
c2df6658ee CMake: Fix linking errors with gmp library
gmpxx library (C++ version of gmp) uses symbols from libgmp, which means
the libgmp is to be passed to the linker after libgmpxx.
2020-09-01 11:31:47 +02:00
114150e80c Fix compilation error with -Werror=array-bounds
This error happened only with O2 or O3 in my tests.
Casting to uintptr_t and back seems to quiet the compiler.
2020-09-01 11:11:21 +02:00
1449ae042e Cleanup: EEVEE bloom shaders
- moved to eevee_shaders
- added to test suite

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D8763
2020-09-01 10:57:20 +02:00
c78c425266 PyAPI: expose 'bl_options' for operators in bpy.ops
Useful for checking which operators are only for internal use.
2020-09-01 17:02:51 +10:00
06ba233374 RNA: rename Area.ui_type 'VIEW' enum identifier to 'IMAGE_EDITOR'
The term makes sense in the image editor, but not among other editors
where we had both VIEW and VIEW_3D.
2020-09-01 16:35:47 +10:00
87aa13d025 PyAPI: prevent leading comma when printing some enums
BPy_enum_as_string (used for creating error messages)
showed a leading comma for enums that used category headings.

While harmless, it looks odd.
2020-09-01 16:32:11 +10:00
76f513f6dc Fix T78601: User count errors when reading home-file
Calling: bpy.ops.wm.read_homefile(use_empty=True)
exposes invalid user-counts in versioning code.

Simplified logic for assigning materials in versioning code.

Caused by 29f3af9527.
2020-09-01 15:00:48 +10:00
a241948ad9 Fix errors ensuring grease pencil palette
- Direct assignment caused ID user counts to be invalid.
- The first palette would always be used,
  even when the named palette searched for was found.

Also pass 'const' string to `hex_to_rgb`, avoid casting to 'non-const'.
2020-09-01 15:00:48 +10:00
d9d0a386cb Cleanup: don't register mix-in menu class
The class is only used as a base for other menus.

This caused complications for tests that inspect menu contents.
2020-09-01 15:00:48 +10:00
8c86c55035 Cleanup: correct doxy sections 2020-09-01 15:00:48 +10:00
bb4478f2fd Fix T80031: UI: "Stencil Opacity" is vague
This affects the mask opacity not the stencil itself.
2020-08-31 23:30:18 -04:00
12c0ecc934 Fix T80100: To sphere tooltip uses "vertices" even in object mode 2020-08-31 23:30:18 -04:00
4e06afb0a1 GL: Fix two GLerror
The gizmo one was only reproducible in debug builds.
The GLImmediate one was only affecting amdpro drivers when --debug-gpu was
enabled.
2020-09-01 00:30:36 +02:00
7f95d780e8 GLImmediate: Use CL_CHECK_ERROR
This provides a bit more debugging info on MacOS.
2020-09-01 00:30:36 +02:00
9d932b426f GL: Move MacOS debug callback to gl_debug.cc
And format to use the same callback as standard debugging layer.
2020-09-01 00:30:36 +02:00
82a197cc7f GPUDebug: Reformat GL debug callbacks and move them to GL backend
Now the callbacks are setup for each debug context.

The formating has been reworked to be less verbose and make errors
and warnings stand out from the notifications.
Errors are most of the time sufficiently explicit in their message.

This also remove the support for AMD_debug_output which is 10 years old.

This is related to the Vulkan port T68990.
2020-09-01 00:30:36 +02:00
058d29ed9a GHOST: Enable debug context on offscreen context too
This was a long standing TODO. This was also preventing debug callbacks
form other context than the main window.
2020-09-01 00:30:36 +02:00
13b0a697a0 Cleanup: GPU: Remove GPU_draw_primitive and default_vao_
These are not used anymore and can be replicated using the GPUBatch API.
2020-09-01 00:30:36 +02:00
052538edc1 Cleanup: Use GPUBatch for icon and area drawing
This is in order to remove GPU_draw_primitive to streamline the drawing
abstraction.
2020-09-01 00:30:36 +02:00
3e7feaff44 Cleanup: Comment formatting in unit.c 2020-08-31 14:18:06 -05:00
fc8533a3c9 New Boolean: Always expose solver propery, add warning
After discussion with @howardt, it seems the solver property should
always be exposed, even in lite builds. This commit removes the
ifdefs for that property and adds a warning if the "Exact" solver is
used when Blender is compiled without GMP.

These changes apply to the boolean modifier as well.
2020-08-31 11:49:22 -05:00
7056f180d3 cleanup: Fix GMP spacing in cmake configurations
It now follows the spacing around it.
2020-08-31 09:42:58 -06:00
3014b5efc8 Fix unused parameter warning in snap_increment_apply_ex()
No functional changes.
2020-08-31 17:37:48 +02:00
f5866f484f Remove patch for HDF5 library
Delete `hdf5.diff`, because it's no longer used. Since Blender 2.90 the
optional support for HDF5 has been dropped, but this file accidentally
wasn't deleted.

See 0102b9d47e and 0c38436227.

No functional changes.
2020-08-31 17:32:28 +02:00
Germano Cavalcante
546b900194 Cleanup/Refactor: Split the snap to increments code
Now we have a better distinction of what is snap to grid and what is
snap to increments.

The code also allows the implementation of mixed snap for these modes.
2020-08-31 11:24:37 -03:00
a1df2fc443 Cleanup: GPU: Remove unused attr_binding and primitive code 2020-08-31 15:15:04 +02:00
1804eb57fd GPUImmediate: GL backend isolation
This is part of the Vulkan backend task T68990.

This is mostly a cleanup, however, there is a small change:
We don't use a special Vertex Array binding function for Immediate
anymore and just reuse the one for batches.
This might create a bit more state changes but this could be fixed
easily if it causes perf regression.

# Conflicts:
#	source/blender/gpu/intern/gpu_context.cc
2020-08-31 15:14:47 +02:00
1b3a0ae231 GLContext: Fix framebuffer deletion to GPUContext
This has more meaning as it's the base class who holds the pointer.

# Conflicts:
#	source/blender/gpu/opengl/gl_context.cc
2020-08-31 15:13:26 +02:00
a54fb081ba Cleanup: GPU_immediate: Change assert to BLI_assert 2020-08-31 15:10:38 +02:00
Germano Cavalcante
a440060142 Fix T79973: Re-ordering face maps messes up the names of other face maps
Use a remap function instead a swap.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D8739
2020-08-31 09:00:48 -03:00
c83ef9d7b2 Cleanup: reduce variable scope 2020-08-31 13:59:33 +02:00
e9da71ae2d Cleanup: reduce variable scope and use LISTBASE_FOREACH 2020-08-31 12:55:51 +02:00
c5b9bf32e9 Fix T80126: Alembic Import dialogue has overwrite protection UI
Use `FILE_OPENFILE` when importing, rather than `FILE_SAVE`.

Reviewed By: sybren

Differential Revision: https://developer.blender.org/D8715
2020-08-31 12:39:01 +02:00
1c2ade053a Linux: 2.90 release information in appdata 2020-08-31 11:21:01 +02:00
6879798202 Cleanup: Resolve unused variable warning in lite build 2020-08-30 22:47:05 -05:00
596b30a080 Clang Tidy: Fix readability-delete-null-pointer warnings 2020-08-30 18:58:40 -05:00
429afe0c62 Cycles: introduce an ownership system to protect nodes from unwanted deletions.
Problem: the Blender synchronization process creates and tags nodes for usage. It does
this by directly adding and removing nodes from the scene data. If some node is not tagged
as used at the end of a synchronization, it then deletes the node from the scene. This poses
a problem when it comes to supporting procedural nodes who can create other nodes not known
by the Blender synchonization system, which will remove them.

Nodes now have a NodeOwner, which is set after creation. Those owners for now are the Scene
for scene level nodes and ShaderGraph for shader nodes. Instead of creating and deleting
nodes using `new` and `delete` explicitely, we now use `create_node` and `delete_node` methods
found on the owners. `delete_node` will assert that the owner is the right one.

Whenever a scene level node is created or deleted, the appropriate node manager is tagged for
an update, freeing this responsability from BlenderSync or other software exporters.

Concerning BlenderSync, the `id_maps` do not explicitely manipulate scene data anymore, they
only keep track of which nodes are used, employing the scene to create and delete them. To
achieve this, the ParticleSystem is now a Node, although it does not have any sockets.

This is part of T79131.

Reviewed By: #cycles, brecht

Maniphest Tasks: T79131

Differential Revision: https://developer.blender.org/D8540
2020-08-30 23:49:38 +02:00
19363880a6 New boolean: silence an "unused" warning.
Previous commit stopped using some functions. Since I may need
them again for future performance tuning, these are just ifdef'd out
for now.
2020-08-30 14:11:36 -04:00
3fa1280132 Fix T79940 VSE Editor crash when opening a different scene as a strip
This was caused by a double lock of the DRW context mutex.

This changes the logic a bit by releasing the DRW context before rendering
with BKE_sequencer_give_ibuf and restoring it after.

Critical fix for 2.91

Reviewed By: dfelinto
Differential Revision: https://developer.blender.org/D8657
2020-08-30 19:58:54 +02:00
19c9b27ffe New boolean: another performance improvement.
Instead of calculating exact normals for all faces, just do it
for those that potentially intersect. A big improvement for dense
meshes that only intersect in relatively few places.
2020-08-30 13:47:18 -04:00
ade8d84fe3 GPUFrameBuffer: Fix build error on MSVC
This also gets rid of the macro.
2020-08-30 19:07:49 +02:00
0299817e0e Fix T80138 Node Editor: Add Frame turns background gray
The removed `UI_ThemeClearColor` made no sense in this context. It must
have been a leftover from previous refactor.
2020-08-30 18:24:19 +02:00
3699d6fe34 Re-enable modifer and bmesh_boolean tests.
These were disabled in the newboolean merge commit.
This commit renables them, using the original 'FAST' solver
so that the result objects need not change.
A TODO to add more tests using the 'EXACT' solver,
though most functionality there is now covered by unit gtests.
2020-08-30 08:31:40 -04:00
dee665b462 GPUShader: Improve shader compilation log
- Print shader type (fragment, vertex, geom)
- Support for Apple + intel error format.
- Handle formatting a bit more gracefully.
2020-08-30 13:35:25 +02:00
ad5d5d3f3b EEVEE: Fix broken rendering caused by SSR + Alpha blended material
This was affecting Mesa drivers as well as AMD pro driver. But it
might have been noticeable on other config too.

This was introduced by rBa9f2ebb21508.
2020-08-30 13:11:03 +02:00
d98c722a5a GPUFramebuffer: Tag dirty after recursing downsample
Also do not bind automatically. This is fine since the framebuffer will
update next time it's bound.
2020-08-30 13:11:03 +02:00
8527d84d35 GPUState: Move Scissor and Viewport state to framebuffer
This way it is way clearer what each viewport state is. There is
no more save and reset. The scissor test is also saved per
framebuffer.

The only rule to remember is that the viewport state (size and
origin) is reset for both the viewport and scissor when a texture
is attached or detached from an attachment slot.
2020-08-30 13:11:03 +02:00
4f395c84fe BLI_math_vector: Add equals_v4v4_int 2020-08-30 13:11:03 +02:00
0f372f3966 GPUContext: Update internal framebuffer size when activating context
This is to ensure the FrameBuffer extents are always up to date.
2020-08-30 13:11:03 +02:00
bb530a77b6 BLI_utildefines: Fix assignment in binary ops for ENUM_OPERATORS
That was an overlook from the review when we introduced it.
2020-08-30 13:11:02 +02:00
83f144b176 WM: Remove 10year old workaround for buggy drivers
This should have no consequence nowadays.
Can be reverted if needed.
2020-08-30 13:11:02 +02:00
832a975c2c GPUUniformBuf: Fix debug name being shorter than release name 2020-08-30 13:11:02 +02:00
f69c7a7ff9 Cleanup: GPUContext: Remove default_framebuffer_
This is now handled by FrameBuffer wrapping.
2020-08-30 13:11:02 +02:00
807817c0c4 GPUFrameBuffer: Use debug name support
This is to make it easier to navigate captures in renderdoc.
2020-08-30 13:11:02 +02:00
f3a65a1b4a GPUFrameBuffer: GL backend isolation
This is related to the Vulkan port T68990.

This is a full cleanup of the Framebuffer module and a separation
of OpenGL related functions.

There is some changes with how the default framebuffers are handled.
Now the default framebuffers are individually wrapped inside special
GLFrameBuffers. This make it easier to keep track of the currently bound
framebuffer state and have some specificity for operations on these
framebuffers.

Another change is dropping the optimisation of only configuring the
changed attachements during framebuffers update. This does not give
any benefits and add some complexity to the code. This might be brought
back if it has a performance impact on some systems.

This also adds support for naming framebuffers but it is currently not
used.
2020-08-30 13:11:02 +02:00
0850afb34e Cleanup: GPU: Remove unused init/exit functions 2020-08-30 13:11:02 +02:00
6e901fd8fc GPUFramebuffer: Make GPUFrameBuffer an opaque type
This is in preparation of the Framebuffer GL backend.

This is a just changing types and moving some code.
No logic is changed... almost... it just removes the context attach.
i.e: `gpu_context_add/remove_framebuffer()`
This is not needed for now and was even disabled in release.

This is part of T68990.
2020-08-30 13:11:02 +02:00
ed7dbaa5a7 GPUState: Fix missing writemask encapsulation
This was the last remaining.
2020-08-30 13:11:02 +02:00
b1b1be1754 Object: support multiple objects for limit-total vertex groups
Also add this to the "Clean Up" menu.
2020-08-30 18:53:24 +10:00
12bc34b0b8 Object: add ED_object_array_in_mode_or_selected
Use this utility function for render-shading & weight paint modes.

This adds support for edit-mode & pose-mode where all objects in the
mode are used in this case instead of the selected objects.
2020-08-30 18:53:19 +10:00
1a623c183f UI: add "Object -> Clean Up" menu
Useful to perform cleanup operations on many objects at once,
also these operations weren't accessible from the search menu.

This follows the convention for other clean up menus
when editing mesh, curve & grease-pencil.

Resolves issues raised in T80011
2020-08-30 13:48:35 +10:00
530ccde909 Object: support removing unused weights for selected objects
This is useful to run in object-mode, instead of from the property editor,
note that this still only used the current object when activated from
the property editor.
2020-08-30 13:48:35 +10:00
1a650fdcb2 Object: support removing unused material slots for selected objects
This is useful to run in object-mode, instead of from the property editor,
note that this still only used the current object when activated from
the property editor.
2020-08-30 13:48:30 +10:00
47908f0155 Operator: expose ED_operator_object_active_local_editable_ex
Support calling this function with an object argument,
useful for implementing filter functions that loop over objects.
2020-08-30 13:42:28 +10:00
2778937fb6 BKE_layer: add BKE_view_layer_array_selected_objects_params
Useful for similar situations as BKE_view_layer_array_from_bases_in_mode_params
without depending on the active objects mode.
2020-08-30 13:42:28 +10:00
e06050945e Cleanup: pass v3d as const to view layer utilities 2020-08-30 13:42:28 +10:00
3abbae2d7c UI: Use term "Plasticity" instead of "Plastic" 2020-08-29 23:30:53 -04:00
3789aa8506 New Boolean: performance improvement.
Avoided cost of searching for coplanar clusters in many cases.
2020-08-29 17:48:01 -04:00
d8585e184a New boolean: fixed a bug in coplanar intersect.
The code that found coplanar clusters was not updating a bounding box.
Also, code that was detecting non-trivial coplanar intersects was
slightly wrong, but that would not have caused any functional problems.
2020-08-29 11:31:47 -04:00
014276a11c Cleanup: spelling 2020-08-29 18:56:08 +10:00
bfa78aceed Cleanup: remove paranoid 'MDeformVert.totweight < 0' check
This was added in 1cb7267a9f, however the behavior before this
would have failed on negative values already.

Also negative values here would fail in many other places.
2020-08-29 10:48:33 +10:00
141a3e6d47 Boolean Modifier: Reorder properties
Properties that display conditionally depending on other properties
should generally be lower down so the movement of buttons as
settings are tweaked is less intrusive.
2020-08-28 16:41:13 -05:00
f34653e498 Clang Tidy: Fix readability-delete-null-pointer warning 2020-08-28 16:20:25 -05:00
5c5d43fd66 Clang Tidy: Fix no lint marker placement
There was a line between the NOLINTNEXTLINE marker and the function.
2020-08-28 16:12:47 -05:00
91bbf96c1d Revert "tmp"
This reverts commit b78a439e90.

This was committed by mistake, and including BLI_winstuff.h on non-windows
platforms results in an error.
2020-08-28 15:29:10 -05:00
pembem22
d8283a1f89 UI: Improve curve grid drawing code
This patch fixes assert on grid drawing. `for` loops are used instead
of `while` loops to make sure the number of lines is exact. The old
code draws lots of unnecessary lines offscreen. This bug is fixed as
well. See the patch for a comparison without a scissor test.

Differential Revision: https://developer.blender.org/D8745
2020-08-28 15:22:36 -05:00
744eb1172e Fix T80195: crash when invoking tooltips on MacOS
Problem introduced in rBadd48c007428.
`UI_but_string_info_get` can change the value of the args.
2020-08-28 17:09:19 -03:00
b78a439e90 tmp 2020-08-28 17:09:19 -03:00
8f5b9fb519 Fix for T75369: Text Editor Line Color
Use correct text color when syntax highlighting is off but line numbers are on.

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

Reviewed by Hans Goudey
2020-08-28 09:58:48 -07:00
c0eb6faa47 UI: Do Not Display Negative Zero Floats
Display negative zero floats as regular zero. Does not alter underlying value.

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

Reviewed by Brecht Van Lommel
2020-08-28 09:30:51 -07:00
285353c252 Cleanup: clang-format 2020-08-28 10:04:26 -06:00
79e82dbc05 cleanup: Fix style issue in sculpt.c
At first sight this code should not build at all
but due to the use of macro's that look like functions
this seemingly has no issues building.

Clang-format alerted me to this strange bit of code
by placing the `if` on it's own line for some reason.

added the missing brackets, and clang-format is happy
again.
2020-08-28 10:03:52 -06:00
7844486e47 Change cmake configs for full and release to enable WITH_GMP. 2020-08-28 11:49:10 -04:00
1cb7267a9f Cleanup: Fix build error with msvc
`ssize_t` is not a standardized type (it's a posix type)
given the line in question here is calculating the size
of a memory allocation there's no logical way this
should ever be negative.

I do not know this code too well and was unsure if
`mdverts->totweight` could ever be < 0, so I protected
it with a clamp, just in case.
2020-08-28 09:47:52 -06:00
4749bd2277 Fix to previous commit to allow building without WITH_GMP. 2020-08-28 11:43:56 -04:00
9e09b5c418 Merge newboolean branch into master.
This is for design task T67744, Boolean Redesign.
It adds a choice of solver to the Boolean modifier and the
Intersect (Boolean) and Intersect (Knife) tools.
The 'Fast' choice is the current Bmesh boolean.
The new 'Exact' choice is a more advanced algorithm that supports
overlapping geometry and uses more robust calculations, but is
slower than the Fast choice.
The default with this commit is set to 'Exact'. We can decide before
the 2.91 release whether or not this is the right choice, but this
choice now will get us more testing and feedback on the new code.
2020-08-28 11:01:06 -04:00
4a17508c6d Merge branch 'blender-v2.90-release' into master 2020-08-28 16:58:40 +02:00
62e2d92aed Blenloader: add api function for accessing packedfile address map
This is needed to move direct_link_packedfile out of readfile.c for T76372.
2020-08-28 16:57:34 +02:00
ddbf41d88d Fix T80104: Crash on making material local.
Problem is again with the embedded data, we want to make those local
together with their owner ID, but sometimes we are actually dealing with
copies here, which are inheritently already local.

Code did not considered that possibility before, leading to access to a
NULL `lib` pointer.

This should also be back-ported to 2.83 LTS release.

Maniphest Tasks: T80104

Differential Revision: https://developer.blender.org/D8731
2020-08-28 16:51:16 +02:00
5086bdfe0b Fix T80064: Adding mask curve points doesn't work around endpoints 2020-08-28 11:50:21 -03:00
368f8f7404 Blenloader: new api function to check if reading is for undo 2020-08-28 16:29:55 +02:00
7b2fe4c9ec Refactor: move Lattice .blend I/O to IDTypeInfo callbacks 2020-08-28 16:10:17 +02:00
8815996418 Refactor: move Mesh .blend I/O to IDTypeInfo callbacks
I'm also adding `BKE_id_blend_write`, so that it can be accessed
outside of `readfile.c`.
2020-08-28 15:49:14 +02:00
5db5ac611a GPU: Fix Segmentation Fault Freeing Failed Shader
The CPP Shader class does not initialize the interface attribute.
What will crash when deleting the shader.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D8740
2020-08-28 15:45:07 +02:00
b8f990b0b4 Revert "GPU: Fix Segmentation Fault Freeing Failed Shader"
This reverts commit c284326809.
2020-08-28 15:43:14 +02:00
0ed7aedc71 Fix building without bullet support
The new BKE_rigidbody_is_affected_by_simulation function was in side the
WITH_BULLET ifdef guard.
2020-08-28 15:28:15 +02:00
b4a608c11c Merge branch 'blender-v2.90-release' into master 2020-08-28 15:09:42 +02:00
4fdd8452a6 DNA: add pragma once to dna_type_offsets.h
Sometimes, this generated file is included more than once,
so it should have an include guard.
2020-08-28 15:05:47 +02:00
8726354d46 Fix Rigidbody depsgraph passive and constraint transform relations.
We need to have transforms from passive objects if they are animated or
driven by parent relations. This is not immediately obvious as the
object transform matrix will still be available, it is just one frame
behind in some cases.

Fixed dependency cycles if there is a constraint between two rigid
bodies. Because bullet keeps track of its simulated bodies, we do not
need to supply objects transforms as bullet should already have them.

I need combine these two fixes because otherwise we will get depsgraph
warnings that nodes are missing that it expects to be there.

Reviewed By: Sergey, Jacques

Differential Revision: http://developer.blender.org/D8732
2020-08-28 14:55:59 +02:00
df8a63bb9c Fix T80078: Overrides: Crash with animated IK control on linked armature.
Issue was with our dear posebones again... when applying overrides we
keep the same address/pointer for the IDs themselves, (which avoids us
the need to remap their usages), but their inner data is often
re-allocated.

Therefore, we need once again to go over armature objects and invalidate
their posebone pointers.

This should also be back-ported to Blender LTS 2.83.

Maniphest Tasks: T80078

Differential Revision: https://developer.blender.org/D8734
2020-08-28 14:53:22 +02:00
Jeroen Bakker
0852ecd844 DrawEngine: Shader Test Suite
A test case that compiles all the GLSL shaders for workbench, gpencil, overlay and some
of eevee. Compilation is still platform dependent, but when run on a test-farm
with different hardware we will be able to detect GLSL compilation
errors early on.

The test will be compiled when `WITH_GTEST` and `WITH_OPENGL_DRAW_TESTS`
are On.

For eevee only the shaders inside eevee_shaders.c are included. EEVEE has some shaders
located inside the submodule. They aren't accessible to the outside and aren't added
to the test case. We should see how we want to add them. For the test cases it is better
to move them to eevee_shaders.c, but for eevee perspective it is better to keep them in
the submodule. Keeping them in the submodule could lead to situations that is harder to test.
as the shader could already have been initialized.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D8667
2020-08-28 14:47:27 +02:00
Jeroen Bakker
2654e9c9c1 Fix T80141: Fix Compiling Workbench Volume Shaders (Mesa 20.0.8)
Default mesa driver for ubuntu 20.04 fails when a name is defined twice.
M_PI is defined in both `common_workbench_lib` and `common_math_lib`. This patch
remove the define out of common_workbench_lib

For reference it fails on https://github.com/mesa3d/mesa/blob/mesa-20.0.8/src/compiler/glsl/glcpp/glcpp-parse.y#L1186
during the check if the macros are the same.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D8741
2020-08-28 14:41:41 +02:00
Jeroen Bakker
922aac999d Fix T79920: Fix Compiling EEVEE Volume Shaders
There were some missing UBO bindings, what asserted in debug mode.
This patch fixes this by binding the missing UBO's

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D8742
2020-08-28 14:40:06 +02:00
Jeroen Bakker
3198fec1fe Fix T80160: Workbench shadows are broken
In recent refactoring {a9f2ebb21508} an issue was introduced that the
opengl rasterizer would be disabled when only writing to a stencil
buffer.

This fix adds stencil writing to the write mask and set it. This makes
the write map not evaluate to GPU_WRITE_NONE and the rasterizer will be
enabled in `GLStateManager::set_write_mask`.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D8743
2020-08-28 14:38:33 +02:00
df8e2c76c9 Merge branch 'blender-v2.90-release' 2020-08-28 14:35:04 +02:00
Jeroen Bakker
c284326809 GPU: Fix Segmentation Fault Freeing Failed Shader
The CPP Shader class does not initialize the interface attribute.
What will crash when deleting the shader.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D8740
2020-08-28 14:32:29 +02:00
a48d78ce07 Refactor: move CustomData .blend I/O to blenkernel
This is part of T76372.
2020-08-28 14:30:45 +02:00
3dc222ea7b Refactor: move defvert .blend IO to blenkernel
This is part of T76372.
2020-08-28 14:30:45 +02:00
65dcf812a5 Fix T80182: Curve [Edit Mode] : Can't Deselect Control Point with Select Box
Caused by rB49f59092e7c8: Curves: Implement Handles for selected points
only

Changes from deselecting all were not considered as changes anymore.

Maniphest Tasks: T80182

Differential Revision: https://developer.blender.org/D8744
2020-08-28 14:28:57 +02:00
2bb60db94a Merge branch 'blender-v2.90-release' 2020-08-28 14:00:51 +02:00
0e021414fe Cleanup: improve function names
With this change, the three .blend read operations: data reading, lib reading
and expanding are more grouped together.
2020-08-28 13:18:24 +02:00
a443287908 IDTypeInfo: add .blend file io callbacks
This is part of T76372.
It adds the `blend_write`, `blend_read_data`, `blend_read_lib`
and `blend_read_expand` which correspond to the various
steps when reading and writing .blend files.
Having these callbacks allows us to decentralize the blenloader
code a lot more. This has the affect that code related to any
specific ID type is less scattered.

Reviewers: mont29

Differential Revision: https://developer.blender.org/D8670
2020-08-28 13:05:48 +02:00
d3f2037966 Fix T80149: Cycles OpenCL baking broken after changes to uses tiles for baking
We forgot to update this code as part of D3108. I'd like to include this in 2.90,
it's entirely broken now so can't really get any worse.

Differential Revision: https://developer.blender.org/D8738
2020-08-28 12:53:50 +02:00
346023b457 Cleanup 'make vertex parent' operator code.
More localized variables, avoid ugly 'offset by one' index usage in
favor of explicit `INDEX_UNSET` define, etc.

No behavior change expected from this commit.
2020-08-28 11:08:03 +02:00
94d6b54826 Merge branch 'blender-v2.90-release' into master 2020-08-28 14:37:05 +10:00
1725e46cee Fix T80135: Duplicate doesn't preserve active spline
Checks to preserve the active spline on duplication
required an active vertex too.

Now having no active vertex doesn't prevent duplicate
from keeping the spline active.

Reviewed by: @mano-wii

Ref D8729
2020-08-28 14:35:30 +10:00
bc2830a3ce Cleanup: use doxy sections in interface_panels.c 2020-08-28 14:25:23 +10:00
84ae44138d Cleanup: spelling 2020-08-28 14:25:19 +10:00
5ee60c9815 Fix (unreported): Walk expansion on scene collection
Left walk navigation while the scene collection is active would collapse
the subtree which shouldn't be allowed. This adds another check to
`outliner_item_openclose` to prevent collapsing the scene collection.

Introduced in rBb077de086e14.
2020-08-27 18:49:47 -06:00
e726ed3c6b Fix: Outliner walk navigation in Data API mode
Because the subtrees in Data API mode are empty for performance reasons,
it was impossible to move through the tree with walk navigation. This
adds an exception to allow walk navigation to expand subtrees in that
mode.
2020-08-27 18:25:51 -06:00
2a0e996d77 Fix T80159: Custom Normals Averaging crash after clearing
custom split normals data

Clearing custom split normals would get rid of the CD_CUSTOMLOOPNORMAL
layer - but editing data `lnor_spacearr` would be kept.

Adding a CD_CUSTOMLOOPNORMAL layer (if none exists yet) should be done
in `edbm_average_normals_exec` / `BKE_editmesh_lnorspace_update` /
`BM_lnorspace_update` / `BM_lnorspacearr_store`. The thing is that if
the editing data `lnor_spacearr` would still be valid after `Clear
Custom Split Normals Data`, blender would happily call
`BM_lnorspace_rebuild` instead. Doing that without a CD_CUSTOMLOOPNORMAL
layer is asking for trouble.

Now clear lnor_spacearr on `Clear Custom Split Normals Data` as well.

Thx @mont29 for feedback here.

Maniphest Tasks: T80159

Differential Revision: https://developer.blender.org/D8730
2020-08-27 22:12:12 +02:00
770cc66f75 UI: Avoid redundant loops in region panel handler
Currently the panel handler loops through every block and every button
for every single panel. This commit moves that check to happen a single
time at the beginning.
2020-08-27 14:36:01 -05:00
a8766de5d5 Fix T68317: Panel "A" key doesn't collapse subpanels properly
We need to only collapse or expand the first panel under the cursor
rather than all of them. Note that whether the parent panel or
the subpanel is first depends on the order of the uiBlocks in the
region's list.
2020-08-27 14:22:28 -05:00
714dbf273c Clang Tidy: Fix warning
Fix readability-static-definition-in-anonymous-namespace in new code
2020-08-27 14:18:06 -05:00
f1565e7f73 UI: Cleanup / refactor region panel event handling
The code for handling panel events was much more complicated than it
needed to be. This commit removes some unecessary function calls and
variables, reduces indentation levels by returning early, and does
some other general cleanup.
2020-08-27 14:02:14 -05:00
0649ed7fa2 GPencil: Don't convert color to sRGB
The color is linear, so the conversion is breaking the real color.
2020-08-27 20:13:51 +02:00
e74a24f0bb Fix T77382: zooming into adjust last operation panel clips contents
This panel should not have zoom functionality at all, just like headers and
many other regions don't have it either.
2020-08-27 19:52:56 +02:00
9d6789115a Cleanup: Move panel category drawing to proper section
Somehow the panel category drawing functions ended up in the middle
of the region event handling code. This commit moves them to their
own section next to the rest of the drawing code.
2020-08-27 12:33:27 -05:00
eed8ea1b73 Cleanup: Fix white space in versions.cmake 2020-08-27 11:03:31 -06:00
9b0ef34534 Fix Outliner allowing to enter Pose Mode on linked armature
If a different object was active, clicking on a linked armature's pose
in the Outliner would enter Pose Mode for it.
This would actually cause a failed assert, but in release builds the
armature would just enter pose mode.

Steps to reproduce were:
* Link in armature object
* Activate a different object
* In the Outliner, un-collapse the armature object
* Activate Pose Mode by clicking on its pose there
2020-08-27 16:40:56 +02:00
8a984ddd0f Cleanup: Fix build warning on windows
MSBuild on windows currently spews a warning about
buildinfo.h_fake not being generated.

For build info we use a non existing file to trigger a
custom_command on every build, which has worked well for
years now, however in recent versions of MSBuild it has
started issuing warnings about files that should be
generated but are not.

CMake is actually aware of this being a problem and states
in the documentation that "If the output of the custom command
is not actually created as a file on disk it should be marked
with the SYMBOLIC source file property."

This change fixes the build warning by properly marking the
buildinfo.h_fake as symbolic resolving the warning.
2020-08-27 08:10:37 -06:00
e51c721315 Fix crash of alembic tests after recent depsgraph builder change
Need to make sure node factories are initialized prior to the dependency
graph allocation.

The regression was initially introduced in 5b021dff41

Thanks Brecht for testing!
2020-08-27 14:52:58 +02:00
1131328aeb Fix: Mantaflow always builds openvdb statically
This would lead to problems when we build a dynamic openvdb library.
2020-08-27 14:49:34 +02:00
91aeb452ab Fix: FindEmbree.cmake looking for non existing dynamic libraries and failing
It is now possible to build against a shared embree library.
Before it was only possible to build against static Embree libraries.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D8702
2020-08-27 11:55:40 +02:00
54b47da565 Cleanup: clang-format 2020-08-27 15:33:33 +10:00
8b82693898 MSVC: Set proper flags for C++17 support.
MSVC already builds with the /std:c++17 flag but for
'reasons' [1] MSVC still gives the wrong value for the
__cplusplus define.

This change sets an additional cxx flag on supported
compilers to allow the compiler properly identify
C++17 support.

This resolves 2 warnings coming out of bullet about
the register keyword being deprecated.

[1] https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
2020-08-26 22:25:40 -06:00
bbf00a6231 Cleanup: Fix build warning with MSVC and OSL
OSL requires RTTI to be off, this is done with the /GR- flag for
MSVC, however /GR is in the default CXX flags leading to warning

D9025 : overriding '/GR' with '/GR-'

which cannot be suppressed.

/GR is on by default and this flag is not required, so removing
it from the default CXX flags makes it possible later use /GR-
without generating warnings.
2020-08-26 22:20:34 -06:00
7f3febf4c0 Fix (unreported): Outliner Data API tree subtree expansion
The changes in rB70151e41dc02 broke subtree expansion in the Data API
display mode because the closed subtrees are empty lists. Move the empty
subtree check from `outliner_item_openclose` to the walk navigation
code to prevent the issue.
2020-08-26 21:29:45 -06:00
489b5790cf Cleanup: Fix build warning with MSVC
`IDTypeForeachCacheFunctionCallback` lists the `flags` parameter
as `uint`, having these functions use `eIDTypeInfoCacheCallbackFlags`
results in the following warning when building with MSVC:

warning C4028: formal parameter 4 different from declaration

This change resolves this warning by changing the parameter to
the appropriate type.
2020-08-26 19:14:17 -06:00
6438fc4f79 Cleanup: Fix MSVC warning in mantaflow
This resolves the following MSVC warning:

warning C4805: '&=': unsafe mix of type 'int' and type 'bool' in operation
2020-08-26 19:07:24 -06:00
Red Mser
479ce00809 UI: Use alternating row theme color in file browser
The outliner already uses the alternating row theme color as an
overlay for every other row. This uses the same color for the file
browser, instead of a hardcoded shading.

The file browser background color is slightly tweaked to match the
outliner, and the Blender Light theme is updated to use a lighter
background color like the outliner.

Reviewed by: Hans Goudey, Julian Eisel

Differential Revision: https://developer.blender.org/D8717
2020-08-26 16:53:58 -05:00
8a9912eaf8 Tests: fail automated tests on memory leaks and other internal errors
This adds a new `--debug-exit-on-error` flag. When it is set, Blender
will abort with a non-zero exit code when there are internal errors.
Currently, "internal errors" includes memory leaks detected by
guardedalloc and error/fatal log entries in clog.

The new flag is passed to Blender in various places where automated
tests are run. Furthermore, the `--debug-memory` flag is used in tests,
because that makes the verbose output more useful, when dealing
with memory leaks.

Reviewers: brecht, sergey

Differential Revision: https://developer.blender.org/D8665
2020-08-26 22:02:02 +02:00
d8cf6ee316 install_deps: add fontconfig to installed libs/tools. 2020-08-26 20:44:53 +02:00
f807b27b67 Cleanup: Fix const warning with BLI_array_free
when you call the BLI_array_free macro with a const pointer you get a
warning when the macro calls `MEM_freeN` (warning C4090: 'function':
different 'const' qualifiers)

This was warning originating from
`smart_uv_project_calculate_project_normals` in `uvedit_unwrap_ops.c`

Normally we resolve these with a non const cast at the callsite
but given BLI_array_free is a macro not a function this is not
an option here and it has to be resolved in the macro.
2020-08-26 11:42:40 -06:00
0498feb0df Fix T80129: Cycles shadow catcher viewport error with exposure other than 1 2020-08-26 19:26:38 +02:00
bd678918ae Fix T80080: improve tooltip for render number of threads
Since the switch to TBB, the threads value specificies the maximum number of
CPU cores used while rendering, it is not longer possible to use more threads
than cores. Change the tooltip to make this more clear.
2020-08-26 19:26:38 +02:00
f699ba3d30 Cleanup: better naming and no bad level access in BLI_winstuff 2020-08-26 19:26:38 +02:00
9de18c361b Outliner: Use shift for restrict button child toggle
The `ctrl` key was mapped to recursive bone selectable and visibility
toggling. This changes the key to `shift` to be consistent with objects
and collections. Also adds an explanation to the tooltip.

Part of T77408

Differential Revision: https://developer.blender.org/D8650
2020-08-26 11:19:19 -06:00
70151e41dc Outliner: Left and right walk navigation
Previously the left and right arrow keys would close and open the active
tree element, but a subsequent key press would not select up or
down the tree as is common in tree-based interfaces.

Walking left and right now does a selection action after opening or closing
the active tree item. For example, a right key press on a closed element
will open it's subtree, and an additional right key press will select
the first child element.

A left key press anywhere in a subtree will first close the active
element if it's subtree is expanded. Walking left again will select the
parent element.

Part of T77408

Differential Revision: https://developer.blender.org/D8650
2020-08-26 10:58:23 -06:00
b028a43245 Cleanup:Remove C++14 flags from extern/quadriflow
The main CMakeLists.txt specifies C++17, quadriflow tries to add C++14
flags leading to the following warnings when building with MSVC

Command line warning D9025 : overriding '/std:c++17' with '/std:c++14`

This change removes the C++14 flags, and fixes a build error caused
by the removal of `std::unary_function` in C++17 in the .obj loader
(which isn't used by blender)

Reviewed By: zeddb

Differential Revision: https://developer.blender.org/D8720
2020-08-26 10:04:24 -06:00
3185e17844 Logging: change error to warning
This is in preparation for https://developer.blender.org/D8665.
2020-08-26 17:48:20 +02:00
14608c5e86 Cleanup: Fix MSVC warning regarding flags in bullet
For bullet we compile at /W0 for MSVC but we did not
remove the standard /W3 flag. Leading to the following
warning:

Command line warning D9025 : overriding '/W3' with '/W0'

This change removes the W3 flag for bullet to get rid
of the warning.
2020-08-26 09:16:21 -06:00
Yevgeny Makarov
2ef5fabec9 Fix T77900: File Browser in macOS fullscreen crashes
When Blender is started in fullscreen mode from the command line,
or if the fullscreen state is saved in the startup file, all temporary windows
will also open in fullscreen mode. When closing the fullscreen File Browser,
Blender would either crash or parent window becomes black.

This does not happen if the Blender switches to full screen manually.

`NSWindowCollectionBehaviorFullScreenPrimary` should be set for windows that
can enter full-screen mode. Otherwise macOS will turn the wrong window into
full-screen.

Similar fix: rB4b39de677d20

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

Reviewed by: Julian Eisel
2020-08-26 16:27:05 +02:00
239b0ba750 Clenaup: Refactor Sculpt gesture mask operators
This refactors Box Mask and Lasso mask making both functions share the
same code. After this change it should be easier to add new
functionality, new gesture tools or implement new gesture modes.

No functional changes.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8707
2020-08-26 15:44:54 +02:00
08ec9b71df Merge branch 'blender-v2.90-release' into master 2020-08-26 23:28:44 +10:00
e0772c6607 Fix T80098: Mesh deform doesn't update in edit mode
Use BKE_mesh_wrapper API access to access mesh coordinates
for modifier evaluation.

Call BKE_mesh_wrapper_ensure_mdata when binding
since it's a one off operation.

Regression from deaff945d0.

Reviewed by: @brecht

Ref D8709
2020-08-26 23:20:37 +10:00
826bd46e66 GPencil: Hide Boundary strokes in Render
This change hides the boundary strokes used for closing filled areas in render mode (viewport and final render).

Related to T80128
2020-08-26 15:05:54 +02:00
d4f7c7f4cc GPencil: Fix Assert using fill tool
With the new changes in the Draw Manager, GPU_depth_mask must be set to ON, before clear depth.
2020-08-26 13:32:57 +02:00
a7e1963b63 Cleanup: remove G.debug_value check for old mesh-deform behavior
Added in 2007, it doesn't seem useful to support alternate behavior.
2020-08-26 21:04:00 +10:00
7773663eb7 Cleanup: remove unused UvVertMap.flag 2020-08-26 21:01:28 +10:00
70d48255ae Fix T79992: Error calling context.copy() in Properties Editor
This was an oversight in rB83e3d25bcae3.

Basically we still have the "hair" and "point_cloud" entries for the
context. However they were ifdef'ed.

Note this would mostly happen in 2.90 since we always build without hair
and particles there.

Differential Revision: https://developer.blender.org/D8712
2020-08-26 11:34:12 +02:00
e414afbaf6 Cleanup: typos 2020-08-26 11:24:10 +02:00
c44251c7d7 Merge remote-tracking branch 'origin/blender-v2.90-release' 2020-08-26 11:18:41 +02:00
Evan Wilson
8ddf8cfa6f Fix #ifdef WITH_PARTICLE_NODES and WITH_HAIR_NODES mixup in rna_internal.h
Differential Revision: https://developer.blender.org/D8711
2020-08-26 11:16:48 +02:00
0e50b6529c BLI: support removing multiple elements from a vector 2020-08-26 10:52:43 +02:00
6a10e69d27 UV: match 3D mesh editing behavior for edge-loop select
- Cycling between part of the boundary & the entire UV boundary.
- Include pole vertices in the selection.

Edge loop selection was rewritten to use BMesh connectivity data.
2020-08-26 18:39:25 +10:00
8f545375f9 Cleanup: simplify edge loop/boundary select cycling logic 2020-08-26 16:56:24 +10:00
7fb11f22a2 Docs: comments for interface_handlers.c
Explain why some features have defines,
also use doxy sections for defines & prototypes.
2020-08-26 10:31:50 +10:00
add48c0074 Cleanup: use const variables in interface code 2020-08-26 10:31:44 +10:00
88ada5e218 Cleanup: add SEQ_ALL_BEGIN, SEQ_CURRENT_BEGIN to .clang-format
These were missed in 70500121b4 which caused reformatting.
2020-08-26 09:59:15 +10:00
be4abb42c1 Cleanup: spelling 2020-08-26 09:41:30 +10:00
bbb6ec9e51 Cleanup: build without USE_KEYNAV_LIMIT defined 2020-08-26 09:41:09 +10:00
396d39c6b9 Cleanup: Declare variables where they are initialized
Further changes to interface_handlers.c to avoid a block of variable
declarations at the beginning of functions. Also use const in some
situations. I only made changes where the variable's intended scope
was obvious.
2020-08-25 14:28:04 -05:00
Valentin
6e06936c0e Cleanup in interface_handlers.c
- Reduce variables scope
 - Use some const prefixes
 - Initialize variables at declaration
 - Use comparison to boolean false instead of 0

Differential Revision: https://developer.blender.org/D8678
2020-08-25 13:15:57 -05:00
72bcb900d0 install_deps: also clear BLOSC cmake variables.
Otherwise when switching from self-built to distro packages for OpenVDB,
Blosc CMake cached variables break building...
2020-08-25 19:54:22 +02:00
999667a8c5 Fix T79494 Refrence Image reflects object after source got deleted
Silly typo was causing the error texture to not be bound.
2020-08-25 19:25:39 +02:00
97f75ca87f GPUState: Move state limits getter to the area they belong
This fix a GL_INVALID_VALUE error on startup due to 0.0f max line width.

Also moves the max anisotropy filter to the sampler creation.

This reduces code fragmentation.
2020-08-25 18:18:55 +02:00
2c34e09b08 Outliner: Include gpencil modifiers and effects in the tree
Grease pencil modifiers already had defined outliner icons, but had
never been included in the tree. This adds the modifiers and the shader
effects to the tree.

Part of T68498
2020-08-25 10:04:15 -06:00
21cb6f09ff Fix T77298: Cycles multiple object making not working with multiple samples
The previous fix loaded the pixels so existing tiles were not overwritten.
However the Cycles render buffer is expected to be scaled by the number of
sample, which was not taken into account.

This is not ideal in that previews could have a mismatched number of samples
between multiple objects, though the result will be correct. The better solution
would be to bake all objects together per tile, rather than one after the other.
But that is a bigger change than we can do in 2.90.

Differential Revision: https://developer.blender.org/D8704
2020-08-25 18:00:35 +02:00
949d92ad5d Fix T79811 MacOS: Edit Mode - vertex/edge/face selection is missing
The VAO reconfiguration from the offset workaround was not working.
2020-08-25 17:42:07 +02:00
b2b4f9fc9b Fix buildbot failing due to non-existent git submodule hash
The wrong hash was committed in 95cc709612, presumably due to local changes
to the submodule repository.
2020-08-25 16:13:58 +02:00
c336947dbb Merge branch 'blender-v2.90-release' into master 2020-08-25 23:56:34 +10:00
33ac3582bb Fix T77359: Crash adding UV's in edit-mode with linked duplicates
This prevents UV layer mix up in
MeshBatchCache.cd_used/cd_needed/cd_used_over_time which depends on the
extraction method.

One object's mesh can be accessed with MR_EXTRACT_MESH, another object
that uses the same mesh can use MR_EXTRACT_BMESH based on
(Object.mode & OB_MODE_EDIT), this causes a problem as the edit-mesh
and the mesh aren't always in sync, the custom data layers wont
necessarily match up, causing T77359.

Reviewed by @jbakker, @brecht

Ref D8645
2020-08-25 23:54:26 +10:00
9dd4d87f18 GPU: Fix compilation issue caused by rBb43f4fda19b9 2020-08-25 15:16:06 +02:00
b43f4fda19 GL: Add error checking function
This is to ease the debugging process on Apple GL implementation.
2020-08-25 15:02:34 +02:00
e51c428be6 GPUSelect: Avoid assert caused by clearing without a depth mask
This should not cause any problem since the depth test is required
in order to draw to the depth buffer and this is not altered by
this change.

To be on the safe side, we still restor the mask after altering it.
2020-08-25 15:02:34 +02:00
5f86a10477 Fix T80012: Bevel Shader node Samples value has too low hardcoded limit
Up the hard limit, keep the UI range max at 16

Maniphest Tasks: T80012

Differential Revision: https://developer.blender.org/D8701
2020-08-25 12:34:10 +02:00
8657c6cb71 Merge branch 'blender-v2.90-release' 2020-08-25 12:17:49 +02:00
Red Mser
3ea324488a Fix T80016: Shape key animation is linked when duplicating object
Fix T80016

Caused by a typo in rB7b1c406b5431ce65d84ddb5f2c53977c25c18373

Reviewed By: mont29, dfelinto

Maniphest Tasks: T80016

Differential Revision: https://developer.blender.org/D8693
2020-08-25 12:11:59 +02:00
ac8825621f Merge branch 'blender-v2.90-release' 2020-08-25 11:56:27 +02:00
263cf2ea94 Enabled workaround to solve threading issues in draw manager
This workaround addresses T79533 and T79038 for Blender 2.90. The
solution isn't clear and needs more research and work. In order to
continue with blender 2.90 release it was proposed to add this work
around.

It has been tested with the test files provided in the reports.

Reviewed By: Dalai Felinto, Clément Foucault

Differential Revision: https://developer.blender.org/D8695
2020-08-25 11:48:48 +02:00
024a9d17d2 Revert "Enabled workaround to solve threading issues in draw manager"
This reverts commit 141a8ff6b3.
2020-08-25 11:29:20 +02:00
8bb93ca80a Fix T79915: crash when changing to white noise texture
Reviewers: brecht, OmarSquircleArt

Differential Revision: https://developer.blender.org/D8697
2020-08-25 11:23:35 +02:00
Jeroen Bakker
141a8ff6b3 Enabled workaround to solve threading issues in draw manager
This workaround addresses T79533 and T79038 for Blender 2.90. The
solution isn't clear and needs more research and work. In order to
continue with blender 2.90 release it was proposed to add this work
around.

It has been tested with the test files provided in the reports.

Reviewed By: Dalai Felinto, Clément Foucault

Differential Revision: https://developer.blender.org/D8695
2020-08-25 08:18:25 +02:00
189ba40e9b Cleanup: use doxy sections 2020-08-25 15:10:36 +10:00
5eb7aa5ebb Fix T80077: Objects disappear when joining with a zero scaled axis
Use invert_m4_m4_safe_ortho when joining objects so zero scaled axis
doesn't cause all points to be scaled to zero.

Instead geometry is left un-scaled on degenerate axes.

Report a warning in this case since users may want to adjust the
active objects scale.
2020-08-25 14:32:10 +10:00
96401e2ef8 BLI_math_matrix: add invert_m4_m4_safe_ortho (m3 version too)
Unlike invert_m4_m4_safe, this calculates zeroed axes.
Useful when we need to use the inverse of an objects matrix,
keeping the valid axis, only filling in the zeroed ones.
2020-08-25 12:57:56 +10:00
46eca3366e Sculpt: Cloth Snake Hook Brush
This implements Snake Hook as a deform type for the cloth brush. This
brush changes the strength of the deformation constraints per brush step
to avoid affecting the results of the simulation as much as possible. It
allows to grab the cloth without producing any artifacts in the surface
and create more natural looking folds than any of the other deformation
modes.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8621
2020-08-24 23:28:01 +02:00
5a634735e6 Fix T80008: Smooth brush not deforming mesh boundaries correctly
In 2.83 and previous versions there was a bug that was causing boundary
vertices to be detected incorrectly that was preventing the smooth brush
to work on boundaries if there was a pole on them.
In 2.90 the boundary vertex detection was fixed, but it was still using a
simplified version of the algorithm without any boundary smoothing. This
patch implements a similar smoothing algorithm to what I think it was
the intention of 2.83 and previous versions, but working correctly.

Reviewed By: sergey

Maniphest Tasks: T80008

Differential Revision: https://developer.blender.org/D8680
2020-08-24 23:09:10 +02:00
ed4c83f61f T79811 MacOS: Edit Mode - vertex/edge/face selection is missing
This is quite embarassing... it was returning the base instance instead of
the correct vao. No wonder that it was causing crash and at most drawing
issues.
2020-08-24 19:25:43 +02:00
f5ca34d0b4 BLI: simplify lookup methods in Map
No functional changes expected.
2020-08-24 19:02:41 +02:00
975fc39457 Merge branch 'blender-v2.90-release' 2020-08-24 18:28:58 +02:00
1bced5884c Fix T80039: Do not subdivide with Multires is mesh has no faces
This skips the subdivision operation if the mesh has no loops, avoiding
the crash.

Reviewed By: sergey

Maniphest Tasks: T80039

Differential Revision: https://developer.blender.org/D8696
2020-08-24 18:27:49 +02:00
dc74d60915 Fix T79819: crash with OSL trace() and getmessage() after Embree changes
The return value of scene_intersect must be checked, the isect struct members
can't be assumed to be initialized if that returns false.

Differential Revision: https://developer.blender.org/D8692
2020-08-24 17:54:25 +02:00
8e18a99845 BLI: improve exception safety of Set and Map
For more information see rB2aff45146f1464ba8899368ad004522cb6a1a98c.
2020-08-24 17:24:13 +02:00
5303509354 Fix T80076: Cycles Alembic Motion Blur Problem
The problem occurs when a deforming modifier is added to the object
after the MeshSequenceCache modifier. We should only consider the cached
velocities if the MeshSequenceCache modifier is the last one on the
object and we also need to check for the correct vertex count before
adding the motion vertex attribute.
2020-08-24 16:56:23 +02:00
734abaa252 Cycles: cleanup, remove unused parameter
This parameter was introduced during a revision of the Alembic motion
blur patch, and is not needed anymore.
2020-08-24 16:56:23 +02:00
950d857505 Merge branch 'blender-v2.90-release' 2020-08-24 10:40:12 -04:00
9498eb2692 API Docs: Update Changelog from 2.83 2020-08-24 10:38:17 -04:00
39a09b536e Workbench: Fix assert with sculpt in textured color mode 2020-08-24 16:26:29 +02:00
5b021dff41 Fix T80035: Fix crash switching/adding scenes
Ensure that time source always is in the dependency graph, allowing to
tag the graph for time update prior it was fully built.

Collaboration of Philipp Oeser, Jacques Lucke and myself.
Thanks everyone :)
2020-08-24 15:55:07 +02:00
ee2e2f14ac numaapi: Sync with upstream
Fixes potential build error in some build configurations
2020-08-24 07:45:39 -06:00
Jeroen Bakker
95cc709612 Theme: Remove TH_UV_OTHERS from bTheme
`TH_UV_OTHERS` is a theme option that isn't hooked to anything since
blender 2.80. This patch will remove the option and related code.

Reviewed By: Campbell Barton

Differential Revision: https://developer.blender.org/D8669
2020-08-24 15:19:49 +02:00
1cac6fe542 Fix selected UV vertex drawing ignoring size 2020-08-24 22:51:31 +10:00
be920fe786 UVEdit: Fix assert caused by depth mask not being set before clear
This happened when using the shading panel when a uv editor opened.
2020-08-24 14:14:17 +02:00
7ce764c9ec Fix T79896 Awful performance with Dyntopo on
Regression caused by rB9443da6166f5. Forgot to clear the flag.
2020-08-24 13:52:01 +02:00
cb8da6efce GPUState: Fix scissor state being overwritten when changing scissor bounds
Fix T79899 viewport artifacts when sculpting
2020-08-24 12:28:54 +02:00
4883cc5728 BLI: add Array.last method
This makes it consistent with Vector and Span.
2020-08-24 11:51:41 +02:00
Imre Palik
afbc727da2 Cycles: Fix missing dependencies in libcycles_device
The code uses OpenGL functionality, so is to be linked against
OpenGL libraries.

This makes it easier to integrate with cycles using CMake.

Differential Revision: https://developer.blender.org/D8371
2020-08-24 11:45:47 +02:00
6b1b2ded77 Merge branch 'blender-v2.90-release' into master
# Conflicts:
#	source/blender/editors/space_node/node_draw.c
#	source/blender/editors/space_sequencer/sequencer_draw.c
2020-08-24 11:31:06 +02:00
35ef42d967 Fix T79970 EEVEE: Camera Animation Breaks Motion Blur (Two Steps or More)
This was caused by motion blur camera movement tagging the view as
invalid and thus resetting the temporal sampling.

Critical fix for 2.90. Need second look, but quite confident. This function
is only called once when Motion blur is off.

Reviewed by: jbakker

Differential Revision: https://developer.blender.org/D8676
2020-08-24 11:24:33 +02:00
40edb84dcf Revert "Fix T77564: VSE (and compositor background) lost stereoscopy preview"
This reverts commit d5b5b228e4.
This reverts commit 47c6f41b89.
2020-08-24 11:17:52 +02:00
e4932d1167 Fix T80034 Crash using material panel on 2.91.0 alpha
This was caused by a NULL name.
2020-08-23 14:48:44 +02:00
e74ba9e09e Fix T79872: VSE - splitting strip shows the channel number when unused
This operator is dependent on mouse position (if the Use Cursor Position
option is used). The Channel property is irrelevant/unused in this case.
So it is not optimal displaying this property when calling this from the
menu (or even using the shortcut with default settings).

Now use a custom UI in the Adjust Last Operation panel in this case.
The properties are now drawn in relation to another then (Channel
underneath Use Cursor Position) next to some other minor layout
improvements.

Thx @HooglyBoogly for feedback (also providing UI code)

Maniphest Tasks: T79872

Differential Revision: https://developer.blender.org/D8625
2020-08-23 13:17:49 +02:00
833bc70399 Fix T79874: VSE - error clearing fades without animation data
Maniphest Tasks: T79874

Differential Revision: https://developer.blender.org/D8624
2020-08-23 13:09:57 +02:00
f18e537451 Cleanup: GPU: Use explicit clear value in GPU_clear* commands
This replace `GPU_clear()` by `GPU_clear_color()` and `GPU_clear_depth()`.
Since we always set the clear value before clearing, it is unecessary
to track the clear color state.
Moreover, it makes it clearer what we clear the framebuffer to.
2020-08-23 12:04:24 +02:00
846cac94db GPUFramebuffer: Use GPUState to temporary change write mask in clear fn
This avoid breaking sync of the state object. Also avoid more hazard.
2020-08-23 12:04:24 +02:00
72e78df464 GPUState: Expose Stencil mask and test
This is to be used by framebuffer clearing.
2020-08-23 12:04:24 +02:00
ed288a5786 Fix T79989: File browser Return doesn't open a directory
Regression in e4a50e3f47.
2020-08-23 16:32:33 +10:00
8f8ed8f567 Fix T80028: Crash opening a file from a timer 2020-08-23 13:44:18 +10:00
2cf930adf3 Cleanup: remove unused UvNearestHit struct members 2020-08-23 12:13:48 +10:00
010c1370af CMake: Fix policy warning about OSL_ROOT being set.
When the OSL_ROOT variable is set this is ignored
by findpackage on cmake < 3.12. CMake 3.12 and up
also  ignore it and warn about it. This change
tells cmake it is OK to use the variable and
stop warning
2020-08-22 16:24:09 -06:00
8f48a32f9f UI: In-line layout for camera passepartout
No need for a sub-panel when there is just one setting.
2020-08-22 21:53:16 +02:00
1885bf77b6 Fix T80013: Crash when toggling maximized area
Error renaming variable in 75aeb4b881
2020-08-22 11:30:51 -04:00
e26301f4d1 Fix T79971 Regression: Transform Gizmos doesnt work anymore
This changes the state of occlusion queries quite a bit. Now scissors is
explicitely disabled and we enabled color write.

I still don't understand why we now need this. This patch is just trial and
error on an affected setup. Note that on the same computer, renderdoc
was not able to capture the regression (the regression did not manifest
during capture).

Regression likely introduced by rB5f414234ddea
2020-08-22 01:42:15 +02:00
a204324966 DRW: Fix state not being locked
Regression introduced by rBe12c08e8d170b7ca40f204a5b0423c23a9fbc2c1
2020-08-22 01:42:15 +02:00
a1f54be042 Cleanup: Remove unused variables 2020-08-21 15:33:40 -04:00
53d1f89322 Fix T79987: Crash when joining objects
Mistake in b077de086e. I did the same fix for a few operators there,
but missed the object "Join" one.

The joining operator changes the layer content. So it must send a
notifier for that.
Before b077de086e that didn't cause a noticeable issue, because the
Outliner happened to listen to other notifiers (active/selection
changes) the operator sent and fully rebuilt its tree in response. Now
missing these notifiers can be more problematic, since we try to avoid
more rebuilds.

Added comments to the notifier types to avoid at least this pitfall.
2020-08-21 19:46:15 +02:00
70500121b4 Cleanup: rename iterators over sequences to be more clear about what they do.
No functional changes expected.
2020-08-21 18:55:27 +02:00
74ded456b3 Merge branch 'blender-v2.90-release' into master 2020-08-21 17:43:59 +02:00
ebf10b72b0 Fix critical bug in foreach ID looper of Scene data-block.
Since stone age of lib_query, the code would iterate over the current
list of active sequences (from a meta strip e.g.), and not over the
whole list of those.

This is a critical issue as it means in some cases (editing a meta strip
typically), some ID pointers would be missed/ignored by this foreach
looper, which is now at the center of most of our ID management code.

This caused a bug here at the studio, leading to loss of all sound IDs
used by sound strips when editing and undoing inside a meta strip, since
ID refcounting would not happen properly on strips using sounds outside
the meta-strip context during file reading of the undo steps.

To be backported to 2.83.

Differential Revision: https://developer.blender.org/D8671
2020-08-21 17:35:18 +02:00
661ba642f2 Cleanup: spelling 2020-08-22 00:10:52 +10:00
eed43a89dd Cleanup: use doxy sections for fcurve.c 2020-08-22 00:10:52 +10:00
c00707c18d Cleanup: remove f-string use 2020-08-22 00:10:52 +10:00
995725c681 Cleanup: remove duplicated code from previously unnoticed merge conflict
`BKE_animdata_blend_expand` is called in `expand_id` already.
2020-08-21 16:01:30 +02:00
0de48f8550 Refactor: move animdata code from blenloader to blenkernel 2020-08-21 15:58:28 +02:00
bed634c4f9 Refactor: move nla code from blenloader to blenkernel 2020-08-21 15:42:26 +02:00
71634d94ca Cleanup: remove LodLevel
This was part of the game engine and is not used anymore.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D8666
2020-08-21 15:24:36 +02:00
79d678e677 Refactor: move fcurve/fmodifier code from blenloader to blenkernel
This is part of T76372.
2020-08-21 15:23:33 +02:00
76689e8517 Cleanup: use LISTBASE_FOREACH in readfile.c 2020-08-21 14:39:39 +02:00
2e630297af GPUShader: Fix linking working even if one shader compilation failed
Linking without valid shaders works on some drivers. Avoid this case by
forcing linking step to return false.
2020-08-21 14:25:58 +02:00
3a6e981bcd Cleanup: GPU: Update classes comments
This should avoid confusion about what is a class and what is an opaque
pointer.
2020-08-21 14:16:42 +02:00
220fbdf593 GPUShader: Make GPUShader* an opaque pointer to blender::gpu::Shader
This avoids the misleading inheritance.

Also cleanup by setting the blender::gpu::Shader as active shader to
avoid some casting.
2020-08-21 14:16:42 +02:00
1e95a7402c GPUShader: Fix NULL string used as shader name.
The shader name is required with the latest changes.
2020-08-21 14:16:42 +02:00
c4f122ac8f GPUUniformBuf: GL backend isolation
This is in preparation of vulkan backend. We move all opengl
functionnalities behind an abstract class.

This also cleansup the "dynamic" ubo create and rename it to
`GPU_uniformbuf_from_list()`

Contains, no functional change.

Part of T68990 Vulkan support.
2020-08-21 14:16:42 +02:00
7edd8a7738 GPUUniformBuf: Rename struct and change API a bit
This follows the GPU module naming of other buffers.
We pass name to distinguish each GPUUniformBuf in debug mode.
Also remove DRW_uniform_buffer interface.
2020-08-21 14:16:42 +02:00
4f0a749489 Cleanup: use LISTBASE_FOREACH in writefile.c 2020-08-21 13:14:41 +02:00
933f0caec6 Blenloader: move IDProperty read/write code to blenkernel
This is part of T76372.
2020-08-21 12:45:41 +02:00
27f0a19bdc Cleanup: remove exec() calls from custom property editor
Remove `exec()` and `eval()` calls from `WM_OT_properties_edit` where
possible. This not only results in simpler, cleaner code, but also
removes the necessity for `repr(value)` to evaluate to a Python
expression that in turn evaluates to `value` again.

No functional changes.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D8658
2020-08-21 12:34:41 +02:00
3bc09c1c1e Cleanup: split BKE_scene_get_depsgraph() into two functions
Split the depsgraph allocation into a separate function
`BKE_scene_ensure_depsgraph()`. Parameters are only passed to those
functions that actually need them. This removes the the "if that boolean
is `false` this pointer is allowed to be `NULL`" logic and more cleanly
decouples code.

No functional changes.
2020-08-21 12:23:13 +02:00
e7767ba6be Cleanup: Reduce nesting of scene_get_depsgraph_p()
Reduce nesting by flipping conditions and returning early. It's now much
clearer that it's actually a linear function (rather than a nested one).

No functional changes.
2020-08-21 12:18:48 +02:00
7aeaf5da0e Fix crash when accessing view_layer.depsgraph through BPY
For the sanity checks to work we don't actually need to check other
scenes. So this function can be simplified so that it does not require
a `Main *`.

Mistake in 5cc08510e0.
2020-08-21 11:31:15 +02:00
41d31e100d Cleanup: remove MeshBatchCache from MeshRenderData
Was noted as a hack, this can be passed as an argument instead.
2020-08-21 17:19:25 +10:00
6755464527 UI: Fix panel collapse all behavior inverted
Ctrl click on a panel should collapse all other panels but leave that panel
expanded. In a recent cleanup commit that was mistakenly reversed.
2020-08-20 23:41:10 -04:00
4ed8bd88d9 UI: Cleanup in interface_panel.c
- Use const in some places where applicable
- Use consistent variable names in some places
- Use "r_" prefix for return arguments
- Declare variables in smaller scope where they are used
2020-08-20 23:38:39 -04:00
75aeb4b881 Cleanup: Use LISTBASE_FOREACH in editors/screen directory
Differential Revision: https://developer.blender.org/D8653
2020-08-20 20:47:44 -04:00
ce0bcd5fbf Fix incorrect notifier value
Wouldn't actually cause an issue since the value was unused within the
subtype bits.
Own mistake in dc2df8307f.
2020-08-20 20:28:54 +02:00
b077de086e Outliner: Avoid rebuilding tree on selection/active changes
We can avoid the rather expensive outliner tree rebuilds and only redraw
if nothing but the selection or active item changes. This should give a
bit of speedup for heavy scenes.

For this to work I had to correct a few notifiers, some were only
sending selection/active change notifiers that actually did things like
adding objects. I also added a more precise notifier type for when the
active collection changes. At the notifier subtype/action level we're
not even close to running out of bits, so this should be fine.
Also had to correct a wrong notifier check (was using `&` rather than
`==`).
2020-08-20 20:22:47 +02:00
2e6d5e6c6b Cleanup: Clang Tidy: Resolve readability-delete-null-pointer error 2020-08-20 13:33:17 -04:00
e5fd2a3888 Merge branch 'blender-v2.90-release' into master 2020-08-20 17:59:05 +02:00
5a957c0299 GPUShaderInterface: Fix use after free crash 2020-08-20 17:57:05 +02:00
05e1ccf108 Fix T79931: Infinite loop in scene "Full Copy" in 2.90.
Code dealing with object copy of master collection was bugy in case one
of the new object copy would get a name lesser than the original object,
leading to new copy being inserted before original one in lists.

Maniphest Tasks: T79931

Differential Revision: https://developer.blender.org/D8656
2020-08-20 17:47:56 +02:00
Wayde Moss
89ee260ef2 Fix T63675: Keying outside NLA strip not possible
Allow adding keys outside of the NLA strip, when Sync Length is
activated. Before this, an animator would have to exit tweak mode,
adjust the strip length, then enter tweak mode again.

Now the animator can freely insert and modify keys outside of the strip
bounds. They will never have to touch the strip bounds directly.

Reviewed By: sybren

Differential Revision: https://developer.blender.org/D7533
2020-08-20 17:19:36 +02:00
7d79b06fa7 Cleanup: Mesh Filter invoke refactor
This moves the allocation for filter to separate functions, removes all
repeated calls to RNA_enum_get an fixes some other code quality issues.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8639
2020-08-20 17:03:15 +02:00
5f414234dd GPUState: Use state setters inside selection code
This fixes T79945 Gizmos don't work in Edit Mode
2020-08-20 17:02:39 +02:00
8228356f50 DRW: Fix remaining glDisable 2020-08-20 17:02:39 +02:00
e23ef8753a GPUState: Use explicit depth test enum 2020-08-20 17:02:39 +02:00
c85144934a Fix T79924: Update the view rotation origin after setting the sculpt pivot
This updates the view navigation origin after modifying the pivot
position.

Reviewed By: sergey

Maniphest Tasks: T79924

Differential Revision: https://developer.blender.org/D8632
2020-08-20 17:01:12 +02:00
d74c495838 Fix variable simulation steps with cloth deform brushes
Cloth deform brushes (both in cloth brush or other tools with cloth
simulation targets) should not have their spacing as a value relative
the brush radius to avoid affecting the simulation speed when changing
the brush radius.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8620
2020-08-20 17:00:12 +02:00
b3bd121dd4 Sculpt: Add orientation modes to the Cloth Filter
This adds the orientation modes to the Cloth Filter.
Similar to the mesh filter, they set the orientation of the axis when
limiting the forces.

When using the gravity mesh filter, the orientation also sets the gravity
direction. In world orientation, cloth will always fall towards the
ground plane. In view mode, cloth will always fall down relative to the
view.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8618
2020-08-20 16:58:26 +02:00
Wayde Moss
50919413fe NLA: Fix strip Sync Length moving animation data
Change the way Sync Length works so that it keeps keyframes at the same
key as before the sync. Now when the user exits tweak mode, the overall
NLA result is unchanged.

Reviewed By: sybren

Differential Revision: https://developer.blender.org/D7602
2020-08-20 16:44:38 +02:00
Red Mser
12dd08ef52 UI: Fix aligned popovers not always turning inactive
Popovers which are aligned with properties should turn themself
(and the panel they open) inactive when the corresponding property
toggle is turned off. A notable exception is the snap settings
popover, as snapping can still be used when the toggle is off.

Differential Revision: https://developer.blender.org/D8584
2020-08-20 10:34:55 -04:00
263148dbac Depsgraph: refactor tagging after time changes
This reverts {rB1693a5efe91999b60b3dc0bdff727473b3bd00bb}
and implements an alternative solution.

The old patch had the problem that the depsgraph would always
evaluate at the current frame of the original scene (even when
`DEG_evaluate_on_framechange` was used). Now it is possible
to evaluate the depsgraph at a specific frame without having to
change the original scene.

Reviewers: sergey, sybren

Differential Revision: https://developer.blender.org/D8616
2020-08-20 16:29:34 +02:00
Sybren A. Stüvel
948e080fc5 Silence -Wmaybe-uninitialized warning on GCC/Linux
Add `-Wno-maybe-uninitialized` option to `CMAKE_CXX_FLAGS_RELEASE` and
`CMAKE_CXX_FLAGS_RELWITHDEBINFO` variables on GCC/Linux.

In Release builds GCC's `-Wmaybe-uninitialized` warning is unreliable,
and thus causes noise that can drown out other warnings. These warnings
are now silenced in release mode builds.a

Debug builds seem fine, so flags for debug builds are not touched by
this commit.

No functional changes.

Reviewed By: Sergey

Differential Revision: https://developer.blender.org/D8615
2020-08-20 16:12:28 +02:00
7fac0f9cd5 Selection: Fix lasso selection invisible 2020-08-20 16:11:14 +02:00
121d3181f9 GPU: Fix some more remaining GL enums scattered outside of GL module
This fixes an assert inside the lasso selection drawing.
2020-08-20 16:11:14 +02:00
19d72175ba GPUShaderInterface: GL backend isolation 2020-08-20 16:11:14 +02:00
14fcd46ca7 GPU: Use GPUShader setters for uniforms removing uses of ShaderInterface 2020-08-20 16:11:14 +02:00
5e65498e3d DRW: Remove some more direct gl state modification. 2020-08-20 16:11:14 +02:00
f364d181e3 UI: Fix collapsed panels not drawing header buttons
Error in rB940b239ad473 left a check for open panels after the
"vertical" check was removed.
2020-08-20 10:04:17 -04:00
f9697543e4 Revert "Cleanup: Use LISTBASE_FOREACH in editors screen directory"
This reverts commit 52f40bcff2.

Apologies for the noise. I caught a problem with this that I hadn't before. I will
commit later after thorough testing.
2020-08-20 09:34:09 -04:00
52f40bcff2 Cleanup: Use LISTBASE_FOREACH in editors screen directory
Differential Revision: https://developer.blender.org/D8653
2020-08-20 09:29:01 -04:00
a12d046910 Merge branch 'blender-v2.90-release' into master 2020-08-20 22:00:51 +10:00
c74b4caa72 Fix incorrect mask use with curves
Ref D8652
2020-08-20 21:51:35 +10:00
5e85c9878b Fix cloth collision clamp having no effect
And rename `cloth_selfcollision_impulse_vert` to `cloth_collision_impulse_vert`
2020-08-20 08:24:32 -03:00
f9b4fb7206 Cleanup: Outliner: LibOverride tools.
Remove useless extra-processing, comments, etc.
2020-08-20 12:41:14 +02:00
4aa04b6490 LibOverride: Add 'delete and use linked data' operation.
This will re-link all usages of a library override data-block
(including all of its override dependencies) to its reference linked
IDs, and delete those liboverrides.

As usual, it is available in the ID sub-menu of the outliner context
right-click menu.

Part of T76555.
2020-08-20 12:35:16 +02:00
59180ff153 Merge branch 'blender-v2.90-release' into master
Conflicts:
	source/blender/makesrna/intern/rna_scene.c
2020-08-20 11:54:46 +02:00
0fae682d61 Fix T79935: Inonsistent simplify behavior when linking collection with objects in sub-collection.
RNA update function would only update objects from 'main' instantiated
collection, not those from sub-collections.

This should be comitted to 2.90 (and backported to 2.83 too).

Maniphest Tasks: T79935

Differential Revision: https://developer.blender.org/D8654
2020-08-20 11:52:12 +02:00
341ff17326 Fix T79935: Inonsistent simplify behavior when linking collection with objects in sub-collection.
RNA update function would only update objects from 'main' instantiated
collection, not those from sub-collections.

This should be comitted to 2.90 (and backported to 2.83 too).

Maniphest Tasks: T79935

Differential Revision: https://developer.blender.org/D8654
2020-08-20 10:39:28 +02:00
efa7aaa97f Cleanup: use const variables where possible in the Python API 2020-08-20 16:10:13 +10:00
8877e3aa62 Cleanup: clang-format 2020-08-20 16:09:48 +10:00
07753fa825 Docs: Update BPY to manual mappings 2020-08-19 21:47:36 -04:00
48325306d9 Cleanup: Outliner active indicator repeated code
Refactor the code to draw the roundrect behind outliner icons for active
elements into a single function.

No functional changes.
2020-08-19 19:35:47 -06:00
940b239ad4 Cleanup: Remove unused variables for horizontal panels
Continuing the work of eb9055a572, remove remaining unecessary
variables and arguments that were related tabbing and horizontal
alignment of panels. For example, "vertical" was always true, and
removing that exposed other unused variables.
2020-08-19 18:55:04 -04:00
50b435cbaa Cleanup: Remove unused variable 2020-08-19 18:05:03 -04:00
4f6051e8c4 BLI: fix memory leak in delaunay 2d
Differential Revision: https://developer.blender.org/D8633
2020-08-19 18:45:48 +02:00
48bd6e7102 Tests: use guarded allocator in tests
This helps finding memory leaks in tests.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D8631
2020-08-19 18:18:20 +02:00
eb9055a572 UI: Remove panel X axis closing code
Horizontal panel alignment hasn't been used for years, and we have no
plans to use it in the future. It adds a fair amount of complexity to
the panel code which makes adding features take longer.

This code removes the X closing flag, and all of the logic / variables
unused without it.

This commit includes a file subversion bump.

Differential Revision: https://developer.blender.org/D8601
2020-08-19 11:37:21 -04:00
f61927d946 BLI: improve leak detection in tests
This actually found a bug in my previous commit.
2020-08-19 17:27:58 +02:00
1dafa87eb5 GPUState: Fix signed / bitfield conversion leading to wrong enum value
This was creating drawing issues on windows builds.
2020-08-19 17:13:53 +02:00
fccb38cf19 Fix warning from narrowing conversion 2020-08-19 16:56:36 +02:00
2aff45146f BLI: improve exception safety of Vector, Array and Stack
Using C++ exceptions in Blender is difficult, due to the large
number of C functions in the call stack. However, C++ data
structures in blenlib should at least try to be exception safe,
so that they can be used if someone wants to use exceptions
in some isolated area.

This patch improves the exception safety of the Vector, Array
and Stack data structure. This is mainly achieved by reordering
some lines and doing some explicit exception handling.
I don't expect performance of common operations to be affected
by this change.

The three containers are supposed to provide at least the
basic exception guarantee for most methods (except for e.g.
`*_unchecked` methods). So, resources should not leak when
the contained type throws an exception.

I also added new unit tests that test the exception handling
in various cases.
2020-08-19 16:44:59 +02:00
aeaf2b0dd4 LibOverride: Add initial version of 'resync' operation.
Available from the usual ID submenu in the Outliner context menu.

The goal of this operator is to re-create the override from the linked
data, while preserving existing defined overrides.

This allows to update local opverrides when relations between datablocks
are changed in source library linked data.

Part of T76555.
2020-08-19 16:27:49 +02:00
aa1e4baa22 Cycles : add a Volume Geometry Node
This splits the volume related data (properties for rendering and attributes) of the Mesh node
into a new `Volume` node type.

This `Volume` node derives from the `Mesh` class since we generate a mesh for the bounds of the
volume, as such we can safely work on `Volumes` as if they were `Meshes`, e.g. for BVH creation.
However such code should still check for the geometry type of the object to be `MESH` or `VOLUME`
which may be bug prone if this is forgotten.

This is part of T79131.

Reviewed By: brecht

Maniphest Tasks: T79131

Differential Revision: https://developer.blender.org/D8538
2020-08-19 15:47:09 +02:00
3e56dd8fd9 GPencil: Change default Onion Keyframe mode to ALL
Now by default the selection mode is All keyframes types.

Also removed the icon for All option and renamed from `All Types`to `All`.

UI review by @pablovazquez
2020-08-19 15:30:38 +02:00
5cc08510e0 RNA: Validate scene/view-layer combination for statistics query
Users may input an invalid scene/view-layer combination via Python. We
can easily detect that and fail gracefully.

Besides checking input parameters in RNA, also assert the
scene/view-layer combination is valid in lower level Depsgraph lookup
function (called by statistics query).
2020-08-19 12:37:59 +02:00
8cbfc4c76e Fix T79816: Restore scene.statistics() BPY function
This RNA/BPY function was removed in c08d847488. For understandable
reasons really-- getting scene statistics from a string displayed in the
status bar is not exactly the best design. But we have committed to not
changing the RNA API too much for the 2.90 release, so we would like to
keep this functionality.

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

Reviewd by: Julian Eisel
2020-08-19 12:37:59 +02:00
5549ee2e08 Fix incorrect number of recent items displayed in splash
After recent code cleanup in rB349eebd7.
2020-08-19 12:26:49 +02:00
83c78529b9 Fix T79816: Restore scene.statistics() BPY function
This RNA/BPY function was removed in c08d847488. For understandable
reasons really-- getting scene statistics from a string displayed in the
status bar is not exactly the best design. But we have committed to not
changing the RNA API too much for the 2.90 release, so we would like to
keep this functionality.

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

Reviewd by: Julian Eisel
2020-08-19 12:14:03 +02:00
c5d33070fd Cleanup: compiler warnings 2020-08-19 12:11:48 +02:00
e9e493977c GPUShader: Fix apple clang warnings 2020-08-19 11:57:28 +02:00
d412a5e6fa DRW: Fix crash drawing gpencil 2020-08-19 11:54:05 +02:00
90ee622830 Turn experimental features ON for master
During alpha the user preferences > experimental featuers are available
to prevent merge issues and allow developers to seek feedback.

This needs to be manually turned off when we branch for beta, otherwise
the RNA of the incomplete features will be exposed.
2020-08-19 10:23:21 +02:00
ffb8fca751 Revert "Turn experimental features on for master (alpha)"
I turned on the wrong feature in cmake.
This reverts commit bdf43213b2.
2020-08-19 10:22:00 +02:00
97dc370c50 Fix compiler error in MSVSC
Introduced in: rB20a8edaa725ddbae16179d2f7cea88c097c61615

It broke building on windows, initializing a static may not be done with a function in C.
2020-08-19 08:58:29 +02:00
638fa188b7 Merge branch 'blender-v2.90-release' into master 2020-08-19 14:45:21 +10:00
Hans Goudey
04ca28a6e0 Fix T77300: Some scientific notation evaluation has incorrect results
Ref D7922
2020-08-19 14:44:42 +10:00
d3bf4929de Cleanup: update mball.c comments
Some errors in comments, references to old function names.
2020-08-19 14:16:25 +10:00
7a602fb525 Cleanup: spelling 2020-08-19 14:04:36 +10:00
3f43f57731 Cleanup: warnings 2020-08-19 13:52:48 +10:00
33a4a6dd66 Merge branch 'blender-v2.90-release' into master 2020-08-19 13:51:14 +10:00
762e4cf221 BLI_listbase: add utility macro for looping over lists with an index
Add to the 2.90 branch to avoid problems if fixes from master use it.
2020-08-19 13:43:51 +10:00
349eebd7d1 UI Code Quality: Use LISTBASE_FOREACH in interface directory
I only skipped a few loops in the monstrous ui_handle_menu_event
function. Also, I only changed variable names where necessary to
prevent redeclarations.

Differential Revision: https://developer.blender.org/D8586
2020-08-18 21:47:00 -04:00
ffa8e75799 BLI Listbase: Add iterator macro that increments an index 2020-08-18 21:38:18 -04:00
78d6c273b7 Merge branch 'blender-v2.90-release'
# Conflicts:
#	source/blender/editors/space_sequencer/sequencer_draw.c
2020-08-18 21:30:52 +02:00
33fde699e2 Cleanup: GPUState: Remove GPU_state_init() 2020-08-18 21:30:11 +02:00
e5796233c7 GPUState: Use GPU_viewport to set viewport state in GPU_framebuffer
also fix a small issue in GPU_texture_clear.
2020-08-18 21:30:11 +02:00
adca09b643 GPUState: Port default state to StateManager constructor 2020-08-18 21:30:11 +02:00
a9f2ebb215 Cleanup: DRW: Use GPUState instead of raw opengl calls
Should not break anything! Huh!
2020-08-18 21:30:10 +02:00
536c2e0ec9 GPUState: Only apply state before drawing 2020-08-18 21:30:10 +02:00
482a51aabf Cleanup: GPUState: Remove stack from the state manager and rename it 2020-08-18 21:30:10 +02:00
d10f000322 GPUState: Remove gpuPushAttr/gpuPopAttr
And use manual save/restore mechanism.

The stack method is not used so much to be considered useful.
2020-08-18 21:30:10 +02:00
f30df15edc GPUState: Make use of GPUStateStack class
This isolate most GL calls to the GL backend. Still a few remains.
2020-08-18 21:30:10 +02:00
298329554a Cleanup: GPUState: remove double GPU_blend calls 2020-08-18 21:30:10 +02:00
bf1b622dd9 GPUState: GPU_blend final API renaming
We now use GPU_blend for enabling / disabling blending and explicitly
set the blend equation.
2020-08-18 21:30:10 +02:00
10558d6973 Cleanup: GPUState: remove use of GPU_blend_set_func 2020-08-18 21:30:10 +02:00
969bcf0793 Cleanup: GPUState: Replace blend func separate by enum 2020-08-18 21:30:10 +02:00
a1459b2f7a Cleanup: GPU: Move towards an explicit Blend state
This make use of the GLStateStack functions for:
- `GPU_blend()`
- `GPU_blend_set_func()`
- `GPU_blend_set_func_separate()`

The goal is to unify them using an explicit state setting.
This will remove the need to use obscure blend functions
2020-08-18 21:30:10 +02:00
2ae1c895a2 GPUState: Add GL backend and state tracking but do not use it
This is just the backend work. It is not plugged in yet because it
needs more external cleanup/refactor.
2020-08-18 21:30:10 +02:00
2eddfa85e0 Cleanup: GPU: Remove uneeded depth precision getter.
We always use 24bit framebuffers nowadays.
2020-08-18 21:30:10 +02:00
0f292dc072 Cleanup: GPUState: remove float variant of GPU_scissor_get 2020-08-18 21:30:10 +02:00
c78ea96528 GPUShader: Add debug labels
This allow better debugging inside renderdoc.
2020-08-18 21:30:10 +02:00
ba3c18f4b2 GPUShader: Add back vertformat_from_shader() 2020-08-18 21:30:10 +02:00
e8c48ce075 GPUShader: Improve auto name
Use macro to get calling function name. Helps debugging shaders.
2020-08-18 21:30:10 +02:00
e43e9caf1b GPUShader: Rewrite error printing
Now error printing only display the line related to the error.
We also put char marker if present.

Example:
```
-- Shader Compilation Errors : MAMaterial --

10414 |  node_fresnel(, facingnormal, viewposition, tmp34);
      |               ^
      | error: syntax error, unexpected ',', expecting ')'

----------------------------------
```
2020-08-18 21:30:10 +02:00
216d78687d GPUShader: GL backend isolation 2020-08-18 21:30:09 +02:00
df28d2c27e Cleanup: GPU: Replace Batch uniform by shader uniform using macro
This is a first step into removing uniforms from GPU_batch and Imm.
2020-08-18 21:30:09 +02:00
d5b5b228e4 UI: Fix protential stray GPU state preventing correct drawing
Fix potential issue with nodetree introduced in rB47c6f41b8926.
2020-08-18 21:29:47 +02:00
b8b56ee172 BLI_kdopbvh: Adjust epsilon according to the axis
This corrects the overlap detection for cloths since in this case kdop26
is used and epsilon represents the distance.
2020-08-18 14:08:58 -03:00
80face1be5 Depsgraph: simplify DEG_evaluate_* API
This mainly removes the bmain argument, which can be
retrieved from the graph itself.

Also, I removed some outdated/unnecessary comments.

Reviewers: sergey, sybren

Differential Revision: https://developer.blender.org/D8614
2020-08-18 17:40:56 +02:00
c2f0522760 Sculpt: Enable Cloth Simulation Target for Pose and Boundary
This adds a new brush property called "Deformation Target" which
controls how the brush deformations is going to affect the mesh data. By
default is set to Geometry, which makes the brushes displace the
vertices. When set to Cloth Simulation, the deformation of the brush is
applied to the cloth solver constraints, so the simulation is
responsible to apply the final deformation. This allows to add cloth
simulation effects to other sculpt tools with minor modifications to their
code.

This patch enables Cloth Simulation deformation target for Pose and
Boundary brushes, which are tools that are already designed to work in
low poly counts and produce large deformations. This allows creating the
most common cloth effects, like bending and compressing folds, without
relying on collisions.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8578
2020-08-18 17:16:35 +02:00
bedd6f90ca Sculpt: Erase Displacement Mesh Filter
Same concept as the Multires Displacement Eraser Brush but implemented
as a mesh Filter. This allows to delete the displacement of an entire
area uniformly.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8608
2020-08-18 17:04:24 +02:00
0957189d4a Sculpt: Enhance Details Mesh Filter
Exact same operation as D8509, implemented as a Mesh Filter.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8510
2020-08-18 16:56:44 +02:00
55087b84b8 Cleanup: Node: Use checker shader for preview background
Removes many drawcalls which might have slowdown the UI.
2020-08-18 16:15:34 +02:00
3e5431fdf4 Sculpt: Invert Smooth to Enhance Details
This enables the invert mode in the smooth brush as Enhance Details.
The operation is similar to the Sharpen Filter intensify details parameter,
which consist in applying the laplacian smooth displacement in the opposite
direction calculated using the original coordinates.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8509
2020-08-18 16:14:10 +02:00
872efd8d73 Merge branch 'blender-v2.90-release'
# Conflicts:
#	source/blender/editors/space_node/node_draw.c
#	source/blender/editors/space_sequencer/sequencer_draw.c
2020-08-18 16:04:41 +02:00
b3b67a61b7 Fix compiler error in MSVSC
Introduced in: rB20a8edaa725ddbae16179d2f7cea88c097c61615

It broke building on windows, initializing a static may not be done with a function in C.
2020-08-18 15:59:03 +02:00
5195d346f4 Fix T79714: Projecting texture from camera fails
The evaluated mesh is now only recomputed when the required data layers
are missing. Previously the evaluated mesh was re-evaluated incorrectly,
which caused the stippled result and the failing assert.

Since now only the evaluated mesh is used, and never a temporary mesh,
there is also no more need to keep track of whether the mesh needs
freeing or not.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8574
2020-08-18 15:53:28 +02:00
6a4f5e6a8c Depsgraph: simplify build API
Reviewers: sergey, sybren

Differential Revision: https://developer.blender.org/D8611
2020-08-18 15:51:32 +02:00
47c6f41b89 Fix T77564: VSE (and compositor background) lost stereoscopy preview
Issue introduced on fe045b2b77.

Since the stereoscopy compositing (anaglyph, ...) is only done for
viewports the VSE preview and compositor need to use viewports.

Reviewed by: dfelinto

Differential Revision: https://developer.blender.org/D8472
2020-08-18 15:50:49 +02:00
d9f7cbb8af Cleanup: remove bmain argument from BKE_scene_graph_update_for_newframe
Reviewers: sergey

Differential Revision: https://developer.blender.org/D8613
2020-08-18 15:45:58 +02:00
f653a4f349 Cleanup: remove outdated comments 2020-08-18 15:41:26 +02:00
2922f9b83d Cleanup: remove TimeSourceNode->cfra which is never read 2020-08-18 15:40:29 +02:00
2e908156d0 Fix T77564: VSE (and compositor background) lost stereoscopy preview
Issue introduced on fe045b2b77.

Since the stereoscopy compositing (anaglyph, ...) is only done for
viewports the VSE preview and compositor need to use viewports.

Reviewed by: dfelinto

Differential Revision: https://developer.blender.org/D8472
2020-08-18 15:39:27 +02:00
63998d3522 Cleanup: remove unused TimeSourceNode->offset 2020-08-18 15:32:43 +02:00
89a374cd96 Sculpt: Sculpt Filter Orientation Options
Previously, the XYZ deform axis of the Mesh Filter were limited to
object space (which is the default for sculpt mode). Now it is possible
to limit the XYZ displacement in Local, Global or View space.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8582
2020-08-18 15:19:54 +02:00
017941057f Fix T79800: Split vertex size for grease pencil
Differential Revision: https://developer.blender.org/D8607
2020-08-18 15:13:53 +02:00
bdf43213b2 Turn experimental features on for master (alpha)
Remember to turn this off again when we branch out for the next beta (2.91)
2020-08-18 14:56:22 +02:00
8ab0d0e399 Merge remote-tracking branch 'origin/blender-v2.90-release' 2020-08-18 14:55:44 +02:00
83e3d25bca Remove (ifdef) RNA for simulation, point cloud and particles
For 2.90 release this should not be exposed in the RNA API.

In master this needs to be ON by default, that's all.

Differential Revision: https://developer.blender.org/D8589
2020-08-18 14:41:16 +02:00
c526a34fc2 Cleanup: Fix strict compiler warning 2020-08-18 14:38:07 +02:00
1da0685076 Cycles: add a Pass Node
The Pass struct is now a Node and the passes are moved from the Film
class to the Scene class.

The Pass Node only has `type` and `name` as sockets as those seem to be
the only properties settable by exporters (other properties are implicit
and depend on the pass type).

This is part of T79131.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8591
2020-08-18 14:28:59 +02:00
673b1930d8 Merge branch 'blender-v2.90-release' 2020-08-18 14:05:26 +02:00
20a8edaa72 No experimental feature (but debug ones) to work for blender beta/release
Final releases (including beta) should strictly show features that are
finalized to prevent loss of data, old API clanging around, and the
overall quality of the product (Blender) presented.

Note that rendering should never be affected by user preferences, so
this is only changing things in the UI level.

Development note: This is reset experimental UI on file load.
Also note: to hide RNA (needed for hair and particles) will be done as a
separate patch.

Differential Revision: https://developer.blender.org/D8606
2020-08-18 14:02:47 +02:00
aba46371a1 GPUTexture: Extend CUBE_MAP_ARRAY_ARB proxy workaround to all Apple gpus
Related to T79716
2020-08-18 14:01:14 +02:00
41235eed1d GPU: Avoid invalid GL API usage
Drawing with 0 sized buffer is prohibited.
2020-08-18 13:53:07 +02:00
fe1827df82 Fix T79782 GPU: Crash cause by shadow batch reference
After drawing, the batch could be reset and draw again using other
parameters.

Avoid having to track references by setting the batch pointer to NULL after
drawing.
2020-08-18 13:53:07 +02:00
4814836120 Sculpt: Option to limit the forces axis in the Cloth Filter
This uses the same concept of the Mesh Filter but for applying the cloth
filter forces, so now it can be limited to a specific axis.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8567
2020-08-18 13:28:37 +02:00
976f0113e0 Multires: Base Mesh Sculpting
This adds an option to the Multires modifier to sculpt directly on the
base mesh while previewing the displacement of a higher subdivisions
level. What this does it considering Multires as a regular modifier
without exposing the grid displacement to sculpt mode.

This allows to see the propagation happening in real time, which enables
to use complex tools like Cloth or Pose in much higher resolutions and
without surface noise and artifacts.

Reviewed By: sergey, Severin

Differential Revision: https://developer.blender.org/D8555
2020-08-18 13:11:23 +02:00
df495e758d Cleanup: use Span instead of separate pointer and length
Reviewers: sergey

Differential Revision: https://developer.blender.org/D8605
2020-08-18 13:06:31 +02:00
fc5eab3570 Mesh: merge mesh_create_eval_final_{view,render} functions
Functions `mesh_create_eval_final_view()` and
`mesh_create_eval_final_render()` were doing the exact same thing,
except for a hack introduced in d3eb9dddd6 (2012-10-08, Better fix for
T32846: dupligroup messes up particle instancing on rendering) that
appears to be no longer necessary. Besides that, these functions had
confusing names. Their functionality changed over time, and whether to
do for-render or for-viewport evaluation is now actually determined by
the depsgraph evaluation mode. This means that the `..._render` function
could evaluate a mesh with viewport settings, and vice versa.

The functions are now merged into `mesh_create_eval_final()`, and the
hack has been removed. The `OB_NO_PSYS_UPDATE` flag has been removed
entirely (instead of keeping it around as deprecated flag), because it
was always only temporarily set on objects during mesh evaluation and
thus not saved to the blend file.

No expected functional changes as far as users are concerned.
2020-08-18 12:58:48 +02:00
e371378c8b Cleanup: rename bdata to boundary
Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8556
2020-08-18 12:48:56 +02:00
701a026d95 Merge branch 'blender-v2.90-release' into master 2020-08-18 12:46:17 +02:00
6df4b00f5f Fix IDProps definition still being editable in liboverrides.
One should be able to edit overridable IDProps values, but never their
settings/definitions.

Note that being able to add new IDProps to overrides is still a TODO.

Reported by Josephbburg (@Josephbburg) over blenderchat, thanks.
2020-08-18 12:43:42 +02:00
5aecc4b57b Fix Cloth Brush Grab deform types not working with spacing
Even the Cloth Brush grab works like a regular grab brush, it makes
sense to support spacing just in this brush in order to prevent creating
more brush steps that update the simulation. This way, it is possible to
create grab brushes that update the simulation constantly while grabbing
(using the dots stroke mode) or brushes that only update the simulation
when the cursor moves (using spacing).

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8568
2020-08-18 12:36:48 +02:00
Pablo Dobarro
e3eb53a5b3 Cleanup: Remove unused code in the Paint Cursor
This code was left here after the refactor, it was doing nothing and it
was causing an assert.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8579
2020-08-18 12:35:37 +02:00
762daacbc7 Fix Face Set Visibility operator using wrong active Face Set
The Face Set visibility operator was using the last active Face Set
updated by the paint cursor, so when the paint cursor is not used (when
using a filter or a transform tool), the active Face Set was not updating
and it was hidding the wrong Face Set based on the last cursor position
with a brush tool active. Now the Face Set Visitility operator has an
invoke callback wich forces a active vertex and face set update
regardless of the active tool, so it should always work correctly.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8580
2020-08-18 12:33:54 +02:00
cfeadaa295 Fix Mesh Filter deformation axis UI layout
This uses a single row for the three axis instead of a row per axis.

Reviewed By: sergey, Severin

Differential Revision: https://developer.blender.org/D8581
2020-08-18 12:32:58 +02:00
6a6cb83eb3 Fix T79568 EEVEE: Film transparent not working
Since world shader use the same standard output and are considered opaque,
we need to set alpha as holdout.
2020-08-18 12:26:22 +02:00
ca7414c4cb Fix Mask Slice deleting the Face Sets
This was a TODO in the code. Previously the Face Set datalayer was
deleted and recreated with a constant ID of 0. Now the datalayer is
preserved and set to the SculptSession after slicing the mask and a new
ID is calculated for the new faces that the slicing operation produced,
so they can be easily isolated for further tweaking.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8583
2020-08-18 12:20:05 +02:00
db4e08dfdc Sculpt: Expose the functions to create and init a SculptClothSimulation
This will be used for new features like supporting cloth deformation in
other brushes and tools outside of the cloth brush code.
No functional changes.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8602
2020-08-18 12:17:14 +02:00
c82166ffcd Cycles: move some Scene related methods out of Session
This moves `Session::get_requested_device_features`,
`Session::load_kernels`, and `Session::update_scene` out of `Session`
and into `Scene`, as mentioned in D8544.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8590
2020-08-18 11:50:37 +02:00
286fc2233d Merge branch 'blender-v2.90-release' into master 2020-08-18 11:39:36 +02:00
0b49fdd0ee Fix/cleanup Constraint poll function in liboverride cases.
Some constraint-specific operators, like set/clear inverse matrix of
childof constraint, are also valid on original, linked/overridden
constraints.

Similar change to what was done to modifiers poll function a few days
ago.

Reported by Josephbburg (@Josephbburg) over IRC, thanks.
2020-08-18 11:36:34 +02:00
400ab19702 Build deps: Enable SSE optimization for FFmpeg
The description is self-explanatory: enable SSE optimizations in the
FFmpeg library. They were disabled from the very beginning of the
dependency builder, possibly due to portability concerns.

FFmpeg does perform runtime check for available CPU microarchitectures,
so the codecs will still run on older hardware, but they will run way
faster on newer hardware.

For example, re-encoding 3405 2560x1376 frames on Xeon E5-2699 V4 CPU
went down from 313sec to 210.

Differential Revision: https://developer.blender.org/D8594
2020-08-18 11:17:26 +02:00
be30023c68 Merge branch 'blender-v2.90-release' 2020-08-18 09:52:20 +02:00
567e333ea4 Fix T79580: Control Mesh Only Partially Drawn After Filling a Surface From a Cage of Surface Curves
Differential Revision: https://developer.blender.org/D8600
2020-08-18 09:51:36 +02:00
ff3ecf4aa9 Merge branch 'blender-v2.90-release' 2020-08-18 08:39:13 +02:00
f94e322ab7 Fix T79770: Crash opening 2.83 .blend with linked collection containing greasepencil object in 2.91
The scene was null and could not be patched.
2020-08-18 08:36:26 +02:00
a8a048915e Cleanup: use view-zoom enum type 2020-08-18 12:30:10 +10:00
3c690aa4bc Merge branch 'blender-v2.90-release' into master 2020-08-18 12:29:15 +10:00
d1057890c4 Fix incorrect pixelsize use where DPI scale was intended
Changing line-width shouldn't scale cursor motion. Related to T79787.

Use dpi_fac for scaling curve error threshold & number button drag
threshold calculation.
2020-08-18 12:09:30 +10:00
6978635622 Fix T79787: orbit/zoom sensitivity depends on line-width
Use 'dpi_fac' instead of 'pixelsize' to scale input sensitivity
based on the interface scale.
Also use dpi_fac for view zoom operator.

Thanks to @ISS for investigating.
2020-08-18 11:44:16 +10:00
9085fb8073 Cleanup: expand UserDef pixel-size & DPI documentation
Avoid misunderstandings with UI scaling.
2020-08-18 11:17:15 +10:00
c65c66320f Merge branch 'blender-v2.90-release' 2020-08-17 21:11:29 +02:00
e157573fab Fix T77683: Cycles baking crash with motion blur enabled and no camera
specified

Maniphest Tasks: T77683

Differential Revision: https://developer.blender.org/D8593
2020-08-17 21:04:55 +02:00
45da0d20e6 VSE: make transform effect multithreaded
Multithreaded implementation can provide significant performance gain
on CPU's that can handle more parallel tasks.

On my 8 core system I got about 3.5x faster processing speed.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8585
2020-08-17 20:52:59 +02:00
8556e801a7 Fix T79594: Define rounding for armature edit props
Define `RNA_def_property_ui_range` for head and tail transform properties.
Step of 10 should match original behavior when tweaking value.

Reviewed By: Severin

Differential Revision: https://developer.blender.org/D8513
2020-08-17 20:49:38 +02:00
Stefan Werner
1c892e6814 Cycles: Fix local intersections in Embree for non-instancd geometry.
Embree's occlusion filter was checking against the wrong object ID
and not exiting correctly in case of a mismatch.

Fixes T79723
2020-08-17 20:41:34 +02:00
118e78a844 Merge branch 'blender-v2.90-release' 2020-08-17 20:39:07 +02:00
4b69e55da3 Fix T79757: Crash on prefetch when renaming strips
Original sequence lookup failed, becase name changed in another thread.
Fix is same as 0471349c90 - stop prefetching before changing content
of seqbase.

I have covered more cases, and added assert so it is more obvious that
issue is in lookup, and it shouldn't fail.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8592
2020-08-17 20:19:11 +02:00
ac41215f07 Tests: fix Alembic export test on Windows
Convert all `subprocess.run()` arguments to string, to prevent breaking
"does this argument need quoting" checks on Windows.
2020-08-17 20:08:01 +02:00
c6a99e021a Clang tidy: Fix else after return 2020-08-17 14:00:42 -04:00
2b896fc481 Fix T79052: Cycles new sky texture fails with sun size zero
Clamp to a minimum angle to avoid precision issues.
2020-08-17 17:57:29 +02:00
108f3284a7 USD: Allow exporting of invisible objects
The fix for T75936 made it possible to export invisible objects to
Alembic. This commit applies the same approach to the USD exporter.

The USD and Alembic code is slightly different in terms of where in the
exported file the visibility attribute is stored. In USD the visibility
is used to prune the scene graph, and thus there are only two options:
"hidden" and "inherited". Setting the visiblity of a node in the scene
graph to "hidden" immediately hides all its children. To allow hidden
parents with visible children, the visibility is stored on the object
data (so the geometry/camera/lamp/etc) instead.
2020-08-17 17:56:05 +02:00
271361e31f IO: Add test for iterating over invisible objects
Add a test that checks invisible objects are iterated over by the
`IO::AbstractHierarchyIterator` class, when a suitable depsgraph is given.

No functional changes.
2020-08-17 17:56:05 +02:00
a95f863596 Fix T75936: Alembic, allow exporting of invisible objects
Add a new depsgraph builder class that includes invisible objects and
use that in the Alembic exporter.

Alembic supports three options for visibility, "visible", "inherited",
and "hidden". This means that parents can be hidden and still have
visible children (contrary to USD, where invisibility is used to prune
an entire scene graph subtree). Because of this, the visibility is
stored on the transform node, as that represents the Object in Blender
and thus keeps the Alembic file as close to Blender's own structure as
possible.

Reviewed By: Sergey

Differential Revision: https://developer.blender.org/D8595
2020-08-17 17:56:05 +02:00
fd3086833a Cleanup: IO, reduce code duplication in USD and Alembic exporters
Move the object visibility check from Alembic/USD-specific code into the
`io/common` module.

No functional changes.
2020-08-17 17:56:05 +02:00
04ae290024 Cleanup: Alembic, rename test in CMake for consistency
Rename test `alembic_tests` to `alembic_export_tests`, so that its name
is consistent with the Python file containing the tests,
`alembic_export_tests.py`.

No functional changes.
2020-08-17 17:56:05 +02:00
9c241eae48 Fix T79597: Crash with dyntopo after paint cursor refactor
The paint cursor now uses a single call to
SCULPT_cursor_geometry_info_update and the Sculpt API to update both the
radius and the SculptSession data, so random access needs to be
initialized for dyntopo before using API functions.

Reviewed By: sergey

Maniphest Tasks: T79597

Differential Revision: https://developer.blender.org/D8489
2020-08-17 17:34:08 +02:00
fd6725cbfb Merge branch 'blender-v2.90-release' into master 2020-08-17 16:45:30 +02:00
c7a7a38b65 Fix T79633: ovrride apply code broken with RNA-defined runtime IDProps in some cases.
When copying between a set RNA runtime property and an unset one, code
would not behave properly.

We have to also consider NULL 'override apply' callback pointer as a
valid 'use default override apply function' case.
2020-08-17 16:44:36 +02:00
Stefan Werner
d88721879b Cycles: Fix local intersections in Embree for non-instancd geometry.
Embree's occlusion filter was checking against the wrong object ID
and not exiting correctly in case of a mismatch.

Fixes T79723
2020-08-17 16:04:01 +02:00
449ccb7b30 Fix typo: missing f string prefix in Alembic export test 2020-08-17 15:16:20 +02:00
6b6de5beba Cleanup: Alembic tests, add note explaining how the export tests work
No functional changes.
2020-08-17 14:07:45 +02:00
ad459302ce Cleanup: rename alembic_tests.py to alembic_tests_export.py
Rename `alembic_tests.py` to `alembic_tests_export.py`, as this makes it
clearer what is being tested.

No functional changes.
2020-08-17 14:07:45 +02:00
4a2ff0fef8 Tests: Better error reporting in AbstractAlembicTest
Instead of checking for the length of a list, just handle the error that
occurs when the length is incorrect.

No functional changes to any actual test.
2020-08-17 14:07:45 +02:00
38752944f8 Fix formatting bug in AbstractAlembicTest class
Replace `formatstring, value` with the correct `formatstring % value`.

No functional changes to any actual tests.
2020-08-17 14:07:45 +02:00
e14de692fc UI: Only draw node menu search if categories exist
Currently, the search operator in the node add menu NODE_MT_add is drawn
even if no node categories exists. This patch only draws the operator if
at least one node category passes the poll.

This patch is needed because some add-ons use custom search operator and
do not register node categories. In this case, it is undesirable to have
a search operator drawn that do nothing and is not used. One such add-on
is Animation Nodes.

Reviewed By: Jacques Lucke

Differential Revision: https://developer.blender.org/D8576
2020-08-17 13:43:19 +02:00
8fda93a405 Cleanup: Change BLI_bitmap for BLI_edgeset for internal springs
The BLI_bitmap had the potential to eat a lot of memory as it was a
dense map between all the vertices in the mesh.

Now we instead use BLI_edgeset so that we only store data when needed
(creating a spare map instead of a dense).
2020-08-17 12:39:40 +02:00
b2d9020aa5 Fix T77340: nested nodes alpha issues
Reviewers: Severin

Differential Revision: https://developer.blender.org/D8573
2020-08-17 12:34:49 +02:00
68651534c2 Fix T77267: Render EEVEE AO pass when AO disabled.
In EEVEE the AO renderpass influenced other render passes. Until now the
pass wasn't selectable when AO was disabled in the scene to remove these
render artifacts.

This patch allows rendering EEVEE AO pass without enabling it in the
scene. It does this by binding a fallback texture that is used by the
surface shaders.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7956
2020-08-17 11:10:32 +02:00
3d47da9e4c Fix error in recent bpy_interface.c split (missed moving define)
Error in 7341ceb674, this missed moving a local-define when splitting.
2020-08-17 18:53:21 +10:00
6b5582c7f7 Fix: Workbench Depth Of Field Crash
Depth of field compilation failed due to recent refactoring. This only
happened in blender 2.91. This change uses the shader lib to find
dependencies.
2020-08-17 10:50:22 +02:00
0967935b42 Cleanup: split BPY_run_string_ex into two functions
Using a boolean to select between eval/exec behavior wasn't very
readable.
2020-08-17 18:32:20 +10:00
7341ceb674 Cleanup: move Python script execution into BPY_extern_run.h
This commit renames 'execute' to 'run' because:

- This follows Python's "PyRun" which these functions wrap.
- Execution functions can use either exec/eval modes,
  making naming awkward (for future API refactoring).
2020-08-17 18:32:20 +10:00
397cec6a4d Cleanup: Pass 'FILE *' instead of 'void *' for BPY_python_backtrace
This was committed as a temporary workaround in 82150f5641
as release builds were failing (only debug builds worked).

This adds `stdio.h` to the header which is now split into a file that
contains more specialized functionality.

Also move function body inside BPY_python_backtrace,
removing PyC_StackPrint as we have PyC_StackSpit() for
similar functionality that can be called from a debugger.
2020-08-17 18:31:04 +10:00
f8c0d63cdb Cleanup: split BPY_extern_python into it's own header
Currently BPY_extern.h includes too much mixed functionality.
2020-08-17 17:20:12 +10:00
0b4a365183 Cleanup: sort CMake path lists 2020-08-17 12:40:03 +10:00
9a4c019255 Cleanup: header order, trailing space 2020-08-17 12:39:08 +10:00
bee4a2f97c Cleanup: use 'use_' prefix for RNA booleans 2020-08-17 12:35:26 +10:00
9762c3892e Cleanup: spelling 2020-08-17 12:34:05 +10:00
cafe5cd9b0 Cleanup: explain why checking the enabled state twice is needed
Address concern raised with the commit that added this extra check.
2020-08-17 12:33:07 +10:00
5c78c16b14 UI: Simplify cloth filter type description
Remove extra words in the message and avoid repeating
the name in the description.
2020-08-16 08:57:46 -04:00
4f57e1aaea Merge branch 'blender-v2.90-release' 2020-08-16 08:54:27 -04:00
8010cbe620 Fix T79823: Typo in cloth filter type description 2020-08-16 08:54:07 -04:00
b0b0d9f2cf Merge branch 'blender-v2.90-release' into master 2020-08-16 21:21:20 +10:00
59bc71d69b Fix popups opening in the wrong direction over headers
Checks for header alignment didn't account for tool-header & header
having different alignment.

There is no reason to use a lookup function on the area
(ED_area_header_alignment) as we already have region.

Check the regions alignment directly, remove access functions.
2020-08-16 21:14:26 +10:00
d5d83b71f7 Merge branch 'blender-v2.90-release' into master 2020-08-16 14:21:04 +10:00
73fb445b8d Fix T78426: Header flips when changing editors
The existing header flip detection didn't account for mixed
tool-header and header flipping & visibility between space-types.

Now alignment syncing handles any combination of header,
tool-header & footer flipped state, in a way that can be extended
to other region types in the future.
2020-08-16 14:18:40 +10:00
93304b483a Cleanup: Quiet GCC maybe uninitialized warning
There was a false positive here. Thankfully, marking the button's type
as constant can quiet the warning.
2020-08-15 22:20:40 -04:00
2c61c3d733 deps_builder: Fix boost::python linking release python library
By default boost::python in debug configuration links the release
python libraries. Which leads to loading issues with the produced
modules in a debug blender (which does use the debug python libs)

Bjam has an option to switch this to the debug libraries but when
you switch that on it changes the library names for *all* boost
libraries, even ones that don't have anything to do with python
and even the release libraries.

therefore an alternative way has been chosen and we're dealing
with this by adding a define rather than asking bjam to do it.
2020-08-15 11:06:16 -06:00
199e308670 Fix T79790: GPencil sculpt strength icon changed in recent cleanup
This commit restores the vertex colors which were lost in the cleanup.
2020-08-14 16:53:14 -04:00
80982941bd Merge branch 'blender-v2.90-release' 2020-08-14 16:39:35 -04:00
c300fc56c3 UI: Fix type in multires modifier subpanel
Thanks to @zanqdo for reporting "Subdivions"

Also remove the empty space I left for the "Delete Lower" operator that
never made it into 2.90.
2020-08-14 16:34:48 -04:00
36e4d4af5b Fix T79772: Gpencil. Additive drawing doesn't work when creating fills
This option was not supported in Fill tool
2020-08-14 19:05:05 +02:00
f491442eb0 Merge branch 'blender-v2.90-release' 2020-08-14 13:01:05 -04:00
9ab3b8f7f4 UI: Remove cutoff text in popovers for 2.90 release
Many of these popovers could use a design pass in 2.91, but for 2.90 we
don't want to change any UI strings at this point, so the best way to
solve the cutoff text is to widen the popovers. Sadly this won't affect
popovers when other languages besides English have longer strings, but
solving that is a much larger task.

Another benefit is that tweaking sculpt / paint brush options feels much
less cramped with slightly wider popovers.

I only know of one string that is still slightly cutoff by default with
this patch, the "Max Element Distance" property of the pose brush in the
sculpt mode brush settings popover. But I didn't think it was worth
widening that popover more to deal with that one case.

Differential Revision: https://developer.blender.org/D8575
2020-08-14 12:58:24 -04:00
e037c7230d Merge branch 'blender-v2.90-release' 2020-08-14 17:58:05 +02:00
04f703fca6 Fix warning when compiling on Linux with WITH_XR_OPENXR enabled 2020-08-14 17:57:24 +02:00
e8dfe91767 Merge branch 'blender-v2.90-release' 2020-08-14 17:18:09 +02:00
b3c08a3a0a Fix constant lighting change in VR view when rotating head
We have to explicitly enable fixed world space lighting. This was in
fact already done, but overridden by the code to sync the 3D View
shading settings to the VR view.
2020-08-14 17:03:10 +02:00
c074943dfd Fix undefined behavior with --debug-xr
Mistake in cb578ca104. Before that, the extension vector was static,
to make sure the extension name strings wouldn't get destructed when
leaving the function. I didn't think that was an issue and couldn't
recreate one, because until the previous commit we wouldn't actually
add any extensions to the vector on Windows (the system I tested
with).

Use C++17's `std::string_view` now, which avoids the string copies
`std::string` creates for itself and thus its destruction when leaving
the local scope.
2020-08-14 17:03:10 +02:00
77e4905b17 Fix --debug-xr not outputting OpenXR debug prints on Windows
The OpenXR debug extension was disabled on Windows as a workaround. This
was an old leftover from when there was only the Windows Mixed Reality
runtime on Windows. The debug extension didn't work for it and we didn't
have a way to disable it just for Windows Mixed Reality.
Now it seems to work though, so we remove the workaround. If specific
runtimes still have trouble with the extension, we can disable it
specifically for these runtimes now.
2020-08-14 17:03:10 +02:00
d958ab62e7 Fix NULL pointer access in render engine reported by address sanitizer
This may not have caused an actual bug.
2020-08-14 16:49:22 +02:00
690d76c624 Fix T79769, T79768: crash tweaking volume settings with Cycles viewport render
Refitting the BVH does not work in this case, it needs to be fully rebuilt.
2020-08-14 16:49:08 +02:00
d117520aa2 Merge branch 'blender-v2.90-release' 2020-08-14 16:00:54 +02:00
cb578ca104 Fix/workaround graphics issues breaking SteamVR use with Blender
Windows only workaround. I'll have to investigate Linux separately.

Steam's OpenGL compatibility is still new and doesn't work for us yet
(neither does it for standard OpenXR examples from what I've heard and
seen myself). We can work around that by falling back to our DirectX
compatibility layer.
Note that this DirectX compatibility still doesn't work for some
systems, see T76082.

Implementation note: Since the graphics binding extensions have to be
enabled before we can find out which runtime is in use (e.g. SteamVR vs.
Oculus, etc), we can now enable multiple graphics binding extensions but
settle for a single one to use later.

Once the SteamVR OpenGL backend works, we can remove this workaround
again.

Fixes T78267.
2020-08-14 16:00:03 +02:00
6a561367d0 Merge branch 'blender-v2.90-release' 2020-08-14 13:29:03 +02:00
ab3a651515 Fix offset applied on top of VR landmark with no positional tracking
On VR session start with positional tracking disabled, the pose would
have an offset applied but it was supposed to start exactly at the
landmark position.

Issue is that we applied the offset to cancel out the position offset
reported by the OpenXR runtime incorrectly. We only want to do that if
positional tracking is enabled, because if not we don't even apply the
runtime's position offset. So we'd cancel something out that wasn't
there.
2020-08-14 13:27:09 +02:00
cc6c52768a BLI: add reverse iterators, iterator constructor and Vector.insert/prepend
The new reverse iterators behave as the reverse iterators for contains from
the standard library. Have a look at the tests to see how to use them.
Using them will hopefully become easier with ranges in C++20.

A Vector can now be constructed from two iterators, which is very common
in the standard library.

New Vector.insert methods allow adding elements in the middle of a vector.
These methods should not be used often in practice, because they has a linear running time.

New Vector.prepend methods allow adding elements to the beginning of a vector.
These methods are O(n) as well.
2020-08-14 13:16:44 +02:00
2d65336408 Cleanup: C++ code style for Ghost-XR
* Avoid deep copy of vectors (technically more than a cleanup).
* Use `std::make_unique` for allocating unique pointers, rather than
  manual `new`.
* Use `std::optional` for optional by-value return values, rather than
  C-style `bool` to indicate success + return-argument.
* Use references rather than pointers for non-optional arguments.
* Avoid manual `new`/`delete`. Use `std::unique_ptr` for local scope
  bound lifetime.
* Use C++ `nullptr` rather than C's `NULL`.
* Remove unnecessary friend declaration.

These changes are generally considered good practise and move us more to
a "modern C++" style. We can still go much further of course.
See https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines.
2020-08-14 12:37:53 +02:00
1ff1b7fcea Merge remote-tracking branch 'origin/blender-v2.90-release' 2020-08-14 11:38:54 +02:00
4c625df759 Fix: Increase Viewport Sculpt Options panel width
The "Delay Viewport Update" label was showing only:
"Delay Viewport U..."
2020-08-14 11:36:40 +02:00
24f7f33c25 Merge branch 'blender-v2.90-release' 2020-08-14 10:40:57 +02:00
a5cf71fa5d Fix (unreported) sculpt vertex color panel visible for all object types
Since DATA_PT_sculpt_vertex_colors has its own poll() we need to call
the poll() of MeshButtonsPanel as well

Differential Revision: https://developer.blender.org/D8563
2020-08-14 10:35:30 +02:00
d0c0a2e392 UI: Correct grammar in property name and description 2020-08-13 22:13:43 -04:00
cd179b5048 UI Code Quality: Use derived struct for color ramp buttons
The same changes as rB570044e9f412 and rB0ab21bf06ae0.
2020-08-13 22:00:50 -04:00
0ab21bf06a UI Code Quality: Use derived struct for curve mapping buttons
The same changes as in rB570044e9f412.
2020-08-13 21:33:47 -04:00
570044e9f4 UI Code Quality: Use derived struct for curve profile buttons
Continuing the work from rB49f088e2d093.

Differential Revision: https://developer.blender.org/D8561
2020-08-13 21:00:54 -04:00
275f1039d2 GPencil: Fix keymap error for Fill Boundary strokes
The key to enable it is `Alt`
2020-08-13 20:18:30 +02:00
ebf5ff8afb GPencil: Display Fill Boundary strokes with stroke color
This feature was removed during the refactor, but it's needed for this type of strokes to display the line using the stroke color without checking if the stroke is enabled or not in the material.

This color is used only for these special strokes.
2020-08-13 20:18:29 +02:00
e691a3a9b7 Deps_builder: Update openvdb to a dynamic library
This patch changes openvdb from a static to a dynamic library.
this is in preparation for enabling pyopenvdb at some point
in the future.

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

Reviewed by: brecht
2020-08-13 11:42:05 -06:00
aabbb515d6 UI: Use consistent geometry icon color
The grease pencil weight sculpt icon was using a slightly different
shade of blue than the other icons.
2020-08-13 12:13:21 -04:00
0664194497 UI: Simplify more geometry icons
Again, no visual changes, just removed internal vertices where they
were unecessary.
2020-08-13 12:09:20 -04:00
c5519d4b6f Fix T78065: OSL shader compilation fails on macOS 2020-08-13 17:53:48 +02:00
4ff414d40d Merge branch 'blender-v2.90-release' into master 2020-08-13 17:48:41 +02:00
9813778a2d Fix T79591: Liboverride: do not update overrides on missing linked data.
It makes no sense to generate/update overrides from missing (broken
linked) reference data, just keep existing ones unchanged then.
2020-08-13 17:41:33 +02:00
53683dec7d UI: Simplify geometry icons
Many of the icons had lots of interior geometry left over from
subdivision. In these cases we should remove the interior geometry
and leave the object with the modifier for the future.
2020-08-13 10:30:08 -04:00
52e7d0bebe Merge branch 'blender-v2.90-release' 2020-08-13 10:05:20 -04:00
4e103101f7 UI: Add sculpt cloth filter tool icon
This icon mimics the details of the cloth brush icon while using the
frame style extablished for the other "filter" tools.

Differential Revision: https://developer.blender.org/D8467
2020-08-13 10:04:48 -04:00
f66fc94da6 UI: Add sculpt cloth filter tool icon
This icon mimics the details of the cloth brush icon while using the
frame style extablished for the other "filter" tools.

Differential Revision: https://developer.blender.org/D8467
2020-08-13 10:03:44 -04:00
6fe609d4c3 Sequencer: Implement zoom-to-fit view mode
In this mode the preview image is always using the most of the preview
area space: it is scaled to fit, preserving aspect ratio. This makes it
possible to always have maximum of the preview region even after resize
of other areas.

This mode is enabled by default, is available in the View -> Zoom to Fit
menu. It is enabled when View All (Home key) is used, and is disabled
when manual navigation ([panning, zooming) is performed.

There is no versioning code, which means existing files will open as-is,
but new projects will have this option enabled.

Ref T78987

Maniphest Tasks: T78987

Differential Revision: https://developer.blender.org/D8549
2020-08-13 15:24:21 +02:00
0df28e8c20 View2D: Inform region type on current view changes
Allows to hook per-space code which is to be run on view navigation.
This is required to have zoom-to-fit implemented in the sequencer.

There might be more cases where the clalback is to be called from,
but it could be easier to address those on the case-by-case basis
when its needed.
2020-08-13 15:24:21 +02:00
c27123632b View2D: Centralize handling of changes to v2d->cur
Currently there are no functional changes, preparing code to add more
functionality which is to be run from navigation/zoom operators.
2020-08-13 15:24:21 +02:00
4f209fab2c Fix T79082: Softbody self-collision does not work on lattices
Reviewers: zeddb

Differential Revision: https://developer.blender.org/D8562
2020-08-13 14:41:44 +02:00
b89521de21 UVEdit: Fix drawing after recent refactor 2020-08-13 14:27:16 +02:00
a6447ca72d GPU: Fix MSVC warning 2020-08-13 14:20:24 +02:00
d52f28380b GPU: Fix issue with MDI and recent refactor 2020-08-13 14:20:24 +02:00
f349ea5508 GPUDrawList: Fix gl error with drawing without the correct VAO bound 2020-08-13 14:20:24 +02:00
985070b1ce GPUShader: Add more uniform functions 2020-08-13 14:20:24 +02:00
ac60a67b3f Cleanup: GPU: Remove Batch vao cache reset
This is done at drawtime automatically.
2020-08-13 14:20:24 +02:00
efc97b3919 GPUBatch: GL backend isolation
This changes the drawing paradigm a bit. The VAO configuration is done
JIT-style and depends on context active shader.

This is to allow more flexibility for implementations to do optimization
at lower level.

The vao cache is now its own class to isolate the concept. It is this
class that is reference by the GLContext for ownership of the containing
VAO ids.
2020-08-13 14:20:24 +02:00
47bfb0f7ad GPUBatch: Move allocator to backend 2020-08-13 14:20:24 +02:00
9443da6166 GPUBatch: Merge phase and ownership flags and cleanup there usage
Also add new flags to communicate specific behavior to future backend.
2020-08-13 14:20:24 +02:00
e0f5f95e66 DRW: InstanceData: Remove hacks of batch freeing callback
We instead use a handle reference counter on the GPUVertBufs used by
the instancing batches. This make sure that if an update happens on the
GPUVertBuf used to contruct the batch, they will never have the same
memory address than the previously allocated ones (since they are still
pending deletion thanks to the refcounter).

This avoid the linear search to update the GPUBatch in the case a
batch is deleted (which was even a bad option since they could be only
cleared)
2020-08-13 14:20:24 +02:00
157f2a20e6 GPU: Use GPU_vertbuf_create & GPU_indexbuf_calloc instead of manual alloc 2020-08-13 14:20:23 +02:00
00a3c297d2 GPUVertBuf: Add handle refcount
A handle refcount is here to avoid freeing of the GPUVertBuf datablock
if it is still referenced somewhere else.

This does not prevent deleting the actual data. This is to avoid too
much zombie data usage.

This is in order to avoid most hacks inside `draw_instance_data.c`.
2020-08-13 14:20:23 +02:00
93165cbf47 GPUBatch: Remove most use of GPU_batch_draw_advanced()
This is in order to better encapsulate / isolate the drawing code.
2020-08-13 14:20:23 +02:00
de4eb115ac Cleanup: GPUBatch: Remove GL functions from uniform assignment 2020-08-13 14:20:23 +02:00
b0f30bd684 Cleanup: GPUBatch: Move gpu_batch_private.h to CPP header 2020-08-13 14:20:23 +02:00
16b28ff974 Cleanup: GPUShader: Remove unused code 2020-08-13 14:20:23 +02:00
854c999d82 GPUShader: Change shader state tracking to be part of the GPUContext
This remove the use of batch->program and replace it with batch->shader.

This will allow GL abstraction latter.
2020-08-13 14:20:23 +02:00
186abf7d3b GPUBatch: Remove usage of gl_prim_type outside of GPU module 2020-08-13 14:20:23 +02:00
38ef35b1ed GPUDrawList: GL backend isolation 2020-08-13 14:20:23 +02:00
cb2565195e Fix T65148: Drivers can't access shape keys
It was impossible for drivers to use shape key properties, modifiers
generate a new mesh. After mesh evaluation the shape keys are no longer
necessary, and because of this the `key` pointer was not copied. As
drivers work on evaluated data, however, they do need this `key`
pointer.

This commit makes the `key` pointer available in evaluated meshes, but
this is somewhat dangerous. There was an explicit reason why the key on
result was kept at null pointer: to have the evaluated mesh in a
consistent state. Assigning this pointer makes it potentially
inconsistent, as the evaluated mesh and the original shape key may have
different topologies.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7785
2020-08-13 13:56:41 +02:00
46aa302400 Merge branch 'blender-v2.90-release' 2020-08-13 11:50:07 +02:00
ada98869df Preferences: correct property description for keyitem restore
Spotted while checking T79657.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D8517
2020-08-13 11:44:57 +02:00
0843d5b024 Fix T79743: baking still uses cage object after removal 2020-08-13 11:30:56 +02:00
28c1300115 Fix T79653: Change soft min frame start of cache from 1 to 0
It was always possible to set it to zero by typing in the value.
This new soft limit is more consistent with the fluid cache
and the Scene.frame_start property.
2020-08-13 11:03:05 +02:00
7c380119a7 GPencil: Remove unused parameter and fix warning 2020-08-13 08:39:46 +02:00
29c28ac022 Cleanup: incorrect comment wrapping
Missed this comment when updating fix for T77409.
2020-08-13 16:38:01 +10:00
e84ffae7ba Cleanup: warnings 2020-08-13 16:23:43 +10:00
357547b010 Cleanup: spelling 2020-08-13 16:21:10 +10:00
608ec79bc3 Cleanup: clang-format 2020-08-13 16:01:38 +10:00
38b5f56dad Merge branch 'blender-v2.90-release' into master 2020-08-13 15:46:55 +10:00
f875d3e504 Merge branch 'blender-v2.90-release' into master 2020-08-13 15:46:46 +10:00
ad05e1100f Fix T77409: Crash showing vertex/face duplicators in edit-mode
This was a regression in deaff945d0 which skips copying a mesh.
Dupli-verts/faces were not updated to account for this.

This supports iterating over edit-mesh vertices & faces,
since falling back to a full copy (as we do in some places)
will be slow while transforming geometry.

This commit looks as if it would change behavior with orcos,
since any edit-mesh deformation causes them to be assigned.
However in practice there is no functional change, details in comments.
2020-08-13 15:41:57 +10:00
9bf8b6799d Cleanup: remove two sided face check
Two sided faces aren't supported and would cause many issues elsewhere.
2020-08-13 15:41:57 +10:00
ee909783de Cleanup: use 'inst_ob' variable name for consistency
Dupli verts/faces named these arguments differently.
2020-08-13 15:41:57 +10:00
494560f19d Cleanup: remove unused struct members from dupli-face/vert
Replace the evaluated mesh with VertexDupliData.mvert since only
vertices are used. This makes dupli-vert similar to how dupli-face
was already working.
2020-08-13 15:41:57 +10:00
a45f2fd1fb Cleanup: move mesh access for dupli vert/face into shared function
De-duplicate mesh access & comments.
2020-08-13 15:41:57 +10:00
12c24ecf6e Cleanup: pass normal as a float to dupli-vert function
Needed for supporting edit-mode dupli-verts.

Currently the un-scaled short values are used to avoid
changing behavior (noted in comments).
2020-08-13 15:41:57 +10:00
51a461dcab Cleanup: spelling, use full sentences for object_dupli.c 2020-08-13 15:41:52 +10:00
f0285e347e Cleanup: use const for dupli vert/face, 'r_' prefix for return value
Make it obvious which values are used read-only, which are written to.
2020-08-13 14:03:46 +10:00
536b6b6376 Merge branch 'blender-v2.90-release' 2020-08-12 21:04:19 -04:00
pembem22
bb2908472c UI: Fix curve widget fill artifacts
Disable antialiasing which caused artifacts.

Differential Revision: https://developer.blender.org/D8497
2020-08-12 21:02:05 -04:00
579cb774da Fix hair collision error introduced in recent commit 2020-08-12 18:40:48 -03:00
5319eb36a5 Cleanup: Silence some arithmetic overflow warnings 2020-08-12 18:25:45 -03:00
c5e469a3e4 Cleanup: Move definitions of some variables closer to their use 2020-08-12 18:25:45 -03:00
7d16db417b Cleanup: move assignment out of loop 2020-08-12 18:25:45 -03:00
6d9358d453 Cleanup: Rename variable 'cloth1' to 'cloth' 2020-08-12 18:25:45 -03:00
ca827e36ac Fix Boundary Brush symmetry with no constant falloff
When using constant falloff symmetry was working fine because the same
deformation is applied twice on the same vertices. When using no
constant falloffs, the deformation is different between symmetry passes,
so vertices need to be separated by symmetry areas to get the right
deformation from its symmetry pass without being overwriten by the next
one.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8541
2020-08-12 23:07:52 +02:00
1260baf16b GPencil: Remove unused variable and fix memory leak
This was missing in previous commit
2020-08-12 23:07:27 +02:00
c77bf95221 Sculpt: Boundary Brush Falloff Types and Offset
This adds the boundary_falloff_type and boundary_offset to control how the
falloff of the Boundary Brush is applied.

Boundary Origin Offset is the same concept as the Pose Origin offset in
the Pose Brush. It is a multiplier that adds extra length to the brush
radius to locate the deformation pivot further from the boundary without
affecting the falloff.

The Falloff type includes Constant (previous default), brush radius, loop
and loop and invert. Loop and Loop and Invert can be used to create
deformation patterns in a mesh.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8526
2020-08-12 23:06:42 +02:00
db7cfd03b0 GPencil: Remove unused parameter in convert curve
The only_stroke parameter is not used
2020-08-12 22:48:19 +02:00
e188a798c6 GPencil: Clean material list when convert a curve
Now the list of materials is cleanup and any duplicated material is removed.
2020-08-12 22:48:14 +02:00
cd49c7b5ea GPencil: Move merge similar materials code to BKE
This is required in other places and need to be shared.
2020-08-12 22:48:10 +02:00
01636ed159 GPencil: Fix unreported problem in merge similar materials
When two similar colors were adjacent, the colors were not merged.
2020-08-12 22:48:06 +02:00
b126e38f6b GPencil: Fix unreported error in merge similar materials
When the color was black, the original value was not initialized and get a NaN value with unexpected results.

Also cleanup code.
2020-08-12 22:48:00 +02:00
3d247abb78 GPencil: Remove unused lines 2020-08-12 22:47:56 +02:00
145445c6b4 GPencil: Recode all material management when convert SVG 2020-08-12 22:47:51 +02:00
504c257dae GPencil: Add Sample parameter to Convert curve
This allows to resample the stroke to avoid too dense geometry.
2020-08-12 22:47:47 +02:00
9abdafe840 GPencil: Add parameters to scale thickness when convert Curves
This parameter allows to scale the thickness.
2020-08-12 22:47:43 +02:00
19cef4073d GPencil: Interpolate thickness when convert Curve to GPencil
The curve was using only the last point radius of the segment. Now, the value is interpolated between start and end points.
2020-08-12 22:47:38 +02:00
54b3168c4a Fix T77424 Overlay: Editmode: Issue with multi edit and in-front option
This is a nice addition to the refactor. Now any combination of in-front
/ not in-front will work in non x-ray edit mode.
2020-08-12 19:57:23 +02:00
f21cdf0d12 Clenaup: Deduplicate cloth collision code
And do the clamp by vertex instead of triangle.
2020-08-12 14:49:59 -03:00
633b0d6d25 Merge branch 'blender-v2.90-release' 2020-08-12 19:26:31 +02:00
ba2d1c8898 Fix T79738: Double Click does not opening folders in File Browser
If the File Browser was used in regular editor mode (e.g. not through an
operation like File > Open), the operator that usually opens files and
directories wouldn't execute. We need to keep two operators for
double-click in the keymap so selecting and opening works in all cases.

Caused by c606044157.
2020-08-12 19:26:04 +02:00
eee88f7cec Merge branch 'blender-v2.90-release' into master 2020-08-12 19:03:32 +02:00
b3165fb8b5 Fix (unreported) glitch when making liboverride of object from IDtemplate.
We need to ensure new override is instantiated in the scene...

Reported by @Severin, thanks.
2020-08-12 19:03:03 +02:00
337b6d0758 Cleanup: Use const for context 2020-08-12 12:59:19 -04:00
1da053956a UI: Category support for instanced panels
This adds support for panel categories to the instanced panel system
used for modifiers and others. The change is pulled from D7997 where
it is needed for FCurve modifiers, but it is unused now.

The change is simple and basically amounts to checking the panel
category where it was overlooked before.
2020-08-12 12:56:10 -04:00
6238eabcd4 Merge branch 'blender-v2.90-release' 2020-08-12 18:50:40 +02:00
54c2c14921 CMake: clarify that the modules are licensed BSD 3-Clause
Many of these are derived from similar modules in the CMake project, which
have this license.

Fixes T79715
2020-08-12 18:49:16 +02:00
655091297f Fix T79736: install_deps.sh failing to download OpenImageIO due to wrong version 2020-08-12 18:38:29 +02:00
478ea4c898 Sculpt: Multires Displacement Eraser Brush
This brush deletes displacement information of the Multires Modifier,
resetting the mesh to the subdivision limit surface.
This can be use to easily delete parts of the sculpt or to fix
reprojection artifacts after applying a shrinkwrap.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8543
2020-08-12 18:26:56 +02:00
6a95f05d65 deps_builder: Optionally build boost::python
This this adds the option of building boost::python
in the libs builder, in preparation for future
dependencies that require it (ie pyopenvdb)

disabled by default, can be enabled with the
`WITH_BOOST_PYTHON` cmake option.

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

Reviewed by: brecht
2020-08-12 10:17:38 -06:00
240ac779d5 Merge branch 'blender-v2.90-release'
# Conflicts:
#	source/blender/draw/engines/eevee/eevee_motion_blur.c
2020-08-12 18:16:47 +02:00
58a457da3d Fix T79680, T79680: confusing viewport denoise start sample behavior 2020-08-12 18:10:50 +02:00
6f502136c7 Fix T79718: Eevee OpenVDB render error when frames miss part of the grids 2020-08-12 18:10:50 +02:00
77e40708c2 Sculpt: Expose Edit Face Set as a tool
Previously the way to use this operations was using the shortcut Ctrl +
W and Ctrl + Alt + W, which was not very discoverable and it was
limiting the amount of options that can be added to the operator.Now the
same functionality of the operator is available as a tool, which will
make easier to add other editing operations and options without adding
more entries to the keymap.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8545
2020-08-12 18:09:27 +02:00
bff91b32aa Fix T79706: Delta Transform Animation not working
The object "delta_" rna variables were not added to the depsgraph search
and thus it would not trigger updates of the object during animation
playback.
2020-08-12 18:09:00 +02:00
051f067fb8 Fix T79706: Delta Transform Animation not working
The object "delta_" rna variables were not added to the depsgraph search
and thus it would not trigger updates of the object during animation
playback.
2020-08-12 18:07:29 +02:00
2218b61e8e Fix T79637 Motion blur gives artifacts when changing the camera
DRW_render_set_time is calling RE_engine_frame_set will in turn calls
BKE_scene_camera_switch_update.

To workaround this, we get the original camera object at render init and
get the evaluated version from it after each time change.
2020-08-12 18:06:36 +02:00
879ed5a165 EEVEE: Motion Blur: Fix issue with batch overflowing with VBOs 2020-08-12 18:06:36 +02:00
bea79e0c7b EEVEE: Fix dupli recursion constant 2020-08-12 18:06:36 +02:00
1eab858dbc EEVEE: Rework deformation motion blur
This change how motion data are indexed inside the ghash.
We follow cycles closely now and use evaluated ID pointers.

By removing the hack, it fixes T78561 (No Motion Blur on linked objects)
2020-08-12 18:06:36 +02:00
2b042d885a EEVEE: Motion Blur: Use evaluated object as key to motion data
This fix issues with instanced geometry and modifiers. Since the
depsgraph will duplicate the objects when they have different modifiers,
the evaluated object are garanteed to be unique.
2020-08-12 18:06:36 +02:00
ff4b5d00e4 Cleanup: Remove explicit float casts in sculpt code
Differential Revision: https://developer.blender.org/D8553
2020-08-12 18:04:06 +02:00
010911d722 Clenaup: Rename random_access_init to random_access_ensure
Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8529
2020-08-12 18:02:47 +02:00
9f288490d5 Subdiv CCG: Cleanup, remove redundant casts
If one of the operands of a binary operator a float, integer
operand gets promoted to float as well.

Differential Revision: https://developer.blender.org/D8552
2020-08-12 17:51:15 +02:00
697c449578 Cleanup: Use clamp_f instead of CLAMP in sculpt code
Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8528
2020-08-12 17:49:55 +02:00
2476b31c71 Fix Sculpt Filters operator naming
Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8523
2020-08-12 17:43:14 +02:00
1813a99447 UI: Fix typo "subdivion" -> subdivision
In the Multires panel, use singular Subdivision instead of Subdivisions.
2020-08-12 17:23:56 +02:00
841d779322 Increase hard limit for Remesher octree depth
Adding more precision to help making watertight objects to be printed.

Differential Revision: https://developer.blender.org/D8551
2020-08-12 17:05:04 +02:00
df12e6778a deps_builder: Fix python build on windows
Issue introduced in the boost.cmake cleanup in
rB5c563cd903ddceebfffbb1e86af2b406bbb2c457
2020-08-12 08:40:24 -06:00
b0dc413f4d deps_builder: Cleanup options.cmake for windows
We no longer build the thumbnail dll in the builder
and these variables are no longer used.
2020-08-12 08:26:42 -06:00
84076260da Merge branch 'blender-v2.90-release' into master 2020-08-12 16:25:18 +02:00
5c563cd903 deps_builder: Cleanup boost.cmake on windows
There were some remnants from previous boost::python support
and support for building 32 bit libs on windows, neither are
needed currently.
2020-08-12 08:21:37 -06:00
cfbea0e09d LibOverride and modifiers: Add copying of linked modifiers.
It also enables copying of linked modifiers (generating new local ones).
2020-08-12 16:16:37 +02:00
707c81cd11 Merge branch 'blender-v2.90-release' 2020-08-12 16:05:23 +02:00
21118fb610 Fix T79622: Mesh Filter on a locked Shape crashes
For a locked shapekey, a SculptSession's orig_cos / deform_cos /
deform_imats are not initialized (they only are when
deform_modifiers_active is true -- this in turn is only true for
shapekeys if they are //not// locked [and for deforming modifiers of
course])

We can just update that keyblock with sculpt_update_keyblock() in case
of a locked shapekey

Maniphest Tasks: T79622

Differential Revision: https://developer.blender.org/D8499
2020-08-12 15:53:22 +02:00
6ef58099d4 Merge branch 'blender-v2.90-release' 2020-08-12 15:34:18 +02:00
08286ef8ba Fix T79712: Color Changes do not record in Auto-Key Mode
Caused by rBfffba2b6530.

In above commit, the buttons rnaindex [-1 for entire arrays like colors]
was not used anymore for the entire function body of
`ED_autokeyframe_property` (previously in `ui_but_anim_autokey`).
Replacing the index with 0 (in the array case) is indeed necessary for
`BKE_fcurve_find_by_rna_context_ui`, prior to rBfffba2b6530 this was
taken care of by using `ui_but_get_fcurve` instead [which did this
internally].

But using an index of 0 (instead of -1) for the entire function body of
`ED_autokeyframe_property` fails for the array part later, namely
`insert_keyframe` needs -1 here.
Now just replace the index for //finding the FCurve//, but use the
original for //inserting the keyframe//.

Could be backported to 2.83 LTS.

Reviewers: campbellbarton, sybren

Subscribers:
2020-08-12 15:28:12 +02:00
d6570fcaed Cleanup: compiler warnings 2020-08-12 12:15:01 +02:00
1f8cb90828 Merge branch 'blender-v2.90-release' 2020-08-12 12:12:12 +02:00
Kévin Dietrich
9280fb19e4 Fixes T77882: artifacts rendering OpenVDB volumes with multiple grids in Cycles
The previous algorithm was not using all of the requested grids to build a mesh
around the volume due to limitations regarding the use of a dense buffer to
gather information about the volume's topology. This resulted in artefacts during
rendering.

The mesh generation is now done by merging all of the input grids and using the
resulting grid's topology to create the mesh. The generation of the mesh
is still done in index space as before, and the vertices are converted to object
space by using the merged topology grid indexToWorld transform.

To be able to merge the grids together we have to make sure that their transformation
matrices and their index spaces match, thus, if they do not match we simply resample
the grids. This behaviour should tackle one other limitation of the current algorithm,
which is that only one transformation matrix was used to generate the final mesh.

If we do not have an OpenVDB grid for the requested volume data, we generate
a temporary OpenVDB grid for it.

Differential Revision: https://developer.blender.org/D8401
2020-08-12 11:52:12 +02:00
da95fa8344 Fix UV unwrap not working with only one pinned vertex
Now the one vertex defines the position of the UV chart, while rotation and
shape is still determined automatically.

Initial patch by Willis (wlssirius).

Differential Revision: https://developer.blender.org/D8484
2020-08-12 11:52:09 +02:00
a1a81e3b88 Merge remote-tracking branch 'origin/blender-v2.90-release' 2020-08-12 11:47:59 +02:00
cbb1bb90fd Bump the minimum required version for 2.90
This is particular important because 2.90 will coexist with 2.83 LTS, so
we should warn the users of potential loss of data when going from 2.90
to 2.83 and back.

Differential Revision: https://developer.blender.org/D8488
2020-08-12 11:43:29 +02:00
05cb4cf26e Merge branch 'blender-v2.90-release' into master 2020-08-12 11:13:10 +02:00
d070d33aa3 Cleanup: Use proper bool type and literals for operators poll functions. 2020-08-12 11:11:48 +02:00
4e31b5b173 Fix (unreported) broken Poll function of GPencile mods and ShaderFX operators in liboverride case.
Those where assuming we always get a valid modifier data from context,
which is not always true...

Also  fix similar issue with shortcuts as reported in T79635.
2020-08-12 11:11:48 +02:00
b3702f5918 Fix part of T79635: Disable by default operation on unknown mod from liboverride object.
It is unfortunate that we cannot get active modifier from context when
operator is called from a shortcut, but we'd need an event for this to
work... So for now forbid any modifier operation of liboverride objects
in that case.
2020-08-12 11:11:48 +02:00
00a7113e61 Merge branch 'blender-v2.90-release' 2020-08-12 10:45:42 +02:00
9b58a41a92 Fix T79708: ShapeKey value greyed out
Mistake in rB0e9999a93edd.

Maniphest Tasks: T79708

Differential Revision: https://developer.blender.org/D8539
2020-08-12 10:35:06 +02:00
ec5f392087 Merge branch 'blender-v2.90-release' 2020-08-11 22:18:39 +02:00
2c7394acce Cleanup: Reduce indentation level
Check the simpler case first and return early.
2020-08-11 16:17:11 -04:00
90b8df8a99 Cleanup: Remove unecessary variables 2020-08-11 16:14:26 -04:00
dbf5bb7af2 Fix T79640: "Assign Shortcut" doesn't work for "View 2D Zoom"
'VIEW2D_OT' operators were not respected in WM_keymap_guess_opname().
This was seemingly done on purpose (see comment "Op types purposely
skipped  for now"), but dont really see the reason for doing so.

Since the "View2D" keymap is not bound to a specific spacetype, we can
still find it using WM_keymap_find_all() [and passing 0 as spacetype].

Reviewers: Severin

Subscribers:
2020-08-11 22:06:15 +02:00
18b1d1af95 Cleanup: Use sizeof first in allocations 2020-08-11 15:58:04 -04:00
185ed9980c Merge branch 'blender-v2.90-release' 2020-08-11 21:52:54 +02:00
3eebdf8a2d Cleanup: Reduce indentation level
Exit early if the bevel width is zero instead of putting
the main function in an if statement.
2020-08-11 15:51:24 -04:00
2fc2a0a56b Fix T79700: skin modifier: prevent error for vert-only mesh
Vert-only mesh is valid input for the skin modifier (displays isolated
cubes), prevent error message about missing root vertex in that case.

Maniphest Tasks: T79700

Differential Revision: https://developer.blender.org/D8533
2020-08-11 21:41:52 +02:00
29852cf320 Merge branch 'blender-v2.90-release' 2020-08-11 21:25:18 +02:00
aec0cfaf08 Fix T79676: Video Sequencer image sequence strip source path breaks when
saving with 'Remap Relative' option

Caused by rBf7386b97571e.

Logic in BKE_bpath_traverse_main calls the callback multiple times [as
often as there are images in the strip].

Prior to above commit, the callback was
'bpath_relative_convert_visit_cb' [this one did not have this problem -
since it returned early if the path was already made relative once]

After rBf7386b97571e though, the 'bpath_relative_rebase_visit_cb' is
used [this one should not be entered multiple times, it would modifiy the
directy again and again].

Luckily, we have a flag (BKE_BPATH_TRAVERSE_SKIP_MULTIFILE) that can be
used to prevent this (this will take care of only calling the callback
once in BKE_bpath_traverse_main for the VSE case)

Could be backported to 2.83 I think.

Maniphest Tasks: T79676

Differential Revision: https://developer.blender.org/D8536
2020-08-11 21:21:40 +02:00
7e9f47c06c Cleanup: Reduce scope of variable declarations in bmesh_bevel.c
This commit generally moves variable declarations to the smallest scope
the variables are used in. This makes the code more readable by
making it clearer when variables are used and by removing the block
of variable declarations at the top of each function.
2020-08-11 15:08:04 -04:00
b0485d47ef Cleanup: Resolve clang tidy warning / error 2020-08-11 14:58:01 -04:00
2b6d4325ac Merge branch 'blender-v2.90-release' 2020-08-11 20:07:20 +02:00
74556a5a17 Fix T79703 EEVEE: Crash on Macos due to lightcache baking 2020-08-11 20:07:03 +02:00
7219abc5bd Fix T79672 EEVEE: Motion blur steps value broken after recent change
Was just an issue of `taa_render_sample` being reset to 1 when it shouldn't.
2020-08-11 20:07:03 +02:00
cae4041878 Fix T79683: Dim GPencil points created by modifiers
This change makes the generated points a light dimmer than selectable points.

Before:

{F8765593}

After:
{F8765585}

Maniphest Tasks: T79683

Differential Revision: https://developer.blender.org/D8515
2020-08-11 19:13:15 +02:00
48c0a82f7a Sculpt: Option to not modify hidden Face Sets in Face Sets Edit
This options allows to perform Face Sets operations while preserving the
mesh visibility. Edit hidden face sets is enabled by default in order to
expand the visible area of the mesh with the grow/shrink operator, but
this can be changed in the keymap per edit operation as more operations
are supported.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8029
2020-08-11 19:04:37 +02:00
b95aa48156 Merge branch 'blender-v2.90-release' into master 2020-08-11 18:49:17 +02:00
d2c150772a Fix T79692: Full copy of scene makes Blender freeze if there is content directly in the master collection.
Old and new collections are the same data in Master collection case
here, so we cannot consider the `gobject` listbase of `collection_old`
as always immutable.
2020-08-11 18:46:47 +02:00
20ca7122f0 install_deps: update some libs, and various improvements/fixes.
This commits:
- Updates some libraries to latest officially supported versions:
** Numpy: 1.17.5
** OCIO: 1.1.1
** OIIO: 2.1.15
** OSL: 1.10.10
** OIDN: 1.2.1

- Re-enables some distro packages (like OSL, OIIO, OCIO...).

- Add missing 'CMake cleanup commands' for generated CMake update
  command, for Embree, OIDN and OpenXR.

- Generalizes using min/max versions of accepted libraries, if no
  package can be found in specified range then it is built from sources.

The later point should help keeping things a bit in better conditions,
although current maximal accepted versions are somewhat arbitrary guess
currently.
2020-08-11 18:11:45 +02:00
72b9d0de51 Cleanup some building errors with ClangTidy. 2020-08-11 18:11:45 +02:00
11509c14c3 Fix T75588: Missing loop cuts preview for edges without quads
The preview of points was only done when the edge is wire.

Now the preview of points is done when the edge is not connected to any
quad.

Also to avoid edge slide in this case, all new vertices created in this
specific case are not selected.

Differential Revision: https://developer.blender.org/D7457
2020-08-11 13:02:37 -03:00
304f0f56c5 Merge branch 'blender-v2.90-release' into master 2020-08-11 17:52:12 +02:00
c300a994b1 Merge branch 'blender-v2.90-release' 2020-08-11 17:00:50 +02:00
eca062b9cb Fix T79563: Compositor's Stabilize 2D in invert mode does not work correctly
Is not only the values of translation/scale/rotation which are to be inverted,
but also the order of operations.

Differential Revision: https://developer.blender.org/D8518
2020-08-11 17:00:30 +02:00
e84e6e12ed Fix T79616: Sort by column in filebrowser is broken
After changes in rBc606044157a3, mouse press events would be blocked by
the selection operator. This only worked by chance before.
2020-08-11 16:55:35 +02:00
a3af59f8e3 Merge remote-tracking branch 'origin/blender-v2.90-release' 2020-08-11 16:14:15 +02:00
1c294fb1fd Revert "Fix T77409: Crash showing vertex/face duplicators in edit-mode"
This reverts commit 9adedb2605. It changes
how duplis work, and by that altered how Alembic and USD files are
written. This was signalled by a failing Alembic unit test.
2020-08-11 16:12:44 +02:00
90baead979 GPencil: Split Primitive operators and add number of points to Topbar
Now the operators are split to define different default values. This is also required for the future Bezier primitive tools.

This allows to show in the Topbar the number of subdivisions. Before this value was totally hidden and it was number of Edges. The wheelmouse can be used to override the value while running, but does not change the default value.

{F8766270}

All operators share same code.

Also, fixed some bad practices done with Toolbar in python.

Reviewed By: mendio, pepeland

Differential Revision: https://developer.blender.org/D8506
2020-08-11 15:27:07 +02:00
344a6a4b80 Cleanup: rename variables 'gizmo_snap' to 'snap_gizmo'
And a minor fix when there is no `USE_SNAP_DETECT_FROM_KEYMAP_HACK`.
2020-08-11 10:08:43 -03:00
24c2c488e7 Merge branch 'blender-v2.90-release' into master 2020-08-11 21:48:51 +10:00
023151868f Merge branch 'blender-v2.90-release' into master 2020-08-11 21:48:46 +10:00
18c9f7ef72 Fix T79517: Data Transfer modifier fails in edit-mode 2020-08-11 21:48:02 +10:00
6b573d9877 Fix mesh data-transfer tracking if a change was made 2020-08-11 21:48:02 +10:00
d8d4c8b6cc Fix compile error after recent cleanup 2020-08-11 13:36:14 +02:00
e738d0ec6c Merge branch 'blender-v2.90-release' into master 2020-08-11 13:32:41 +02:00
e11aa3eddd Python: don't remove existing context overrides when calling an operator
Reviewers: campbellbarton, brecht

Differential Revision: https://developer.blender.org/D8532
2020-08-11 13:32:07 +02:00
6d888133da Timers: set first window as context in timer
This avoids some crashes when running Python code in timers.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D8531
2020-08-11 13:24:52 +02:00
1b8778e314 Cleanup: Strict compiler flags
Mainly caused by moving tests to source folder, which brings
new compiler flags.

Also, no need to extend include directories (to the non-existing paths,
btw) since this is done by the CmakeList.txt which is in the blenlib folder.
2020-08-11 12:48:33 +02:00
aa4fb22cac Depsgraph: Use UUID to match modifiers
Solves possible pointer-based comparison fiasco.

Another nice outcome of this is that topology cache will now be
preserved throughout the undo system. For example, undo of object
transform will not require topology cache to be re-created.

Differential Revision: https://developer.blender.org/D8493
2020-08-11 12:17:22 +02:00
6f99dfc0c6 Modifier: Maintain per-modifier session UUID
Allows to keep track of modifiers, which is required, for example,
for runtime data preservation in depsgraph.
2020-08-11 12:17:13 +02:00
ca2c4907fb Fix path regression test build failure on Windows
The file was including BKE. It was a required fix for another
compilation error a while back. It is a bad level include, and
seems is not needed anymore.
2020-08-11 10:36:21 +02:00
15abd58b15 Merge branch 'blender-v2.90-release' into master 2020-08-11 17:11:22 +10:00
bb5cc3bccf Fix memory leak setting error text in the data-transfer modifier 2020-08-11 17:10:36 +10:00
90c6a38cbb Merge branch 'blender-v2.90-release' into master 2020-08-11 16:36:05 +10:00
77c4ed1d04 Merge branch 'blender-v2.90-release' into master 2020-08-11 16:34:50 +10:00
fb049a7976 Merge branch 'blender-v2.90-release' into master 2020-08-11 16:34:39 +10:00
9adedb2605 Fix T77409: Crash showing vertex/face duplicators in edit-mode
Support duplicators in edit-mode without creating a mesh copy.
2020-08-11 16:21:19 +10:00
23a6b5d91e BMesh: add UV calculate center call
Move uv_poly_center to BM_face_uv_calc_center_median as
it was only defined in uvedit_intern.h
2020-08-11 15:11:31 +10:00
fc5ff99770 Cleanup: use doxy sections for object_dupli.c 2020-08-11 14:57:20 +10:00
7f15120e9c Cleanup: GCC warning in guardedalloc_overflow_test 2020-08-11 13:22:59 +10:00
0c0f972e86 Cleanup: spelling 2020-08-11 13:19:09 +10:00
acd4687063 Merge branch 'blender-v2.90-release' 2020-08-10 23:16:25 +02:00
bc5d144855 Fix T77298: Can't bake texture with multiple objects
The problem here is that the baking code uses tiles to exchange pixel data with
the renderer since a recent-ish refactor, but the code that sent data to the
renderer did not initialize the bake result pixels.

Therefore, when the baking process for the second object started, Cycles
received empty tiles and sent them back as-is if the second object did not
cover them.

By initializing the tiles with the result of the previous bakes, we avoid this
problem.
2020-08-10 22:54:01 +02:00
784adccf47 Merge branch 'blender-v2.90-release' 2020-08-10 18:30:53 +02:00
8ef05d3180 Fix T79636: Inserting special characters with Ctrl+Alt broken on Windows
We can't exactly follow what we do for macOS here. On Windows special
characters can be inserted with Ctrl+Alt. So make sure we expect UTF-8
characters when Alt is held.

Mistake in 87062d4d67.
2020-08-10 18:29:02 +02:00
3b08cb3236 Cleanup: follow code style regarding braces 2020-08-10 18:18:59 +02:00
c521b69ffb BLI: improve StringRef for C++17
Since C++17 there is also std::string_view, which is similar to StringRef.
This commit does a couple of things:
* New implicit conversions between StringRef and std::string_view.
* Support std::string_view in blender::DefaultHash.
* Support most of the methods that std::string_view has.
* Add StringRef::not_found which can be used instead of -1 in some places.
* Improve/fix the description at the top of BLI_string_ref.hh.
2020-08-10 18:17:07 +02:00
53d203dea8 Tests: move remaining gtests into their own module folders
And make them part of the blender_test runner. The one exception is blenlib
performance tests, which we don't want to run by default. They remain in their
own executable.

Differential Revision: https://developer.blender.org/D8498
2020-08-10 18:14:00 +02:00
af77bf1f0f Sculpt: Option to mask front faces only using Lasso and Box Mask
This adds a property that checks the normals of each vertex against the
view direction to decide if they should be masked (similar to the
"Front Faces Only" option works for brushes.

Reviewed By: sergey

Maniphest Tasks: T77637

Differential Revision: https://developer.blender.org/D8448
2020-08-10 18:10:45 +02:00
ed9c0464ba Sculpt: Boundary Brush
This brush includes a set of deformation modes designed to deform and
control the shape of the mesh boundaries, which are really hard to do
with regular sculpt brushes (and even in edit mode). This is useful
for creating cloth assets and hard surface base meshes.

The brush detects the mesh boundary closest to the active vertex and
propagates the deformation using the brush falloff into the mesh.
It includes bend, expand, inflate, grab and twist deform modes.

The main use cases of this brush are the Bend and Expand deformation
modes, which depend on a grid topology to create the best results.
In order to do further adjustments and tweaks to the result of these
deformation modes, the brush also includes the Inflate, Grab and
Twist deformation modes, which do not depend that much on the topology.

Grab and Inflate are the same operation that is implemented in the
Grab and Inflate tools, they are also available in the boundary brush
as producing deformations with regular brushes in these areas is very
hard to control.

Even if this brush can produce deformations in triangle meshes and
meshes with a non-regular quad grid, the more regular and clean the
topology is, the better. Most of the assets this brush is intended to
deform are always created from a cylindrical or plane quad grid, so it
should be fine. Also, its algorithms can be improved in future versions
to handle more corner cases and topology patterns.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8356
2020-08-10 18:04:00 +02:00
71639cc862 Merge branch 'blender-v2.90-release' 2020-08-10 17:40:42 +02:00
9c093a5d9a Fix T79324: Crash when changing View Layer while VR session runs
Proper handling of View Layers for the VR session was never implemented.
Now the View Layer of the VR session follows the window the session was
started in.
Note that if this window is closed, we fallback to another window. This
is done to avoid the overhead it would take to maintain a separate
depsgraph for the VR view. Instead we always share some already visible
View Layer (and hence the depsgraph).
2020-08-10 17:39:36 +02:00
01537f7a9d Merge branch 'blender-v2.90-release' 2020-08-10 12:06:33 -03:00
c0340ec893 Fix T78113: Random explosions of cloth with self collision
The problem is caused by a lack of prediction in the `isect_line_segment_tri_v3`
that incorrectly confirms some intersections of coplanar segments to the triangle.

The solution is to use another algorithm to detect intersections.

This also resulted in a slight improvement in the performance:
- 1min 17sec to 1min 6sec in my test file

Differential Revision: https://developer.blender.org/D8500
2020-08-10 12:05:37 -03:00
1baba83bb0 GPencil: Fix warning text 2020-08-10 16:41:15 +02:00
4ada290956 GPencil: Invert Filled area pressing Ctrl key
This feature was suggested in https://blender.community/c/rightclickselect/rggbbc/

When press `Ctrl+LMB`, the filled area is inverted.

{F8749306}

{F8749307}

Filling several areas:

{F8759399}

Differential Revision: https://developer.blender.org/D8477
2020-08-10 16:34:26 +02:00
3fe2fceb4e GPencil: Change default Stroke thickness when convert curves
The thickness by default was using the old Draw Engine values and it was too thick in new engine.
2020-08-10 15:33:16 +02:00
3a3dc45e7b GPencil: Remove color conversion when convert curve
In previous versions, grease pencil used sRGB and a color conversion was needed, but now all is Linear and the conversion changes the color wrongly.
2020-08-10 15:33:09 +02:00
cfba3cb121 Merge branch 'blender-v2.90-release' into master 2020-08-10 14:35:22 +02:00
ab2dbafd8b Fix T77847: "Add plane > align" causes crash when certain rigs are in the scene (2.83, fixed in 2.90).
Root of the issue was not fixed in 2.90, only hidden by the fact that we
now re-read much less data during undo's that we used to, when some new
datablock gets added or removed.

This is not an ideal solution (as usual when dealing with data pointers
shared across data-blocks), but it's decent enough. thanks a lot to
@brecht for it!

To be backported to 2.83 too.
2020-08-10 14:34:55 +02:00
659f7f1981 Merge branch 'blender-v2.90-release' 2020-08-10 13:52:39 +02:00
2e5c877056 Fix pose offset on VR session start for some OpenXR runtimes
We want the session to start exactly at the landmark position, with
no additional offset. Some runtimes (e.g. Windows Mixed Reality) may
give an initial non-[0,0,0] position at session start though.

Also add a comment explaining the purpose of the eye offset variable.
2020-08-10 13:52:13 +02:00
f1cb3dfbaa Fix broken behavior on active VR Landmark change
There would always be an unintended offset applied. Per design there
should not be any offset when changing VR Landmarks, the view should
just jump exactly to the Landmark.

Due to the recent changes, we don't have to add, but substract the eye
offset we apply to get the wanted behavior.

Mistake in 607d745a79.
2020-08-10 13:51:43 +02:00
9c1f140a47 Fix pose offset on VR session start for some OpenXR runtimes
We want the session to start exactly at the landmark position, with
no additional offset. Some runtimes (e.g. Windows Mixed Reality) may
give an initial non-[0,0,0] position at session start though.

Also add a comment explaining the purpose of the eye offset variable.
2020-08-10 13:49:34 +02:00
727a744e3c Fix broken behavior on active VR Landmark change
There would always be an unintended offset applied. Per design there
should not be any offset when changing VR Landmarks, the view should
just jump exactly to the Landmark.

Due to the recent changes, we don't have to add, but substract the eye
offset we apply to get the wanted behavior.

Mistake in 607d745a79.
2020-08-10 13:40:11 +02:00
342a6b5f93 Fix T77685: object transforms from rigid body simulation are ignored by modifiers
This does not fix all the cases in the bug report, because there are multiple
different issues. Only the first two are fixed. The third is probably a known
issue for now.

Before this patch, the rigid body simulation was always done after modifiers
are evaluated, because to perform the simulation, the final geometry of the
object was required. However, the geometry is not required in all cases,
depending on the selected collisions shape.

This patch changes it so that when the simulation does not need the
evaluated geometry, the simulation will be done before the modifiers
are evaluated. This gives the modifiers access to the simulated positions.
When the rigid body simulation does depend on the evaluated geometry,
it will still be performed after modifiers are evaluated.

The simulation will be performed after modifiers are evaluated, iff
the collision shape is "Convex Hull" or "Mesh" and the source is set
to "Deform" or "Final".

Reviewers: sergey

Differential Revision: https://developer.blender.org/D8487
2020-08-10 10:54:28 +02:00
52a57af3d5 Cleanup: use doxy sections for object_dupli.c 2020-08-10 18:30:47 +10:00
f15d33d585 Fix T79619: Sequencer window not updating whilst playing animation
Reverted Playhead optimizations for VSE. Needs more investigation to
detect which settings in the VSE would require a redraw of the area.
2020-08-10 09:28:18 +02:00
e2d5e8d584 Merge branch 'blender-v2.90-release' 2020-08-10 09:09:49 +02:00
6640ed92c0 Fix T79346: VSE custom proxy file is broken
In last set of refactoring patches, code implementing this feature
has been accidentally removed.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8449
2020-08-10 08:11:09 +02:00
Eitan
4fd73e7465 Remove Video Proxy Resolution limitation
Height and width of video proxies was limited to multiples of 8 with
comment "JPEG requires this".

I could not find any resource that would confirm this to be the case
with FFMPEG and MJPEG codec.

I have looked in:
https://ffmpeg.org/ffmpeg-all.html
https://ffmpeg.org/ffmpeg-formats.html
https://ffmpeg.org/doxygen/trunk/structAVCodecContext.html

Reviewed By: ISS, sergey, sybren

Differential Revision: https://developer.blender.org/D6507
2020-08-10 07:54:51 +02:00
00162e6b7b Fix T79246 GPUShader: compile error on AWS Elastic Graphics 2020-08-09 14:07:00 +02:00
b522e834ec msvc: Fix build error with msvc 2017
`using blender;` Was required to get the Vector type.
2020-08-08 18:04:46 -06:00
a1d57e3f05 Cleanup: replace sizeof division with ARRAY_SIZE macro 2020-08-08 14:08:37 +10:00
171e77c3c2 Cleanup: use array syntax for sizeof with fixed values
Also order sizeof(..) first to promote other values to size_t.
2020-08-08 13:38:00 +10:00
4bf3ca2016 Cleanup: replace elem_strcmp with elem_streq
This is used for equality and didn't have the same behavior as strcmp.
2020-08-08 13:38:00 +10:00
61a045b7d3 Clenup: use STREQ macro 2020-08-08 13:38:00 +10:00
586a308467 Cleanup: remove redundant return parenthesis 2020-08-08 13:37:55 +10:00
f1b1a0745f Cleanup: GPU: Change gpu_context_private.h to C++ only header 2020-08-08 03:05:39 +02:00
f742a7ac79 DRW: Fix runtime error: shifting signed 32bits int 2020-08-08 01:46:51 +02:00
cb7ea2ccfb GPUBackend: Add new GPUBackend object to manage GL object allocations
This just set a global object responsible for allocating new objects
in a thread safe way without needing any GPUContext bound to this
thread.

This also introduce the GLContext which will contain all the GL related
functions for the current context.

# Conflicts:
#	source/blender/gpu/intern/gpu_context.cc
2020-08-08 01:30:33 +02:00
1dd7377596 GPUBackend: Add new GPUBackend object to manage GL object allocations
This just set a global object responsible for allocating new objects
in a thread safe way without needing any GPUContext bound to this
thread.

This also introduce the GLContext which will contain all the GL related
functions for the current context.
2020-08-08 01:16:40 +02:00
0ccf3f89d2 GPU: Move ghost default framebuffer getter to context creation 2020-08-08 01:15:28 +02:00
0255f1e022 GPUBatch: Use custom allocator
This is needed for the new GPU abstraction.
2020-08-08 01:15:27 +02:00
0063d1befc DRW: Instance Data: Replace GPUBatch bulk allocation by separate alloc
This is suboptimal but needed for the new GPU abstraction.

Maybe a better solution will be needed if performance is impacted.
2020-08-08 01:15:27 +02:00
994ab8985b Cleanup: Fix reported clang-tidy code-style issues.
This resolves `error: statement should be inside braces` in some
windows specific code that previously was unchecked by clang-tidy.
2020-08-07 14:53:42 -06:00
915cc956ba Cleanup: Rename soops to space_outliner
No functional changes. Rename soops, soutliner, and so to
space_outliner.
2020-08-07 11:49:58 -06:00
2597c12b0c Cleanup: Remove outliner statement with no effect
No functional changes. The memory dupalloc will already carry over the
flags.
2020-08-07 11:49:57 -06:00
dc5c616cca Cleanup: use _fn for outliner callback functions
No functional changes.
2020-08-07 11:49:57 -06:00
e3f369e13f Cleanup: fix some clang tidy warnings 2020-08-07 19:19:38 +02:00
c50e5fcc34 Cleanup: use C++ style casts in various places 2020-08-07 18:42:21 +02:00
28b1022434 Fix compile error with WITH_INPUT_NDOF after last own commit
Caused by dcff28e1e7.
2020-08-07 18:41:15 +02:00
ad6e63cb96 Cleanup: enable Clang-Tidy bugprone-parent-virtual-call rule
I added a single `NOLINT` exception with explanation.

No functional changes.
2020-08-07 17:59:26 +02:00
dcff28e1e7 UI Code Quality: Use derived struct for HSV Cube buttons
For the main rationale behind this design, see 49f088e2d0. Further,
this removes users of uiBut.a1, which is a very ugly design
choice (hard to reason about).

Part of T74432.
2020-08-07 17:46:58 +02:00
60b42ef117 Cleanup: enabled Clang-Tidy bugprone-suspicious-missing-comma rule
No functional changes because no code changed.
2020-08-07 17:46:32 +02:00
ca85da075b Cleanup: enabled Clang-Tidy bugprone-not-null-terminated-result rule
No functional changes because no code changed.
2020-08-07 17:38:45 +02:00
a9c91ce331 Cleanup: fixed Clang-Tidy bugprone-suspicious-string-compare warnings
No functional changes.
2020-08-07 17:16:49 +02:00
7309ee4df7 Merge branch 'blender-v2.90-release' 2020-08-07 17:12:00 +02:00
a93be410c9 Fix previous commit, we first need to be sure we actually get a mesh... 2020-08-07 17:11:21 +02:00
c4b1ef45a0 Merge branch 'blender-v2.90-release' 2020-08-07 17:08:44 +02:00
8fa42f0bd4 Fix T79604: Switching to edit mode on boolean object runs out of memory.
Note that this is a dummy safe fix for now, far from optimal.
2020-08-07 17:07:30 +02:00
be83b8f456 Cleanup: CMake warnings related to "find package" modules
Fix package name missmatch in a few module files. IE "ALEMBIC" was
defined in the file but the find_package commands used "Alembic"

Some modules state that they set and use the _LIBRARY variable but the
do in fact not do this. Removed these comments from those files.
2020-08-07 16:56:38 +02:00
4c2ce816aa Cleanup: enabled Clang-Tidy rule bugprone-infinite-loop
Enabling it and doing a full rebuild didn't cause any warnings, so nothing
else to do here.

No functional changes.
2020-08-07 16:46:26 +02:00
7aeab6f6aa Cleanup: added explanation of why incircleadapt is allowed to be long
This is a followup of d4bd0789ab, as it was
lacking a bit of an explanation.

No functional changes.
2020-08-07 16:38:28 +02:00
6414da0381 Cleanup: enable and silence Clang-Tidy readability-function-size
Enable Clang-Tidy's `readability-function-size` rule and add a few
`NOLINT` markers to explicitly silence warnings for three functions.
These functions are huge and would IMO benefit from splitting up, but
are hard to without intimate knowledge of the code.

At least by enabling the rule, we can start tweaking the values and
refactoring other functions that bubble up as being too long/complex.

No functional changes.
2020-08-07 16:23:17 +02:00
2a0bc4d23e Cleanup: Nodes, silence Clang-Tidy readability-function-size
Add a `NOLINT` marker to explicitly silence a warning from Clang-Tidy's
`readability-function-size` rule for the `node_type_base()` function.
This function is indeed huge, but that is because a lot of macros are
expanded. Before expansion things are still not small, but still
understandable & expandable.

No functional changes.
2020-08-07 16:23:02 +02:00
4ce298b3c0 Cleanup: Clang-Tidy. readability-non-const-parameter in pixel drawing 2020-08-07 16:13:11 +02:00
17dbdcc552 Fix T79571: "Assign Shortcut" doesn't work for "Clear Keyframes"
In the 3D View, the "Animation" keymap is not used, but the mode
specific ones. So the shortcut editing code should use these too, just
like the default keymap does.
2020-08-07 16:11:30 +02:00
d4bd0789ab Cleanup: Delaunay 2D, silence Clang-Tidy readability-function-size
This adds a `NOLINT` marker to explicitly silence a warning from
Clang-Tidy's `readability-function-size` rule for the `incircleadapt()`
function in `delaunay_2d.c`.

No functional changes.
2020-08-07 15:54:28 +02:00
b27a953798 Cleanup: Versioning: silence Clang-Tidy readability-function-size
This adds `NOLINT` markers to explicitly silence warnings from Clang-Tidy's
`readability-function-size` rule for versioning functions. Technically
these could be refactored and split up into smaller bits, but generally
they are hardly ever looked at once they're a few releases old.

No functional changes.
2020-08-07 15:54:28 +02:00
3090b52f8c Cleanup: PyBGL, Clang-Tidy readability-function-size fixes
This addresses warnings from Clang-Tidy's `readability-function-size`
rule in the `source/blender/python` module.

It's just `BPyInit_bgl()` that's been split up into one or two smaller
functions per OpenGL version.

No functional changes.
2020-08-07 15:54:28 +02:00
24d8ab1556 Merge branch 'blender-v2.90-release' 2020-08-07 15:50:42 +02:00
c2691c93d5 Fix T79201: Mantaflow: Fluid guides don't affect simulation.
This broke during the OpenVDB update for 2.90. Just making sure that guiding velocity files are being read correctly.
2020-08-07 15:33:51 +02:00
076a93b855 UI Code Quality: Use derived struct for progessbar buttons
For the main rationale behind this design, see 03b122e2a18df. Further,
this removes users of `uiBut.a1`, which is a very ugly design
choice (hard to reason about).

Part of T74432.
2020-08-07 15:17:52 +02:00
9f475db6c9 Fix failing assert when entering Texture Paint mode
Was unbinding the shader twice.
2020-08-07 15:17:52 +02:00
68c00e6f8f UI Code Quality: Use derived struct for color buttons
For the main rationale behind this design, see 03b122e2a18df. Further,
this removes users of `uiBut.a1`/`uiBut.a2`, which is a very ugly design
choice (hard to reason about).

Part of Part of T74432.
2020-08-07 15:17:52 +02:00
49f088e2d0 UI Code Quality: Use derived structs for search buttons and decorators
The current on-size-fits-all `uiBut` creates quite a mess, where it's
hard to reason about which members are free for use, under which
conditions they are used and how.
`uiBut` also has members that aren't used at times, violating the "don't
pay for what you don't use" principle.

To address this, we want to move to typed buttons, where `uiBut` is just
a base struct and each type extends it as needed. That structures data
better and type specific data is only available if it's actually used by
a button type.

Two trade-offs:
* Many casts to the derived type have to be done.
* Sometimes we change the button type after it's created. So I had to
  add logic to reallocate the button for use with the new, possibly
  derived struct. Ideally that wouldn't be needed, but for now that's
  what we have.

Part of T74432.

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

Reviewed by: Brecht Van Lommel, Campbell Barton
2020-08-07 15:17:52 +02:00
48e089375e Cleanup: pass arrays const where possible 2020-08-07 22:56:13 +10:00
b134434224 Cleanup: declare arrays arrays where possible 2020-08-07 22:37:39 +10:00
3db67fd670 Revert "Cleanup: Cycles, applied Clang-Format"
This reverts commit 88cc3f167f. It was
caused by running Clang-Format version 10, instead of 9 from the
precompiled libs directory.
2020-08-07 13:38:07 +02:00
c04088fed1 Cleanup: Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule. This should be the final commit of the series of commits that
addresses this particular rule.

No functional changes.
2020-08-07 13:38:07 +02:00
3d48d99647 Cleanup: Python, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/python` module.

No functional changes.
2020-08-07 13:38:07 +02:00
44b7354742 Cleanup: Nodes, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/nodes` module.

No functional changes.
2020-08-07 13:38:06 +02:00
47f8c444a4 Cleanup: Modifiers, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/modifiers` module.

No functional changes.
2020-08-07 13:38:06 +02:00
dee359e26e Cleanup: IO, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/io` module.

No functional changes.
2020-08-07 13:38:06 +02:00
dbf4f52fe0 Cleanup: ImBuf, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/imbuf` module.

No functional changes.
2020-08-07 13:38:06 +02:00
c889d93c80 Cleanup: GPU, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/gpu` module.

No functional changes.
2020-08-07 13:38:06 +02:00
326e137a8c Cleanup: Freestyle, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/freestyle` module.

No functional changes.
2020-08-07 13:38:06 +02:00
94eaaf097c Cleanup: Depsgraph, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/depsgraph` module.

No functional changes.
2020-08-07 13:38:06 +02:00
f453ee7d3a Cleanup: Compositor, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/compositor` module.

No functional changes.
2020-08-07 13:38:06 +02:00
fb18e48a84 Cleanup: Blenloader, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/blenloader` module.

No functional changes.
2020-08-07 13:38:06 +02:00
1b272a649b Cleanup: Blenkernel, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/blenkernel` module.

No functional changes.
2020-08-07 13:38:06 +02:00
cfc6f9eb18 Clang-Tidy: Address readability-redundant-string-init 2020-08-07 12:18:15 +02:00
156448ba4b Cleanup: Draw, Clang-Tidy else-after-return fixes (incomplete)
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/draw` module. Not all warnings are addressed
in this commit.

No functional changes.
2020-08-07 12:01:40 +02:00
88cc3f167f Cleanup: Cycles, applied Clang-Format
No functional changes.
2020-08-07 12:01:40 +02:00
4ba9d7d71e Fix fast clicks on File Browser sort columns not changing sorting
Clicking on the column header is supposed to enable sorting by this
column, or switch the sort order if already enabled.
The double-click event would be blocked by the `file.execute()`
operator, which is not supposed to act if the user clicked outside the
file list.
2020-08-07 11:39:04 +02:00
5809dc6b5b Fix T79616: Sort by column in filebrowser is broken
After changes in rBc606044157a3, mouse press events would be blocked by
the selection operator. This only worked by chance before.
2020-08-07 11:39:04 +02:00
a29686eeb3 Cleanup: Blenlib, Clang-Tidy else-after-return fixes (incomplete)
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/blenlib` module. Not all warnings are
addressed in this commit.

No functional changes.
2020-08-07 11:23:02 +02:00
e0c51b466f Merge branch 'blender-v2.90-release' into master 2020-08-07 10:23:33 +02:00
1b1129f82a Code Style: use "#pragma once" in intern/ghost
More information can be found in D8466.
2020-08-07 10:18:01 +02:00
8198dbb888 Code Style: use "#pragma once" in some newer headers
Those were missing from the previous commit, because these headers
only exist in the `master` and not in the `blender-v2.90-release` branch.
2020-08-07 10:10:37 +02:00
af88cc0701 Cleanup: make format 2020-08-07 10:07:36 +02:00
7283e6fb73 Merge branch 'blender-v2.90-release' into master 2020-08-07 10:04:57 +02:00
91694b9b58 Code Style: use "#pragma once" in source directory
This replaces header include guards with `#pragma once`.
A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`),
because they are used in other places.

This patch has been generated by P1561 followed by `make format`.

Differential Revision: https://developer.blender.org/D8466
2020-08-07 09:50:34 +02:00
21fec95139 Merge branch 'blender-v2.90-release' 2020-08-07 01:23:20 +02:00
58909abc68 EEVEE: Render: Fix regression caused by previous Motion blur fix
Caused by rB4f59e4bddcb0c06e441adf68a5f252a4e5b4b260
2020-08-07 00:59:14 +02:00
6e226275fd Merge branch 'blender-v2.90-release' 2020-08-06 23:06:33 +02:00
4f59e4bddc Fix T78452 EEVEE: Motion Blur: Crash when using camera switching
This was caused by the ViewLayer being freed with all its
engine data.
2020-08-06 23:06:18 +02:00
3dcaca93a0 Fix T78160 EEVEE: Motion Blur: Bug with Follow Path animation
Follow path seems to not be catched by `BKE_object_moves_in_time`.
For this reason, we cache all transforms for all object and check
ourselves if an animation occurs. This is almost what cycles does.

We also fix the rigid body case if the rigid body use deformation.
2020-08-06 23:06:18 +02:00
9a1ff4445b Merge branch 'blender-v2.90-release' 2020-08-06 19:52:49 +02:00
3d35012a05 GPencil: Fix unreported wrong Polyline bottom tooltip
It was mising the Wheelmouse option and the name of the tool was wrong.
2020-08-06 19:52:30 +02:00
6f87a7ad9f GPencil: Fix unreported wrong Polyline bottom tooltip
It was mising the Wheelmouse option and the name of the tool was wrong.
2020-08-06 19:44:41 +02:00
8123b12006 Fix T79586: "rendering paused" not shown when viewport render starts paused 2020-08-06 19:19:22 +02:00
Vincent Blankfield
8fbfc150a0 Fix T77885: crash rendering grease pencil from compositor with multiple scenes 2020-08-06 19:19:22 +02:00
8719ac990f Merge branch 'blender-v2.90-release' 2020-08-06 19:15:35 +02:00
cc3cb52b23 Fix Pose Brush FK mode detecting wrong rotation origin
The Pose FK mode assings the rotation origin to the boundary of the last
visited face set in the floodfill operation. In some cases, the topology
of the model may make the flood fill operation to visit a face set as the
first one (assinging it to target) and visit it again as the last one
(assinging it to origin). This will make the pose brush to default the
origin and target to the brush location and not to the face sets as it
considers that there is only one possible boundary.
This adds a GSet to ensure that a particular face set is not visited
twice in the flood fill, fixing these cases.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7984
2020-08-06 19:14:39 +02:00
d693d77fed Sculpt: Cloth Brush simulation area property
This makes possible to choose between a local and a global simulation
when the cloth brush is used. Local simulation is the current default.
When global simulation is enabled, the cloth brush simulates the entire
mesh without taking any simulation limits into account.

This was possible before by setting the simulation limits to 10 (the
current maximum value allowed) so the entire mesh was inside the limits,
but this was a hack as the limits scale with the radius and there should
not be any limitation on how big the simulated area can be to be able to
simulate an entire object. This also allows to make a more clear
distinction between cloth brush presets that are intended to be used in
local areas to add details or globally to generate the base shape of the
mesh.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8481
2020-08-06 18:03:56 +02:00
97c56b7628 Merge branch 'blender-v2.90-release' 2020-08-06 17:29:28 +02:00
96e460ed9b GPencil: Patch old files after the change in how the first frame is used
This patching duplicates the first frame of the layer if the first frame number is not equals to the scene first frame number.

Related to T79567

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

Some minor cleanup in the patch.
2020-08-06 17:28:59 +02:00
5f51438185 Cleanup: Paint Cursor Refactor
The paint_draw_cursor function was handling the cursor drawing for 2D
and 3D views of all paint modes, calculating the brush radius, updating
the SculptSession data and updating and drawing all sculpt cursor
overlays for different tools. It was almost impossible to understand when
and what was being drawn and in which state the GPU matrix was.

Now everyting is organized into different functions, with clear
separation between modes, sculpt tool overlays and different drawing
setups. Update and drawing functions are also separated (this allows to
skip one PBVH query on each cursor drawing).

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8206
2020-08-06 17:27:57 +02:00
56af04d31f Merge remote-tracking branch 'origin/blender-v2.90-release' 2020-08-06 16:44:21 +02:00
bc8168f4a2 Cleanup: Remove bad level calls from space image
Groundwork for upcoming fix (D8472)
2020-08-06 16:44:03 +02:00
45e6ca3661 Cleanup: Stop accessing gpu_batch_presets_reset()
The current code is accessing this from outside the gpu "namespace". As
such it should be accessing GPU_ functions, not gpu_ functions.

This is also a place to centralize the XXX message that will be
addressed upon refactor. So we can reuse this call in other places that
need the same temporary workaround.

Groundwork for upcoming fix (D8472)
2020-08-06 16:44:03 +02:00
5e6119ddca Cycles: load OpenVDB file earlier in Blender export
In an upcoming bugfix we'll use OpenVDB data structures directly to build mesh
for sparse OpenVDB volumes, loading them OpenVDB grids earlier and removing any
references to Blender data structures makes that easier.

This also makes changes to Blender volumes to support this, so Cycles can take
ownership of a grid without Blender having to keep its own reference to it.
This should also be useful in a future Python API.

Ref D8401
2020-08-06 15:13:05 +02:00
9696239762 Merge branch 'blender-v2.90-release' 2020-08-06 15:05:00 +02:00
77d71cc113 Move CDData debug print helper from DM to CustomData 'namespace'/files. 2020-08-06 15:03:49 +02:00
86f586636d Merge branch 'blender-v2.90-release' into master 2020-08-06 22:58:48 +10:00
30d3d4fbc1 Merge branch 'blender-v2.90-release' into master 2020-08-06 22:58:44 +10:00
Yevgeny Makarov
91be94d465 UI: Fixes and small improvements to some labels and UI messages
Small tweaks to make labels and texts more correct, consistent and
polished.

Reviewed by: Aaron Carlisle, Julian Eisel

Differential Revision: https://developer.blender.org/D8346
2020-08-06 14:50:45 +02:00
e4f400f0d6 Cleanup: undeclared warnings 2020-08-06 22:50:38 +10:00
ba20da7214 Cleanup: avoid debug-only includes for BLI_assert.h
Having includes in debug builds makes it possible to accidentally
break release builds.

Avoid this by moving calls to other modules out of BLI_assert.h
into BLI_assert.c
2020-08-06 22:49:28 +10:00
cb1096163a Merge branch 'blender-v2.90-release' 2020-08-06 14:15:19 +02:00
73a43c9d8a Fix buffer-overflow when drawing Curve Guide objects
Was passing an array of length 3 to `where_on_path()` that expected
length 4.
2020-08-06 14:14:55 +02:00
cb294c3a01 Fix buffer-overflow when drawing Curve Guide objects
Was passing an array of length 3 to `where_on_path()` that expected
length 4.
2020-08-06 14:12:23 +02:00
Matias Herrero
8f34bf5ebb UI: Name force fields using the type of force by default
When adding multiple force fields of different types they are all called
"Field", making it difficult to tell them apart.
Lights were already named based on their type. This follows the light
code.

New names:
  - Force
  - Vortex
  - Magnet
  - Wind
  - Guide
  - TextureField
  - Harmonic
  - Charge
  - Lennard-Jones
  - Boid
  - Turbulence
  - Drag
  - Fluid
  - Field

Reviewed by: Julian Eisel

Differential Revision: https://developer.blender.org/D8420
2020-08-06 14:09:10 +02:00
690d61cf78 Merge branch 'blender-v2.90-release' 2020-08-06 13:39:09 +02:00
574bd866c8 Fix T78520 EEVEE: No viewport update when changing material nodetree
This was comming from rBd82c3d86155ea3c7831c7b5ef5d07bc8e2d99394
2020-08-06 13:37:41 +02:00
c4e606e386 Merge branch 'blender-v2.90-release' 2020-08-06 13:35:06 +02:00
Red Mser
b313710c10 Fix padding when multi-editing aligned widgets
Similar to T58668, labels were not aligned when multi-editing widgets
that are not center-aligned.

Reviewed by: Hans Goudey, Julian Eisel

Differential Revision: https://developer.blender.org/D8441
2020-08-06 13:34:40 +02:00
2d95a23aa6 Merge branch 'blender-v2.90-release' into master 2020-08-06 12:55:49 +02:00
769ec7ffe6 Fix T79408: ungroup operation update animation data incorrectly
Reviewers: sybren, sergey

Differential Revision: https://developer.blender.org/D8464
2020-08-06 12:50:08 +02:00
95fb3dc5ca Depsgraph: refactor dot exporter to use utility library from blenlib
Reviewers: sybren, sergey

Differential Revision: https://developer.blender.org/D8473
2020-08-06 12:40:37 +02:00
Yevgeny Makarov
b2e0c8f902 UI: Reduce item padding in the edit mesh context menus
Align items in the edit mesh context menus (reducing padding), for
consistency with other menus.
The root layout of menus doesn't add the padding, for sub-layouts
`align` has to be enabled.

{F8749633}

Reviewed By: Julian Eisel

Differential Revision: https://developer.blender.org/D8480
2020-08-06 12:33:28 +02:00
d71cb229d0 Fix T79484: Crash when viewing Movie Clip as a Background Image in a Camera
This seems to be caused by a change to the logic of movieclip_get_gputexture_ptr in rB97b597c.

Differential Revision: https://developer.blender.org/D8469
2020-08-06 11:52:59 +02:00
3439cbcc69 Merge branch 'blender-v2.90-release' into master 2020-08-06 19:20:32 +10:00
82150f5641 Workaround release builds failing
Issue caused by e9c4325515.
2020-08-06 19:19:25 +10:00
8a8c3e0972 Merge branch 'blender-v2.90-release' into master 2020-08-06 19:01:07 +10:00
c872e87bd4 Fix T79309: Safe Areas are not visible 2020-08-06 18:59:20 +10:00
6158f56f52 Merge branch 'blender-v2.90-release' into master 2020-08-06 17:19:01 +10:00
d4804f00fb Fix T79575: Crash loading nested set-scenes 2020-08-06 17:15:20 +10:00
14dc1aecf0 Merge branch 'blender-v2.90-release' into master 2020-08-06 15:48:42 +10:00
Daniel Bailey
e9c4325515 Python: include Python stack trace in the crash log
This helps Python developers troubleshoot errors when
Python causes a crash.
2020-08-06 15:44:00 +10:00
c86fed79d5 Cleanup: use doxy sections for py_capi_utils.c 2020-08-06 13:51:28 +10:00
85ddba475b Cleanup: no need for plural for term 'collision' 2020-08-06 09:38:25 +10:00
675700d948 Sculpt: Cloth Brush/Filter Collisions
This implements collisions in the solver of the cloth brush/filter. It
uses the scene colliders as a regular physics simulation.

There are still some parameters (friction, distance to the surface...)
that can be exposed as properties in later patches.

Thanks to Sebastian Parborg for helping me with the implementation.

Reviewed By: sergey, zeddb

Differential Revision: https://developer.blender.org/D8019
2020-08-06 00:29:22 +02:00
8c98684e22 Merge branch 'blender-v2.90-release' 2020-08-05 17:38:48 -04:00
c5b6b3d82f Fix T78698: Move cursor stuck after removing modifier
The panels are rebuilt when a modifier is removed so the button handlers need
to properly finish. By adding a context argument to the panel_delete function
this will happen properly.
2020-08-05 17:36:16 -04:00
3570173d0f Sculpt: Sharpen Mesh Filter curvature smoothing and intensify details
This adds a curvature smoothing and intensify details properties to control
the result of the Sharpen Mesh Filter.

Curvature smoothing removes high frequency details from the precalculated
sharpen data, so the filter result has much smoother surfaces and cleaner
sharpen lines;

Intensify details displaces the vertices of creases and valleys in the direction
opposite to its neighbors average, so it intensifies high frequency details
in those areas, producing more noisy and sharp shapes:

Both this properties can be used in combination to achieve a good balance of
high and low frequency details depending on the shape and the desired result.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8447
2020-08-05 23:16:42 +02:00
ad3838e1e0 Fix Squash and Stretch naming in the Pose Brush deform mode
Previusly it was using the / character, which implies that there is one
deformation mode and and invert deformation mode like in the other two
deformation, but squash and stretch is only one deformation mode and
does not have an invert mode.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8463
2020-08-05 23:00:38 +02:00
9ea77f5232 Sculpt: Option to lock the rotation in the Pose Brush scale deform mode
The scale deform mode includes rotation by default, so when when scaling
down a part of the models it becomes harder to control as the effect of
the rotation less predictable (similar to using trackball rotation in a
very small radius). This locks the rotation of the segment, so parts of
the model can be scaled down in a more predictable way.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8465
2020-08-05 22:59:27 +02:00
3474b0968a Merge branch 'blender-v2.90-release' 2020-08-05 22:29:40 +02:00
59861db763 Fix T77517 EEVEE: Collection Holdout doesn't work in 2.90
The default material was missing its init code.
2020-08-05 22:29:21 +02:00
29ef7142dd EEVEE: Fix previous commit
Small mistake in rB5249a813f22f

Now for fix it real!
2020-08-05 22:18:26 +02:00
2b7d39c3f1 Merge branch 'blender-v2.90-release' 2020-08-05 22:13:15 +02:00
5249a813f2 Fix T78954 EEVEE: Motion Blur: Bug with hair particles on linked objects
The cache key for particle system was the original Object data. But this
is incorrect for particle systems as modifiers are not shared.
2020-08-05 22:12:53 +02:00
492235903d Merge branch 'blender-v2.90-release' 2020-08-05 21:58:03 +02:00
315ae005c3 Fix file name sometimes not visible immediately after renaming
Steps to reproduce were:
* Open File Browser
* Create a new directory
* Cancel renaming with Esc

File selection flags were modified during drawing when the rename button
got removed, but the file name label drawing wasn't checking the
modified state.
2020-08-05 21:57:51 +02:00
f41eb8b2a9 Merge branch 'blender-v2.90-release' 2020-08-05 21:34:15 +02:00
c606044157 Fix double-click not opening directories on some touch-pads
The file.execute() operator is the one that actually opened directories
and files, not file.select() with the "open" option, as it was assumed
when changing the keymap to double-click for opening. It only acts on
the current selection though, so we have to ensure the selection is set
on the first click.
Now, some touch-pads have a delay until they register a click event, so
the double-click would be registered instead, before the selection is
set. Always select on mouse-down now and remove the unnecessary select
operator call on double-click.
2020-08-05 21:34:00 +02:00
82343037f5 Merge branch 'blender-v2.90-release' 2020-08-05 15:48:29 -03:00
Deep Majumder
c323f3e90a Fix T77548: Crash when using Add Object Tool with Normal Orientation and zero objects in scene
The crash is caused by the fact that a NULL Object pointer is passed to
calculate the transform orientation, which has been set to normal.

A check has been include to detect the same.

Differential Revision: https://developer.blender.org/D7951
2020-08-05 15:45:46 -03:00
7aec56204b Merge branch 'blender-v2.90-release' 2020-08-05 20:33:40 +02:00
f3e724b93d Fix T79370 EEVEE: Texture paint does not update during stroke
Was caused by rBd82c3d86155e
2020-08-05 20:33:24 +02:00
854f73b4a2 Fix T78592: Shear operator fails to affect curve control point handles
Use `td->iloc` as the coordinates of the transformed element.

It is more accurate and other transformation modes, such as scale, also
operate on `td->iloc`.
2020-08-05 15:06:23 -03:00
d9b72a96b3 Merge branch 'blender-v2.90-release' 2020-08-05 19:41:04 +02:00
1b593edf1d Fix T78907: Renaming file doesn't work while mouse is over file icon
The icons are label buttons. Usually these are not editable and can not
become active. These are draggable ones though (so dragging files can be
dragged by dragging the icon) which creates an exception to this rule.
So hovering the icon would activate its label and when executing the
rename operator via shortcut it wouldn't get exited properly. This broke
the invariant of only allowing a single active button at a time.
Added an assert to check that invariant now.

Letting the code to activate the text button ensure any currently active
button is exited seems sensible.
2020-08-05 19:40:40 +02:00
38e9a349de Workbench: Fix broken id pass 2020-08-05 19:37:41 +02:00
cf3431e0e8 Fix T79509 Workbench: Object color mode broken if more than 4096 objects
This was due to the new DRWShadingGroup not being saved and reused for
the next objects.
2020-08-05 19:37:41 +02:00
93f4f96818 Merge branch 'blender-v2.90-release' 2020-08-05 20:21:08 +03:00
a316d3b6c6 Eevee: do not rely on the SOCK_HIDE_VALUE flag for node group sockets.
When disconnecting links for defaulted node group inputs, recurse
into the nested node group nodes, instead of checking the socket
flag. Otherwise the behavior is confusing and differs from Cycles.

Differential Revision: https://developer.blender.org/D8455
2020-08-05 20:20:48 +03:00
9118df1ecd Merge branch 'blender-v2.90-release' into master 2020-08-05 10:46:12 -06:00
d84dce85f3 Fix T72297: disabled buttons toggling on drag
Disabled buttons would incorrectly toggle state when a drag toggle
passed over them. This adds a check to prevent a drag toggle on disabled
buttons.

Differential Revision: https://developer.blender.org/D8476
2020-08-05 10:42:43 -06:00
9e644b98a6 GPencil: Reorganize Advanced Brush panel
The Ignore Transparent Strokes and the Factor are related, so it's better disable factor if the checkbox is disabled.
2020-08-05 18:25:58 +02:00
e03d53874d Fix T79127: crash on scene.ray_cast() with non-viewport view layer
The `rna_Scene_ray_cast()` function tried to find the current depsgraph. To
this end, it required the scene, the view layer, and bmain. Scene has a cache
of per-view-layer depsgraphs, to speed up switching between view layers. This
cache does not contain render depsgraphs, and evaluated view layers also don't
have a depsgraph here.

When a suitable depsgraph cannot be found, a new depsgraph is created. However,
this depsgraph is not evaluated, and has an unexpanded scene pointer with a
`NULL` `view_layer`. Using this then crashes Blender. Also, there was no way
for the code to get the render depsgraph.

The solution is to pass the depsgraph to the `ray_cast()` function, instead of
the view layer. This avoids the depsgraph lookup, and also works correctly when
rendering.

Some add-ons also need updating, which I'll do in the `addons`
repository soon.

Reviewed By: Sergey

Differential Revision: https://developer.blender.org/D8475
2020-08-05 18:14:06 +02:00
fff12be945 GPencil: Rename Default Fill Boundary option to All 2020-08-05 18:00:34 +02:00
927b1e9fa2 Merge branch 'blender-v2.90-release' 2020-08-05 17:51:41 +02:00
531a3f6c4e Sculpt: Use vertices instead of faces to limit the grids in each PBVH node
This uses the vertices per grid instead of quads to set the limit of
grids per PBVH Node. This should create more leaf nodes in lower
subdivisions levels where the duplicates count is high, producing more
uniform performance across different levels.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8454
2020-08-05 17:50:28 +02:00
8fc7c3539a GPencil: Add Fill option to determine the layers used for boundary strokes
This is a patch suggested in https://blender.community/c/rightclickselect/qggbbc/

The valid values are:

* Visible Layers.
* Active Layer.
* Layer Above active.
* Layer Below active.
* All layers Above active.
* All layers Below active.

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

Some minor UI changes done in the original patch.
2020-08-05 17:46:34 +02:00
f3acfc97d9 Functions: fix multi function test
There were two issues. First, I made a mistake when I switched from unsigned
to signed integers. Second, two classes with the same name were defined in
separate files. Those classes are in an anonymus namespace now, so that they
don't leak into other files.
2020-08-05 17:19:02 +02:00
b3d35d2039 Fix Cycles + grease pencil render failing after recent GPU refactoring
GPU_texture_update_sub now requires the texture to be bound already.
2020-08-05 17:17:21 +02:00
055af3a489 Merge branch 'blender-v2.90-release' 2020-08-05 16:56:59 +02:00
adfde60831 Fix T79524: Button alignment broken in some cases
ad4928a171 disabled alignment for too many cases. Still try to avoid
aligning many items, to avoid thousands of redundant alignment
calculations. But now we're much more picky adding an sub-row with
alignment.
2020-08-05 16:56:24 +02:00
2ca006f6c1 Merge branch 'blender-v2.90-release' 2020-08-05 15:59:04 +02:00
87062d4d67 Fix T78412: Ctrl+Spacebar does not maximize Python console on Windows
On windows, spacebar would be passed as UTF-8 text input, despite the
control key being pressed. On macOS, there already was an explicit
exception for this (command key in this case), on Linux XInput already
handled this case for us.
Note that Alt should still allow text input, for special character
sequences.

Issue also happened in the Text Editor if a text data-block was set.
2020-08-05 15:50:58 +02:00
ee351cb74d Fix T78869: denoising performance regression on Windows
Optimization was disabled in this function to work around a bug in MSVC, use
a different solution that does not come with such a big performance regression.
2020-08-05 15:46:44 +02:00
Jeroen Bakker
f7d38e2e64 Fix T77346: GPU Workaround Always Render Using Main Context
In Blender 2.90 EEVEE materials were refactored that introduced crashes on Intel
GPUs on Windows. The crash happened in the `local_context_workaround` that temporary
stored compiled materials in a binary form to reload it in the main GL context.

It has been tested that the workaround isn't needed anymore for HD6xx GPUs, but it
is still needed for HD4000.

After several unsuccesfull fixes we came to the conclusion that we could not support
the local context workaround and needed to come with a different workaround. The idea
of this patch is that in these cases there is only a single context that is used for
rendering. Threads that uses these contextes are guarded by a mutex and will block.

Impact on User Level:
* Due to main mutex lock the UI freezes when rendering or baking or feel less snappy

Reviewed By: Clément Foucault, Brecht van Lommel

Differential Revision: https://developer.blender.org/D8410
2020-08-05 15:45:42 +02:00
43d41675a4 Merge branch 'blender-v2.90-release' 2020-08-05 15:39:08 +02:00
56d7e39b92 Fix T79520: Data Transfer modifier: crash/assert going into editmode on a source object. 2020-08-05 15:36:24 +02:00
40ad989059 BLI: improve dot exporter interface 2020-08-05 15:30:22 +02:00
754a663f68 Cleanup: remove some private fields that are currently unused 2020-08-05 14:59:06 +02:00
c961bf8975 GPUTexture: Fix missing break 2020-08-05 14:17:34 +02:00
42f4233871 Merge branch 'blender-v2.90-release' 2020-08-05 14:10:08 +02:00
229fe01a15 PyDoc: use glClearColor before glClear in gpu docs
ref T79491

Maniphest Tasks: T79491

Differential Revision: https://developer.blender.org/D8471
2020-08-05 14:09:00 +02:00
1cf5c5085e Merge branch 'blender-v2.90-release' into master 2020-08-05 14:04:11 +02:00
f9aba4f6e1 Fix T79374: Render audio produces random clipping
Port of the bugfix from audaspace upstream.
2020-08-05 14:02:59 +02:00
396abbbfe7 Audaspace: port documentation bugfix from upstream. 2020-08-05 14:02:59 +02:00
a6b0a2356a Merge branch 'blender-v2.90-release' 2020-08-05 13:06:11 +02:00
f96afde3bd Fix T79544: No sound in video sequencer preview.
Directly caused by rB2bb73787791a, but actual issue was a pre-exiting
typo that never caused problems so far apparently...
2020-08-05 13:05:51 +02:00
2c5c39d53c Merge branch 'blender-v2.90-release' 2020-08-05 13:00:15 +02:00
02ccc37144 Correct recent fix for Cycles motion blur test
Need to only compare directory name, not the whole path.
2020-08-05 12:59:28 +02:00
85e11ca7fb Fix possible fall-through after recent change 2020-08-05 12:25:12 +02:00
e4a4dc5309 BLI: add dot::Edge.set_label method
This method sets the label of an edge in a dot graph.
2020-08-05 12:22:45 +02:00
fc9f7e3e51 Merge branch 'blender-v2.90-release' 2020-08-05 12:19:28 +02:00
c3113724ed Fix T78630: Custom icons not grayed out in inactive layouts
For regular icons this worked because they used the text color, which
was already grayed out by the caller.
2020-08-05 12:19:14 +02:00
ec9ab00fcb Fix failing USD test on macOS after becoming part of blender test runner 2020-08-05 12:15:17 +02:00
de53178b26 Fix T78777: Cycles motion blur test differences between AVX/AVX2
This appears to be slight precision differences in the Embree implementation,
simply increase the diff threshold a little for these motion blur tests.
2020-08-05 11:45:31 +02:00
7088422283 Merge branch 'blender-v2.90-release' into master 2020-08-05 16:48:28 +10:00
3562978c35 Merge branch 'blender-v2.90-release' into master 2020-08-05 16:48:25 +10:00
79cb0105cd Merge branch 'blender-v2.90-release' into master 2020-08-05 16:48:23 +10:00
8e5a4e3645 Merge branch 'blender-v2.90-release' into master 2020-08-05 16:48:20 +10:00
db907ea888 Merge branch 'blender-v2.90-release' into master 2020-08-05 16:48:17 +10:00
baf015be31 Merge branch 'blender-v2.90-release' into master 2020-08-05 16:48:14 +10:00
05fbbfec0b Merge branch 'blender-v2.90-release' into master 2020-08-05 16:48:03 +10:00
4a289081a5 Keymap: add back Shift-K to cut-through selected faces
Resolves T78540
2020-08-05 16:24:26 +10:00
ef7b804e26 Cleanup: missing 'initialize' -> 'init' from previous cleanup 2020-08-05 11:56:14 +10:00
006698167b Cleanup: spelling 2020-08-05 11:49:31 +10:00
7198e9d10e Fix unreported crash in gpu_free_unused_buffers
As far as I can see, this problem was introduced with the gpu_free_unused_buffers() changes in rB97b597c.

The code checks the returned pointer to stop looping, but the last iteration will return the last GPUTexture and set the queue to NULL, meaning that the next pop() will crash.

Differential Revision: https://developer.blender.org/D8468
2020-08-05 02:35:23 +02:00
fce71a255c EEVEE: LightCache: Add warning if the cache cannot be saved 2020-08-05 02:26:44 +02:00
6390b530d0 Fix T78529: Blend file corrupted during save caused by high Cubemap Size
This just avoid the corruption. A better fix still need to be finished.

See P1564
2020-08-05 02:26:44 +02:00
6be8b6af40 EEVEE: LightCache: Prevent crash when using a lightcache too big
Some implementation have different maximum texture size.
This patch avoid crash when texture allocation fails when:
- trying to bake a lightcache too big for the OpenGL imeplementaion.
- loading a cache from file that is too big for the OpenGL imeplementation.
2020-08-05 02:26:44 +02:00
d1b3da697d GPUTexture: Check PROXY textures for cubemap types
It can happen than some textures are not supported on some implementation
even if they fix the `GPU_max_texture_size` and `GPU_max_texture_layers`.
2020-08-05 02:26:44 +02:00
de947c5c50 GPUTexture: Improve debug print 2020-08-05 02:26:44 +02:00
3a522f7a7f Fix T79213 EEVEE: rendering with motion blur can change current frame
It seems to be expected that the render engine reset to the right CFRA
if it modifies it.
2020-08-05 02:26:44 +02:00
1ccb997c6d Fix T79497: Crash when removing strips with prefetching
This was already fixed by 0471349c90 but accidentally removed in refactor.
2020-08-05 01:40:02 +02:00
deb76548c1 Merge branch 'blender-v2.90-release' 2020-08-04 23:34:55 +02:00
3ebe97c06b Fix T78665: Face Set visibility reverted when chaning Multires Levels
Face Sets where only set and updated on the PBVH after starting a sculpt
tool. In order to preserve the visibility they store when changing
levels, they need to be updated and sync also on PBVH creation

Reviewed By: sergey

Maniphest Tasks: T78665

Differential Revision: https://developer.blender.org/D8225
2020-08-04 23:33:51 +02:00
50e6d56e4e Fix missing duplicates in the subdiv_ccg neighbors function
Duplicates of a grid corner adjacent to an edge which are on the
adjacent grid of the same face were not added when requested.

Needed for D8356 to work, it may also fix some other bug in Multires.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8385
2020-08-04 23:21:12 +02:00
bf65820782 Sculpt: Cloth brush Pin Simulation Boundary property
The cloth brush has a defined simulated area with a falloff. In the falloff
area (the area between the dashed white circle and the exterior white
circle), simulation properties change in order to fade out the
simulation deformation effects towards the boundary.
With some brushes and stroke types (like anchored strokes with pinching
or grabbing with full strength), it is possible to apply more force than
what the boundary falloff can compensate, so the simulation breaks when
this happens.
This option pins the falloff area with softbody constraints, This
produces a much better deformation falloff and it is no longer possible
to move the vertices near the simulation boundary, so the simulation
won't break no matter the strength of the forces applied inside the
simulated areas.
This is an option as it is particularly useful for some brushes to add
localized details, but for brushes that are supposed to deform the
entire mesh (like the grab brush in D8424), this can add unwanted
softbody constraints that affect the simulation result.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8435
2020-08-04 23:06:14 +02:00
6faa765af8 Sculpt: Split Box Mask into its own operator
Box mask is not a selection, so it should not be part of the select
operator. This allows to add more sculpt mode specific functionality and
properties and to share more code with the lasso mask operator in a
later refactor.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8456
2020-08-04 22:52:20 +02:00
1ae9960a15 Merge branch 'blender-v2.90-release' into master 2020-08-04 12:15:14 -06:00
304767dcd3 Fix T78688: Crash changing workspace with specific fullscreen setup
When switching workspaces we need to have an unused screen layout that
we can activate. The other window now showed the only available screen
layout in fullscreen though.
Usually when there's no unused screen layout we duplicate an existing
one, but that code didn't respect the fullscreen case properly.

This also tries to clean up the logic a bit, but things are still rather
complicated to follow.

Changes in this code are always risky. Of course things worked fine in
my tests, but I wouldn't be surprised if something breaks.
2020-08-04 20:12:07 +02:00
97be726f93 Fix T74796: Outliner child objects hidden when collections are filtered
Filtering Collections when also filtering object children would only
display the parent object. Add a check for the NO_CHILDREN filter before
creating the object-parent hierarchy.
2020-08-04 12:05:05 -06:00
e4370eccdf Fix T71488: Flipping Custom Split Normal Data leads to artifacts
The winding order of the faces changes when flipping the faces.
This lead to the loop indices changing as well.

Now we take this into account when restoring and flipping the custom
normals. Before the normals would be swapped.
2020-08-04 19:43:34 +02:00
0d3b5a5068 Fix T71488: Flipping Custom Split Normal Data leads to artifacts
The winding order of the faces changes when flipping the faces.
This lead to the loop indices changing as well.

Now we take this into account when restoring and flipping the custom
normals. Before the normals would be swapped.
2020-08-04 19:32:24 +02:00
205cf0500d Fluid: Minor cleanup in addition to fix for TT72192
Make curly brackets consistent.
2020-08-04 18:20:49 +02:00
df28a68e70 Fix T72192: Mantaflow does not render flame when flow source is hidden from Renders
The problem in this case was that the flag for active fire was not set. With hidden flow sources the flag was not updated in update_flowsflags().

The solution for this is to take the active field from the config cache file.
2020-08-04 18:09:17 +02:00
f2ac432467 Cleanup: Bevel: Split two case for loop into separate function
Previously a for loop with two iterations was used to calculate the
3D segment locations for the input number and the higher power of 2.
Splitting off the inside of the for loop to a separate function makes
the code more readable.

This commit also includes a simple timer for bevel, enabled with a
define. Interestingly, the cleanup in this commit happended to give
a 3% speedup on a Ryzen 3700x for a bevel calculation with 64
segments.
2020-08-04 11:43:42 -04:00
e818f1274b Fix T78932: fix linking reroute nodes of different type
Reviewers: mano-wii

Differential Revision: https://developer.blender.org/D8460
2020-08-04 17:36:50 +02:00
93d8373edb Merge branch 'blender-v2.90-release' 2020-08-04 17:14:06 +02:00
a4a814a180 Fix buildbot macOS packaging error after recent changes 2020-08-04 17:13:09 +02:00
f130cd1169 Point Clouds: basic support for instancing objects on points
Same exact system as instancing on vertices for a mesh. More powerful ways
of instancing will be added at some later point, but this makes the basics
works and is consistent with other geometry types.
2020-08-04 17:11:00 +02:00
89baafc8e2 Merge branch 'blender-v2.90-release' 2020-08-04 16:57:50 +02:00
9538e38704 Fix buildbot packaging error after recent changes 2020-08-04 16:54:18 +02:00
21c31885ed Merge branch 'blender-v2.90-release' 2020-08-04 16:39:03 +02:00
b1976d131c Fix broken Alembic tests following motion blur commit
The tests were broken because of an extra call to
RNA_def_struct_name_property which set the name of the velocity
attribute to be the string used to identify CacheFiles in
bpy.data.cachefiles.
2020-08-04 16:10:51 +02:00
7bad5e0d18 Cleanup: clang-format after recent cleanup commit
Remember to run `make format` after any massive cleanup please.

This "issue" introduced on 901ee66ea1.
2020-08-04 16:01:26 +02:00
16c7b6a7fe Buildbot: make code signing of packages optional with --codesign parameter
This is in preparation of doing builds per commit that will not be code signed.

Ref D8438

Differential Revision: https://developer.blender.org/D8451
2020-08-04 15:44:41 +02:00
0e87a35f8e Merge remote-tracking branch 'origin/blender-v2.90-release' 2020-08-04 15:37:49 +02:00
e8483f9bd7 Fix T78758 Alembic export: crash when file is in use by another application
In cases when the output file cannot be opened, an exception is thrown that
was not caught.
2020-08-04 15:23:43 +02:00
f5919a7ad1 Merge branch 'blender-v2.90-release' 2020-08-04 15:05:39 +02:00
e1a10b5e53 Fix T79234: Material preview does not update
When changing the material while the properties editor temporarily isn't
visible (e.g. because another editor is in full-screen or a different
workspace is active), the preview wouldn't be updated on changes.

Always trigger a material preview update on screen layout or editor type
changes.
2020-08-04 15:05:24 +02:00
5270462953 Fix T79234: Material preview does not update
When changing the material while the properties editor temporarily isn't
visible (e.g. because another editor is in full-screen or a different
workspace is active), the preview wouldn't be updated on changes.

Always trigger a material preview update on screen layout or editor type
changes.
2020-08-04 14:55:55 +02:00
675fa2ee13 Refactor: rename SpaceType->new to SpaceType->create
The data member `new` was conflicting with the `new` keyword
when `BKE_screen.h` was included in C++ files.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D8459
2020-08-04 14:40:15 +02:00
7fbbe71922 Depsgraph: Fix wrong forward declarations 2020-08-04 14:25:13 +02:00
5f621a12c6 Merge branch 'blender-v2.90-release'
Conflicts:
	source/blender/editors/gpencil/gpencil_primitive.c
2020-08-04 13:36:58 +02:00
ca606bf551 Merge branch 'blender-v2.90-release' into master 2020-08-04 21:28:21 +10:00
701a9d3917 Cleanup: typos & co in UI messages (and some other places). 2020-08-04 13:26:58 +02:00
0dff6b2b4b Cleanup: unused main argument 2020-08-04 21:25:28 +10:00
164f40c50a Fix T79503: Selecting edit-bones while holding Ctrl crashes 2020-08-04 21:23:53 +10:00
d6762bedee Merge branch 'blender-v2.90-release' 2020-08-04 12:59:20 +02:00
f921ae4665 Fix T79453: Motion Tracking: marker does not remember 'enabled' state
Caused by rB63ee3db96107.

While above commit corrected the clip offset, it also removed logic to
ensure a marker on a particular frame. This is needed though, otherwise
changes on a particular frame are applied to the marker being returned
by 'BKE_tracking_marker_get' which can be a completely different marker
if none exist for that frame yet.

This patch partly reverts rB63ee3db96107 and reintroduces the framenr
for the MarkerUpdateCb and uses that to ensure a marker on that frame.

Candidate for backporting to 2.83 LTS?

Reviewers: sergey, jacqueslucke

Subscribers:
2020-08-04 12:52:40 +02:00
a9e0aeaf65 Fix crash switching render slots when there is only one slot 2020-08-04 20:11:57 +10:00
778f0aca52 Merge branch 'blender-v2.90-release' 2020-08-04 12:08:09 +02:00
03c2439d96 Fluid: Do not show fluid if frame is out of cache range
Before: If the current frame is out of the cache start/end range, the viewport will show the fluid as it was on the last frame that was still in the cache frame range.

Now: If the current frame is out of the cache start/end range, the viewport will show no fluid at all (even if there are cache files present for this frame).

This fix is related / in response to T79423.
2020-08-04 11:45:05 +02:00
8d3b8bc835 Depsgraph: Use UUID to identify pose channels
Fixes possible fiasco caused by re-allocation re-using pointers between
pose channels.

Differential Revision: https://developer.blender.org/D8453
2020-08-04 11:40:09 +02:00
52c2f296bc Pose channel: Add session UUID
Allows to identify pose channels more reliably than by the pointer.
2020-08-04 11:40:09 +02:00
51af20b856 Cycles: Fix nan in decomposed transform for degenerated input
The decomposed transform would have consists of nan values if the input
transform had zero scale.

Now the decomposition will check for zero scale, and if it is detected
then the result will be ensured to be finite. Additionally, rotation
value will be copied from previous/next time step to help avoiding
obscure interpolation.

The latter step can become more comprehensive than the current simple
implementation.

Differential Revision: https://developer.blender.org/D8450
2020-08-04 11:40:09 +02:00
7f6530e5bd Cycles: Add finite checks for float4 and transforms
Currently unused, preparing for an upcoming development.
2020-08-04 11:40:09 +02:00
b38c04aebe Cleanup: fixed unused parameter warning
No functional changes.
2020-08-04 11:36:28 +02:00
3642cbb1d2 Cleanup: converted Depsgraph Building Pipeline to object-oriented code
This will make it easier & cleaner to make custom-built depsgraph (for
example for exporting invisible objects to USD or Alembic, see T75936).

No functional changes.

Reviewed by: sergey

Differential Revision: https://developer.blender.org/D8423
2020-08-04 11:36:24 +02:00
15ad4f6f1f Merge branch 'blender-v2.90-release' 2020-08-04 11:57:09 +03:00
9306037ed3 Node Groups: expose the SOCK_HIDE_VALUE flag for node group inputs.
This flag specifies that even when the socket is not connected,
the node should not display the input field for the constant input
value. This is useful for inputs like Normal, which have special
handling for the missing input case and don't use a constant value.
Currently there is no way to change this flag from Python, and
through UI it can only be done by re-creating the socket.

This patch exposes the flag through RNA and UI, makes sure it
is properly updated when changed, and adds special handling to
ensure that it is correctly set when creating a node group from
a node set that includes reroute nodes.

Differential Revision: https://developer.blender.org/D8395
2020-08-04 11:29:16 +03:00
b016e7f258 Node Groups: fix placement of the Output node when creating a group.
Instead of assuming the node width, compute the actual right bound.
Otherwise BSDF nodes tend to be too wide, and intersect Output.

Differential Revision: https://developer.blender.org/D8395
2020-08-04 11:29:01 +03:00
f5eae90277 Fix T79493: EEVEE LightProbe Display
Introduced by recent EEVEE GLSL refactoring {da741013a1e1}
2020-08-04 10:09:31 +02:00
105ed22b95 Merge branch 'blender-v2.90-release' into master 2020-08-04 15:35:03 +10:00
c1386795a9 Modifier: bypass mesh conversion for hooks in edit-mode
Avoid the conversion for the hook modifier as riggers
may need to enable this modifier in edit-mode.

The speedup of the modifier alone is significant since the hook
operation is simple compared to conversion that took over 99.9%
of the time in my tests, however the overall speedup was around to 1.6x.
2020-08-04 15:34:04 +10:00
6791b88d28 Merge branch 'blender-v2.90-release' 2020-08-03 18:28:59 -04:00
9de5adc6a1 Fix: Remove debug print added mistakenly
This print whenever units are evaluated in number input was added in
45dbc38a8b mistakenly.
2020-08-03 18:28:39 -04:00
4b99df20d5 Merge branch 'blender-v2.90-release' 2020-08-03 18:18:02 -04:00
fbc3c1b24d Fix (unreported): Bevel tool custom profile uses wrong segments number
The bevel code initialized the CurveProfile with the "higher power of 2"
segments after the normal number of segments, leaving the widget in an
incorrect state after the calculation. A simple fix is to re-order the
initializations, doing the input number second.
2020-08-03 18:12:24 -04:00
862d79fffc Cleanup: Reduce indentation in function 2020-08-03 17:40:07 -04:00
452b896f2d Ocean Modifier: Fix render resolution only used for baking
The modifier needs to check that the cached ocean has the correct
resolution.
2020-08-03 15:33:32 -04:00
b5c737469d Cleanup: Avoid double operator name lookup 2020-08-03 14:00:14 -04:00
Adrian Newton
8356012068 UI: Change Header Position Label 'Default' to 'Keep Existing'
'Default' actually means 'Keep Existing' and it makes more sense to
display the more descriptive label.

Differential Revision: https://developer.blender.org/D7614
2020-08-03 12:37:48 -04:00
10590b0500 Fix missing shortcut indicators and crash on shortcut change
Fixes T78346.

The shortcut display and change code is context sensitive. To make it
work correctly the context needs to be set properly.
When executing operators from the dropdowns, the active region is the
header, but the shortcut handlers are set for the main region. So make
sure that is used instead.

This also sets the main region active for context menu operators, where
this issue shouldn't be present. Doing it anyway shouldn't hurt though
and fixes this issue in case somebody displays the context menu in the
header as dropdown too.
2020-08-03 18:26:06 +02:00
e9bcf09819 Cleanup: Typos in comments. 2020-08-03 17:42:45 +02:00
3593dff147 Fix T79374: Render audio produces random clipping
Port of the bugfix from audaspace upstream.
2020-08-03 17:42:36 +02:00
d66009f179 Fluid: Adjustments to force component reset
Instead of clearing forces at the end of the simulation step, they will now be cleared before writing to them, i.e. at the beginning of a step.

Also cleaned up minor areas that I looked at while making this change.
2020-08-03 17:39:56 +02:00
f24920790d Merge branch 'blender-v2.90-release' 2020-08-03 16:24:34 +02:00
473d9507fa Fix T78536: Crash calling object.modifier_apply on an empty
Caused by rB6add0cc88a0d.

Maniphest Tasks: T78536

Differential Revision: https://developer.blender.org/D8440
2020-08-03 16:20:46 +02:00
Phil Stopford
a44299ccd1 Ocean Modifier: Add viewport resolution
Following work done in 2.83, the resolution control is now a real
level-of-detail parameter. It is now useful to be able to set the
resolution for display independently from render. This is true for
both mesh generation and mesh deformation modes.

For compatibility with old scenes, resolution is retained and is the
render resolution. Old modifiers loaded have the value of resolution
also applied to viewport resolution. This allows newer modifiers to
be used in older versions without trouble

Differential Revision: https://developer.blender.org/D8336
2020-08-03 10:08:31 -04:00
30b52b6a4a Merge branch 'blender-v2.90-release' 2020-08-03 15:15:54 +02:00
2bb7378779 Fix T79222: Assert due to multiple building of same scene sequencer in depsgraph.
Just check and skip building if it has already been done before.

Thanks to @sergey for the help.
2020-08-03 15:11:05 +02:00
92f6f6d30e Audaspace: port documentation bugfix from upstream. 2020-08-03 14:21:54 +02:00
61eec61adb Merge branch 'blender-v2.90-release' into master 2020-08-03 21:14:49 +10:00
3f94f47113 Fix T79482: Triangulate quads with 'Beauty' can make zero area faces 2020-08-03 21:12:46 +10:00
1c4a695d70 Merge branch 'blender-v2.90-release' 2020-08-03 13:01:21 +02:00
14b77b37cb Fix T78428: Checkbox labels don't highlight on mouse-over in popovers
The text colors set by the general widget state function
(`widget_state()`) would always be overriden by the menu-back text
colors to avoid contrast issues. This would only respect the selected
state, not other states.

Address this now by changing the input theme colors to use the menu-back
ones, rather than overriding after the fact (calling `widget_state()`).
2020-08-03 13:00:53 +02:00
3c9cb62d82 Merge branch 'blender-v2.90-release' 2020-08-03 12:40:06 +02:00
33e6562a8a Fix T78266: Mantaflow: changing flow type (fire -> fire + smoke) resets Surface Emission
Changing the surface distance through the flow type is inappropriate here. It had been added to ensure that liquids / smoke use a different emission value.

Now the value will only be changed when changing from a gas to a liquid emitter or, vice-versa, when changing from a liquid to a gas emitter.
2020-08-03 12:38:07 +02:00
db5915d863 Merge branch 'blender-v2.90-release' 2020-08-03 12:36:52 +02:00
nutti
b5e3451540 Fix parameters in bpy.props.StringProperty Python API docs
There is a parameter typo in Python API document about bpy.props.StringProperty.
This patch fixes this.

Also this patch should apply to 2.90 branch as well.

Reviewed By: Grische, mont29

Differential Revision: https://developer.blender.org/D8430
2020-08-03 12:35:54 +02:00
633e9cef8c Merge branch 'blender-v2.90-release' 2020-08-03 12:11:52 +02:00
057f3f2f3d Fix T78575: Assert when using UILayout.prop_tabs_enum
Code required the tabs to be placed in an aligned region. Code should
work fine even for unaligned regions though, so I don't see a reason to
forbid this.
2020-08-03 11:57:20 +02:00
e17befe368 Install_deps: add libgmp as default dependency.
This is a common system library, no need for fancy building this time...

Part of D8384.
2020-08-03 10:44:07 +02:00
977f89ef2d Merge branch 'blender-v2.90-release' 2020-08-03 10:30:59 +02:00
fe70605a2a Building: Add ceres to Ninja's heavy jobs pool.
Some files in this library require more than 1.5Gb to build, so they
also belong to the 'heavy' pool.
2020-08-03 10:30:33 +02:00
040d7872e8 Merge branch 'blender-v2.90-release' into master 2020-08-03 18:03:49 +10:00
8f22feefbc Fix T79440: Deform modifiers fail in edit-mode when not first
Lattice, armature & curve only worked when an edit-mesh was passed in,
the mesh argument was being ignored.

Regression in 9f5833798c
2020-08-03 18:01:34 +10:00
144f780c71 Cleanup: remove unused code, update comments 2020-08-03 15:14:08 +10:00
83d6290800 Cleanup: remove trailing space, newlines at eof 2020-08-03 15:14:02 +10:00
21f150cc90 Merge branch 'blender-v2.90-release' into master 2020-08-03 15:13:52 +10:00
d406edf1ee Mesh: correct negative material indices when validating
Fixes corrupt mesh from T79451.
2020-08-03 14:48:16 +10:00
b5dcf74636 Cycles: add support for rendering deformation motion blur from Alembic caches.
This patch adds the ability to render motion blur from Alembic caches.
The motion blur data is derived from a velocity attribute whose name has
to be defined by the user through the MeshSequenceCache modifier, with a
default value of ".velocities", which is the standard name in Alembic
for the velocity property, although other software may ignore it and
write velocity with their own naming convention (e.g. "v" in Houdini).

Furthermore, a property was added to define how the velocity vectors
are interpreted with regard to time : frame or second. "Frame"
means that the velocity is already scaled by the time step and we do not
need to modify it for it to look proper. "Second" means that the unit
the velocity was measured in is in seconds and so has to be scaled by
some time step computed here as being the time between two frames (1 /
FPS, which would be typical for a simulation). This appears to be
common, and is the default behavior.

Another property was added to control the scale of the velocity to
further modify the look of the motion blur.

Reviewed By: brecht, sybren

Differential Revision: https://developer.blender.org/D2388
2020-08-03 03:44:40 +02:00
396d0b5cd0 Particles: new Age Reached Event, Kill Particle and Random Float node
The hardcoded age limit is now gone. The behavior can be implemented
with an Age Reached Event and Kill Particle node. Other utility nodes
to handle age limits of particles can be added later. Adding an
Age Limit attribute to particles on birth will be useful for some effects,
e.g. when you want to control the color or size of a particle over its
life time.

The Random Float node takes a seed currently. Different nodes will
produce different values even with the same seed. However, the same
node will generate the same random number for the same seed every
time. The "Hash" of a particle can be used as seed. Later, we'd want
to have more modes in the node to make it more user friendly.
Modes could be: Per Particle, Per Time, Per Particle Per Time,
Per Node Instance, ...
Also a Random Vector node will be useful, as it currently has to be
build using three Random Float nodes.
2020-08-02 22:10:47 +02:00
d1063575b5 Merge branch 'blender-v2.90-release' 2020-08-02 21:00:09 +02:00
0264f53e30 Fix T67181: Only the first added movie strip will have audio below
Find free slot first for sound strips then for movie strips.
This patch also fixes issue where all strips were added to channel 2 by default.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8339
2020-08-02 20:54:37 +02:00
189eb2550d Fix T66805: No cache invalidation with remove gaps operator
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8379
2020-08-02 20:53:55 +02:00
4f27e94146 Merge branch 'blender-v2.90-release' into master 2020-08-02 18:13:15 +10:00
422954b708 Merge branch 'blender-v2.90-release' into master 2020-08-02 18:13:11 +10:00
ed6bec8d1a Merge branch 'blender-v2.90-release' into master 2020-08-02 18:13:05 +10:00
89167dd304 Merge branch 'blender-v2.90-release' into master 2020-08-02 18:12:58 +10:00
nutti
cc0d8ab036 Docs: add translation keyword argument default for msgctxt 2020-08-02 18:12:31 +10:00
nutti
c442ff0017 Fix RST syntax for freestyle documentation 2020-08-02 18:12:22 +10:00
f349a53c08 Fix T78691: Fly/Walk navigation ignores object channel locks 2020-08-02 18:10:07 +10:00
70d7805fa9 Cleanup: pass const matrices
Also order return matrices last.
2020-08-02 18:02:20 +10:00
a3a6b71a9d Cleanup: pass const matrices
Also order return matrices last.
2020-08-02 17:17:31 +10:00
0e308b07a0 Merge branch 'blender-v2.90-release' into master 2020-08-02 16:20:51 +10:00
ba6ed01058 Fix UV face dot refresh when toggling sync-select 2020-08-02 16:11:07 +10:00
8305dd9499 Cleanup: localize creator.c definitions
As creator.c is used for the 'main' function,
avoid obscure declarations being placed so prominently.

- Move Blender as a Python module declarations into it's own section.
- Move USD declaration to an 'extern' just before it's called.
2020-08-02 13:11:30 +10:00
6a444830a3 GPU: Convert gpu_matrix.c to C++ 2020-08-02 02:10:22 +02:00
6941e27f4a GPU: Convert gpu_shader_interface.c to C++ 2020-08-02 02:10:22 +02:00
de097b28cc Cleanup: OCIO: Remove extern "C" around blender headers 2020-08-02 02:10:22 +02:00
7cd2c1fd2e Particles: support custom particle events in solver
Previously, there were only particle-birth and time-step events.
Now the solver can handle custom events. On the user level
this does not change anything yet. This feature of the solver
will be used by an upcoming Age Reached Event node and
possibly others. When this node exists, I can finally remove
the hardcoded maximum particle age.
2020-08-01 21:56:05 +02:00
6141549fee Fix error in recent rename
This function is defined outside of Blender.
2020-08-01 20:04:22 +10:00
6119f3cad1 Cleanup: spelling (initialized) 2020-08-01 13:57:27 +10:00
901ee66ea1 Cleanup: use term init instead of initialize/initialise
The abbreviation 'init' is brief, unambiguous and already used
in thousands of places, also initialize is often accidentally
written with British spelling.
2020-08-01 13:51:05 +10:00
006e850a84 Cleanup: spelling 2020-08-01 12:52:11 +10:00
03afffc96a Merge branch 'blender-v2.90-release' into master 2020-08-01 12:18:29 +10:00
06f3312b04 Merge branch 'blender-v2.90-release' into master 2020-08-01 12:18:24 +10:00
72b422c1e1 UV: support select linked with sync-select in vert/edge modes 2020-08-01 12:15:05 +10:00
732434cb1f Fix T46568: UV select-linked failure to de-select
Shift-L was de-selecting all instead of the linked UV's.
2020-08-01 12:14:42 +10:00
106e7654e8 Fluid: Another adjustment for Python pointers
Yet another update to ensure that pointer variables are always up to date, i.e. those referencing the memory allocated by Mantaflow. Outdated pointers usually show up through flickering in viewport.
2020-07-31 23:27:51 +02:00
251ae108e7 Merge branch 'blender-v2.90-release' 2020-07-31 18:20:51 +02:00
71683be4bb Fix T78884: GPencil weight paint crash when painting over modifier generated points
The weight must be added only to the real points, not to the autogenerated points by modifiers. This affects, not only to subdivide, but to any modifier that generate points.
2020-07-31 18:20:39 +02:00
7e64f6cee4 Fluid: Fix for Python pointer update (flickering in smoke/fire issue)
In f2b04302cd the pointer update was refactored. It was sufficient to update pointers just in replay mode at the end of a step since the 'ensure()' functions from manta_fluid_API.cpp had their own pointer update call. These were removed in 51f4bee5a5, however, and so in order to still have some sort of update, the given update call needs to be available to all cache types.
2020-07-31 17:42:08 +02:00
83f8223543 Deps builder: Add support for building GMP
Required for the new boolean code, disabled by default
until all platforms have landed the libs and the boolean
code actually lands in master.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8384
2020-07-31 09:34:26 -06:00
a2c6c51647 Merge branch 'blender-v2.90-release' 2020-07-31 16:46:35 +02:00
cab9673bed Fix T79111: Cycles: Image Sequence not rendering
Caused by c7aa0f9d74.

Since above commit, BKE_image_user_frame_calc requires an image (not
just the iuser) to get the framenumber.

Cycles used to call this with NULL image (in `image_user_file_path` and
`image_user_frame_number`), now pass the image as well.

Maniphest Tasks: T79111

Differential Revision: https://developer.blender.org/D8439
2020-07-31 16:39:22 +02:00
2a0a2c1054 Fluid: Cleanup and improved readability
A collection of multiple changes that had been living in my stash:

- Use nullptr instead of NULL in C++ files
- Removed unused/deprecated functions from headers
- Cleared animatable flag in cache UI
- Comment cleanups
2020-07-31 16:32:02 +02:00
51f4bee5a5 Fluid: Refactored Python fluid initialization functions
Initialization functions now have a return type which will be asserted during fluid object creation.
2020-07-31 16:32:02 +02:00
f2b04302cd Fluid: Refactored Python pointer update function
Use static_cast() where possible and refresh pointers for every frame when in replay mode. The latter is particularly important as this seems to have caused the issue where smoke in the viewport was flickering when loading data from pointers after loading them from disk for the frame before (e.g. when resuming a bake job).
2020-07-31 16:32:02 +02:00
227e20f370 Merge branch 'blender-v2.90-release' 2020-07-31 11:25:56 -03:00
1ff1a2be9c Fix T78600: Crash when transforming doubles with mirroring on
`EDBM_verts_mirror_cache_begin_ex` could do a better work avoiding these
duplicates, but this is a separate problem.
2020-07-31 11:24:34 -03:00
201b4051ba Fluid: Fix missing WITH_FLUID in draw code
The new draw code from 486c7b87fb  was just missing a WITH_FLUID flag.
2020-07-31 15:19:29 +02:00
81caec8c60 Fix blender_test runner build on the buildbot on Linux and macOS
Add our own copy of the gtest discovery scripts from CMake a few reasons:
* Use the very latest version which supports PRE_TEST for Windows
* Fix usage of [] symbols in file paths that fail with the zsh shell
* Disable asan leak checker when discovering tests

This means Windows also no longer requires the very latest CMake 3.18.
2020-07-31 14:41:13 +02:00
5628aaeee1 Fix build of blender_test runner on macOS 2020-07-31 14:15:42 +02:00
3785dc59d1 Merge branch 'blender-v2.90-release' 2020-07-31 13:47:46 +02:00
feaed44ef6 GPencil: Fix unreported missing last point in NURBS conversion
The last point of the curve was missing.
2020-07-31 13:47:12 +02:00
c565f16afb Fix T79397: blurry icons at some UI scales, after recent refactor
Solution found by Yevgeny Makarov.
2020-07-31 12:39:58 +02:00
ded4b72002 Merge branch 'blender-v2.90-release' 2020-07-31 12:20:27 +02:00
627b294317 Fix build error with clang 2020-07-31 12:03:11 +02:00
db24e289b2 Merge branch 'blender-v2.90-release' 2020-07-31 11:53:22 +02:00
de68880e79 Cleanup: Remove unused original pointer in Sequence 2020-07-31 11:45:40 +02:00
1e7afea2bb Fix T78835: Ghosting audio after using undo
The root of the issue comes to the fact that sub-data pointers were
used to match strips before/after copy-on-write. The undo system might
re-use sub-data pointers after re-allocating them, making it so that,
for example, pointer used by sound strip is later re-used by video
strip.

This fix takes an advantage of recently introduced per-sequence UUID
and uses it to match sequences before/after copy-on-write.
2020-07-31 11:45:40 +02:00
9ea6228b07 Sequencer: Ensure UUIDs are updated when needed
Document cases where it seems that they need to be updated, but where
the proper behavior is to not update the UUID.
2020-07-31 11:45:40 +02:00
eb8cbb6d7c Depsgraph: Add command line argument to debug UUIDs
Will trigger code paths which makes sure UUIDs are generated and
are unique.

Enabled with --debug-depsgraph-uuid (which is also implied by
--debug-depsgraph).
2020-07-31 11:45:00 +02:00
cc63897c22 Sequencer: Add session UUID check function
Is aimed for use during development and debug, to help
verifying that operations do not leave sequences with
invalid UUIDs.
2020-07-31 11:44:59 +02:00
3305a94fa1 Sequencer: Add session UUID management to Sequence
This is the first step for having sequences covered with session UUID
with the goal to remove code which uses original sequence pointer to
match sequences.

Currently this UUID is maintained on file load, allocation and leaf
duplication function.There are more cases to cover and ensure UUID
is re-generated or re-used when needed. It will be done as follow-up
development.
2020-07-31 11:44:59 +02:00
44b32e0e4a Sequencer: Add session UUID field to the Sequence DNA 2020-07-31 11:29:55 +02:00
de21ddf821 BLI: Initial implementation of generic session UUID API
Covers basics like generation of new UUID.

Also contains code needed to use the SessionUUID as a key in the Map.
2020-07-31 11:24:03 +02:00
cd579c4996 Add generic session UUID structures to DNA
Allows to use pre-defined structure for session UUIDs in all data
structures which needs it: pose channels, sequencer strips, modifiers.

The goal of all this is to have a reliable way of matching original
and copy-on-written versions of data, so that it's possible to
preserve runtime caches.
2020-07-31 11:22:05 +02:00
f379bb368b BLI: fix float3 in-place operators 2020-07-31 11:17:33 +02:00
585c9c2f23 Merge branch 'blender-v2.90-release' 2020-07-31 10:51:00 +02:00
298d5eb669 UI: fix buttons ranges not properly updated when tabbing to next/previous
button

This was reported for the FCurve modifier restrict ranges, but might fail
elsewhere, too. Reason is that the post_but has its range (hardmin/
hardmax etc) set before the updates to the active button take place, so
changes here dont end up on the post_but (even though the RNA range
function is properly called for a new defined button - new one is not the
same as the post_but though).

Now update the ranges on the post_but when that gets active.

Fixes T78763

Maniphest Tasks: T78763

Differential Revision: https://developer.blender.org/D8265
2020-07-31 10:47:52 +02:00
f3e8326453 Cleanup: fix function signature 2020-07-31 10:13:33 +02:00
59c14c1a62 Merge branch 'blender-v2.90-release' 2020-07-30 22:08:54 -04:00
8c375113b5 UI: Label Fixes
These were added in rB146473f08335e8cb774ccaf1baad82a1d308fbe1 however 
there were a few errors with the labels:

1. Underscore in label
2. Abbreviation when not needed
2020-07-30 22:05:25 -04:00
44928a2a8f Fix: Blender_test not working on windows.
This bumps the minimum requirement for cmake from 3.10 to 3.18 on windows
if `WITH_GTESTS` is enabled.

Reviewed By: sergey brecht sybren campbellbarton

Differential Revision: https://developer.blender.org/D8405
2020-07-30 13:18:05 -06:00
848cbe889b Fix T79347 GPU: Segfault starting blender 2020-07-30 19:43:53 +02:00
9132fd8825 Merge branch 'blender-v2.90-release' into master 2020-07-30 11:24:39 -06:00
f45f8a7a89 Fix T79278: Selected object filter skipping collection instances
Collection instance datablocks were not filtered out when only showing
the selected object. They were treated as a collection (which should
show when filtering objects). Adds a case to check if the parent is an
object.
2020-07-30 11:19:07 -06:00
David Vogel
820ca419e0 Add compound shape for rigid body simulation
This patch adds a new compound shape entry to the shape selection
dropdown. It also corrects wrong inertia calculation for convex hulls,
that resulted in strange behavior for small objects.

The compound shape take the collision shapes from its object children
and combines them. This makes it possible to create concave shapes from
primitive shapes. Using this instead of the mesh collision shape is
often many times faster.

Reviewed By: Sergey, Sebastian Parborg

Differential Revision: http://developer.blender.org/D5797
2020-07-30 18:53:35 +02:00
d3944940f9 Merge remote-tracking branch 'origin/blender-v2.90-release' 2020-07-30 18:38:08 +02:00
Valentin
4089b07aa0 Cleanup: Remove pre 2.80 headers
Review: D8341
2020-07-30 18:37:36 +02:00
8dc2fbd7b6 Fix T79117: dependency cycle with passive rigid body objects
Reviewers: zeddb

Differential Revision: D8431
2020-07-30 18:22:29 +02:00
27d50d6f67 Enable header auto-complete suggestions in Xcode
Description of `USER_HEADER_SEARCH_PATHS` build setting:
"
This is a list of paths to folders to be searched by the compiler
for included or imported user header files (those headers listed
in quotes) when compiling C, Objective-C, C++, or Objective-C++.
Paths are delimited by whitespace, so any paths with spaces in
them need to be properly quoted. See Always Search User Paths
(Deprecated) (ALWAYS_SEARCH_USER_PATHS) for more details
on how this setting is used. If the compiler doesn't support the
concept of user headers, then the search paths are prepended to
the any existing header search paths defined in Header Search
Paths (HEADER_SEARCH_PATHS).
"

http://help.apple.com/xcode/mac/current/#/itcaec37c2a6

Xcode doesn't use `HEADER_SEARCH_PATHS` for auto-complete. Only the
header files in the same directory as the current file are suggested.

CMake as of now correctly sets `SYSTEM_HEADER_SEARCH_PATHS` and lumps the
rest in `HEADER_SEARCH_PATHS`.  The standard way is to use
`USER_HEADER_SEARCH_PATHS` & `SYSTEM_HEADER_SEARCH_PATHS` and let
`HEADER_SEARCH_PATHS` be used as a fallback for compilers which do not
distinguish between `<*.h>` and `"*.h"` syntax.

So set `USER_HEADER_SEARCH_PATHS` to the include paths specified
in the `CMakeLists.txt` files of all targets.
2020-07-30 21:13:26 +05:30
168653ed1d Merge branch 'blender-v2.90-release' 2020-07-30 17:36:20 +02:00
ff1d599172 Fix T79357: VSE crash on prefetching when performing cuts
Caused by {rBa1a333a1e92e}

`BKE_sequencer_prefetch_get_original_sequence` cant get a sequence in
`BKE_sequencer_cache_put`.

rBa1a333a1e92e moved multiple NULL checks (including the one checking
seq) above BKE_sequencer_prefetch_get_original_sequence (this should
never return NULL really, but this is for another fix).

So solution suggested by @ISS is to just stop prefetching all together
before changing content of seqbase.

Maniphest Tasks: T79357

Differential Revision: https://developer.blender.org/D8421
2020-07-30 17:29:48 +02:00
b1bfcf9f6b GPU: Fix compilation error (missed one) 2020-07-30 17:17:16 +02:00
2d38ff67d3 GPU: Fix compilation error 2020-07-30 17:08:23 +02:00
d7a28b3d1a Cleanup: IMB: Put lowercase prefix on static functions 2020-07-30 16:55:42 +02:00
da741013a1 EEVEE: GLSL refactor/cleanup
- add the use of DRWShaderLibrary to EEVEE's glsl codebase to reduce code
complexity and duplication.
- split bsdf_common_lib.glsl into multiple sub library which are now shared
with other engines.
- the surface shader code is now more organised and have its own files.
- change default world to use a material nodetree and make lookdev shader
more clear.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D8306
2020-07-30 16:44:58 +02:00
55401fbb3d IMB: Refactor util_gpu.c to not expose enum getters
This was causing compiler error on MSVC and is not a good idea
in general.
2020-07-30 16:44:57 +02:00
008ccacdfc Cleanup: Use MEM_calloc_arrayN in the Cloth Brush
Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8432
2020-07-30 16:23:19 +02:00
2e33c5ca15 Sculpt: Use constraints in cloth deform brushes
Previously, deform brushes were modifying the final positions in the
simulation directly, which was causing all sorts of artifacts in the
deformed area and problems with other features of the solver.
Now these brushes deform a separate array of positions and the solver
adds constraints to them, so the real vertices are moved when solving
the constraints. This prevents those artifacts and gives the brush a
much better behavior.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8424
2020-07-30 16:10:15 +02:00
49c1359b55 Sculpt: Enable persistent base for the cloth brush
The cloth brush builds the constraints when the stroke starts usign the
current state of the mesh. This means that deformations profuced by the
simulattion will accumulate after multiple strokes as it will always
start from the previous deformed state. While this is useful in many
cases, for other uses it is convenient to always simulate the same
initial shape, but applying different forces to it.

The persistent base options work like the persistent base in the layer
brush and allows the cloth brush to not accumulate deformation after
each stroke. When enabled, constraints are created for the shape stored
in the persistent base instead of from the current state of the mesh.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8428
2020-07-30 15:59:35 +02:00
27b643d27a Merge branch 'blender-v2.90-release' 2020-07-30 14:27:07 +02:00
9cac158e96 Fix T78730: CLOG writes/reads outside allocated memory.
Fix several issues in CLOG code:
* In `clg_str_reserve`, allocated memory may be bigger than requested
  one, do not assign the latter back to `cstr->len_alloc`.
* `clg_str_vappendf` was mis-interpreting returned value from
  `vsnprintf`, and completely mixing total allocated memory and extra
  needed amount of memory to allocate...

Simplified code of `clg_str_vappendf` to only have allocating code
handled in one place, makes things easier to follow too.

Think this should also be beckported to 2.83.
2020-07-30 14:26:44 +02:00
19175f4757 GPUBatch & GPUImmediate: Use GPUShader instead of using raw OGL handle 2020-07-30 13:28:50 +02:00
3eff2b44db Merge branch 'blender-v2.90-release' 2020-07-30 13:02:29 +02:00
4251a87bf6 Fix usercount not decrementing in gpencil_stroke_separate_exec
This is part of T79273 where separating a stroke would result in
multiuser gpencil data for the original object.
Real underlying issue seems to be that gpencil multiuser objects (also
the ones created by Alt+D duplicating) have a problem evaluating
modifiers correctly [this will need further investigation].
Not sure if this is a limitation of D5470?

This patch only corrects the usercount on separating [which already fixes
the scenario reported because singleuser gpencil modifiers work
correctly].

Note: we could have also called `ED_object_add_duplicate` with the
`USER_DUP_GPENCIL` dupflag -- that would have taken care of the usercount
--, but then the whole following logic in `gpencil_stroke_separate_exec`
would need to change from **adding** layers/frames/strokes to
**removing** these.

Part of T79273

Maniphest Tasks: T79273

Differential Revision: https://developer.blender.org/D8419
2020-07-30 12:47:54 +02:00
742ad5acbc Merge branch 'blender-v2.90-release' into master 2020-07-30 17:45:26 +10:00
2bc017ece1 Fix T79207: Crash converting curve to mesh 2020-07-30 17:42:09 +10:00
5893a1562f Cleanup: split curve bevel into separate file 2020-07-30 14:54:39 +10:00
24d035b383 Merge branch 'blender-v2.90-release' into master 2020-07-30 14:21:54 +10:00
1f48e67002 Merge branch 'blender-v2.90-release' into master 2020-07-30 14:21:49 +10:00
422e5e372e Merge branch 'blender-v2.90-release' into master 2020-07-30 14:21:41 +10:00
0ab66dd63f Fix T79369: BMesh.calc_volume() gave incorrect result 2020-07-30 14:20:18 +10:00
69ec7ab873 UV: path select support with sync-select enabled
Also improve region fill with edge-select enabled which often failed
to include both vertices from each edge in the resulting region.
2020-07-30 12:07:10 +10:00
ff0112bcb2 Fix UV select with sync select enabled wasn't setting active 2020-07-30 11:02:03 +10:00
dc3baf2c78 Cleanup: spelling 2020-07-30 08:43:40 +10:00
929c94ee20 Cleanup: warnings 2020-07-30 08:43:40 +10:00
2181028292 Merge branch 'blender-v2.90-release' 2020-07-29 19:19:25 -03:00
699cefefd0 Fix ghash return value on 'Correct Face Attributes' with 'Keep Connect'
The result was somewhat unpredictable.
This error was recently introduced.
2020-07-29 19:17:56 -03:00
486c7b87fb Cleanup: GPU: Remove GPU_draw.h and move fluid gpu function to DRW 2020-07-29 23:21:33 +02:00
5f6fb5bb41 Cleanup: Split gpu_texture_image.c into BKE and IMB modules
This is in order to disolve GPU_draw.h into more meaningful code blocks.

All the Image related function are in `image_gpu.c`.
All the MovieClip related function are in `movieclip.c`.

The IMB module now has a connection with GPU. This is not strickly
necessary and the code could be move to `image_gpu.c` if needed.

The Image garbage collection is also ported to `image_gpu.c`.
2020-07-29 23:06:37 +02:00
7e8d493730 GPU_draw.h: cleanup before splitting 2020-07-29 23:06:37 +02:00
c09f61a915 RNA: Image API: Fix error in NULL check in rna_Image_gl_touch
This check was always returning true.
2020-07-29 23:06:37 +02:00
5f46a0fbce Cleanup: Rename define
*_LEN follows names elsewhere in Blender more closely than "_N_"
2020-07-29 17:01:46 -04:00
81ce8481b2 Fix failing PLY test, update hash because metadata changed 2020-07-29 19:49:53 +02:00
8c10e56331 Sculpt: Cloth Brush Soft Body Influence property
This property adds constraints to the simulation using the initial
location of the vertices, making it behave like a soft body. The
strength of these constraints can be modified with the brush parameter.
This makes some deformation modes more subtle and predictable, making it
possible to use the cloth brush to add surface detail in a more
controllable way without loosing completely the original shape of the
mesh.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7845
2020-07-29 19:14:03 +02:00
ebda95953c Merge branch 'blender-v2.90-release' 2020-07-29 18:22:33 +02:00
3274ce0a8e Fix T79119: Hook modifier deformation not shown in edit mode.
Missing temp `BKE_mesh_wrapper_ensure_mdata` hack for the Hook
modifier...
2020-07-29 18:21:27 +02:00
f62c7c546a Merge branch 'blender-v2.90-release' 2020-07-29 17:39:59 +02:00
Bastien Montagne
4e6975ffd6 Fix T78285: Invalid thread safety in shrinkwrap modifier code.
This uses mesh's runtime mutex for both `BKE_mesh_runtime_looptri_ensure`
(was using its own global RW mutex before), and `BKE_mesh_wrapper_ensure_mdata`
(was not protected at all before).

This is more like a band-aid than a proper fix, as mentioned in the report
proper fix would be for the modifier to request those data (the relevant
BVHTree, which would implicitely also call the tow others) through flags,
just like it does for regular CDData layers. But this is a much bigger
refactor to be done outside of bugfix scope.

Reviewed By: sergey

Maniphest Tasks: T78285

Differential Revision: https://developer.blender.org/D8415
2020-07-29 17:36:46 +02:00
03acbc7b71 Merge branch 'blender-v2.90-release' 2020-07-29 17:22:50 +02:00
54a2fcc0f3 Fix Cloth Brush global Sculpt gravity applied in the wrong falloff
Previously, gravity was only applied in the real brush radius, not in
the whole simulation radius. For most deformation modes, applying
gravity to the entire simulation instead of just to the brush radius and
scaled by the radius (like a regular sculpt brush) makes more sense.
After this fix and with the cloth collisions patch applied, it is possible
to do things like this with the cloth grab brush.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8406
2020-07-29 17:21:41 +02:00
6e5278c3da Fix T79054: Crash with Cloth Brush and anchored stroke
As the comment says, anchored stroke can't rely on the first stroke
iteration for creating the simulation data. Probably lost in a cleanup.

I also made that anchored stroke doesn't restore the mesh state in the
cloth brush, so it can create the simulation effect.

Reviewed By: sergey

Maniphest Tasks: T79054

Differential Revision: https://developer.blender.org/D8348
2020-07-29 17:19:10 +02:00
83f01db7a9 Compositor: Fix node preview when input resolution is not known
The final render will use scene resolution in this case.

For example, when Color Input is plugger to preview and composite output
nodes, final render will flood-fill the final image which is a size of
scene resolution with this color. Before this fix the node preview was
empty. After this fix the node preview will be flood-filled with the
color.

Fixes T78586

Differential Revision: https://developer.blender.org/D8263
2020-07-29 17:18:35 +02:00
66df8fff32 Compositor: Fix calculation of preview resolution
Were two issues:

- Divider was calculated in integer domain, causing rounding issues in
  general case, and causing singularity in a corner case when input is
  smaller than the preview size.

- The resolution was scaled down by 1 pixel for no obvious reason.
2020-07-29 17:18:35 +02:00
b9c7c904ed GPUShader: Fix linking with MSVC 2020-07-29 16:07:51 +02:00
f0687d4665 Cleanup: GPUTexture: Use UNPACK3 in texture_fluid 2020-07-29 15:54:51 +02:00
1804a6d040 GPUState: Fix compilation error on MSVC 2020-07-29 15:54:51 +02:00
2d89cd7dd5 Cleanup: GPU: Move Image based function to GPU_draw.h
This makes it less confusing what functions are for blender
structures.
2020-07-29 15:54:51 +02:00
99d0b3b793 Cleanup: GPU: Rename gpu_texture_smoke to fluid, and move back to C
The file do not have a reason to be C++ anymore.
2020-07-29 15:54:51 +02:00
7becd283cc GPencil: New Brush predefined mode
it's good to have an option to ' pin' a mode to the brush, to use that mode always, independent of the current viewport selected mode.

{F8723224}

Reviewed By: pepeland

Differential Revision: https://developer.blender.org/D8399
81a002
2020-07-29 15:34:54 +02:00
ade7603379 Cleanup: Remove deprecated comment. 2020-07-29 15:30:10 +02:00
e2e87efea2 Cleanup: Always keep unlock at same level as lock.
This was fine in those cases with current code, but that kind of
assumption is always risky, and an open door to hard-to-track bugs when
code changes in the future...
2020-07-29 15:30:10 +02:00
e749643793 GPU: Refactor gpu_texture_image to not use GL calls
This is also a bit of code cleanup, reorganisation.

Tried to be DRYed but avoid too much code change to (hopefully) minimize
breakage.

- GPU: remove TEXTARGET_CUBE_MAP, this is no longer used in the codebase.
- GPUTexture: Move compressed texture upload to gpu_texture.cc
- GPUTexture: Add per texture Anisotropic filtering switch
2020-07-29 15:03:02 +02:00
e4ee9de638 GPU: Move gpu_shader.c to C++
We split builtin shader support to its own file to avoid
converting code (lack of designated initializer in C++)
and to reduce file size.
2020-07-29 15:03:02 +02:00
18d2db22ff GPU: Move gpu_state.c to C++ 2020-07-29 15:03:02 +02:00
45d61bdc03 GPU: Move gpu_texture.c to C++
# Conflicts:
#	source/blender/gpu/GPU_texture.h
2020-07-29 15:03:02 +02:00
56d0a554a8 GPU: Move gpu_uniformbuffer.c to C++
This also rewrite and simplify the module a bit.
2020-07-29 15:03:02 +02:00
f84342d7e1 GPU: Move gpu_vertex_buffer.c to C++ 2020-07-29 15:03:02 +02:00
959529d4b8 GPU: Move gpu_vertex_format.c to C++ 2020-07-29 15:03:02 +02:00
18caaff149 Merge branch 'blender-v2.90-release' 2020-07-29 09:10:07 -03:00
84f7de432c Fix T78826: Move constraint is not fully disabled
Caused by rB45f17e10ec50
2020-07-29 09:09:34 -03:00
9c807325dd Particles: rename Size attribute to Radius
Doing this change for consistency with the point cloud attributes.
2020-07-29 12:03:30 +02:00
91150c9ef5 Workbench/Eeevee: Minor refactor in smoke draw function
More concise this way.
2020-07-29 11:22:35 +02:00
659db0592d GPencil: Consider extrude point as last
Before, when extrude a point, the extruded point is considered as the first point of the stroke, but this was not logic.

Now, the extrude point is considered as last.

Related to T79313
2020-07-29 11:19:35 +02:00
4cad74e589 Particles: add Size attribute 2020-07-29 10:05:27 +02:00
3e82500509 Fix T79355: switch to texture paint workspace changes image in other workspaces
Only automatically change image in editor to follow texture paint editors and
workspaces that are visible.
2020-07-29 09:06:23 +02:00
7a07683060 Cleanup: rename uiBut.dt, uiBlock.dt to 'emboss'
Use 'emboss' instead of 'draw_type' as enum, layout & functions use
the term emboss.

This issue was noted by @Poulpator in D8414, as `dt` is also an
abbreviation for delta-time.
2020-07-29 12:05:27 +10:00
a3c6304a27 Cleanup: quiet possible comma misuse warning in feestyle PyAPI 2020-07-29 11:00:32 +10:00
1e76441dd6 Clanup: unused return 2020-07-29 10:50:43 +10:00
dcad6c9db8 Cleanup: correct assert in GPU_offscreen_read_pixels 2020-07-29 10:50:31 +10:00
ac6fbf6ba8 Cleanup: declare static variables 2020-07-29 10:50:10 +10:00
012ed9ca9f Fix incorrect flag check in overlay relationship lines 2020-07-29 10:45:53 +10:00
nutti
0f075c25c4 Docs: add translation keyword argument default for msgctxt 2020-07-29 10:01:42 +10:00
nutti
55c6cc46b5 Fix RST syntax for freestyle documentation 2020-07-29 09:49:08 +10:00
7dfc2f5137 Cleanup: Doxygen sections, comment formatting 2020-07-28 17:20:41 -04:00
a0bc3596f0 Cleanup: class -> struct 2020-07-28 20:56:45 +02:00
cd3be9c46d Cleanup: too small loop variable 2020-07-28 20:56:34 +02:00
c3f6227f30 Cleanup: Use bool instead of int 2020-07-28 14:24:25 -04:00
e5e97d0fe0 Merge branch 'blender-v2.90-release' 2020-07-28 18:46:38 +02:00
d8919d12f7 GPencil: Fix typo error in RIM VFX panel
The vertical axis must be named Y, not Z because it works in 2D space.
2020-07-28 18:46:22 +02:00
814ca40c63 Merge branch 'blender-v2.90-release' 2020-07-28 16:37:01 +02:00
fcf91bbf0d Merge branch 'blender-v2.90-release' 2020-07-28 18:32:11 +02:00
9c1da81a4c Fix T54544: "Copy Materials to Selected" only works when materials are defined on the mesh.
Build a temp matarray storing materials from obdata and source object
(depending on slots 'allocation' of source object), and assign those to
targets.

Also remove limitation of 'using same obdata is forbidden', just never
edit obdata materials in that case...

Certainly not perfect, but already much better than existing code.
2020-07-28 18:31:51 +02:00
cf243e0980 Merge branch 'blender-v2.90-release' 2020-07-28 17:56:26 +02:00
5d88f8eba2 Fix T61607: OpenEXR files with less common RGB channels names not loaded
Previously there would have to be 3 channels R,G,B. Now also support cases
where there are fewer channels or other names like Red, AR and RA are used.
2020-07-28 17:55:37 +02:00
556252f1fe Fix T79067: Cycles panorama viewport render stretched after recent changes 2020-07-28 17:34:51 +02:00
80539723b9 Fix T79219: Cycles NLM denoiser clean passes broken after recent changes 2020-07-28 17:34:44 +02:00
67c33caeec Fix: remove error in previous commit 2020-07-28 16:35:31 +02:00
b274d18aec Cleanup: correct usage of extern-C blocks in various places
This removes extern-C blocks around other includes and adds
such blocks for some headers that need them.
2020-07-28 16:33:43 +02:00
cbeb2e55ed Merge branch 'blender-v2.90-release' 2020-07-28 16:24:53 +02:00
dcf7a05077 GPencil: Fix unreported missing strokes in interpolation
Sometimes the interpolated stroke was tagged and removed.
2020-07-28 16:23:45 +02:00
8fbed7f7f5 Merge branch 'blender-v2.90-release' 2020-07-28 15:46:09 +02:00
9ff7820f62 Fix T79259: OptiX render with fisheye camera is different to CUDA
The fisheye camera setup causes the edges of the image to not shoot primary rays. This was not
respected by OptiX because of an optimization that tried to reduce conditionals around trace calls.
Removing that does not seem to have an impact on performance anymore however and it fixes
the issue.
2020-07-28 15:45:46 +02:00
bc0b75ea37 Merge branch 'blender-v2.90-release' 2020-07-28 09:55:27 -03:00
5e232d7a0b Fix bad 'Correct Face Attributes' behavior when extruding faces
A face must have area in order to be possible calculate interpolation weights.
The same to the reference UVs.
But the new faces created with the extrude operator, have no area (before moving).

The solution was to get the loop data from some neighbor face.

Differential Revision: https://developer.blender.org/D8278
2020-07-28 09:53:44 -03:00
6a689b5047 Transform: Correct Face Attributes: Option to merge attributes
Keeping face attributes connected is now optional.

Keeping UV's connected is useful for organic modeling, but bad for
architectural.

Differential Revision: https://developer.blender.org/D8360
2020-07-28 09:53:23 -03:00
47b82fc02f Fix precision issues in 'interp_weights_poly_v2'
These precision issues were evident in corrected uvs when the option
`"Correct Face Attributes"` is enabled.
2020-07-28 09:53:07 -03:00
26bc8f4935 Merge branch 'blender-v2.90-release' 2020-07-28 14:44:54 +02:00
b99358315e Fix T79180: Object disappears when scaled, set origin etc after applying smooth modifier.
Very dummy mistake in modifier code would generate invalid number
(divisions by zero)...

Should also be ported to 2.83.
2020-07-28 14:44:17 +02:00
76d489fe23 Bump minimum CMake version to 3.10
This bumps the minimally required CMake version from 3.5 to 3.10, as
discussed in D8405.

Since D7649 landed, there has been the `gtest_discover_tests()` call to
discover individual unit tests in `bin/tests/blender_test`. This
function was introduced in CMake 3.10.

Since there were no complaints about this incompatibility, I suspect
that a newer version is already in use by the majority of the
Blender-building people.
2020-07-28 14:17:13 +02:00
9d412a92f5 Cleanup: incorrect spelling of 'manhattan' 2020-07-28 22:06:44 +10:00
2a52c2d001 Cleanup: spelling, comments 2020-07-28 21:49:37 +10:00
82c38a7df0 Fix T79067: Cycles panorama viewport render stretched after recent changes 2020-07-28 13:35:45 +02:00
75e16c22d7 Fix T79219: Cycles NLM denoiser clean passes broken after recent changes 2020-07-28 13:16:44 +02:00
f0c4566ce3 Merge remote-tracking branch 'origin/blender-v2.90-release' 2020-07-28 12:40:05 +02:00
ec80f1d376 Cleanup: Commented BKE_object_moves_in_time() does not consider physics
When an object is moved only by the rigid body physics system, the
function `BKE_object_moves_in_time()` will incorrectly return `false`.
This commit adds a comment to make this behaviour more explicit.

No functional changes.
2020-07-28 12:39:52 +02:00
19de9d1a9e Cleanup: spelling fix in comment 2020-07-28 12:39:52 +02:00
050de1fb8e Fix T79263: Alembic, exported rigid body animation not moving
The root cause was that `BKE_object_moves_in_time()` incorrectly returns
`false` when an object is moved by the physics system.

This also fixes the same issue in the USD exporter.
2020-07-28 12:38:31 +02:00
3b9e16a4f7 Particles: initial support for the Time input node 2020-07-28 12:10:37 +02:00
c8e45c3fe9 Merge branch 'blender-v2.90-release' 2020-07-28 12:02:59 +02:00
d738e47b0d Clip Editor: Make filter labels consistent
This was done for the regular dopesheet in rB9ccc73ade8a2, this just
makes that label consistent across all anim views.

Differential Revision: https://developer.blender.org/D8255
2020-07-28 12:00:47 +02:00
34125ce507 Merge branch 'blender-v2.90-release' 2020-07-28 11:54:51 +02:00
e296c9e24e Fix T79031: Batch Generate-Previews doesn't work anymore
Caused by rB19785b96c43f.

Maniphest Tasks: T79031

Differential Revision: https://developer.blender.org/D8400
2020-07-28 11:52:38 +02:00
8a60e920f4 Merge branch 'blender-v2.90-release' 2020-07-28 11:47:55 +02:00
290b372aac Fix T79264: Mantaflow Field weights cannot be animated
rna_EffectorWeight_path() needs to point to "domain_settings" (instead
of "settings"), was a missing change when switching the FluidModifier to
mantaflow.

Maniphest Tasks: T79264

Differential Revision: https://developer.blender.org/D8398
2020-07-28 11:36:07 +02:00
da32c17631 Merge remote-tracking branch 'origin/blender-v2.90-release' 2020-07-28 11:08:10 +02:00
617e67529c Tests: show debugging hint when USDStageCreationTest fails
Setting the environment variable `PXR_PATH_DEBUG` non-empty will make the
USD library print the directories it uses to find its JSON files. This can
aid in debugging when this unit test fails. Now the failure message also
tells you about this.

No functional changes.
2020-07-28 11:02:05 +02:00
e7dd89b50b Cleanup: remove redundant return statement
This was found by clang-tidy.
2020-07-28 11:00:08 +02:00
1675969152 Merge branch 'blender-v2.90-release' 2020-07-28 17:57:56 +10:00
a2a29327d9 Fix T79341: Crash evaluating curve 2020-07-28 17:53:22 +10:00
289aac723a Merge branch 'blender-v2.90-release' 2020-07-27 21:17:03 -06:00
ed19781a2a Fix T77951: Remove duplicate outliner menu entries
Move the common entries (View and Area) into a static method to be
called from other menus to avoid duplicating the New Collection and ID
Paste operators.
2020-07-27 21:08:28 -06:00
6ad75949b9 Fix: Wrong outliner restrict column for gpencil layer hide
The icon was drawing in the viewport disable rather than the viewport
hide column. Unreported.
2020-07-27 20:07:55 -06:00
ace832bf7c Merge branch 'blender-v2.90-release' 2020-07-27 22:21:57 +02:00
221604cdd6 Fix Sculpt Relax operation when deforming mesh boundaries
Previously, mesh boundaries were relaxed as any other vertex, which was
causing artifacts and unwanted deformation. In order to prevent this,
the mesh filter was using the automasking system to lock the boundary
vertices, which was hacked into the tool. For the brush, the only
solution was to enable boundary automasking to lock those vertices
in plance.

Now the relax vertex function slides the boundary vertices along the
mesh boundary edges, relaxing all the topology correctly while
preserving the shape of the mesh. The automasking hack in the relax
mesh filter was also removed as now vertices slide correctly along
the boundary.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8350
2020-07-27 22:19:35 +02:00
0006526952 Fix T79074: Mesh Topology info not being updated after changes
All these data arrays are created for a specific topology, so they should be
freed and updated when the PBVH rebuilds. Previously, this was only
happening when freeing the SculptSession, but it also needs to happen in
BKE_sculpt_update_object_before_eval to avoid reusing out of date data.

Reviewed By: sergey

Maniphest Tasks: T79074

Differential Revision: https://developer.blender.org/D8357
2020-07-27 22:04:31 +02:00
7eebebebc7 Fix T79164: Sculpting with smooth shading doesn't update normals
Just a missing update flag

Reviewed By: sergey

Maniphest Tasks: T79164

Differential Revision: https://developer.blender.org/D8364
2020-07-27 22:02:35 +02:00
4f3233dd53 Fix T78242: Crash when using a Sculpt color tools that needs connectivity for the first time
When there is no color layer available,
BKE_sculpt_update_object_for_edit creates a new one and tags the mesh
with ID_RECLAC_GEOMETRY, so this layer is inmediatly available when the
tool starts. This also deletes the PBVH and when it is created again in
BKE_sculpt_update_object_after_eval, the pmap is not initialized, making
the tool crash.

This moves the color layer creation to a separate function outside
BKE_sculpt_update_object_for_edit, which now runs after the color
layer is available, so it won't need to update again and the pmap will
still be available when the tool is used.

Reviewed By: sergey

Maniphest Tasks: T78242

Differential Revision: https://developer.blender.org/D8135
2020-07-27 21:58:59 +02:00
a0b0a47d81 GPencil: Scale stroke thickness when use Offset modifier scale 2020-07-27 19:09:44 +02:00
e8869d9c71 Merge remote-tracking branch 'origin/blender-v2.90-release' 2020-07-27 19:02:44 +02:00
2584a2a4e7 Fix USD unit test on buildbot
The buildbot uses a separate `CMAKE_INSTALL_PREFIX`. This means that
the unit test could not find its USD JSON files in the build directory.
Using `${CMAKE_INSTALL_PREFIX}` instead of `$<TARGET_FILE_DIR:blender>`
solved this.
2020-07-27 19:02:22 +02:00
e893430a63 Partly revert "Fix T77276: Generating Python API docs raises many warnings"
This commit reverts the "noindex" part of the original commit.
using noindex made it imposible to link to a specific property.

The original warnings do not pose an issue so until a proper solution is 
found I am reverting this commit.

This reverts commit 953c232db3
2020-07-27 13:01:28 -04:00
729da8bfac CTest: Fix blender_test not working on windows.
MSVC does need the wholearchive flag but it was not set,
so no tests were actually linked into the binary.

Reviewed By: sybren

Differential Revision: https://developer.blender.org/D8404
2020-07-27 10:55:34 -06:00
e54289cdf3 Merge branch 'blender-v2.90-release' 2020-07-27 18:15:56 +02:00
1ae8855f8e Fix T78308: Weight Transfer Operator "Deform Pose Bones" destination setting doesn't work.
Some modes were working by mere chance in that ugly 'reversed' case, but
the to/from selection modes were not properly swapped...

Should also be safe for 2.83.
2020-07-27 18:12:40 +02:00
7fd68db841 Merge branch 'blender-v2.90-release' 2020-07-27 17:40:10 +02:00
960ce1e394 Fix T78306: Weight Transfer Operator target mesh doesn't update when transforming bones.
Data transfer operator was missing tagging DEG for relations updates.

Should be portable to 2.83 as well.
2020-07-27 17:39:49 +02:00
2e376cfcc8 Merge remote-tracking branch 'origin/blender-v2.90-release' 2020-07-27 17:32:28 +02:00
a5b2aa96e4 CMake: reject older GCC version when using precompiled Linux libraries
In the situation where the precompiled libraries are used on Linux +
GCC, a version of GCC older than 9.3 is guaranteed to cause problems.

This just implents a fatal error message when we know it doesn't make
sense to continue. We could do more checks and add some warnings, but
it's very likely that these will be ignored amongst the other noise.

Reviewed By: sergey, brecht

Differential Revision: https://developer.blender.org/D8396
2020-07-27 17:29:13 +02:00
9a53d4a882 Particles: support Clamp node 2020-07-27 17:12:15 +02:00
bd4b29d63d Cleanup: fixed compiler warning about strncat
`strncat(command, "x", 1)` is the same as `strcat(command, "x")`, except
that the latter form doesn't trigger a GCC warning.

No functional changes.
2020-07-27 17:03:32 +02:00
c7ee66e517 Cleanup: remove outdated comment 2020-07-27 16:42:04 +02:00
6f5d01779a Functions: add some tests for virtual spans 2020-07-27 16:35:54 +02:00
38e65331a8 Particles: initial support for events and actions
The following nodes work now (although things can still be improved of course):
Particle Birth Event, Praticle Time Step Event, Set Particle Attribute and Execute Condition.

Multiple Set Particle Attribute nodes can be chained using the "Execute" sockets.
They will be executed from left to right.
2020-07-27 16:26:43 +02:00
a83bb170b0 Merge branch 'blender-v2.90-release' 2020-07-27 16:18:44 +02:00
d64e171c4b Cycles: Enable OptiX on first generation Maxwell GPUs again 2020-07-27 16:11:00 +02:00
4c5e1f1c25 Merge remote-tracking branch 'origin/blender-v2.90-release' 2020-07-27 15:49:02 +02:00
79312962de Cleanup: Fix compiler warning about function without prototype
No functional changes.
2020-07-27 15:48:47 +02:00
81a0027f13 Merge remote-tracking branch 'origin/blender-v2.90-release' 2020-07-27 15:26:08 +02:00
f8a0a5a350 PointCloud: Fix viewport issue when using radius attrib after not using it
This was a simple issue with the static GPUVertFormat being the same for
both cases.
2020-07-27 15:41:16 +02:00
71506698de Cleanup: Fix compiler warning about missing parentheses
The code was well-defined, given that `&&` binds stronger than `||`, but
still GCC warns about this.

No functional changes.
2020-07-27 15:25:33 +02:00
565d7f75cc UI: improve errors when evaluating a number button fails
Showing the Python error without any explanation is often
not enough information and doesn't hint that the error was in the
user input.

The error report from a invalid expression such as '..1' used to be:
   ('invalid syntax', ('<string>', 1, 1, '..1'))

Now reads:
   Error evaluating number, see Info editor for details: invalid syntax

Address issue raised by T78913.
2020-07-27 21:00:50 +10:00
7beef1fd33 PyAPI: simplify syntax error reports
The result of syntax errors read poorly in reports,
resulting in cryptic and unhelpful information.

Change PyC_ExceptionBuffer_Simple only to extract the initial text,
making syntax errors when entering invalid numeric expressions into
buttons easier to follow.
2020-07-27 21:00:50 +10:00
d7cb67454d Cleanup: match call signature for UI unit number evaluation
Also rename ui_but_string_set_eval_num to ui_but_string_eval_number
as it doesn't set any of the buttons values.
2020-07-27 21:00:49 +10:00
9ce2c5bf50 Cleanup: remove workaround for old BLI_dynstr_vappendf bug
Remove workaround from 1c806f6bb4
as this doesn't seem to be needed anymore.
2020-07-27 21:00:49 +10:00
b18c376946 Cleanup: quiet warnings without DDS 2020-07-27 21:00:49 +10:00
0b04f0e4e6 GPU: Fix crash and missing texture due to recent C++ port
Fix T79306 DRW: small issues with yesterday commits modifying TEXTARGET
Fix T79303 Image texture node crashes EEVEE when connected to a shader output
2020-07-27 13:37:22 +02:00
bfeb94eccc Cleanup: quiet warning 2020-07-27 11:41:51 +02:00
418753b6a6 GPU: fix build error due to wrong linkage specification 2020-07-27 11:40:47 +02:00
382b9007f8 GPencil: New operator to Cleanup duplicated frames
This operator cleanup any frame that is equal to the previous one. This is very handy when convert a mesh animation to Gpencil and the mesh is static for several frames.

Differential Revision: https://developer.blender.org/D8149
2020-07-27 10:47:04 +02:00
f31fa3eb97 Merge branch 'blender-v2.90-release' 2020-07-27 10:32:38 +02:00
ea4a00e93b Fluid: Fix warnings from max particle option
-Wreorder was the issue.
2020-07-27 10:32:12 +02:00
93e6ed9b45 Merge branch 'blender-v2.90-release' 2020-07-27 10:26:00 +02:00
d906116eba Cleanup: comments. 2020-07-27 10:25:43 +02:00
041904ceb8 Cleanup: Minor renaming. 2020-07-27 10:25:43 +02:00
40a9524637 Merge branch 'blender-v2.90-release' 2020-07-27 10:24:53 +02:00
87fb12d16e Allocator: fix build error with -Werror=format-security
Doing it again here, because I fixed this only in master branch before..
2020-07-27 10:23:20 +02:00
6d42ffe03c Merge remote-tracking branch 'origin/blender-v2.90-release' 2020-07-27 09:06:00 +02:00
9b867f2e90 Fix T79121: Dependency cycle when driver points to prop with 'scale' in name
This makes `RNANodeQuery::construct_node_identifier()` more strict in
its matching of certain property names.

The downside of this approach is that it's not possible any more to use
`"rotation"` and expect a match for `"rotation_euler"` and friends, so
the list of strings to test against is now 3x as long.

Reviewed By: sergey

Maniphest Tasks: T79121

Differential Revision: https://developer.blender.org/D8375
2020-07-27 08:53:32 +02:00
3bcec7c142 Cleanup: Alembic, fix maybe-uninitialized warning
No functional changes.
2020-07-27 08:52:53 +02:00
d62250a3e0 UI: Show message in transform panel when no metaball elements are selected
The complete lack of a transform panel was confusing enough to spawn
this question: https://blender.stackexchange.com/q/169074/599
Displaying a message instead of nothing is more consistent with the
behavior of the mesh transform panel anyway.

Reviewed By: Blendify

Differential Revision: https://developer.blender.org/D8390
2020-07-26 21:20:37 -04:00
9e7ee39385 Merge branch 'blender-v2.90-release' 2020-07-26 21:09:24 -04:00
344be1fcfa RNA to Manual: Update links 2020-07-26 21:06:35 -04:00
ba9c88ce18 GPUFramebuffer: Fix compilation issue with designated initializer in C++ 2020-07-27 00:08:48 +02:00
2c2082cc62 GPU: Fix MSVC compile errors 2020-07-26 23:50:29 +02:00
e76f64a532 Fluid: Added new option to control the maximum number fluid particles in the simulation
New option that lets users the define the maximum number of fluid particles that will be allowed in the simulation. This can come in handy, for example, to ensure that the particle count will not exceed the hardware capabilities, or to avoid excessive amounts of particles in a scene.
2020-07-26 22:04:59 +02:00
c9cc5ad1c0 Fluid: Updated Mantaflow source files
New files contain updated sampling function (support for maximum number of particles cap).
2020-07-26 22:04:59 +02:00
65e1d43f0b Fluid: Cleanup unsed file format options
File format options for noise and particles are not needed anymore (since OpenVDB update).
2020-07-26 22:04:59 +02:00
04195b1e74 Fluid: Added new option to control the maximum number fluid particles in the simulation
New option that lets users the define the maximum number of fluid particles that will be allowed in the simulation. This can come in handy, for example, to ensure that the particle count will not exceed the hardware capabilities, or to avoid excessive amounts of particles in a scene.
2020-07-26 22:02:10 +02:00
2ebf263f5c Fluid: Updated Mantaflow source files
New files contain updated sampling function (support for maximum number of particles cap).
2020-07-26 22:02:10 +02:00
9386dd66ff Fluid: Cleanup unsed file format options
File format options for noise and particles are not needed anymore (since OpenVDB update).
2020-07-26 22:02:10 +02:00
94afe7671c Cleanup: GPU: Remove glew headers part2 2020-07-26 21:07:25 +02:00
54237994d8 Cleanup: Image: Rename redundant enum for clarity 2020-07-26 21:07:25 +02:00
487eaeed7e GPUTexture: Replace GL textarget enum by Image enum 2020-07-26 21:07:25 +02:00
025dc31d28 GPU: Remove GL constant from BIF_glutil 2020-07-26 21:07:25 +02:00
18cca0e704 Cleanup: GPU: Remove GPU_glew.h outside of GPU module
Remove use of GL* constants and types inside the codebase. There is still
a few occurence to get rid of.
2020-07-26 17:29:49 +02:00
9e23dbd060 Cleanup: GPU_codegen.c: Use LISTBASE_FOREACH macro instead of for loops 2020-07-26 17:28:48 +02:00
15655aa1dd Cleanup: GPU: Remove unused code and header 2020-07-26 17:28:48 +02:00
cc7d5e1fe6 GPU: Move gpu_platform.c to C++ 2020-07-26 17:28:48 +02:00
c276ef61d4 GPU: Move gpu_immediate.c to C++ 2020-07-26 17:28:48 +02:00
b296b68ff2 GPU: Move gpu_framebuffer.c to C++ 2020-07-26 17:28:48 +02:00
9905db5557 GPU: Move gpu_extensions.c to C++ 2020-07-26 17:28:48 +02:00
7c3eaffbbd GPU: Move gpu_element.c to C++ 2020-07-26 17:28:48 +02:00
97b597cd04 GPU: Move and rename gpu_draw*.c to C++
`gpu_draw.c` was a misleading name, `gpu_texture_image.cc` is better
suited.
2020-07-26 17:28:48 +02:00
8b7802db85 GPU: Move gpu_debug.c to C++ 2020-07-26 17:28:48 +02:00
56803e2754 GPU: Rename gpu_context.cpp to .cc suffix 2020-07-26 17:28:48 +02:00
7b4a21077a GPU: Move gpu_batch.c to C++ 2020-07-26 17:28:48 +02:00
d3cecc5007 GPU: Move gpu_attr_binding.c to C++ 2020-07-26 17:28:48 +02:00
13afc81f6d BLI: Add MACRO for enum usage in C++
This is handy to add support for enums used in both C and C++
files. This removes the need to typecast each time for every
operation.

Only support bitwise operators for now.
2020-07-26 17:28:48 +02:00
a77175c9b6 GPU: Add extern "C" to intern headers 2020-07-26 17:28:48 +02:00
076d033e10 VSE: Refactor delete operator and API
Operator logic is limited to iterating over selection and executing
same code as python API does.

Functional changes:

 - No attempt to preserve effects is made. Dependant effects are deleted.
 - No attempt to change meta strip boundaries.

Partially fixes T73828

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D6892
2020-07-26 16:07:34 +02:00
f0e370a650 Merge branch 'blender-v2.90-release' 2020-07-26 15:04:56 +02:00
7ceb6ffe57 Fix T74958: Infinite loop on using strip as modifier mask
Add recursion check before assigning strip as a mask for modifier.
Same check is used for recursion check when reassigning effect input, so it
should not be possible to create recursion at all.
2020-07-26 15:00:37 +02:00
f2907b06f4 Fix T78999: Crash when adjusting sequencer property
Sequencer was not initialized yet, and RNA update function tried to clean up cache.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8323
2020-07-26 15:00:37 +02:00
5414ccbd4c Merge branch 'blender-v2.90-release' 2020-07-26 22:00:13 +10:00
28b1c70895 Fix T79272: Dimensions fail on negative scaled axis 2020-07-26 21:58:47 +10:00
850234c1b1 UV: port smart project from Python to C
Use C for faster operation on high poly models,
in my tests this gave ~27x speedup.

D8311 by @andreasterrius with edits.
2020-07-26 21:27:32 +10:00
9482cc6865 UV: support creating ParamHandle without checking UV selection
Needed for unwrapping from the 3D view.
2020-07-26 20:42:11 +10:00
fd7e31b3e5 Particles: don't mark Particle Attribute node as mockup
It is actually doing something already.
2020-07-26 12:32:28 +02:00
6cecdf2ade Functions: move tests closer to code 2020-07-26 12:19:11 +02:00
13abacaaf3 Particles: show which nodes are only mockups in the Add menu
More nodes will be implemented step by step. I don't remove/disable these nodes,
so that it is still possible to add them.
2020-07-25 21:01:57 +02:00
14326619a1 Cleanup: avoid using namespace name in many cases 2020-07-25 20:39:21 +02:00
1e999c7bdb Particles: initial Quick Particles operator
This operator automates the following steps:
1. Create a point cloud object.
2. Create a simulation data block.
3. Add a small particle simulation to the node tree.
4. Add a Simulation modifier to the point cloud object.
5. Reference the particle simulation from the modifier.

You have to go back to frame 1 to start the simulation.
The simulation is not yet cached and cannot be rendered.

The bounding box of the point cloud object is enabled for now,
because otherwise it is hard to select the object.
2020-07-25 20:24:36 +02:00
04d46bdb83 Pointcloud: workaround for a viewport drawing issue 2020-07-25 20:19:55 +02:00
89f4191a53 Allocator: fix build error with -Werror=format-security 2020-07-25 15:10:24 +02:00
0ae2a1d12a Particles: improve emitter when object is animated 2020-07-25 14:51:15 +02:00
d52e45c89e Merge branch 'blender-v2.90-release' 2020-07-25 21:31:16 +10:00
a8d058dbf4 Fix T79260: Crash displaying the same mesh in two windows 2020-07-25 21:30:08 +10:00
790d3804d0 Merge branch 'blender-v2.90-release' 2020-07-25 20:50:38 +10:00
4ca8f25fa8 Fix T79239: UV path select crash 2020-07-25 20:48:40 +10:00
82db64ed80 Merge branch 'blender-v2.90-release' 2020-07-25 20:36:31 +10:00
537c57136f Fix T79254: FCurve editor crash when zooming out to limit 2020-07-25 20:32:07 +10:00
eeaa4379aa Simulation: cleanup dna data 2020-07-25 11:54:06 +02:00
ddd4fec386 Merge branch 'blender-v2.90-release' 2020-07-25 17:19:49 +10:00
2308668bac Fix T72622: Transform object origin ignores shape keys
D8367 by @paul2t with edits.
2020-07-25 17:19:13 +10:00
273f50a333 Merge branch 'blender-v2.90-release' 2020-07-24 13:13:42 -03:00
d7c4e96493 Cleanup: Rename 'isect_ray_seg_v3' to 'isect_ray_line_v3'
The name was misleading as it returns true whenever it intersects the
line represented by the points.
2020-07-24 12:07:58 -03:00
9a117fcdae GPencil: Add more randomness to random stroke color
The old method produce a small range of similar colors.
2020-07-24 16:24:04 +02:00
704d581aea Merge branch 'blender-v2.90-release' 2020-07-24 15:39:11 +02:00
c64b12c0b8 Fix OptiX being shown as available on first generation Maxwell GPUs
The OptiX kernels are compiled for target "compute_sm_52", which is only available on second
generation Maxwell GPUs, so disable support for older ones.
2020-07-24 15:36:09 +02:00
50ff450202 Cleanup: can use guarded instead of raw allocator now 2020-07-24 13:47:57 +02:00
74fcb4d4c2 Particles: initial particle birth action
A particle action is some function that is triggered by some event.
Right now, users cannot control this. There is just a
randomize-velocity on-birth action. So the direction of spawned
particles is slightly randomized now.

This also adds a new integer attribute called "Hash" which is
useful for a number of things. Mainly for generating random numbers
for a specific particle. The ID of a particle is not necessarily a good source
of randomness.
2020-07-24 13:37:55 +02:00
f495b583be Merge branch 'blender-v2.90-release' 2020-07-24 12:40:20 +02:00
ec17b45034 Depsgraph: use construct on first use idiom for graph registry
This is necessary to avoid false positive memory leaks.
2020-07-24 12:38:04 +02:00
236ca8fbe8 Allocator: make leak detection work with static variables
When definining static variables that own memory, you should
use the "construct on first use" idiom. Otherwise, you'll get
a warning when Blender exits.

More details are provided in D8354.

Differential Revision: https://developer.blender.org/D8354
2020-07-24 12:26:11 +02:00
b53c46d760 BLI: add MultiValueMap
This is a convenience wrapper for `Map<Key, Vector<Value>>`.
It does not provide any performance benefits (yet). I need this
kind of map in a couple of places and before I was duplicating
the lookup logic in many places.
2020-07-24 12:15:13 +02:00
141deeefff DNA: disable 'int8_t' since it's not properly supported
Currently negative values from this type will be changed if the
int8_t changes to a int16_t for e.g.
2020-07-24 19:41:50 +10:00
22b8ac80d2 Merge branch 'blender-v2.90-release' 2020-07-24 11:24:57 +02:00
3886392430 Fix interface artifacts on Intel GPUs
This is a continuation of fix for T78307. Turns out instancing do not
work at all, so enforce single widget drawing on macOS and Intel GPU.

It was also reported that certain AMD and Mesa driver suffer from
similar issue, so disabled instancing for this configuration as well.

Differential Revision: https://developer.blender.org/D8374
2020-07-24 11:23:39 +02:00
13fa4b9898 Cleanup: remove redundant glReadBuffer call when reading pixels 2020-07-24 19:01:13 +10:00
1a5945e2c3 Merge branch 'blender-v2.90-release' 2020-07-24 16:21:47 +10:00
2bd2db120e Fix T79209: Empties have disabled viewport display settings 2020-07-24 16:20:30 +10:00
2a186af2b3 Merge branch 'blender-v2.90-release' 2020-07-24 15:58:30 +10:00
0e9999a93e Fix shape key pin toggle drawing as disabled in edit-mode
Pin can be used in edit-mode when shape key in edit-mode is enabled.
2020-07-24 15:55:11 +10:00
ba99b12287 Cleanup: use doxy sections, update comments missed from refactor 2020-07-24 13:58:32 +10:00
698af2e774 Try to fix build error
Not sure if this is the correct fix, because I can't reproduce the error.
2020-07-24 00:35:51 +02:00
0b50ea51cc Particles: simulate partial time steps on newly emitted particles 2020-07-23 23:03:19 +02:00
f359672c35 Particles: spawn particles on mesh surface 2020-07-23 22:30:22 +02:00
c049fe7979 Merge branch 'blender-v2.90-release' 2020-07-23 12:50:59 -06:00
9cbf43801b Fix T79187: Outliner "Make Single User" crash
When "ID Data" -> "Make Single User" is chosen with selected elements
that are not curves, there is a crash. This fix ensures that the id in the
callback function is an Action.
2020-07-23 12:40:33 -06:00
5ccb0f46dd Merge branch 'blender-v2.90-release' 2020-07-23 18:10:28 +02:00
954aa441bf Fix: Incorrect VR pose after changing landmark
Once the base pose was changed (e.g. by changing the active landmark), we'd always run the logic to reset to the base pose. That would mess up the final viewer pose.
Think this only got exposed through 607d745a79.
2020-07-23 18:08:24 +02:00
149bb0c26d Cleanup: unify naming between different spans 2020-07-23 18:07:44 +02:00
87c0a38a39 GPencil: Fix unreported missing frames in interpolation
When interpolate, the temp frames are tagged, and later removed. If for any reason any stroke was tagged in other area of Blender (this tag is used for temp tagging), the stroke could be removed by error when run interpolation.

In a previous fix, the tag was cleared before, but only for the frame range of the interpolation. Now, the clear is done for all frames.

Also, instead to clear for each stroke sampling, now it's done only once at invoke time.
2020-07-23 17:59:18 +02:00
766edbdf1f Particles: improve mesh emitter
Particles are now emitted from vertices of the mesh.
2020-07-23 17:57:11 +02:00
67857b5d9f Cleanup: avoid zero byte memcpy
Asan reports warnings because of this.
2020-07-23 17:55:05 +02:00
cf123da640 BLI: Add MutableSpan.copy_from method 2020-07-23 17:54:31 +02:00
4619562e2f Merge branch 'blender-v2.90-release' 2020-07-23 17:15:58 +02:00
ad586e7eeb LibOverride: Add update of overrides when reloading library data.
Pretty straight-forward, although it does not rebuild relationships
(this is a heavy process we do not want to automate for now, will be a
separate operator in near future).

Fix T78179: Library Overrides - Additional geometry not updating without reloading scene.
2020-07-23 17:15:32 +02:00
50cb693f1d Cleanup: Clang format. 2020-07-23 17:15:32 +02:00
ad6cfcef01 Fix (unreported) crash in reload library code related to shpaekeys.
Once again, we need lots of unatural twisting and convolutions to get
those nasty things to work...

Note that in previous versions of Blender, this would not crash, but was
still broken (shapekeys were never actually reloaded from libraries).
2020-07-23 17:15:32 +02:00
706b690ec6 Fix (unreported) bad handling of pointers in overrides with shapekeys. 2020-07-23 17:15:32 +02:00
6f3c37a3ff UI: Move properties tab list creation from RNA to editor
This is a change I pulled from the property-search-ui branch,
where I have to use the list of tabs to search the inactive tabs
and it makes more sense to use the array directly.

It is also an improvement to have this fundamental code to the
properties editor in the editor code rather than an RNA callback.

There are no functional changes.

Differential Revision: https://developer.blender.org/D8368
2020-07-23 11:01:59 -04:00
c9975d19b5 Merge branch 'blender-v2.90-release' 2020-07-23 15:47:47 +02:00
8d35dceb14 DNA: support fixed size integers
Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D8373
2020-07-23 15:42:45 +02:00
c8b24af1b2 BLI: move some tests into blenlib/tests
Reviewers: sybren

Differential Revision: https://developer.blender.org/D8315
2020-07-23 15:23:55 +02:00
ee98dc8d0f Fix T77277: building depsgraph inter-driver relations is slow
The extra depsgraph relations that were added to prevent threading
issues during evaluation (rB4c30dc343165) caused a considerable slowdown
on complex scenes with many drivers (T77277, T78615). This commit
improves this as follows.

Only the following drivers are considered for execution serialisation:
- Drivers on Array elements, and
- Drivers on Boolean or Enum properties.

Relations between drivers of the same arrays are added blindly, i.e.
without checking for transitive or cyclic relations. This is possible as
other relations will just target the `PROPERTIES_ENTRY` or
`PROPERTIES_EXIT` nodes.

Checking whether a driver is on an array is first done by checking
`array_index > 0`, and then falling back to resolving the RNA path to an
RNA property and inspecting that.

The code also avoids circular dependencies when there are multiple
drivers on the same property. This not something that is expected to
happen (both the UI and the Python API prevent duplicate drivers), it
did happen in a file (F8669945, example file of T78615) and it is easy
to deal with here.

Reviewers: sergey

Subscribers: mont29

Comment update
2020-07-23 14:52:46 +02:00
37ad90c35f Fix T29189 bevel crash.
New code to calculate UV islands made an incorrect assumption about
maximum stack size.
2020-07-23 08:44:34 -04:00
4ae24c0b57 Fix T79189 bevel crash.
New code to calculate UV islands made an incorrect assumption about
the maximum size of a stack.
2020-07-23 08:27:10 -04:00
be1969d2a4 Merge branch 'blender-v2.90-release' 2020-07-23 08:42:40 -03:00
b64ae920e4 Fix T79158: Eevee cubemaps shows black
Same as T75943 that was fixed by rBff97545c50f4
2020-07-23 08:41:35 -03:00
65aba4fc7a Fix T79158: Eevee cubemaps shows black
Same as T75943 that was fixed by rBff97545c50f4
2020-07-23 08:37:41 -03:00
634585aa68 Simulation: add depsgraph relations for ids referenced by node tree
I'll really have to refactor `ntreeUpdateTree` soon to avoid scanning
all node trees multiple times.
2020-07-23 12:09:36 +02:00
6596891121 Merge branch 'blender-v2.90-release' 2020-07-23 11:45:44 +02:00
bfeff73252 LibOverride: Add reset operations to the outliner menu. 2020-07-23 11:33:24 +02:00
60b80ce142 LibOverride: Add core functions to reset a library override.
This means that we delete all override properties except for those over
ID pointers *if* the assigned pointer matches the linked data hierarchy.

Then we reload affected datablocks.
2020-07-23 11:33:24 +02:00
79440c37ac LibOverride: Store RNA prop type in override properties.
Storing this info will help with dealing with reset operations and the
like (as we do not want to reset overrides of ID pointers essentially).
2020-07-23 11:33:24 +02:00
fa21ba0179 LibOverride: Outliner override creation: Better checks.
Enhance checks for which ID is valid for the override creation
operation.
2020-07-23 11:33:24 +02:00
d998258fa6 LibOverride: Make ID_IS_OVERRIDABLE_LIBRARY macro more correct. 2020-07-23 11:33:24 +02:00
ef17e7e51b LibOverride: Move override operations into own section of the ID outliner menu.
Also cleanup naming in outliner's override callbacks.
2020-07-23 11:33:24 +02:00
85157e74b3 LibOverride: Fix missing ID update tag in BKE_lib_override_library_update. 2020-07-23 11:33:24 +02:00
ad602a3f03 LibOverride: change runtime data into a real struct.
Needed for upcoming changes.
2020-07-23 11:33:24 +02:00
c8653e516d LibOverride: Optimize/fix new generic 'relation-based' make override code.
This commit mostly avoids following 'loop back' ID pointers, since those
should never define an actual relationship.
2020-07-23 11:33:24 +02:00
8a5da947dc Fix error in 'preferences.copy_prev' checking for the last version
The check to avoid updating between major releases prevented
2.90 files being copied to 2.91
2020-07-23 18:43:37 +10:00
944df0c784 Cleanup: remove incorrect comment 2020-07-23 10:39:22 +02:00
62e53788aa Merge branch 'blender-v2.90-release' 2020-07-23 17:35:40 +10:00
67002402bd Fix T79162: 'prop_search' includes ID prefix in string properties
Regression from d6cefef98f

This also fixes an unreported issue where finding an exact match
wasn't being detected for items that contained an ID prefix.
2020-07-23 17:24:17 +10:00
8438ef4d8e Cleanup: update comments, remove disabled code 2020-07-23 14:04:18 +10:00
19afb0ea67 Cleanup: remove redundant static variable use
This hasn't been needed since Python 3.7x.
2020-07-23 13:59:07 +10:00
797820fc20 Cleanup: replace wchar_t with char32_t 3D text accent input 2020-07-23 12:39:03 +10:00
ce4c2b8f0b Merge branch 'blender-v2.90-release' 2020-07-23 12:24:55 +10:00
4b31f4ace7 UI: disable add-object tool for 2.90 release
This needs improvements which need user testing before this can
be considered finished, even on a basic level.
2020-07-23 12:23:43 +10:00
e5cd770e9f Cleanup: rename Curve.len_wchar to len_char32
The name was misleading as the length is for char32_t, not wchar_t.
2020-07-23 11:50:03 +10:00
06e84fef88 Cleanup: unused argument 2020-07-23 11:39:49 +10:00
a51048a5d3 Simulation: add todo comment 2020-07-22 19:29:38 +02:00
4d6ac72264 Nodes: add missing update tags in the case of simulation node trees 2020-07-22 19:16:33 +02:00
e77644982c Depsgraph: build ids referenced by sockets 2020-07-22 19:16:33 +02:00
e0400d0a1c Simulation: move responsibility of updating persistent data handles
This solver should not be responsible for updating the handles.
2020-07-22 19:16:33 +02:00
0a5ef40c2c Simulation: fix memory leak 2020-07-22 19:16:33 +02:00
750899fd31 Simulation: improve depsgraph integration
A simulation data block has an embedded node tree, which requires
special handling in a couple of places. Some of those places were
missing beforehand.

This also adds a relation to make sure that the simulation is evaluated
after animations on the embedded node tree are evaluated.
2020-07-22 19:16:33 +02:00
921c95ab5e Fix T79144: Snapping bypassing the viewport backface culling
Silently activate the backface culling when the viewport is using.
2020-07-22 12:00:02 -03:00
72fc70879c Cleanup: Fix strict compiler warning 2020-07-22 16:52:00 +02:00
6f3ba033f8 Merge branch 'blender-v2.90-release' 2020-07-22 10:12:51 -04:00
0e280b96ca Fix T79160: Bevel modifier set to vertices by default
Need to properly initialize the affect_type field.
2020-07-22 10:02:52 -04:00
Nathan Letwory
5a1a4f4dd2 master is now 2.91.0 alpha. 2020-07-22 16:48:29 +03:00
Nathan Letwory
62a0e1d54f Merge branch 'blender-v2.90-release' 2020-07-22 16:47:26 +03:00
Nathan Letwory
a4e3943a08 Release branch is now in beta. 2020-07-22 16:41:29 +03:00
1fb9b6b1a1 UI: Use property split for simulation modifier 2020-07-22 09:16:17 -04:00
Nathan Letwory
0c0a9dabc7 Ensure submodules are at their correct commits. 2020-07-22 16:15:53 +03:00
4950022e7d Object: add-object option to place on the surface normal
Optionally use the surface normal under the mouse cursor.
2020-07-22 22:38:40 +10:00
980dd43bd4 Particles: give emitter its own state
High quality emitters need to maintain state themselves. For example,
this it needs to remember when it spawned the last particle.
This is especially important when the birth rate is changing over time.
Otherwise, there will be very visible artifacts.

It is quite likely that other components of the simulation need their own
state as well. Therefore, I refactored the `SimulationState` type a bit,
to make it more extensible. Instead of using hardcoded type numbers, a
string is used to identify the state type. Also, instead of having switch
statements in many places, there is a new `SimulationStateType` that
encapsulates information about how a specific state is created/freed/copied/...

I removed the integration with the point cache for now, because it was
not used anyway in it's current state.
2020-07-22 14:16:08 +02:00
47b6c33258 GPencil: New BKE function for setting random vertex color
This function is very handy for debug purposes.
2020-07-22 11:16:45 +02:00
Yevgeny Makarov
8f658ec27c UI: use term 'Vertex' instead of 'Vert' 2020-07-22 16:22:23 +10:00
ef52a9f791 Fix UV select flush error in recent loop select cleanup
Regression from d99b343b31
2020-07-22 16:02:46 +10:00
077a2f7bbb Cleanup: minor changes to doxy sections and naming
Use py_bl_math prefix instead of M_Math.
2020-07-22 15:24:10 +10:00
Cody Winchester
5c28955d3a Modifiers: option to preserve custom normals for subsurf & multires 2020-07-22 15:07:21 +10:00
a197b81090 Docs: include 'bl_math' module 2020-07-22 14:36:30 +10:00
b5194520e3 Fix T79148: UV Edge ring select doesn't select edges
While UV doesn't yet support edge selection, it can
when sync select is enabled.
2020-07-22 14:33:26 +10:00
83cb4f5f8f Cleanup: spelling 2020-07-22 11:57:04 +10:00
7fc9666c89 Cleanup: use elif for sculpt tool checks 2020-07-22 11:29:53 +10:00
59e48d8fe4 Wayland: draw opaque background when OpenGL alpha is enabled 2020-07-22 10:57:42 +10:00
cfa788cf9a GPU: clear color with 1.0 alpha
This impacts GHOST/Wayland which draws windows using alpha.
2020-07-22 10:57:41 +10:00
607d745a79 VR: Change how landmarks affect viewer pose
* Changing to a landmark moves the view exactly to it, rather than
  keeping the current position offset.
* Disabling positional tracking moves the viewer back to the landmark
  position.
This is a more predictable and practical way to use landmarks. See
feedback in T71347.

On the code side, I did some cleanup so the logic flow is more clear.

Note: This is entirely untested. I currently don't have access to a
device. There might be issues, tomorrow I'll hopefully get feedback.
2020-07-22 00:05:56 +02:00
878d191bae Sculpt: Add extra deform types to Slide
This adds extra deform modes to the slide mode of the Topology
Slide/Relax brush (both slide and smear are almost identical).
This is useful to move topology to a specific area to add more localized
details

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8349
2020-07-21 22:59:07 +02:00
46b126a2c8 UI: Small changes to bevel active tool layout
- Exposes affect enum in the header instead of profile type.
 - Add two missing options from the operator
2020-07-21 16:47:58 -04:00
69afdf6970 Sculpt: Support pen pressure modulation in Paint Brush properties
This allows to use pen pressure modulation in hardness, wet mix, wet
persistence, flow and density, as well as inverting the modulation (more
pressure, less density...). With this, it is possible to create brushes
that mix paint or apply a new color based on the pressure.

Reviewed By: sergey, campbellbarton

Differential Revision: https://developer.blender.org/D8267
2020-07-21 22:43:39 +02:00
4aa2a5481c Bevel: Refactor "Vertex Only" to an enum
This matches the change that was done to the bevel modifier so that the
interface for the modifier, the active tool, and the operator are consistent.

 This commit extends the refactor to the bmesh implementation too, so
that the parameters in the implementation don't stray too far from what
is exposed.

Tests are adjusted and still pass.
2020-07-21 16:32:00 -04:00
a39da2cbca Fix T79056: Topology automasking artifacts in multires
Both to_v and form_v need to be included. From_v is needed to include
the active vertex when there is only one vertex in the radius of the
brush, to_v needs to be included to add all grids duplicates

Reviewed By: sergey

Maniphest Tasks: T79056

Differential Revision: https://developer.blender.org/D8347
2020-07-21 22:27:44 +02:00
7aabd74222 Fix T79007: Smooth brushes crasing in dyntopo
The custom smooth functions for bmesh and meshes where removed and
replaced by a generic smooth function using the sculpt API, which needs
to initialize the bmesh indices in order to be used

Reviewed By: sergey

Maniphest Tasks: T79007

Differential Revision: https://developer.blender.org/D8333
2020-07-21 22:26:42 +02:00
b453e9e3a4 Cleanup: move 'int i' declaration
It is preferable that the value used for interators is defined
close to where it is used.
2020-07-21 14:02:13 -03:00
f8cc01595d Drivers: add lerp and clamp functions to namespace.
Implementation of lerp without a function requires repeating one of
the arguments, which is not ideal. To avoid that, add a new function
to the driver namespace. In addition, provide a function for clamping
between 0 and 1 to support easy clamped lerp, and a smoothstep function
from GLSL that is somewhat related.

The function implementations are added to a new bl_math module.
As an aside, add the round function and two-argument log to the
pylike expression subset.

Differential Revision: https://developer.blender.org/D8205
2020-07-21 19:01:50 +03:00
8369adabc0 Particles: initial object socket and emitter node support
Object sockets work now, but only the new Object Transforms and the
Particle Mesh Emitter node use it. The emitter does not actually
use the mesh surface yet. Instead, new particles are just emitted around
the origin of the object.

Internally, handles to object data blocks are passed around in the network,
instead of raw object pointers. Using handles has a couple of benefits:
* The caller of the function has control over which handles can be resolved
  and therefore limit access to specific data. The set of data blocks that
  is accessed by a node tree should be known statically. This is necessary
  for a proper integration with the dependency graph.
* When the pointer to an object changes (e.g. after restarting Blender),
  all handles are still valid.
* When an object is deleted, the handle is invalidated without causing crashes.
* The handle is just an integer that can be stored per particle and can be cached easily.

The mapping between handles and their corresponding data blocks is
stored in the Simulation data block.
2020-07-21 17:35:09 +02:00
6c7e62ef9b UI: Adjust Multiresolution Modifier Layout
Adjusting the layout for this modifier is the final part of the modifier UI
project for 2.90. This layout exposes the most important information,
the levels and subdivision controls, by default, putting other contols
in collapsed subpanels.

Note that there is empty space for the "Delete Lower" button
that is still planned for 2.90. And there will also eventually be more
items added to the "Shape" panel, maybe for 2.90.

Differential Revision: https://developer.blender.org/D8187
2020-07-21 11:27:05 -04:00
17ebbdf1c1 UI: Use consistent layout for custom operator UI
Operators are one of the last places in Blender to use older UI designs
that don't fit in with recent style conventions. This commit updates
these custom operator UI callbacks for consistency and clarity.

Some of the code is also simplified a lot. Some of the older operator layouts
were much more complex (in terms of code) than they needed to be.

See the differential revision for a before and after screenshot
of each operator.

Differential Revision: https://developer.blender.org/D8326
2020-07-21 11:13:18 -04:00
c2b0c64843 UI: Add an outer boundary for edge panning, use in outliner
Currently if you drag and drop an item from the outliner elsewhere in
the Blender window, the outliner will scroll the entire time, even if the
mouse is far away. This commit adds optional behavior for the edge pan
operator that makes it only act if the mouse is close enough to the region.

Differential Revision: https://developer.blender.org/D8193
2020-07-21 10:12:35 -04:00
696c23f284 Cleanup: Comments. 2020-07-21 16:00:39 +02:00
cd6250c220 Fix (unreported) broken code in recent override operator enhancements.
When overriding a whole linked collection from a single object in
3DView, said 'reference' object would be removed by code. We only want
that behavior when overriding from an instanciating Empty.
2020-07-21 16:00:39 +02:00
d42530824e Fix T78994: Clear selected pose doesn't work without animation
It looks like the code left this as a todo, but the basic solution is to
add an extra parameter to BKE_bose_rest to check whether bones
are selected before reseting them.

I also corrected the operator description which said it acted on only
selected bones even when there is an option to turn that off. The
"act on selected" is generally implied for Blender's operators anyway.

Differential Revision: https://developer.blender.org/D8319
2020-07-21 09:51:27 -04:00
6b6e2e742f Fluid: Updated Mantaflow source files
Updated files include fixes for the mesh IO - read/write success was not propagated.
2020-07-21 15:22:40 +02:00
727e569ac3 Cleanup: CodeQuality: Replace OB_DRAWXRAY by OB_DRAW_IN_FRONT
This is to match the option name and to avoid confusion with
workbench xray mode.
2020-07-21 14:44:37 +02:00
3fe5c0e5df Fluid: Cleanup unused variables 2020-07-21 14:38:26 +02:00
5904953d22 Tests: IO, fixed a memory leak in the USDHierarchyIteratorTest
No functional changes to Blender.
2020-07-21 14:10:42 +02:00
269c184ac9 Cleanup: IO, renamed delete_object_writer()release_writer()
The function is called for all writers, not just 'object' writers.
Furthermore, it's called by the function `release_writers()`, so now the
name is consistent with that as well.

No functional changes.
2020-07-21 14:10:42 +02:00
6b6970d43f Tests: fix link errors when USD and Alembic are disabled
The unit tests for `bf_io_common` didn't actually link against
`bf_io_common`, so when both USD and Alembic were disabled, nothing
would link against that library and building the tests would fail.
2020-07-21 14:10:42 +02:00
bafe22e8ce Fix T79112: Redo shrink/fatten uses negative values
The numbers in the redo panel were negated compared to the value
entered while transforming.
2020-07-21 21:36:10 +10:00
6778ef4dcc Fix T78867: Crash related to viewing video files
Any time FFmpeg was used to get a picture Blender would crash
when FFmpeg 4.3 is used. This affects thumbnails, VSE, Clip Editor.

Caused by a bug in FFmpeg which lead to crashes when unaligned
buffer was passed to sws_scale(). It got fixed later on in FFmpeg,
but for portability and compatibility reasons still nice to avoid
crash, especially since it's not so difficult to do.

FFmpeg ticked number is #8747
The FFmpeg Git hash with the fix: ba3e771a42c2

Differential Revision: https://developer.blender.org/D8355
2020-07-21 12:49:20 +02:00
1c0fa3aff6 GPencil: Reorganize Snap pie menu
Put the options in the same position of meshes.

related to T79094
2020-07-21 12:36:22 +02:00
494a6a0bf2 Cleanup: layer_collection_sync: use LISTBASE_FOREACH_MUTABLE. 2020-07-21 12:18:08 +02:00
629726177a Cleanup: layer_collection_sync: use proper naming.
Previous ones were extremely confusing and innacurate (probably
inherited from older versions of scene collections?).

Also, use named fields in struct initialization, much much safer and
cleaner than anonymous, positionned-based thing.
2020-07-21 12:18:08 +02:00
0bfec04cd5 Fix T72621: Transform object origin support for grease-pencil
Added support for transforming only origins with greasepencil objects.

The new functions is based on BKE_gpencil_transform. That is why there is FIXME statements in there.

Reviewed By: Campbell, Antonio

Differential Revision: http://developer.blender.org/D8303
2020-07-21 12:13:03 +02:00
ece6d8b25a Fix (unreported) bad handling of detection of what to override from 3DView in some cases.
Having a directly linked object does not always mean it should be
considered as really overridable...
2020-07-21 11:59:50 +02:00
b277a75a3b Fix (unreported) LibOverride creation adding things to linked collections.
This is strictly forbidden, and sill cause crashes with undo in some
cases...
2020-07-21 11:59:50 +02:00
8c916a3aec Fix T79066: Entering Edit Mode when Viewport Display set as Wire or Bounds leads to crash 2020-07-21 11:50:21 +02:00
fdc3f56234 Cleanup: convert unsigned to signed comparison in assert
Thanks to Campbell for pointing this out.
2020-07-21 09:03:37 +02:00
c46663ad66 Cleanup: spelling 2020-07-21 16:02:58 +10:00
b31d3d1202 Fix UV edge/face sync selection from recent sticky select cleanup 2020-07-21 15:46:14 +10:00
2bc1fd7e91 Cleanup: simplify sticky UV selection
Use BMesh connectivity information instead of looping over all
geometry to flush the sticky selection.
2020-07-21 14:54:41 +10:00
b88dd3b8e7 UV: remove selection threshold for nearby coordinates
Internally UV selection considered close UV's to be connected.
While this could be convenient in some cases,
it complicates logic for more advanced selection operations that
need to check when UV's should be considered part of the same vertex
since simple threshold checks would give different results depending
on the order of UV's tested.

Users must now run "Merge by Distance" instead of relying
on this selection threshold.
2020-07-21 14:32:21 +10:00
50fe187443 Cleanup: improve comment for disabled readfile allocation naming
Also allocate the required amount instead of a fixed size.
2020-07-21 12:25:20 +10:00
731d9f0bfa Fix T78733 Bevel sometimes produces zero-area UV face with odd segments.
A bug introduced when I made the choice of interpolation face cleverer.
2020-07-20 16:08:43 -04:00
ed870f87b9 Fix weird placement of "Motion Tracking" in 3D View overlay popup
There was a weird looking gap between the checkbox and the "Motion Tracking"
label. Plus, the label could not be clicked to change the value, unlike
usually.

Issue is that the row is actually a sub-panel header. The checkbox being drawn
with the draw_header() callback, and the label being added as separate item by
the popover panel code. This adds a hack so the checkbox can add the panel
label itself (the popup drawing skips adding the label then). That addresses
mentioned issues.
2020-07-20 19:54:43 +02:00
d40c39fca0 Cycles: adjust Sky texture intensity to follow physical units
The sky will appear brighter than before by default. To compensate for this,
lower exposure in the Film panel. The default altitude was also changed from
90 to 15 degrees.

Patch contributed by Marco with the help of Ryan Jones.

Differential Revision: https://developer.blender.org/D8285
2020-07-20 19:31:42 +02:00
Miguel Pozo
52543be9a6 Python API: option to use OpenGL context in RenderEngine.render
When bl_use_gpu_context is set, an OpenGL context will be available for
OpenGL based render engines.

Differential Revision: https://developer.blender.org/D8305
2020-07-20 19:31:42 +02:00
a9644c812f Cycles: Use pre-compiled PTX kernel for older generation when no matching one is found
This patch changes the discovery of pre-compiled kernels, to look for any PTX, even if
it does not match the current architecture version exactly. It works because the driver can
JIT-compile PTX generated for architectures less than or equal to the current one.
This e.g. makes it possible to render on a new GPU architecture even if no pre-compiled
binary kernel was distributed for it as part of the Blender installation.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8332
2020-07-20 19:25:27 +02:00
a5ded0720c Fix (unreported) broken deletion of Shapekeys alongside their owner ID.
Trying to get shape key pointer after having unlinked its owner from
Main data-base is rather useless... So those shapekeys ended up never
being deleted.
2020-07-20 19:18:45 +02:00
bb63ce9839 Fix (unreported) bad handling of shapekeys when applying override rules.
We need to do a full proper swap of those shape keys as well, previous
code ended up breaking relationships between data-blocks...
2020-07-20 19:18:45 +02:00
62a819202e Fluid: Refactored smoke noise system
This refactor is in response to reports in which the adaptive domain with noise caused a crash (e.g. T79009). It should also fix issues where the smoke appeared to be cut off when using the adaptive domain together with noise. It is also possible that some of these changes improve the lines issue from T74559.
2020-07-20 18:35:52 +02:00
Adrian Newton
7d85495ab9 UI: Fix File Broswer filter checkbox not connected to label
Differential Revision: https://developer.blender.org/D8168

Reviewed by: Hans Goudey, Julian Eisel
2020-07-20 17:36:43 +02:00
4432209849 Fix T78321 Eevee: Motion blur crash rendering animation with high steps count
This was caused by `BPy_*_ALLOW_THREADS` being used when it shouldn't.

Implemented the simple fix suggested by @brecht :

> The simplest solution may be to ensure that Python stuff is only done
> when called through the RNA API, and not when Eevee calls it directly.
2020-07-20 17:23:28 +02:00
7484e45297 Fix T78960: 2.83.2 not opening a 2.82a project correctly.
That project cannot be opened correctly ayway, it has recursive
collections intanciating themselves...

But at least now we have a check at startup to detect and 'fix' those
nasty cycles in collections.
2020-07-20 17:04:16 +02:00
ccc2a7996b BLI: add typedefs for containers that use raw allocators
Those are useful when you have to create containers with static
storage duration. If those would use Blender's guarded allocator,
it would report memory leaks, that are not actually leaks.
2020-07-20 16:03:14 +02:00
ed184050b6 Fix T78958: Library Override crash: undo make local. 2020-07-20 15:36:31 +02:00
4f4af0cbe1 Particles: support removing particles during the simulation
This still cannot be controlled by the user. Currently, all particles are
killed after two seconds
2020-07-20 15:31:05 +02:00
9016a29f19 Fix T79107: Crash changing brush size in GPencil sculpt
Reviewed By: fclem

Maniphest Tasks: T79107

Differential Revision: https://developer.blender.org/D8353
2020-07-20 15:23:00 +02:00
230f7d79ce Fix signed/unsigned comparison 2020-07-20 14:04:09 +02:00
cbf2278266 Fix T79075: Tool popup fails with experimental vertex colors enabled
Register key-maps from tools in functions.
2020-07-20 21:55:48 +10:00
ac5f011e9c Fix T70455: Knife Tool failing to cut edges
Analyzing the cuts, the points shown in the viewport (indicating the
previous and current cuts) do not correspond to the final cuts.

Sometimes a point, even snapped to a vert, is a point that cuts an edge and
sometimes a point, even snapped to an edge, is a point that cuts only the face.

This is because the detection of snapping vertices from mouse is different
from the "snap" that detects vertices that are cut.

So small projection inaccuracies can result in detection failures.

The solution for this is simply to confirm the cuts whose vertices
indicate the `prev` ou and `cur` point.

The tolerance distance does not need to be calculated in these cases.
2020-07-20 08:52:11 -03:00
33ad95b677 Animation: Fix MSVC warning about C incompatibility of AnimationEvalContext
Thanks @JacquesLucke for pointing this out.

No functional changes.
2020-07-20 13:14:00 +02:00
579b180053 BLI: add Vector/Array.fill methods 2020-07-20 13:02:10 +02:00
8cbbdedaf4 Refactor: Update integer type usage
This updates the usage of integer types in code I wrote according to our new style guides.

Major changes:
* Use signed instead of unsigned integers in many places.
* C++ containers in blenlib use `int64_t` for size and indices now (instead of `uint`).
* Hash values for C++ containers are 64 bit wide now (instead of 32 bit).

I do hope that I broke no builds, but it is quite likely that some compiler reports
slightly different errors. Please let me know when there are any errors. If the fix
is small, feel free to commit it yourself.
I compiled successfully on linux with gcc and on windows.
2020-07-20 12:16:20 +02:00
Sybren A. Stüvel
686ab4c940 T77086 Animation: Passing Dependency Graph to Drivers
Custom driver functions need access to the dependency graph that is
triggering the evaluation of the driver. This patch passes the
dependency graph pointer through all the animation-related calls.

Instead of passing the evaluation time to functions, the code now passes
an `AnimationEvalContext` pointer:

```
typedef struct AnimationEvalContext {
  struct Depsgraph *const depsgraph;
  const float eval_time;
} AnimationEvalContext;
```

These structs are read-only, meaning that the code cannot change the
evaluation time. Note that the `depsgraph` pointer itself is const, but
it points to a non-const depsgraph.

FCurves and Drivers can be evaluated at a different time than the
current scene time, for example when evaluating NLA strips. This means
that, even though the current time is stored in the dependency graph, we
need an explicit evaluation time.

There are two functions that allow creation of `AnimationEvalContext`
objects:

- `BKE_animsys_eval_context_construct(Depsgraph *depsgraph, float
  eval_time)`, which creates a new context object from scratch, and
- `BKE_animsys_eval_context_construct_at(AnimationEvalContext
  *anim_eval_context, float eval_time)`, which can be used to create a
  `AnimationEvalContext` with the same depsgraph, but at a different
  time. This makes it possible to later add fields without changing any
  of the code that just want to change the eval time.

This also provides a fix for T75553, although it does require a change
to the custom driver function. The driver should call
`custom_function(depsgraph)`, and the function should use that depsgraph
instead of information from `bpy.context`.

Reviewed By: brecht, sergey

Differential Revision: https://developer.blender.org/D8047
2020-07-20 11:51:09 +02:00
6fbfa522e6 GPencil: Fix unreported wrong SNAP menu in Point Context menu
It was using the mesh menu instead of GPencil one.
2020-07-20 11:10:47 +02:00
e4daac84b6 Fix T79094: GPencil Snap menu with Shift+S not pie menu
In order to keep UI consistency, now it's a pie menu.
2020-07-20 11:07:28 +02:00
eb5cd628bd Fix T79089: Crash changing themes
Regression from 2840782d84.
2020-07-20 17:52:58 +10:00
b219ae4498 Fix T79077: Off-screen rendering ignores shading argument
Thumbnails used the 3D view shading mode when a camera wasn't used.
2020-07-20 11:32:26 +10:00
615af4e239 DRW: draw hook relationship lines
This wasn't added back from 2.7x, making "Recenter Hook" applier to
do nothing.
2020-07-20 09:25:26 +10:00
9db4e44961 DRW: overlay engine support for drawing isolated points
This matches similar functionality for drawing lines.
2020-07-20 09:19:50 +10:00
Yevgeny Makarov
78e40ad21f UI: use "Recalculate" instead of "Recalc" 2020-07-20 07:23:16 +10:00
6247ec7827 Fix T78977 GPU: blf fonts are not gamma corrected 2020-07-19 23:00:22 +02:00
3884d78e49 Particles: Make it easier to add attributes internally 2020-07-19 22:06:35 +02:00
5063820c9b Particles: Emit particles over time
This adds a basic internal emitter for every particle simulation.
The emitter cannot be controlled by the user yet. That will
come next.
2020-07-19 13:58:58 +02:00
8c90910dcc Fix T66937: Blank view on navigation with auto-deph & large clip-end 2020-07-19 21:27:13 +10:00
ccd2af43b3 Fix T78624: Crash running operators from Python in background mode 2020-07-19 18:59:14 +10:00
52a7c724b5 Cleanup: unused argument warning 2020-07-19 17:43:59 +10:00
71d0f6f896 Cleanup: spelling 2020-07-19 17:37:02 +10:00
b8601b64c7 Correct Blender version after last commit
c08d847488 incremented the patch version instead of the file subversion
for versioning code when adding new options. This commit resets the patch
version and instead bumps the file subversion.
2020-07-18 12:26:32 -04:00
c08d847488 UI: Status Bar Statistics and Other Options
Status Bar can show scene statistics, memory usage, version, etc set by context menu. Part two of T75672.

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

Reviewed by Julian Eisel
2020-07-18 07:49:25 -07:00
fe49e4139c Simulation: cleanup deduplicating attribute input nodes 2020-07-18 10:51:38 +02:00
9eaa48f520 Simulation: cleanup how data inputs are handled 2020-07-18 10:19:26 +02:00
fd67b521b9 Simulation: deduplicate code that finds particle simulation names 2020-07-18 10:08:53 +02:00
63db971a00 Simulation: fix memory leak 2020-07-18 10:06:36 +02:00
1dd381828f UV: edge-ring selection support
Matches edit-mesh edge-ring selection.
2020-07-18 16:09:17 +10:00
c48ccb38cb BMesh: utility for checking shared edge with limit argument 2020-07-18 15:54:04 +10:00
4e73ba2cab Cleanup: split UV loop select out of mouse picking function 2020-07-18 15:43:37 +10:00
f24ccedc18 UV: utility functions for sticky select setting
Support setting vert/edge/face selection, using the sticky option
without performing a second loop over all faces to flush selection.

Existing selection code didn't take advantage of BMesh connectivity
since the logic is from before BMesh was included.
2020-07-18 15:37:33 +10:00
016253a648 Cleanup: spelling 2020-07-18 14:27:53 +10:00
fd08d6f391 Cleanup: unused warning 2020-07-18 14:27:30 +10:00
d99b343b31 Cleanup: UV selection
Remove commented code, move penalty calculation into own function.
2020-07-18 14:15:02 +10:00
d9228c557b Cleanup: KnifeTool: Replace glPolygonOffset by GPU_polygon_offset 2020-07-18 03:46:12 +02:00
4c28b1c74e Cleanup: GPU: Encapsulate clipDistances
This also remove some non functionnal state changes that were left
from legacy code.
2020-07-18 03:43:52 +02:00
59975b0adf Cleanup: WM: Encapsulate stereo draw buffers binding 2020-07-18 03:43:52 +02:00
8dfc31f61f Cleanup: GPU: Encapsulate glProvokingVertex 2020-07-18 03:43:52 +02:00
264b1e1e15 Cleanup: GPU: Encapsulate glFrontFace 2020-07-18 03:43:52 +02:00
5993c53a6d Cleanup: GPU: Encapsulate Backface culling 2020-07-18 03:43:52 +02:00
c14e6cdd56 Cleanup: View3D: Encapsulate OpenGL calls
Removes GL_DEPTH_RANGE query as it is not changed anywhere.
2020-07-18 03:43:52 +02:00
1f2edba1fb Cleanup: GPU: Encapsulate scissor test 2020-07-18 03:43:52 +02:00
d19b3019d9 Cleanup: GPU: Encapsulate glScissor 2020-07-18 03:43:52 +02:00
a6bd7777c2 Cleanup: GPU: Encapsulate glViewport calls 2020-07-18 03:43:52 +02:00
35f1b3e43b Cleanup: GPU: Wrap GL_UNPACK_ROW_LENGTH in GPU_state
Also go back to default value of 0 after usage.
2020-07-18 03:43:52 +02:00
faeaf53255 Cleanup: Sequencer: Use GPUTexture instead of opengl calls 2020-07-18 03:43:52 +02:00
e2305690eb Cleanup: WM: Use GPUTexture for radial control drawing 2020-07-18 03:43:52 +02:00
2d9eee15c5 Cleanup: GPU: Set default GL_UNPACK_ALIGNMENT to 1
Ogl default is 4 but for almost all cases, blender use tightly
packed format. This avoid confusion and state change for the
common case.

The only case that __might__ need alignement is DDS loader
(untested) so leaving this as it is.
2020-07-18 03:43:52 +02:00
0ef57d3fc0 Cleanup: glutil: Use GPUTexture in immDrawPixelsTexScaled_clipping
This also cleanup the code for readability.
2020-07-18 03:43:51 +02:00
122d0c8f4b Cleanup: ClipDraw: Use GPUTexture api and fix a vmem leak
Leak was silent as it was an opengl handle.
2020-07-18 03:43:51 +02:00
dcf6e12a60 Cleanup: GPUShader: Remove unused builtin shader 2020-07-18 03:43:51 +02:00
7e66616b7e Cleanup: ClipDraw: Remove usage of GPU_SHADER_3D_IMAGE_MODULATE_ALPHA 2020-07-18 03:43:51 +02:00
6d160f199c Cleanup: PaintCursor: Use GPUTexture instead of opengl calls 2020-07-18 03:43:51 +02:00
99b424334d GPU: Add immBindTexture and immBindTextureSampler 2020-07-18 03:43:51 +02:00
5b4a862f83 GPUTexture: Add better swizzle support 2020-07-18 03:43:51 +02:00
2840782d84 Cleanup: GPU: Make icon drawing use GPUTexture
This remove all gl function calls. Adds a new sampler only
for icon drawing.
2020-07-18 03:43:51 +02:00
02c09773ea Cleanup: GPU: rename bglPolygonOffset to GPU_polygon_offset
And move it to GPU module.
2020-07-18 03:43:51 +02:00
acad0d75b1 Cleanup: GPU: Replace glBlendFunc by GPU equivalent 2020-07-18 03:43:51 +02:00
3d536f69f6 UI: Use property split for custom property edit popover
The panel looks out of place with the rest of Blender's UI and the
text is cropped. With property split turned on and a few smaller
tweaks these issues are fixed.

|  Before  |  After   |
|{F8700181}|{F8700183}|

Differential Revision: https://developer.blender.org/D8322
2020-07-17 19:54:11 -04:00
aa8279648e Simulation: extract node tree parsing code to separate file 2020-07-17 21:20:51 +02:00
25582aef61 Simulation: separate code from node tree parsing and solver 2020-07-17 21:20:51 +02:00
69d14c0ddb Fix T78959: Show current frame indicator when interface is locked
When the playhead drawing moved to an overlay, a check was added to keep
it from drawing with a locked interface. This is necessary for some overlays,
but not this one, so this removes the check, making it the responsibility of
the editor.

A context function is added to make that check easier in the future.

Differential Revision: https://developer.blender.org/D8313
2020-07-17 15:18:54 -04:00
8b0df381d9 Transform: use GHASH_ITER when restoring customdata 2020-07-17 14:33:40 -03:00
d8a6eec1a3 Cleanup: Removed incorrect // namespace DEG comment
No functional changes.
2020-07-17 16:49:00 +02:00
893eb30730 Fluid: Numpy support for Mantaflow build system
Adjusted the fluid build system so that plugins that depend on numpy can be compiled as well.

Note that in this commit numpy support is still disabled. It can be enabled by re-running the Mantaflow update script with USE_NUMPY=1 and enabling WITH_MANTA_NUMPY in extern/mantaflow/CMakeLists.txt. This will happen in a future commit.
2020-07-17 16:11:21 +02:00
0cdc75ccd2 Fluid: Cleanup build system for extern mantaflow
No longer including unused dependencies. Should numpy IO be needed at some point, the Manta source update script can be configured so that the required dependencies are included again.
2020-07-17 15:58:13 +02:00
e3f8768d8a Refactor: move ParticleFunction to separate file 2020-07-17 14:23:57 +02:00
2679236047 Cleanup: avoid static initialization order issues when accessing CPPTypes
Instead of depending on static initialization order of globals use
static variables within functions. Those are initialized on first use.
This is every so slighly less efficient, but avoids a full class of problems.
2020-07-17 14:15:06 +02:00
3ef59121a4 Simulation: move initial simulation code from bf_blenkernel to bf_simulation
I removed bf_blenkernel from `nodes/CMakeLists.txt` again (added it yesterday),
because now this was causing me unresolved symbol errors... Without it, cmake
seems to link the libraries bf_simulation, bf_blenkernel and bf_nodes in the right
order. Not sure if that is just luck or if it is guaranteed.

It was possible to fix the issue by using cmakes `LINK_INTERFACE_MULTIPLICITY`,
but that is probably bad style.
2020-07-17 13:49:18 +02:00
Jeroen Bakker
9582797d4b Fix T77867: Link Duplicate Object crashes during batch creation
When using link duplicated objects it could happen that one object is
calculating the GPUBuffers and the second object is marking these
buffers invalid. This introduces threading issues.

This patch fixes this by combining the surface and surface per material
batches. Most likely the surface per material batches are used and when
requested you will most likely need the surface batch for the depth
tests and overlays.

During tests it slightly improves performance as batches aren't thrown
away without using it.

After this patch we can add a quick path for meshes with one material
and two materials.

Alternative approaches that have been checked:
- sync extraction per object: reduced performance to much (-15%)
  ({D8292})
- post checks: reduced the threading issues, but didn't solve it.
- separating preparation and execution of the extraction ({D8312})

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D8329
2020-07-17 13:47:53 +02:00
bf2bb6db26 Cleanup: silence unused variable warning
Reviewed By: fclem

Differential Revision: https://developer.blender.org/D8328
2020-07-17 17:12:46 +05:30
0e3d34e48f BLI: add StringRefNull.c_str() method
This should be used whenever you rely on the fact, that the
returned pointer points to the beginning of a null-terminated array.
2020-07-17 12:38:15 +02:00
0fcd23a388 Simulation: use better api for adding and removing simulation states 2020-07-17 12:36:23 +02:00
c5f61fbf48 Cleanup: avoid warning about redundant access specifier
No functional changes.
2020-07-17 11:49:51 +02:00
5910dbdbf7 Nodes: move some code from blenkernel directory to nodes
This also introduces the `blender::nodes` namespace. Eventually,
we want to move most/all of the node implementation files into
this namespace.

The reason for this file-move is that the code fits much better
into the `nodes` directory than in the `blenkernel` directory.
2020-07-17 11:36:59 +02:00
0a40c671b0 Cleanup: consistent ordering for scene argument to UV functions 2020-07-17 17:39:47 +10:00
83e204702d Cleanup: remove f-string use in favor of percentage for formatting 2020-07-17 17:39:47 +10:00
618f31312c Fix vertex selection error from recent refactor
Temporary fix for regression in 8084b7e6e2.
2020-07-17 17:37:35 +10:00
89a7a1c156 Cleanup: extract draw cache sanity checks to own function 2020-07-17 08:31:03 +02:00
608d9b5aa1 UI: Add shortcuts for constraint panels
Only the delete shortcut applies here, although the move up and down
operators can optionally be assigned in the keymap.

See rB1fa40c9f8a81 for more details and rB5d2005cbb54b for the
grease pencil modifier panel implementation, which is the same.
Some refactoring of the constraint delete operator was necessary,
including adding an invoke function.

Differential Revision: https://developer.blender.org/D8238
2020-07-16 14:07:47 -04:00
b13bbb22e4 Fix link error in bf_nodes
I got undefined reference errors on the `NodeMFNetworkBuilder::get_default_fn`
function under some circumstances. This symbol is definitely defined in bf_blenkernel.
The error seemed a bit undeterministic and was probably caused by some incorrect
link order. I don't get the error with this change.
2020-07-16 19:52:28 +02:00
02a3720000 Simulation: rename bf_physics to bf_simulation
Also see {rB9363c4de0635394548fa2eb8d205581313029775}.
2020-07-16 18:49:59 +02:00
93f21ebb13 Fluid: Update Mantaflow source files
Includes cleanup that resolves a -Wunused-but-set-variable warning.
2020-07-16 18:04:44 +02:00
e7c1a32a78 Tests: disable ASAN when discovering tests
CMake, when it's configuring the project, runs the `blender_test` test
runner (if it exists from a previous build) to discover which tests it
contains. At this time none of the tests themselves are run, so it's not
that useful to run ASAN and have it break things when there are memory
leaks.

This commit disables ASAN by injecting `ASAN_OPTIONS="detect_leaks=0"` in
the environment variables.

It is not enough to use `set(ENV{ASAN_OPTIONS} "detect_leaks=0")` in
`tests/gtests/runner/CMakeLists.txt`, as it wouldn't be passed to the child
process.
2020-07-16 17:38:29 +02:00
a138bf57c9 Tests: move tests from USD test directory into io/common and io/usd
This commit is a followup of {D7649}, and ports the USD tests to the new
testing approach. It moves test code from `tests/gtests/usd` into
`source/blender/io/common` and `source/blender/io/usd`, and adjusts the
use of namespaces to be consistent with the other tests.

I decided to put one test into `io/usd/tests`, instead of
`io/usd/intern`. The reason is that this test does not correspond with a
single file in that directory; instead, it tests Blender's integration
with the USD library itself.

There are two new CLI arguments for the Big Test Runner:

- `--test-assets-dir`, which points to the `lib/tests` directory in the
  SVN repository. This allows unit tests to find test assets.
- `--test-release-dir`, which points to `bin/{BLENDER_VERSION}` in the
  build directory. At the moment this is only used by the USD test.

The CLI arguments are automatically passed to the Big Test Runner when
using `ctest`. When manually running the tests, the arguments are only
required when there is a test run that needs them.

For more info about splitting some code into 'common', see
rB084c5d6c7e2cf8.

No functional changes to the tests themselves, only to the way they are
built & run.

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

Reviewed by: brecht, mont29
2020-07-16 17:38:29 +02:00
Francesco Siddi
09a483a3aa macOS: improve design of .dmg background
Differential Revision: https://developer.blender.org/D8300
2020-07-16 17:28:27 +02:00
671c6d8afd Cleanup: Gizmo: Remove non matched glDisable
We use the polyline shader for drawing the rotation gizmo now.
This shader supports clipping without hardware clip planes.
2020-07-16 18:01:44 +02:00
07d70a76df Cleanup: WM: Use GPUTexture API instead of raw ogl calls 2020-07-16 18:01:44 +02:00
5099cbeec9 Cleanup: GPU: Move depth/color masks functions to GPU_state 2020-07-16 18:01:44 +02:00
436d38bb54 Cleanup: GPU: Move XOR logic op to gpu_state.c 2020-07-16 18:01:44 +02:00
3481f6eaf2 Cleanup: GPU: Remove GL_DITHER usage 2020-07-16 18:01:44 +02:00
71ac137662 Cleanup: GPU: Move quad buffer stereo check to GPU module 2020-07-16 18:01:44 +02:00
8084b7e6e2 Cleanup: GPU: Replace all glReadPixels by GPU equivalent 2020-07-16 18:01:44 +02:00
ab19abe223 Cleanup: Port glClear calls to GPU module functions 2020-07-16 18:01:44 +02:00
bc85081156 Cleanup: DRW: remove uneeded double bind
Now that binds are permanent there is no need to setup the same
texture for each subgroups.
2020-07-16 18:01:44 +02:00
56b8adb9e2 Particles: avoid crash when connected unimplemented node 2020-07-16 16:43:42 +02:00
1494ad20b9 Particles: add implicit covnersions between Vector and Color
Not sure if these conversions are a good idea. However, we have them
in Cycles, so they be available in the simulation node tree for consistency
reasons.
2020-07-16 16:43:42 +02:00
76bf050853 Particles: simplify adding new implicit conversions between sockets 2020-07-16 16:43:42 +02:00
aa547ce88b Fluid: Update Mantaflow source files
Refactored various functions after noticing new warnings when compiling on Apple DTK devices - there should now be fewer warnings when building.
2020-07-16 16:39:49 +02:00
f64710a518 Particles: change initial velocity of particles
This is only temporary, but makes testing the system a bit easier.
2020-07-16 16:09:19 +02:00
4249d6f58e Particles: support Separate/Combine RGB nodes 2020-07-16 16:09:19 +02:00
ada173ebfd Particles: simplify Combine XYZ node 2020-07-16 16:09:19 +02:00
72df7c23c4 Particles: support Color Ramp node 2020-07-16 16:09:19 +02:00
c7aa0f9d74 Fix T78537: too much memory usage rendering animation with persistent images
For still images, always return 0 for the current frame number. This ensures
Cycles can detects that the image did not change.

Based on patch by Vincent Blankfield.

Differential Revision: https://developer.blender.org/D8242
2020-07-16 15:50:43 +02:00
279cc34343 Keymap: disable 'Alt' click for tools prompt by default
Based on feedback from artists in the Blender Studio this is too
easy to access by accident.

This is still accessible as a preference.
2020-07-16 23:48:38 +10:00
83955d6769 Particles: support Map Range node
Only linear interpolation mode is supported for now.
2020-07-16 13:26:20 +02:00
99fda4d31e deps builder: Fix typo in windows harvesting 2020-07-16 07:22:52 -06:00
9b6088cb9d Simulation: Change BPH prefix to SIM
In a previous commit the `physics` folder has been renamed to `simulation`.
This commit updates the function/file prefix accordingly.
2020-07-16 14:37:21 +02:00
9363c4de06 Simulation: Rename physics directory to simulation
Function names will be updated in a separate commit.

This will be the place for the new particle system and other
code related to the Simulation data block. We don't want
to have all that code in blenkernel.

Approved by brecht.
2020-07-16 14:28:38 +02:00
66b48ad8fb Fix git tag warning when running make update after recent changes 2020-07-16 14:26:37 +02:00
f3ea6a5b28 Particles: implement more vector math operations 2020-07-16 14:15:24 +02:00
3d8f8085fb UI: show connected icon for proportional editing in the image space 2020-07-16 22:07:53 +10:00
b882f89fe3 Particles: support for most math node operations 2020-07-16 13:41:47 +02:00
2ddb3dc617 Nodes: support default function for partially implemented nodes 2020-07-16 13:38:23 +02:00
56aa5b0d8c T73268: Link C/C++ unit tests into single executable
This commit introduces a new way to build unit tests. It is now possible
for each module to generate its own test library. The tests in these
libraries are then bundled into a single executable.

The test executable can be run with `ctest`. Even though the tests
reside in a single executable, they are still exposed as individual
tests to `ctest`, and thus can be selected via its `-R` argument.

Not yet ported tests still build & run as before.

The following rules apply:

- Test code should reside in the same directory as the code under test.
- Tests that target functionality in `somefile.{c,cc}` should reside in
  `somefile_test.cc`.
- The namespace for tests is the `tests` sub-namespace of the code under
  test. For example, tests for `blender::bke` should be in
  `blender::bke:tests`.
- The test files should be listed in the module's `CMakeLists.txt` in a
  `blender_add_test_lib()` call. See the `blenkernel` module for an
  example.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7649
2020-07-16 12:58:49 +02:00
065a00ee3e Fix T78920: missing depsgraph relation when using sound strips in VSE
Having a sound strip in the VSE caused a missing relation error to be
logged on the console. This was caused by the AUDIO depsgraph component
not having an entry node. This commits adds that node, and sets up
relations correctly.

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

Reviewed By: Sergey
2020-07-16 11:51:39 +02:00
d4ce777aed BLI: move inline include to the bottom to avoid redeclaration warning 2020-07-16 11:33:35 +02:00
d897228682 BLI: move safe math functions to separate header 2020-07-16 11:28:31 +02:00
f6f93b5b12 BLI: add safe_divide, safe_modf and safe_logf
Those are defined exactly as their corresponding functions in Cycles.
2020-07-16 11:05:30 +02:00
7e0bf7a0f1 LibOverride: Fix getting proper RNA path and ID from embedded ones.
Master collections and root node trees should now be working as expected
in that regard.
2020-07-16 11:04:03 +02:00
35bfe1702c BLI: add safe_powf function
The same function is also used by cycles.
2020-07-16 10:46:18 +02:00
Yevgeny Makarov
4a9d903e2b Fix View3D "Mirror" menu, both "Global" and "Local" items are GLOBAL 2020-07-16 18:08:25 +10:00
Stefan Werner
9715ad5aca macOS: Support arm64 architecture.
Enabling all `make deps` dependencies with the exception of Embree and OIDN.
After that, Blender can be compiled on an Apple Silicon Mac just like on any
Intel based Mac. There are still compiler warnings that need to be
investigated and there are probably a couple of bug still to be discovered
and to be fixed.

Most patches to the dependencies are simple and are about disabling SSE and
setting the proper architecture to compiile for. Notable exception is Python,
where I back ported a yet to be accepted PR for upstream Python:
https://github.com/python/cpython/pull/21249

Cross compiling or buliding a Universal Binary is not supported yet.
The minimum macOS target version for x86_64 remains at 10.13, the target
for arm64 is 11.00.

Differential Revision: https://developer.blender.org/D8236
2020-07-16 09:37:38 +02:00
ad4928a171 UI: avoid aligning labels for ui_item_with_label
Key-map display was doing thousands of redundant alignment operations.
Set the spacing instead as align was only set to use zero spacing.

This would have prevented the crash reported by T78636.
2020-07-16 17:00:16 +10:00
75520894c7 Fix T78636: Crash displaying many aligned buttons
Displaying user preferences search crashed on macOS when the search
contained a common character such as 'E'.
This caused alignment to 'alloca' too much memory.

Replace with a heap allocation fallback.
2020-07-16 16:38:07 +10:00
2811de6e5c Cleanup: fix building without USE_UIBUT_SPATIAL_ALIGN defined 2020-07-16 13:48:01 +10:00
5b099a25d7 Fix T78966: Center cursor doesn't refresh the UI 2020-07-16 13:27:50 +10:00
123e29c274 Cleanup: missing CMake headers from source lists 2020-07-16 13:17:31 +10:00
54abab53bf Cleanup: undeclared function warning, unused argument 2020-07-16 11:14:27 +10:00
a3d90337b8 Cleanup: spelling 2020-07-16 11:09:39 +10:00
d11a2dfe71 Cleanup: minor change to grease pencil material access
Rename for clarity and avoid passing in the prefix length.
2020-07-16 11:09:39 +10:00
75a09ba2ed Fix T78837: Prefetching can corrupt .blend files
This happened because of typo in seq_dupli() when duplicating effect data.
Instead of duplicating data to new sequence, it was duplicated into original.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8295
2020-07-16 02:24:37 +02:00
974e36d7d0 Fix T78647 UVEdit: Crash when entering edit mode with UV Editor open
Only affects MacOS.
2020-07-15 21:14:46 +02:00
058514aa0a PointCloud: Initial rendering support for Workbench
Also includes outline overlays. Removes the temp overlay drawing

We make the geometry follow camera like billboards this uses less
geometry. Currently we use half octahedron for now. Goal would be
to use icospheres.

This patch also optimize the case when pointcloud has uniform radius.
However we should premultiply the radius prop by the default radius
beforehand to avoid a multiplication on CPU.

Using geometry instead of pseudo raytraced spheres is more scalable as
we can render as low as 1 or 2 triangle to a full half sphere and can
integrate easily in the render pipeline using a low amount of code.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8301
2020-07-15 20:10:45 +02:00
d4d810f817 Cleanup: EEVEE: Remove concentric samples. 2020-07-15 19:51:55 +02:00
37a8c6d809 Cleanup: EEVEE: Remove unused IRRADIANCE_CUBEMAP 2020-07-15 19:51:55 +02:00
47885abbe6 Workbench: Replace viewvecs caculation by DRWView 2020-07-15 19:51:55 +02:00
cd8f3c9ee7 DRW: Add glsl math libraries
Copied from eevee bsdf_common_lib.glsl
2020-07-15 19:51:55 +02:00
2c1edcf3ef EEVEE: Fix undefined behavior in world output 2020-07-15 19:51:55 +02:00
24c846b2b4 GPU: Shader: Move IN_OUT define to shader GPU_shader_create_ex
This adds the opportunity to use it in multiple places.
2020-07-15 19:51:55 +02:00
987d14a3b2 DRW: Shader: Fix const correctness and print better debug output 2020-07-15 19:51:55 +02:00
8e16873086 DRW: Shader: Add DRW_shader_create(_fullscreen)_with_shaderlib
Some convenience function for using DRWShaderLibrary.
2020-07-15 19:51:55 +02:00
5dcf60e053 DRW: View: Add ViewVecs calculation
This will remove some code duplication between draw engines.
2020-07-15 19:51:55 +02:00
f1104c2828 Fix T78369: Sculpt Vertex Colors not rendering in EEVEE
The vertex colors node was using the M_COL attribute type but Sculpt
Vertex Colors use CD_PROP_COLOR
Now the Vertex Color node also fallbacks to legacy vertex colors if
Scultp Vertex Colors are not enabled as experimental.

Reviewed By: brecht

Maniphest Tasks: T78369

Differential Revision: https://developer.blender.org/D8185
2020-07-15 18:55:33 +02:00
eb54624a9a LibOverride: make outliner's 'override hierarchy' use same logic as 3DView operator.
So now one can create a 'full', 'complete' override of a character from
the outliner as well.
2020-07-15 18:17:34 +02:00
5057b28a2f LibOverride: move most of 'complete override creation' from ED_object to BKE_lib_override.
This code is fairly complex and can be used in more places, better not
duplicate that logic and just have it in BKE area.
2020-07-15 18:17:34 +02:00
ba100c883c BKE collection: add util to add a collection using another collection as 'template'.
Similar to what we already had using an object as 'template'.
2020-07-15 18:17:34 +02:00
a082e49671 Cleanup: remove debug prints. 2020-07-15 18:17:34 +02:00
cda6da4957 Fix error in recent commit
Obviously a copy paste error of mine...
2020-07-15 18:14:03 +02:00
ae4098e234 GPencil: Fix unreported error baking mesh animation
When the mesh is linked, the materials can not be available or be the same assigned to mesh. Now, if the mesh is linked, a simple two materials conversion is used.

To get the full list of materials, the mesh must not be linked.

Also checked some indexes to be sure never get a wrong value and that materials are not created again and again.
2020-07-15 17:26:27 +02:00
36e836d0e9 Fluid: Adjusted Mantaflow version number
Version number was increased after recent OpenVDB IO changes.
2020-07-15 17:04:56 +02:00
19d17b217a Particles: use CD_PROP_FLOAT3 instead of CD_LOCATION
`CD_LOCATION` was only used temporarily due to the lack
of a better alternative. This also removes the name from
`CD_LOCATION` again, because at most one layer of this
type should exist.
2020-07-15 16:48:30 +02:00
57ec1f37e9 CustomData: add float2 and float3 data types
This adds `CD_PROP_FLOAT2` and `CD_PROP_FLOAT3`.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D8251
2020-07-15 16:42:17 +02:00
e06a346458 Fix T78747: Fix mesh boundary detection and automasking
This issue was produced by a hack in the sculpt mode code from 2.80
 when the sculpt API for connectivity info was not available.
The smooth brush was the only brush that needed connectivity info,
so there were 3 different smooth functions with the connectivity
queries implemented for dyntopo, meshes and grids. The mesh version
of smoothing was checking the number of connected faces to a vertex
to mask the mesh boundaries, which was not covering all cases and
was hardcoded in the smooth function itself.

This patch removes all those legacy functions and unifies all
smooth functions into a single one using the new API and the
automasking system. In order to achieve this, there were needed
some extra changes:

- The smooth brush now does not automasks the boundaries by default,
so its default preset needs to be updated to enable automasking

- The mesh boundary info is extracted once and cached in a
bitmap, similar to the disconnected elements IDs. This makes
boundary detection work as expected in all cases, solving a lot
of known issues with the smooth brush. In multires, this info is
extracted and cached only at the base mesh level, so it is much
more memory efficient than the previous automasking system.

- In order to keep the brushes responsive as they were before,
the automasking system can now skip creating the cache when it
is not needed for the requested options. This means that for
high poly meshes and simple automasking options the brushes
won't lag on start.

Reviewed By: sergey

Maniphest Tasks: T78747

Differential Revision: https://developer.blender.org/D8260
2020-07-15 16:33:25 +02:00
10cacbbb15 Fix T77417: Topology Automasking not working with individual vertices
The flood fill operation was setting the mask using to_v, so in the first
iteration when the floodfill callback was using the active vertex as
from_v and any other neighbor as to_v, the mask for the active vertex
was never set.

Now the mask is set using from_v and it checks if it should continue
propagating to the next neighbor using to_v.

Reviewed By: sergey

Maniphest Tasks: T77417

Differential Revision: https://developer.blender.org/D8294
2020-07-15 16:15:41 +02:00
613d314251 UV: support region fill for path select
This matches edit-mesh region selection (Ctrl-Shift-Select).
2020-07-15 23:20:25 +10:00
b3c34011c0 Cleanup: Replace 0 with False for boolean argument 2020-07-15 09:11:01 -04:00
efc6f6e1ae Clang-Tidy: ignore some newer checks
Those checks have been added to clang tidy within the last year.
They fail when I use a clang tidy version I built from source.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D8302
2020-07-15 14:24:24 +02:00
5a11c8ba24 Fix T68845: Follow Active Quads, divide by zero error 2020-07-15 21:48:28 +10:00
87f8949f0e Fix T78930: Cycles OpenCL error on graphics cards that don't support half float 2020-07-15 13:38:04 +02:00
44bb73e765 Revert "Cleanup: simplify Weld Modifier logic"
This reverts commit 98b1a716d6.

That commit broke a few modifiers.py tests
(Screw+Weld and a weld merge threshold).

And some pairs may be lost in the first loop.
2020-07-15 08:10:41 -03:00
ff2fa59689 Fix T76690: Incorrect liquid particle count displayed
Reviewers: sergey, sebbas

Differential Revision: https://developer.blender.org/D7852
2020-07-15 12:53:05 +02:00
4e8fc14120 GPencil: Fix name typo error 2020-07-15 12:47:55 +02:00
7e2ffbfb25 Add missing NULL assignment to D8293
Missed reseting "next_td" in that patch.
Shouldn't have caused any issues in practice, but it is nice to be
extra clear and safe in the code.
2020-07-15 12:36:48 +02:00
50c6448781 Fix T78909: Curve-edit proportional connected-only broken
Now it calculates the actual distance when traveling along the curve.

I addition to this, it also now supports cyclic curves.

Reviewed By: Campbell

Differential Revision: http://developer.blender.org/D8293
2020-07-15 12:29:45 +02:00
e8b26a0501 Fix signed/unsigned comparison 2020-07-15 11:06:54 +02:00
680a81fc49 LibOverride: rework 'make override' 3DView operator.
Removed the 'select main object to override' menu when overriding an
instanced collection, this was no more used anyway.

Added new behavior allowing to select which directly linked collection
to override when trying to override an inderctly linked object. This
allows to link collections without instancing them with an empty object,
select one of their objects, and call override operator.
2020-07-15 11:01:40 +02:00
eb87b1c8f6 Cleanup: remove assignment from a NULL struct
Quiet ASAN 'member access within null pointer' warning.

While this doesn't crash, access to 'shading'
without checking if the 'v3d' would have.
2020-07-15 15:37:03 +10:00
Liam Scaife
920b138f83 UI: Add manifold extrude to extrude menu 2020-07-15 15:20:34 +10:00
e062def3b4 Cleanup: spelling 2020-07-15 13:11:22 +10:00
061d76f55c Revert "Cleanup: remove public unused function."
This reverts commit 03c8b048a1.

This commit re-introduced T76837.

While there is a comment explaining why this function is needed,
the naming of the poll function does make this confusing.
The API could be changed to avoid confusion here.
2020-07-15 13:09:06 +10:00
d493fc43bd Fix T78875: Numerical display of delta of translation is not updating in 3d view 2020-07-14 17:45:57 -03:00
7f67e3200a Fluid: Fix liquid mesh scaling
Fixes issue with .bobj.gz and .obj mesh files not always being scaled correctly in the viewport.
2020-07-14 22:21:15 +02:00
7e0289b618 Fluid: Updated Mantaflow source files
New files include fixes for obj mesh import and minor cleanups.
2020-07-14 22:21:15 +02:00
98b1a716d6 Cleanup: simplify Weld Modifier logic
The original code to rearrange the weld vertices map was confusing.

It traverses the overlap result multiple times within a loop.

This part of the code has therefore been rethought, simplified and commented.

This also results in a slight improvement in the performance of the modifier.
2020-07-14 15:18:22 -03:00
dbcc74f801 Fix T77263: Mantaflow: Cache gets deleted at changing upres factor under Particles section.
Moved fluid simulation reset to separate functions based on type.
2020-07-14 18:11:35 +02:00
0b100e21fb Fix T78704: RenderPass normals disapear when view isn't updated
When the view isn't updated the renderpass thought that it was rendering
the next sample, skipping the conversion from encoded to blender
normals.

This patch resets the current sample when only rendering single sample
layers.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D8280
2020-07-14 17:42:15 +02:00
6cc88e330b Fix T78431: Update mesh_cd_layers_type_ to support 8 bytes.
Sculpt vertex colors changed the `DRW_MeshCDMask` from 4 bytes to 8 bytes, but
the functions assumed it still was 4 bytes. This patch updates the functions and
adds a compile time check.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D8215
2020-07-14 17:41:05 +02:00
2ba1cf4b40 Fix T78880: UV Editor - Match prop edit connected behavior with mesh editing and fix Rip Region double proportional checkbox
This fixes the double prop edit checkbox in the redo menu.

This also makes it so that proportional edit in connected mode now
matches how it behaves in mesh edit mode.

Without this change, ripping in UV edit mode with proportional edit on
would be useless as the UV verts you ripped will still be stuck together
even if they were not connected anymore.

Reviewed By: Campbell

Differential Revision: http://developer.blender.org/D8289
2020-07-14 17:27:48 +02:00
797027be6b Fluid: Fix missing flag update for cache
These flags need to be set correctly in order to distinguish between data that comes from cache files and raw data that comes directly from pointers to the data in Mantaflow.
2020-07-14 16:30:15 +02:00
14eaa9ed63 LibOverride: fix for removing use_override_library in rB3d587efef2872.
Thanks to @JacquesLucke for the heads up.
2020-07-14 16:04:44 +02:00
8e9dd5492a Gpencil: Simplify modifier sample mode minimal vert count fix.
For this mode is possible use strokes of 2 points.

Differential revision: https://developer.blender.org/D8138
2020-07-14 15:59:49 +02:00
c8a62e4f50 Cleanup: function name not following its module conventions. 2020-07-14 15:28:08 +02:00
6068f49c33 BLI: remove static assert noexcept move constructors
The move constructor of `mpq_class` from GMP currently
allocates when it is moved. So, it cannot be noexcept.
Since we want to use this type, this static assert cannot
stay there.
2020-07-14 15:23:40 +02:00
2e8a78f4d1 Fluid bake: fix memory leak when path validation fails
Reviewed By: sebbas

Differential Revision: https://developer.blender.org/D8284
2020-07-14 15:21:08 +02:00
78148e20fa Cleanup: remove tab indention 2020-07-14 22:52:50 +10:00
fa7ace2215 PyAPI: support element multiplication for vector, matrix, quaternions
This was disabled during 2.8x for smooth porting of 2.7x scripts,

Now '@' is used for matrix multiplication,
support '*' to multiple vector elements.

See T56276.
2020-07-14 22:52:50 +10:00
e3fd60b182 LibOverride: Outliner: Add an operation to override the selected ID and its parents.
This will override all linked data-blocks in the tree branch leading to
the selected one.
2020-07-14 14:51:13 +02:00
140b26909e LibOverride: Move code tagging reauired dependencies of an override into BKE.
This is fairly generic code that can be re-used in other places.
2020-07-14 14:51:13 +02:00
1e5ce39156 Fix T78900: Single vertex sliding crashes
As we can see in `initVertSlide_ex`, `sld` can be `NULL`.
`sld` is dereferenced, but can still be `NULL`.
2020-07-14 09:31:05 -03:00
01ec76842f Fix T77766: support animated global gravity toggle
Reviewers: sebbas

Differential Revision: https://developer.blender.org/D8281
2020-07-14 13:47:32 +02:00
4096330b81 Cleanup: typo 2020-07-14 13:01:46 +02:00
25fc84bf2e Fix wrong vector size functions used in knife tool
Should not use copy_v3_v3 on a 2 element vectors.
2020-07-14 10:43:32 +02:00
26793d619c GPencil: Cleanup Build modifier and fix potential div by zero errors 2020-07-14 10:26:19 +02:00
0fb08b7cc4 Cleanup: sort header, cmake paths 2020-07-14 16:04:18 +10:00
93e14e5935 Fix T78883: New bezier curve points to uninitialized memory 2020-07-14 15:53:56 +10:00
5338b36fcc Cleanup: spelling 2020-07-14 15:19:52 +10:00
b818f6b55f Fix T78902: Only check main modifier panel for expansion property
Internally the "show_expanded" property stores the expansion for every
subpanel, but for RNA we should only check the first bit of the flag that
corresponds to the main panel.
2020-07-13 20:10:49 -04:00
0b24930541 UI: Add missing row in curve profile template 2020-07-13 17:16:01 -04:00
37fb586a0b Cleanup: remove unnecessary member
`Kfv-> sco` was being treated as a local variable, and can be
confusing since this value is not updated when navigating the viewport.
2020-07-13 16:10:45 -03:00
70992ae270 Fix: Fix build error with MSVC in BLI_span_test
span.size() returns an uint, causing a signed/unsigned comparison
using 3u sidesteps the issue
2020-07-13 12:29:53 -06:00
6e74a8b69f Fix T78881: Cycles OpenImageDenoise not using albedo and normal correctly
Properly normalize buffers now. Also expose option to not use albedo and normal
just like OptiX.
2020-07-13 19:38:49 +02:00
2b5e21fe00 Sculpt: Add extra deform types to Smear
The smear brush was using the stroke direction to slide colors across
the mesh surface (this is called drag in other sculpt tools). Similarly,
other deformations can be included. The most common ones in image
editing are pinch and expand, which can be used to sharpen transitions
between colors.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8270
2020-07-13 17:53:24 +02:00
1076952209 Fix wrong variable name in Sculpt Vertex Colors experimental check
Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8269
2020-07-13 17:52:11 +02:00
eb3f74a0fe Sculpt: Enable color palettes for sculpt vertex colors
Enables the color palette subpanel for brushes that have color
capabilities (only the paint brush for now)

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8268
2020-07-13 17:51:12 +02:00
8dd2386a68 IDTemplate: Minor tweak to 'make local/override' code.
Only update pointer of the template if we actually changed it...
2020-07-13 17:43:22 +02:00
fcc91faf3f Fix (unreported) bad handling of undo for some IDTemplates operations. 2020-07-13 17:03:39 +02:00
91e67c7bda Cleanup: remove some incorrectly placed consts
Clang-tidy reported that those parameters could be const,
but that is not true on windows.
2020-07-13 16:55:39 +02:00
3d587efef2 LibOverride: Cleanup: Remove option to disable library overrides.
Code is mature enough now to not need this anymore, people who do not
want to use liboverrides can just not create them.
2020-07-13 16:45:55 +02:00
5c8dd2a703 Cleanup: silence warnings 2020-07-13 11:40:21 -03:00
3dcc7c73e2 MSVC: Fix build error with the 8.1 SDK
shobjidl_core.h only exists in the windows 10 SDK in the 8.1
SDK ShObjIdl.h will have the definitions we need, which still
exists in the 10 SDK and implicitly includes shobjidl_core.h.

so ShObjIdl.h will work on both SDK versions.
2020-07-13 08:38:31 -06:00
Szymon Ulatowski
29da019cb3 EEVEE: Fix sky zenith bug
Careless use of acos() in spherical coordinates transformation was
deteriorating the precision near zenith (and nadir) and producing
glitchy pixels (best seen in longer focal lengths).

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D8266
2020-07-13 17:08:58 +02:00
16989c4d1d Fix T78037: fresh install of blender 2.83.0 not able to save user startup file.
Simply remove that check ob userdef's themes, we are never read any
userdef from startup file anymore, so this check makes no more sense.

To be backported to 2.83.
2020-07-13 16:17:35 +02:00
952279a366 Fix T76687: [Mantaflow] low domain transformation performance
Implemented G.moving suggestion from comments.
2020-07-13 16:15:43 +02:00
5ecefc6a07 Build: make update support for git tags
Previously it only picked the appropriate version with the
blender-vX.XX-release branches.
2020-07-13 15:54:12 +02:00
2be7a11e43 Python API: new RNA property Screen.is_scrubbing
This commit adds a new read-only boolean property `Screen.is_scrubbing`.

The related property `Screen.is_animation_playing` is set to `True` in
two situations:

- Animation is actually playing (for example via the Play button in the
  timeline)
- The user is scrubbing through time (in the timeline, dopesheet, graph
  editor, etc.)

To distinguish between these two cases, the property
`Screen.is_scrubbing` has been added.

Concept approved by @brecht.
2020-07-13 15:26:00 +02:00
b9f565881e VSE: Python API, allow creation of VSE Movie strips with missing file
It was already possible to create Sound and Image strips that reference
non-existing files. Now it's also possible to create Movie strips
referencing missing files via the Python API call
`Sequences.new_movie()`. In this case, the duration of the strip will be
set to 1 frame.

Note that this commit does not change anything in the user interface.

The Python API of the `MovieStrip` class is extended with a function
`reload_if_needed()`. This function only performs disk I/O if the movie
strip cannot produce frames, that is either when its filepath points to
a non-existing file, or when the video sequence editor has not been
shown yet (for example because it is in an inactive workspace).

This allows for the following:

```
import bpy

scene = bpy.context.scene
vse = scene.sequence_editor_create()

filepath = bpy.path.abspath('//demo.mkv')
strip = vse.sequences.new_movie("movie", filepath,
    channel=2,
    frame_start=47,
    file_must_exist=False)
strip.frame_final_end = 327
```

This will create a new movie strip, even when `demo.mkv` does not exist.

Once `demo.mkv` has appeared at the expected location, either
`strip.reload_if_needed()` or `strip.filepath = strip.filepath` will
load it.

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

Reviewed By: Sergey, ISS
2020-07-13 15:09:18 +02:00
9db0c36af1 LibOverride: add more polling checks to operators not supposed to work on overrides.
This is long work, we are still likely missing a lot of cases...
2020-07-13 14:29:54 +02:00
03c8b048a1 Cleanup: remove public unused function. 2020-07-13 14:29:54 +02:00
9c9eb03d78 Fix T78855: Knife tool crashes when the geometry has no face
I don't see the need for a BVH Tree to have root but not have leafs.
But apparently this case is possible.
2020-07-13 08:59:47 -03:00
f019164f1f Optimization: Use dedicated function to restore customdata
Called when canceling a transform operation.
2020-07-13 08:59:47 -03:00
8074a18964 Cleanup: move unchanged condition out of loop 2020-07-13 08:58:04 -03:00
7b558a20a9 Fix Extrude Manifold losing original UV 2020-07-13 08:48:35 -03:00
976a0ff691 RNA code cleanup: Fix wrong usages of rna_idproperty_check().
This function is more expansive than the simpler `rna_ensure_property()`
one, and should only be used when IDProperty data is actually needed.

If one only needs to ensure it has a valid PropertyRNA pointer,
`rna_ensure_property()` is much more efficient.

Also add compiler warnings when results of those functions are unused,
this should never be the case.
2020-07-13 12:51:29 +02:00
f8afbb7657 RNA property management: tweak to 'is set' information.
Only consider a full IDProperty as set if it actually exists in given
PointerRNA data.
2020-07-13 12:51:29 +02:00
0158571b34 I18n utils: fix broken case when 'settings' argument is default NULL one. 2020-07-13 12:51:29 +02:00
7453ff73ad Cleanup: quiet warnings by adding const in some places
The warnings were introduced in rB725973485a909c2b732c5.
2020-07-13 12:48:51 +02:00
725973485a Clang Tidy: enable readability-non-const-parameter warning
Clang Tidy reported a couple of false positives. I disabled
those `NOLINTNEXTLINE`.

Differential Revision: https://developer.blender.org/D8199
2020-07-13 11:27:09 +02:00
a19584a471 BLI: fix constructor regression for Vector and Array
This was introduced in rB403384998a6bb5f428e15ced5.
2020-07-13 10:51:46 +02:00
644a915b1b BLI: don't allow mutable span of initializer list 2020-07-13 10:49:59 +02:00
0718c6fae0 Cleanup: fix clang tidy warning
The code was actually correct, but clang tidy complaint about
using the Vector after it was moved from.
2020-07-13 10:40:05 +02:00
91c763af3e Cleanup: typo 2020-07-13 10:34:44 +02:00
6dabfacb38 Sky: Code style and formatting fixes
Differential Revision: https://developer.blender.org/D8091
2020-07-13 03:08:11 +02:00
6a3c91f7ad Cycles: Clamp Sky Texture altitude to avoid numerical issues
Differential Revision: https://developer.blender.org/D8091
2020-07-13 03:08:11 +02:00
7aacf2e119 Cycles: Account for Sky Texture mapping in the sun sampling code
Differential Revision: https://developer.blender.org/D8091
2020-07-13 03:08:11 +02:00
192bd2605f Cycles: Change precomputed Sky Texture mapping to prioritize the horizon
Differential Revision: https://developer.blender.org/D8091
2020-07-13 03:08:11 +02:00
41e6f9bd43 Cycles: Add control for sun intensity in Sky Texture and change altitude to km
Differential Revision: https://developer.blender.org/D8091
2020-07-13 03:08:11 +02:00
e2736afdbe Cycles: Add versioning code for the new Sky Texture model
Differential Revision: https://developer.blender.org/D8091
2020-07-13 03:08:07 +02:00
77cd8182f8 Cycles: Remove Vector input on Sky texture when using the included sun
When using the sun, we need to sun sampling logic to avoid excessive
sampling map resolution, but that logic assumes that the Vector input
comes from the view direction.
That is the case in the vast majority of cases anyways, so the easiest
solution is to just remove the input for that case.

Differential Revision: https://developer.blender.org/D8091
2020-07-13 02:00:38 +02:00
474dcbcf12 Cycles: Remove limits on the Sky texture's sun rotation
For animation/driver purposes, being able to go outside of the 0-360
range makes things easier.

Differential Revision: https://developer.blender.org/D8091
2020-07-13 02:00:24 +02:00
f319eec881 Cleanup: disable debug code 2020-07-12 11:05:43 +02:00
30ed51d60a Cleanup: unused debug variable 2020-07-12 12:50:19 +02:00
21b20ae5ec Particles: initial support for forces in simulation node trees
The force node can now be used to control the behavior of particles.
Forces can access particles attributes. Currently, there are three attributes:
`Position` (vector), `Velocity` (vector) and `ID` (integer).

Supported nodes are: Math, Vector Math, Separate Vector, Combine Vector and Value.

Next, I'll have to split `simulation.cc` into multiple files and move
some stuff out of blenkernel into another folder.
2020-07-12 12:38:57 +02:00
ebf9082e1c Nodes: support more implicit conversions in simulation node tree 2020-07-12 12:38:30 +02:00
838b1742fb Functions: minor improvements 2020-07-12 12:38:03 +02:00
404486e66c Functions: minor api improvements 2020-07-12 10:01:37 +02:00
ee5c2f6ead GPencil: Replace "ShaderFX" with "Shader Effects" in RNA prop text 2020-07-11 20:41:21 +02:00
c7eada103c Nodes: support implicit conversions and incorrectly linked sockets 2020-07-11 18:02:06 +02:00
06401157a6 Fix: incorrect attribute type in network 2020-07-11 17:59:43 +02:00
46b79b3d4a Nodes: support vector math node in simulation node tree 2020-07-11 16:55:57 +02:00
b920875893 Nodes: support math node in simulation node tree 2020-07-11 16:47:53 +02:00
8fae58ce0b Nodes: support Value node in simulation node tree 2020-07-11 16:39:17 +02:00
16d4373158 Nodes: move Math, Vector Math and Value shader nodes to c++ files
This required a little bit of refactoring, because we were using c-only
syntax for the gpu shader names. All tests are still passing.
2020-07-11 16:24:53 +02:00
415d3ee05b UV: add path select operator that uses the selection
Instead of using the mouse cursor position,
this selects between existing selected elements.

Access this since picking a selection path doesn't
work from the menu.
2020-07-11 22:09:45 +10:00
6e698653df Cleanup: remove unused function 2020-07-11 20:34:17 +10:00
651db1b26f Cleanup: spelling 2020-07-11 15:32:59 +10:00
020e0f11ff Docs: remove reference to PYTHONHOME
This is no longer used by default, when '--python-use-system-env' is set
there are many Python environment variables, don't list them in
Blender's help message.
2020-07-11 14:50:47 +10:00
d2b910fafe UI: UV: Add Select Shortest Path to menu
This matches the 3D Viewport
2020-07-10 16:07:31 -04:00
3dc0178390 Fix T78662: Cycles baking fails if denoising is enabled, after recent changes
This is not supported yet.
2020-07-10 20:08:46 +02:00
6fbacd6048 Fix build error building without OpenImageDenoise 2020-07-10 19:56:53 +02:00
48f10319c6 Fix T78801: Eevee missing setting to enable/disable freestyle per view layer
This was only visible when Cycles was enabled.
2020-07-10 18:41:16 +02:00
4e8fc15586 UI: Improve transform constraint layout
- Remove the "mapping" subpanel and moves the source axis
    selection ot the destination subpanel.
  - Rename "Source" and "Destination" to "Map From" and "Map To" to
    make the action more clear
  - Gray out source axes when their data isn't selected.

  These changes were discussed in D8041.
2020-07-10 12:21:32 -04:00
3e4f49fe71 Revert "Fix T78296: Performance - Use Binary Search for MDeformWeight"
This reverts commit 39b525e0f0 and
3121015dce as tests are failing.
2020-07-10 18:03:21 +02:00
d5208c45fa GPencil: Fix unreported Use Falloff curve for active frame not working
For the active frame it was using always a value of 1.0 and it was not using the curve.
2020-07-10 17:56:35 +02:00
6eeb32706a Cycles: support OpenImageDenoise in final renders
Performance is not great currently due to the API not seeming to support
efficient denoising of multiple tiles at the same time. So in many cases
only one or a few threads will actually be denoising at the same time.

In renders with many samples this is not a big problem, but for faster
renders it's a signficant overhead.

We should try to optimize this still, possibly by batching denoising of
a bigger neighborhood of multiple tiles at once.
2020-07-10 17:10:05 +02:00
93791381fe Cleanup: reduce hardcoded numbers in denoising neighbor tiles code 2020-07-10 17:10:05 +02:00
e65c78cd43 Cleanup: minor refactoring in Cycles update detection code 2020-07-10 17:10:05 +02:00
Milan Jaros
ad45b8d6a4 Cycles: optimize camera inside volume tests
Only run when there are volumes in the scene, and compute in parallel.

Ref T56939

Differential Revision: https://developer.blender.org/D8261
2020-07-10 17:10:05 +02:00
d8e648c352 Fix T78776: Cycles OpenCL error after recent changes for holdouts 2020-07-10 17:10:05 +02:00
9dbe9a753a Fix T78766: Blender crashes after deleting vertices with Custom Normals.
Some core BMesh topology changing functions were not properly tagging
custom normal runtime caches as dirty...
2020-07-10 16:51:37 +02:00
5372924983 Fix T78579: Proxy produces wrong preview when using Offset or Crop
Make sure that proxy and original images are scaled to same size before
applying offset or crop.

During testing, I discovered, that raw cache will lose information whether
this image was proxy or not. Because of this, proxy images will not create
this cache type. It would be fairly easy to implement this functionality for
cache, but I have decided to not do it now, because I did not want to pass yet
another mostly hard-coded bool flag to cache system. Since image is proxy, it
should be fast to read anyway.

In case of using offset property, code was modified to make sure we scale
image only once. I also tried to make code more readable and streamlined and
cleaned up surrounding functions a bit.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8203
2020-07-10 16:16:42 +02:00
77f823a240 Fix T78573: Crash when removing strips with prefetching
Stop prefetching before changing content of seqbase.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8256
2020-07-10 16:16:42 +02:00
47e71f4623 Fix T69440: Memory leak adding strips via python
seq->strip was overwritten in python API function.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8204
2020-07-10 16:16:42 +02:00
cbfedf2139 BLI: add C++ random number generator
This adds `blender::RandomNumberGenerator` in `BLI_rand.hh`.
Furthermore, `RNG` is now implemented in terms of this new generator.
No functional changes are expected, the generated random numbers
are not changed by this commit.

Reviewers: campbellbarton, brecht

Differential Revision: https://developer.blender.org/D8259
2020-07-10 15:54:01 +02:00
c2304d2f02 Expose override flags to python RNA properties definition.
Time will tell whether we need to expose more RNA override flags here.

Implements/Fix T78534.

Differential Revision: https://developer.blender.org/D8250
2020-07-10 15:50:21 +02:00
4d1c3c029e Cleanup: declaration and implementation function signature did not match 2020-07-10 15:48:46 +02:00
f93e0f1a9e Refactor override code to properly deal with runtime rna properties too.
The triplet static RNA / runtime RNA / custom properties is a real pain to
deal with...

Using the new `PropertyRNAOrID` struct helps clarifying and properly
dealing with all three cases.

Note that this makes override of py-defined RNA properties working
(support for that will be committed next).

Differential Revision: https://developer.blender.org/D8249
2020-07-10 15:23:52 +02:00
337e2c9029 RNA: refactor how we get 'ensured' RNA properties.
Introduce new PropertyRNAOrID structure, storing most useful data about
an 'opaque' PropertyRNA in relation with a given PointerRNA struct.

It deals with all the three cases (pure static RNA, runtime RNA where
data is actually stored in IDProperties, and pure IDProperties, aka
custom data.
2020-07-10 15:19:40 +02:00
6c1157201a Cleanup: simplify platform define checks
Platforms besides WIN32 were in a single else clause, use elif instead.
2020-07-10 23:01:21 +10:00
45287f909c Fix for building on systems besides apple/windows/linux 2020-07-10 23:00:17 +10:00
26d28ade26 Cleanup: follow code style 2020-07-10 14:40:23 +02:00
c806db6313 Functions: add utility to find dependencies of input sockets 2020-07-10 14:23:13 +02:00
60133ff98d Functions: store derived node tree and network in map for future access 2020-07-10 14:23:13 +02:00
295b3aefb0 Functions: make constant folding work on unfinished networks 2020-07-10 14:23:13 +02:00
7bae599232 Nodes: add redundant name check in debug builds to prevent errors 2020-07-10 14:23:13 +02:00
3121015dce Fix Crash due to recent changes
{39b525e0f07fa25dcda54226ade789959b642dec} could write in unallocated
space.
2020-07-10 13:38:38 +02:00
00eb6a56aa GPencil: Fix tooltip error
The tooltip was copied by error from Lattice modifier.
2020-07-10 13:30:21 +02:00
8fd65a2252 Functions: use new is-equal and hash function of CPPType 2020-07-10 12:57:28 +02:00
3edd2832b2 Functions: make generic types hashable 2020-07-10 12:57:28 +02:00
f62204718b BLI: initial hash function for Color4b and float4x4 2020-07-10 12:57:28 +02:00
8f6c0f2242 Functions: make generic types equality comparable 2020-07-10 12:57:28 +02:00
52636c3059 Cleanup: various cleanups in for CPPType 2020-07-10 12:57:28 +02:00
39b525e0f0 Fix T78296: Performance - Use Binary Search for MDeformWeight
Use binary search for querying deform weights.

Spring 02_020_A.anim.blend on Ryzen 1700X goes from 12.4 to 12.7fps.

During profiling it was detected that adding new items to the head was faster than adding to the tail.

Reviewed By: Campbell Barton

Differential Revision: https://developer.blender.org/D8127
2020-07-10 12:09:40 +02:00
77a646279d Cleanup: structure CPPType according to code style guide 2020-07-10 12:04:49 +02:00
9c25731781 LibOverride: Fix improper tagging of more of the backward pointers in RNA nodetrees. 2020-07-10 11:53:11 +02:00
582a0b7e5a Fix T78756: White UV drawing is displayed as Dashed 2020-07-10 19:02:18 +10:00
7a9028cad1 Fix UV rip failing to disable proportional edit-mode 2020-07-10 18:58:36 +10:00
a148c4676b Cleanup: spelling 2020-07-10 16:04:09 +10:00
03f5acd445 Cleanup: clang-format 2020-07-10 16:03:12 +10:00
8b660ea0ec Fix UV path redo in vert/edge mode
Redo was only working in some situations,
some options were also not being forwarded.
2020-07-10 13:41:51 +10:00
96068324cd Fix BM_loop_at_index_find lookup 2020-07-10 13:35:44 +10:00
89cb41faa0 UV: allow ripping face-regions
This changes the behavior of rip when entire faces are selected.
Now face regions are isolated and moved instead of ripping the edge-loop
extracted from the selection boundary.

This is a convenient alternative to separate selection & move.
Resolves T78751.
2020-07-10 13:01:46 +10:00
3fdd092649 Cleanup: face-center mesh calculation
Loop over faces and calculate their centers instead of zeroing the
face center array and accumulating all faces vertex corners.

Move subsurf face center extraction into it's own loop since it works
differently.
2020-07-10 12:44:42 +10:00
b0378440ce Fix missing adjacent UV check for recent UV path select
Path selection could cross UV islands if the destination element was
on an island boundary.
2020-07-10 12:19:30 +10:00
8f24ec2e26 Cleanup: add BLI_linklist_find_last
This makes adding to the end of a linked list simpler,
In most cases we avoid this in favor of BLI_linklist_append.

For one off operations it's OK.
2020-07-10 12:14:32 +10:00
3dd460aa7f Cleanup: spelling 2020-07-10 11:49:46 +10:00
a0d3b60015 Cleanup: use FLT_MAX for the maximum path selection cost
A large number below FLT_MAX was used to avoid overflow,
however this doesn't cause any problems.
2020-07-10 11:49:46 +10:00
0b77e2f4c4 Cleanup: variable names, use define for maximum path cost 2020-07-10 11:49:46 +10:00
92bc277950 Cleanup: undeclared warnings 2020-07-10 11:49:46 +10:00
3623db7784 BLI: add more operator overloads for float2 2020-07-09 19:04:47 +02:00
03a00bda2b Sculpt: Make Sculpt Vertex Colors features experimental
This disables all Sculpt Vertex Colors tools, operators, panels and rendering capabilities and puts them under the "Use Sculpt Vertex Colors" experimental option.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8239
2020-07-09 18:24:50 +02:00
1e3247c078 Fix: add missing extern "C" 2020-07-09 18:19:39 +02:00
a90b69d065 Build: add more libc compatibility functions for upcoming libraries update
These are needed by the x264 library.
2020-07-09 18:10:05 +02:00
6778949e01 Fix repeated Face Sets IDs when joining meshes
As Face Sets IDs start from 0 and increase by 1 each time a new face set
is created in a mesh, when joining multiple meshes it could happen that
the same ID is used by several unrelated areas in multiple objects. This
checks the Face Sets IDs when joining meshes and ensures that they are
not repeated between different objects when joining them, so in the
resulting mesh all previous face sets will have different IDs.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8224
2020-07-09 17:56:56 +02:00
7b1c406b54 Implement T77959: Never duplicate linked data during deep-copy.
Note that this behavior is enforced on user level for now, but on code
side it is controlled with a flag, which should make it easy to refine
that behavior if needed.

Only exception is when we duplicate a linked ID directly (then we assume
user wants a local deep-copy of that linked data, and we always also
duplicate linked sub-data-blocks).

Note that this commit also slightly refactor the handling of actions of
animdata, by simplifying `BKE_animdata_copy_id_action()` and adding an
explicit new `BKE_animdata_duplicate_id_action()` to be used during ID
duplication (deep copy).

This also allows us to get rid of the special case for liboverrides.
2020-07-09 17:56:05 +02:00
78b629a98f Sculpt: Skip fully hidden nodes in sculpt tools
As tools iterators skip not visible vertices, fully hidden nodes can
also be skipped and considered as masked.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8244
2020-07-09 17:51:09 +02:00
1fb667da01 Fix wrong upate flag when updating the PBVH visibility
This function was using the wrong flag to update the visibility state of
the nodes, so I assume that most of the partially visible optimizations
were not working.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8243
2020-07-09 17:50:10 +02:00
e5ebaa9fd6 Fix T78664: Implement Mesh and Face Set boundary automasking in Multires
This implements the SCULPT_vertex_is_boundary and SCULPT_vertex_has_unique_face_set functions for PBVH_GRIDS, which makes features such as automasking now work in multires. It also fixes some other face sets related features in multires, like face set boundary smoothing.

This uses the BKE_subdiv_ccg_coarse_mesh_adjacency_info_get function to get the vertex indicies in the base mesh from multires. This way the API functions can get topology or face set information directly from it. In the future, these vertex indices can be used to get any other information from the base mesh from multires, like seams, sharp edges, disconnected elements IDs...

Reviewed By: sergey

Maniphest Tasks: T78664

Differential Revision: https://developer.blender.org/D8227
2020-07-09 17:48:24 +02:00
bd84b2cbcc Fix Sculpt Vertex Colors sample color changing brush alpha
It is not practical to change the alpha of the paint color with the
color picker as with the current brush design alpha is the main strength
control for the brush.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8208
2020-07-09 17:42:27 +02:00
13b1374497 Fix crash when using Mask by Color in Multires
Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8207
2020-07-09 17:41:14 +02:00
78d48343ae Make deps: Fix compilation error on CentOS
There were two issues.

First is related on ISPC's CMake configuration forcing C and C++
compilers to be clang and clang++. This goes against of desired
behavior when we use our own compiled clang compilers.

The second issue was related on linker failure: CLang libraries
are linked statically, and they need some of C++ 11 STL symbols
which are coming from libstdc++.

Differential Revision: https://developer.blender.org/D8258
2020-07-09 17:24:49 +02:00
2be0ae7c99 Fix Cycles unnecessary updates to camera in viewport render
Problem identified by Milan Jaros.
2020-07-09 16:53:28 +02:00
Szymon Ulatowski
9de09220fc EEVEE: Implement the missing Sky texture
I'm not sure if the Sky was deliberately left out or was just waiting for a
better moment, but so many I was disappointed that Sky in EEVEE is
completely white.

There are already 2 implementations (osl and gpu) so this is the third one.
Looking at other cases it seems that we are not supposed to share sources
between cycles and the rest? So the new util_sky_model files are just
copies of what is already in cycles, except that the data file uses the RGB
variant of the Hosek/Wilkie model, because we output RGB anyway (but can be
easily changed to XYZ if desired - the results are nearly identical).
I am not sure if it is okay to pass 3*9 float values as 3 mat4 uniforms (I
wanted to use mat3 but it does not work).
Also, should I cache the sky model data between renders if the parameters
do not change?

Reviewed By: fclem, brecht

Differential Revision: https://developer.blender.org/D7108
2020-07-09 17:31:36 +02:00
42c99ec15b BLI: rename rand.c to rand.cc 2020-07-09 16:37:44 +02:00
580d50091c Particles: Create a simulation state for every Particle Simulation node
Every Particle Simulation node has a name (or a path when it is in a node group).
This name has to be used in the Simulation modifier on a point cloud to see
the particles.

Caching has been disabled for now, because it was holding back development
a bit. To reset the simulation, go back to frame 1.

Currently, there is no way to influence the simulation. There are just some
randomly moving points. Changing that is the next step.
2020-07-09 15:40:27 +02:00
31ad43a3c7 Blenloader: make BLO_read_data_address work in C++ 2020-07-09 15:29:25 +02:00
544c435fdd Fix T78745: Cycles error baking with multiple materials 2020-07-09 12:28:33 +02:00
8ddf7556a5 Fix T78718: Crash when deleting particle system modifier with the X Shortcut.
Duplication and deletion code of modifiers was totally wrong for
particle system, that special weird thing needs its own custom
management.

Note that for now I chose not to duplicate the particle settings ID when
duplicating the modifier...
2020-07-09 11:46:28 +02:00
ea5fe7abc1 UV: path selection support
This adds support for path selection for vertex edge & face selection
modes, matching mesh editing behavior, useful with the UV rip tool.

Region select & edge tagging are currently not supported,
although they could be added eventually.
2020-07-09 18:43:23 +10:00
0b8221683f BMesh: add utility functions
- BM_edge_uv_share_vert_check
- BM_face_uv_calc_center_median_weighted
- BM_loop_at_index_find
2020-07-09 18:23:16 +10:00
0b3bf69d3c Cleanup: move BMesh UV queries into their own file 2020-07-09 13:33:15 +10:00
754c5d6a14 Cleanup: clang-format 2020-07-09 13:29:48 +10:00
31bc76ea4e Cleanup: remove unnecessary calls to as_span
This uses the new implicit conversions and constructors
that have been committed in the previous commit.

I tested these changes on Linux with gcc and on Windows.
2020-07-08 22:30:23 +02:00
403384998a BLI: improve constructors and conversions to span
This allows us to avoid many calls to `as_span()` methods. I will
remove those in the next commit. Furthermore, constructors
of Vector and Array can convert from one type to another now.

I tested these changes on Linux with gcc and on Windows.
2020-07-08 22:27:25 +02:00
4b85ed819d Cleanup: remove unused function
This is not necessary in C++17 anymore.
2020-07-08 20:41:00 +02:00
f7d5d4ee3b Cleanup: use c++17 helper variable templates 2020-07-08 20:39:20 +02:00
e4926c167b Fix T78718: Crash when deleting particle system modifier with the X Shortcut.
Again those backward pointers not properly flagged in RNA, hence
generating infinite loops.
2020-07-08 18:08:08 +02:00
f4a39cafa1 Functions: add AttributesRef class
This is the same as MutableAttributesRef, but the data in it cannot be changed.
2020-07-08 17:05:52 +02:00
439c238bb4 Cleanup: use different internal socket name 2020-07-08 17:05:52 +02:00
05365d1376 Functions: support hashing MFDataType and CPPType 2020-07-08 17:05:52 +02:00
2de5de57c5 Build: fix stack linker warning with ffmpeg on macOS
The ff_cfhd_init_vlcs() function was using a lot of stack space, which
made linker on macOS unhappy. Using heap allocation allows to silence
the warning without causing other side-effects.

Kept the patch enabled for all platforms to avoid difference in behavior
and performance on different platforms, which could make certain types
of investigation very tricky.

Differential Revision: https://developer.blender.org/D8248
2020-07-08 15:49:55 +02:00
cb3c4218bf Minor cleanup in rna override code. 2020-07-08 15:43:57 +02:00
d1f4546a59 Functions: implement common subnetwork elimination optimization
This was the last of the three network optimizations I developed in
the functions branch. Common subnetwork elimination and constant
folding together can get rid of most unnecessary nodes.
2020-07-08 15:10:30 +02:00
e3e42c00cb Functions: Support getting MFSocket based on its id 2020-07-08 15:10:30 +02:00
2b9d62b73a Functions: Support accessing socket index of MFSocket 2020-07-08 15:10:30 +02:00
34d175f372 Functions: initial hash/equals implementation for constant multi-functions 2020-07-08 15:10:30 +02:00
840941215d Functions: allow multi-functions to override a hash and equals function 2020-07-08 15:10:30 +02:00
36a547af7b Cleanup: add correct license header to tests 2020-07-08 15:10:30 +02:00
ff133bbd33 BLI: add disjoint set data structure
This can be used to find separate islands in meshes efficiently (as is
done in cycles already). Furthermore, this helps to implement some
algorithms on node trees more efficiently.
2020-07-08 15:10:30 +02:00
a8ff8b64dc BLI: add comparison operators and hash functions for float3, etc. 2020-07-08 15:10:30 +02:00
ff444da7c4 macOS: upgrade minimum required version to 10.13 High Sierra
C++17 does not work on 10.12, and Apple extended support ended for 10.12 in
October 2019.

Maniphest Tasks: T76783, T76184

Differential Revision: https://developer.blender.org/D8179
2020-07-08 14:43:28 +02:00
6435acd8f6 Cycles: support shader transparency for holdout objects
Now transparent areas of the object will render objects behind.

Fixes T78728.
2020-07-08 13:18:19 +02:00
643196cc37 CMake: Fix spelling of Embree passed to find package
The spelling and capitalization of package name passed to find_package()
and find_package_handle_standard_args() needs to match.

Silences CMake warning about mismatch.

Differential Revision: https://developer.blender.org/D8247
2020-07-08 12:35:56 +02:00
45004d82e0 Functions: add dead node removal and constant folding optimization
Those optimizations work on the multi-function network level.
Not only will they make the network evaluation faster, but they also
simplify the network a lot. That makes it easier to understand the
exported dot graph.
2020-07-08 11:18:43 +02:00
50d7c00d9c Cleanup: fix comment 2020-07-08 10:16:56 +02:00
01c8aa12a1 Apply Modifier: support applying as shape key and keeping the modifier.
This can be useful to save the result of a cloth simulation as a
shape key without destroying the simulation, so it's possible to
e.g. re-run it to get other shapes, or simply use the new shape
key to start the simulation already in a draped state.

It also makes sense to allow applying as shape key even when the
mesh is shared, because the operation itself just adds a shape
key. To support this, split the apply operator into Apply and
Apply As Shapekey so that they can have different poll callbacks.

Differential Revision: https://developer.blender.org/D8173
2020-07-08 11:06:57 +03:00
7fcb6bc59c Fix T78324: Different Sky Texture results between CPU and GPU
The problem here was numerical precision: The code calculates the angle between
sun and view direction, and the usual acos(dot(a, b)) approach for that has
poor numerical performance for almost parallel angles.

As a result, the generally tiny difference between floating point computation
between CPU and GPU was enough to make the sun vanish at different radii,
causing different results.

The new version fixes the difference by making the computation much more robust
on both platforms.
2020-07-08 02:15:37 +02:00
afcb41a0aa BLI: simplify copy constructor of Array 2020-07-07 20:32:40 +02:00
eb5fb1741d Cleanup: don't end description with a '.' 2020-07-07 20:29:35 +02:00
8713109212 Cleanup: fix typo 2020-07-07 20:27:34 +02:00
902ee4d13c Functions: cleanup loop that traverses the MFNetwork 2020-07-07 19:46:10 +02:00
22158162ef Functions: add generic functions that output constants 2020-07-07 19:34:35 +02:00
f4633cf46c BLI: simplify copy constructor of vector 2020-07-07 19:16:31 +02:00
67042aa6a1 Functions: extend multi-function network api 2020-07-07 18:45:34 +02:00
adfae89f96 BLI: provide access to underlying node in dot exporter 2020-07-07 18:40:42 +02:00
a8627ea66d Functions: Add debug print and destruct callback to CPPType 2020-07-07 18:39:24 +02:00
4990e4dd01 Nodes: Generate multi-function network from node tree
This adds new callbacks to `bNodeSocketType` and `bNodeType`.
Those are used to generate a multi-function network from a node
tree. Later, this network is evaluated on e.g. particle data.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D8169
2020-07-07 18:23:33 +02:00
ff97545c50 Fix T75943 EEVEE: Cubemaps shows black
Caused by faulty driver implementation. Force fallback method.
2020-07-07 18:38:21 +02:00
1e2ff4f81b Cleanup: Add braces for clang tidy 2020-07-07 11:10:42 -04:00
0edf2fc128 BLI: Correct spin lock definition
The MSVC atomic function is defined for an unsigned type.

Not sure why this became an issue after switch to TBB by default,
maybe some CFLAGS changed to be more strict after that.
2020-07-07 16:51:03 +02:00
dad3de89dc Fix: remove accidental code
`v1` and `v2` are already set.
2020-07-07 11:27:23 -03:00
d352902758 Make deps: Use own nasm for ffmpeg and x264
Fixes the warning: building for macOS, but linking in object file

Differential Revision: https://developer.blender.org/D8235
2020-07-07 16:26:47 +02:00
1e3c0b4b03 Make deps: Compile own version of nasm for Apple
The upstream version of nasm does not put version information to the
generated object files, which makes linker to show the following
warning:

  building for macOS, but linking in object file

Using own patched version of nasm which puts required information to
the object file, making linker happy.

The plan is to either streamline the patch and provide it to the
upstream, or, it that takes too long, get an independent fix from the
upstream.
2020-07-07 16:26:13 +02:00
202e7ccaae Fix T77455: Blender Freezes when using the 3d Scale Gizmo
Issue is reported on Linux ith Intel HD6xx iGPU. Inside
`gpu_select_sample_query.c` the call to `glGetQueryObjectuiv` froze. After
bisecting this lead to the polyline shader. When using a 3d color shader
in stead of the polyline shader during selection seems to fix the issue.

Other parts of blender might also be effective, but I wasn't able to
freeze blender in these areas. When it does, we might want to add
a similar work-around to button2d, cage2d, cage3d & move3d, navigate.

Backport this patch to 2.83.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D8217
2020-07-07 16:22:05 +02:00
d1dcd2b464 BLI: Fix mistake in SpinLock TBB migration
Copy-paste mistake.
2020-07-07 16:17:58 +02:00
20558848d3 Optimization: use BLI_bvhtree_intersect_plane to detect faces that will be affected by the knife tool
The knife code currently calls the `BLI_bvhtree_overlap` function that
tests the overlap between the mesh tree and an AABB that encompasses the
points projected in the clip_start, clip_end and or clip_planes of the
view.

This resulted in many false positives since the AABB is very large.
Often all the triangles "overlapped".

The solution was to create a new function that actually tests the
intersection of AABB with a plane.

Even not considering the clip_planes of the view, this solution is more
appropriate than using overlap.

Differential Revision: https://developer.blender.org/D8229
2020-07-07 10:55:57 -03:00
630c6226e2 Fix T78307 UI: Drawing artifacts in the Blender UI on macOS
This was due to a bad driver which was not respecting this bit of the
specification:

`If the current primitive does not originate from an instanced draw command, the value of gl_InstanceID is zero.`
2020-07-07 16:26:01 +02:00
737bd549b6 Cycles: Add support for native OptiX curve primitive
This patch adds support for the curve primitive from OptiX to Cycles. It's currently hidden
behind a debug option, since there can be some slight rendering differences still (because no
backface culling is performed and something seems off with endcaps). The curve primitive
was added with the OptiX 7.1 SDK and requires a r450 driver or newer, so this also updates
the codebase to be able to build with the new SDK.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8223
2020-07-07 15:39:02 +02:00
95f0f31279 Fix T78692: improve UI regarding the effect of the denoiser on denoising passes
It wasn't obvious that the choice of Cycles denoiser also generates different
denoising data passes for compositing.
2020-07-07 15:12:41 +02:00
a394aac8b4 Fix T78666: Cycles non-uniformly scaled hair renders wrong for static objects
Don't apply the matrix transform optimization in this case, curve points and
radius can't represent non-uniform scale the way is possible with triangle
meshes and vertices.

This would cause abrupt change if objects had e.g. motion blur in one frame
and not in the next.
2020-07-07 15:08:21 +02:00
98bee41c8a IO: Reversed persistent ID order in exports to Alembic and USD
Each duplicated (a.k.a. instanced) object has a Persistent ID, which
identifies a dupli within the context of its duplicator. This ID
consists of several numbers when there are nested duplis (for example a
mesh instancing empties on its vertices, where each empty instances a
collection). When exporting to Alembic/USD, these are used to uniquely
name the duplicated objects in the export.

This commit reverses the order of the persistent ID numbers, so that the
first number identifies the first level of recursion. This produces
trees like this:

    ABC
     `--Triangle
         |--Triangle
         |--Empty-1
         |    `--Pole-1-0
         |        |--Pole
         |        `--Block-1-1
         |            `--Block
         |--Empty
         |    `--Pole-0
         |        |--Pole
         |        `--Block-1
         |            `--Block
         |--Empty-2
         |    `--Pole-2-0
         |        |--Pole
         |        `--Block-2-1
         |            `--Block
         `--Empty-0
             `--Pole-0-0
                 |--Pole
                 `--Block-0-1
                     `--Block

It is now clearer that `Pole-2-0` and `Block-2-1` are instanced by
`Empty-2`. Before this commit, they would have been named `Pole-0-2` and
`Block-1-2`.
2020-07-07 14:30:55 +02:00
70b1c09d7a IO: Fix bug exporting dupli parent/child relations
Exporting a scene to USD or Alembic would fail when there are multiple
duplicates of parent & child objects, duplicated by the same object. For
example, this happens when such a hierarchy of objects is contained in a
collection, and that collection is instanced multiple times by mesh
vertices. The problem here is that the 'parent' pointer of each
duplicated object points to the real parent; Blender would not figure
out properly which duplicated parent should be used.

This is now resolved by keeping track of the persistent ID of each
duplicated instance, which makes it possible to reconstruct the
parent-child relations of duplicated objects. This does use up some
memory for each dupli, so it could be heavy to export a Spring scene
(with all the pebbles and leaves), but it's only a small addition on top
of the USD/Alembic writer objects that have to be created anyway. At
least with this patch, they're created correctly.

Code-wise, the following changes are made:

- The export graph (that maps export parent to its export children) used
  to have as its key (Object, Duplicator). This is insufficient to
  correctly distinguish between multiple duplis of the same object by
  the same duplicator, so this is now extended to (Object, Duplicator,
  Persistent ID). To make this possible, new classes `ObjectIdentifier`
  and `PersistentID` are introduced.
- Finding the parent of a duplicated object is done via its persistent
  ID. In Python notation, the code first tries to find the parent
  instance where `child_persistent_id[1:] == parent_persistent_id[1:]`.
  If that fails, the dupli with persistent ID `child_persistent_id[1:]`
  is used as parent.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8233
2020-07-07 13:01:07 +02:00
f2175e06a7 Mae deps: Ensure Brotli is disabled for FreeType
We don't need it and it was optionally enabled, causing Blender to fail
to link on certain configuration (when Brotli is installed via Homebrew
for example).
2020-07-07 12:44:12 +02:00
02cd159539 Cleanup: add comment explaining operator delete 2020-07-07 12:31:25 +02:00
cc311e4a52 IO: print export name instead of object name in debug export graph output
This is just a change in `AbstractHierarchyIterator::debug_print_export_graph()`
to aid in debugging. It'll make it possible to distinguish between
different duplicates of the same object.

No functional changes to Blender itself.
2020-07-07 12:02:49 +02:00
5761cb9ee2 Guarded Allocator: add missing operator delete
This resolves warning C4291 on windows.
2020-07-07 11:52:45 +02:00
Johan Walles
80fe5e1b15 UI: Add units to motion tracking solve errors
The unit being "pixels".

Before this change the solve errors were unitless in the UI.

With this change in place, the UI is now clear on that the unit of the
reprojection errors is pixels (px).

Differential Revision: https://developer.blender.org/D8000
2020-07-07 11:22:12 +02:00
6d9a6f12b3 Make deps: Fix compilation error of Python on macOS
The configuration was confused about gettext installed via Homebrew
and isysroot passed to Python's compilation but not to test programs.

After this change `import gettext` still works, but it is unclear how
to test it further,

Differential Revision: https://developer.blender.org/D8231
2020-07-07 11:17:47 +02:00
955abbeff2 Fix sign conversion error 2020-07-07 09:01:01 +02:00
e233ee1c1f Fix T78186: Dyntopo panel error with tools that dont have a brush
Maniphest Tasks: T78186

Differential Revision: https://developer.blender.org/D8120
2020-07-07 10:38:56 +02:00
19d4e265b6 Cleanup: remove redundant comments
Searching in these files for "_as" will reveal a comment at the
top, that explains what these methods are for. There is no need
to duplicate that knowledge all over the place.
2020-07-07 10:35:55 +02:00
6e609f0eb0 Cleanup: use doxy comments 2020-07-07 17:52:05 +10:00
62774baded UI: add merge/split menus
This makes the menus and keymap match the edit-mesh
(M for merge, Alt-M for split).
2020-07-07 17:52:05 +10:00
d212b3dc43 Make deps: Fixes for macOS platform
Set of fixes which had to be made in order to have dependencies built
on own laptop:

- Require bison as a dependent software. It is required by ISPC.

  On macOS it is required to be installed via Homebrew. This is because
  Bison from Xcode toolchain is too old.

- Made sure Boost is compiled using clang.

  Without this gcc was used, and some unsupported command line argument
  was passed to it.

- Modify OGG in a way which does in fact pull fixed sized types.
  They are defined in stdint.h.

  Without this fix FFmpeg will not detect presence of OGG because the
  test program fails to compile.

- Force disable zstd compression and make wepb optional for the TIFF
  library. Without this TIFF might pick up development libraries from
  Homebrew.

Differential Revision: https://developer.blender.org/D8221
2020-07-07 09:31:46 +02:00
b28683b8b5 Cleanup: remove unused arguments 2020-07-07 16:04:10 +10:00
0c58970da7 Cleanup: spelling 2020-07-07 12:49:13 +10:00
ad0edc626d Cleanup: unused World struct members linfac, logfac 2020-07-07 12:44:20 +10:00
e20171e59f Fix build error with tests for removed functions
These GHash functions were removed in 12817083ec,
so the tests should be removed too.
2020-07-06 16:39:28 -04:00
d557f05502 Cleanup: Use bool instead of int 2020-07-06 16:07:54 -04:00
053e0c0af3 UI: Add shortcuts for shader effect panels
Only the delete shortcut applies here, although the move up and down
operators can optionally be assigned in the keymap.

See rB1fa40c9f8a81 for more details and rB5d2005cbb54b for the
grease pencil modifier panel implementation, which is the same.
2020-07-06 15:35:21 -04:00
12817083ec Cleanup: Use the BLI_edgehash API in the sewing simulation of cloths
Also remove the code in the ghash that is no longer used.

This change simplifies the existing code.

Differential Revision: https://developer.blender.org/D8219
2020-07-06 14:44:30 -03:00
a856de700b Fix T77730: ShaderFx Missing Update Notifier
This adds a notification type for shaderfx so the properties editor can
be properly notified to redraw.

Another possible solution would be to also redraw the shaderfx tab
 with a ND_MODIFIER update, but this solution allows us to avoid
 some unecessary redraws too. There were no existing cases of
ND_OBJECT | NC_MODIFIER updates, so those cases were
removed from buttons_area_listener.

Differential Revision: https://developer.blender.org/D8159
2020-07-06 13:17:07 -04:00
f6f4043924 BLI: add methods to lookup a stored key in a set 2020-07-06 17:59:27 +02:00
1562c9f031 Fix OptiX viewport denoising not working when rendering scene (without OptiX) that uses unsupported features
Denoising devices do not need to load the full feature set of kernels, so only activate the denoising
feature for them (so that it is possible to use features that are supported by the render devices, but
not the denoising devices).
2020-07-06 17:33:04 +02:00
aabfd2fb9b Cleanup: readfile: remove old deprecated OldNewMap for runtime caches. 2020-07-06 16:55:38 +02:00
ee3eba902a Runtime cache preservation during undo: add support for nodes and embedded IDs. 2020-07-06 16:55:38 +02:00
bfc644dcfb Reduce DupliObject::persistent_id from 16 to 8 items
For historical reasons, `DupliObject::persistent_id` was of size
`2*MAX_DUPLI_RECUR`. These reasons are now gone, and the persistent ID
always gets exactly one array element for every dupli-recursion.

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

Reviewed by: brecht
2020-07-06 16:52:28 +02:00
0b07f9b717 Fix T78608: Memory leak in Material properties: "Data from SCE".
Caused by recent own refactor of cache presevation handling in readfile,
EEVEE's lightcache are weird birds that can also be saved in .blend
files, need a special handling for those 'persistent' caches...
2020-07-06 15:09:39 +02:00
99feb10b8b Cleanup: warning, spelling 2020-07-06 23:07:18 +10:00
20446f07f6 Docs: reference bl_rna_get_subclass_py instead of bl_rna_get_subclass
bl_rna_get_subclass only works for Nodes at the moment.
2020-07-06 23:07:18 +10:00
ffaf294c3f Fix alignment/size issue on ARM/RPi architecture
Addresses 964305 from Debian bug tracker.
2020-07-06 14:53:39 +02:00
924578ce19 Optimization: Don't compute the snap to face on the knife tool twice
Both `knife_find_closest_vert` and `knife_find_closest_edge` call
`knife_find_closest_face`. Thus, running the raycast twice and setting
values like `kcd->curr.bmface` and `kcd->curr.is_space` repeatedly.

So:
- separate `knife_find_closest_face` from `knife_find_closest_vert` and `knife_find_closest_edge`.
- rename `knife_find_closest_vert` to `knife_find_closest_vert_of_face`
- rename `knife_find_closest_edge `to `knife_find_closest_edge_of_face`.
- do not set parameters previously set.

Differential Revision: https://developer.blender.org/D8198
2020-07-06 09:49:00 -03:00
073c426900 Fix faces disappearing when AutoMerge & Split 2020-07-06 09:03:33 -03:00
c632cf9ccd Fix UV select separate not refreshing the display 2020-07-06 21:23:35 +10:00
2c0cab03ca UV: add rip region to toolbar 2020-07-06 21:15:18 +10:00
dbe171fb26 Cleanup: spelling, comments 2020-07-06 21:03:45 +10:00
18b6c49a90 Cleanup: rename namespace TimeIt to timeit
According to our style guide, namespaces should have
lower case names.
2020-07-06 12:37:11 +02:00
572c48cf98 BLI: improve exception safety of memory utils
Even if we do not use exception in many places in Blender, our core C++ library
should become exception safe. Otherwise, we don't even have the option
to work with exceptions if we decide to do so.
2020-07-06 09:08:53 +02:00
703a73fa84 BLI: refactor how buffers for small object optimization are stored
Previously, there was an error when operator-> was returning an
invalid type. See error C2839.
2020-07-06 10:56:26 +02:00
80393a0eba UV: add rip tool
New rip tool matching edit-mesh rip functionality.

Useful as disconnecting UV's, especially for loops is inconvenient
without this.

This uses 'V' to rip, changing stitch to 'Alt-V'.
2020-07-06 18:27:51 +10:00
9353477383 BMesh: add BM_face_calc_uv_cross 2020-07-06 18:23:38 +10:00
b51b893df8 BMesh: add BM_loop_other_vert_loop_by_edge 2020-07-06 18:23:38 +10:00
705015e0a4 Fix T78481: Workbench Shadow effects XRay
When in XRay some effects (shadow, cavity & depth of field) aren't supported.
This patch makes sure that these effects aren't enabled.
2020-07-06 10:21:14 +02:00
4f3045999d Cleanup: warnings, spelling 2020-07-06 17:35:41 +10:00
0f617cd67e GPU: Remove local shaders workaround for Intel/Windows
It has been tested that local shaders workaround isn't needed for the
latest Windows/Intel 6xx GPU's.

Currently the local shaders workaround doesn't work anymore during the
investigation it was detected that the intel drivers didn't need it
anymore.

Local shaders should still be fixed as it is also used for some legacy
iGPU's. The current work around crashes when doing preview renders in
EEVEE as the default materials aren't available but for the work around
they should. (See T77346 for more information)
2020-07-06 07:45:10 +02:00
baf124c753 RNA Manual Reference: Update links 2020-07-05 16:45:56 -04:00
247a28f242 Revert "BLI: refactor how buffers for small object optimization are stored"
This reverts commit 5d79f9f276.

This was introducing build errors in windows. Need a bit more time to check it.
2020-07-05 15:08:26 +02:00
5d79f9f276 BLI: refactor how buffers for small object optimization are stored 2020-07-05 16:30:26 +02:00
464aaf2701 Fix T78603: GPencil Noise modifier Vertex Group influence filter missing
This was removed by error during the last refactor of modiifers.
2020-07-04 17:31:15 +02:00
169bb4b9ce BLI: fix mistake in move constructor of Stack 2020-07-04 17:28:25 +02:00
8e97694c8a Fix T78588: Material preview not visible in selection list
Logic to determine if the library icon should be used was too general.
2020-07-04 17:06:57 +02:00
9168ea8aab Cleanup: Fix small typo error 2020-07-04 11:15:11 +02:00
17603816f2 GPencil: Cleanup some comments typo 2020-07-04 11:04:21 +02:00
b0da78084b UI: Attempt to fix OSX widget shader issue
Some OSX GL driver implementation needs a dummy vbo read. This fixed issues
with the Hair shaders in the past.

Related to T78307
2020-07-04 01:27:59 +02:00
cad98923d0 Cleanup: spelling 2020-07-04 01:03:34 +02:00
ea65c6a153 Fix T78433: Adding Fade Generates Python Exception
This was caused by typo in rB67a822e08684.
2020-07-04 00:59:09 +02:00
4bf56b37ca Cleanup: Use C-style comments in outliner files
No functional changes. Convert all C++ style comments to C comments.
Also capitalize and add full stops.

The comments themselves were not cleaned up. Some could be removed or
reworded.
2020-07-03 13:40:12 -06:00
59ef43147e Cleanup: Remove unused outliner activation code
No functional changes. Remove commented calls to extern_set_butspace
and unused text activation code.
2020-07-03 13:40:12 -06:00
57a48bd0ca Cleanup: Use _fn suffix for outliner button callbacks
No functional changes. Use _fn instead of _cb.
2020-07-03 13:40:12 -06:00
d7dbf90a02 Clang-tidy: Enable braces-around-statements warning 2020-07-03 21:23:33 +02:00
185fe9cd8b Cleanup: compiler warning 2020-07-03 19:12:37 +02:00
46fcc12e83 Fix error in new Hair data type file reading 2020-07-03 19:12:36 +02:00
d2db481dc7 Cleanup: Blendkernel, Clang-Tidy else-after-return fixes (incomplete)
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/blenkernel` module. Not all warnings are
addressed in this commit.

No functional changes.
2020-07-03 18:18:16 +02:00
a21cb22f8b Cleanup: Deduplicate code for finding context object
Instead of manually checking the pinned object, use the existing
ED_object_active_context function. This requires adding const
to the context in that function.
2020-07-03 11:58:43 -04:00
33a74941c5 Cleanup: Editors, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors` module.

No functional changes.
2020-07-03 17:42:46 +02:00
367034f210 Cleanup: Editors/Space/UV-Edit, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/uv_edit` module.

No functional changes.
2020-07-03 17:42:45 +02:00
651d1aa7c8 Cleanup: Editors/Transform, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/transform` module.

No functional changes.
2020-07-03 17:42:45 +02:00
35ce16939c Cleanup: Editors/Space/sequencer, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/space_sequencer` module.

No functional changes.
2020-07-03 17:42:45 +02:00
a201020cd3 Cleanup: Editors/Space/Clip, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/space_clip` module.

No functional changes.
2020-07-03 17:42:45 +02:00
f254f66587 Cleanup: Editors/Space/Outliner, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/space_outliner` module.

No functional changes.
2020-07-03 17:42:45 +02:00
3aa53b361d Cleanup: Editors/Space/Node, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/space_node` module.

No functional changes.
2020-07-03 17:42:45 +02:00
bf532b1106 Cleanup: Editors/Space/Text, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/space_text` module.

No functional changes.
2020-07-03 17:42:45 +02:00
2f6fc5a7e8 Cleanup: Editors/Space/View3D, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/space_view3d` module.

No functional changes.
2020-07-03 17:42:45 +02:00
b61ecb785c Cleanup: Explicit return in each else if block in buttons_context()
This is a similar change as in rB4283da83cc9.

No functional changes.
2020-07-03 17:42:45 +02:00
f43fedd400 Cleanup: remove side effect in assertion 2020-07-03 17:35:40 +02:00
4a48939f04 UI: Fix bevel modifier not showing vertex group 2020-07-03 11:18:24 -04:00
cad2d32be6 Clang-Tidy: Enable bugprone-misplaced-widening-cast 2020-07-03 17:10:27 +02:00
4a5389816b Clang-Tidy: enable readability-named-parameter 2020-07-03 17:07:13 +02:00
fac2e63bc0 Fix utterly broken code regarding GPUtextures of MovieClip in readfile.c
Treat those as pure runtime code, reset to NULL by reading code, for
now.

Think those could be handled like Image gputextures (i.e. considered
runtime cache and preserved across undo steps), but probably not
critical for now.
2020-07-03 17:01:21 +02:00
1bdabd7b4f Move MovieClip to new undo cache management system. 2020-07-03 17:01:21 +02:00
1019c9f582 Clang-Tidy: enable bugprone-too-small-loop-variable 2020-07-03 16:54:08 +02:00
883f9dd6e5 Clang-Tidy: enable bugprone-assert-side-effect
Looks like we have no assertions with side effects.
2020-07-03 16:48:16 +02:00
9739fc4d1b Clang-Tidy: More fixed of redundant check before delete
For some reason got unnoticed in the original cleanup pass.
2020-07-03 16:47:59 +02:00
14fd91e7e8 Clang-Tidy: enable bugprone-argument-comment
It was called `inverted` in the header.
2020-07-03 16:39:06 +02:00
f4fdb8efc5 Cleanup: Remove redundant logic 2020-07-03 10:38:49 -04:00
f66aafa391 Fix memory leak when dragging shaderfx 2020-07-03 10:37:58 -04:00
f891d4e2ad Clang-Tidy: Fix readability-delete-null-pointer warnings
Also enable it in the configuration.
2020-07-03 16:32:51 +02:00
53d41e1a6f UI: Use sliders and [0, 1] ranges in ocean modifier
The ocean modifier has two properties that use a [0, 10] hard min and
hard max. The values act as factors though, so it makes more sense to
use sliders and a 0 to 1 range.

This commit also bumps the file subversion to avoid repeatedly applying
the change to the properties' range.

Differential Revision: https://developer.blender.org/D8186
2020-07-03 10:28:13 -04:00
2a39b34a09 Cleanup: Editors/Sculpt/Paint, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/sculpt_paint` module.

No functional changes.
2020-07-03 16:15:01 +02:00
fd5b093f84 Cleanup: Editors/Screen, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/screen` module.

No functional changes.
2020-07-03 16:15:01 +02:00
4283da83cc Cleanup: Explicit return in each else if block in ed_screen_context()
The `ed_screen_context()` function is approximately 700 lines long, and
its main structure is a huge chain of `else if` statements. Some of the
bodies did not return, but rather fell through and relied on the `return
-1;` at the bottom of the function. This means that in order to truly
understand what is going on in one of those `else if` blocks, it could
be required to scroll past all the following `else if` blocks,
double-checking that they all had an `else`, and then see what happens
below.

By adding explicit `return -1;` everywhere this happened, this is all
avoided, increasing local understandability of the code. Furthermore, it
makes the upcoming cleanup with the Clang-Tidy rule
`readability-else-after-return` a lot easier to do.

No functional changes.
2020-07-03 16:15:01 +02:00
de7c9f41e6 Cleanup: Editors/Object, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/object` module.

No functional changes.
2020-07-03 16:15:01 +02:00
19483125f8 Cleanup: Editors/Mesh, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/mesh` module.

No functional changes.
2020-07-03 16:15:00 +02:00
7d0a0b8a6d Cleanup: Editors/Armature, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/armature` module.

No functional changes.
2020-07-03 16:15:00 +02:00
f82e52ebc8 Cleanup: Editors/Animation, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/animation` module.

No functional changes.
2020-07-03 16:15:00 +02:00
17ba566018 Fix Pose Brush crashing after disabling connected only in FK mode
This function was returning the ik_chain before disabling the
fake_neighbors, so when the brush was used again with fake neighbors
disabled after rebuilding the PBVH and free them, they were still
enabled in the SculptSession, causing a the crash.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8195
2020-07-03 16:13:49 +02:00
3a59c184b9 Move Scene's cache management during undo to new system. 2020-07-03 16:10:33 +02:00
a33756d783 Cleanup: Unused variables in non-debug build 2020-07-03 10:09:19 -04:00
6a58e15548 Cleanup: Remove obsolete code in interface_panel.c
Some code delt with panel merging in earlier versions of Blender,
which is no longer needed. Other code delt with controls that aren't
used anymore, and in some cases have region-level equivalents.

There's a surprising amount of this unused code in this file, so removing it
will be helpful for the future.

Differential Revision: https://developer.blender.org/D7938
2020-07-03 10:03:16 -04:00
88d358902f Clang-Tidy: Enable readability-redundant-string-cstr 2020-07-03 15:55:09 +02:00
405e6c6cc9 Fix T78555: GPencil bake animation operator loose frame setting
The values were reset for each run
2020-07-03 15:53:44 +02:00
19ff145e66 Clang-Tidy: Enable readability-redundant-control-flow 2020-07-03 09:41:55 -04:00
ffef562bf7 Disable clang-tidy for code-generated RNA files
This needs some extra care, which is probably easier once the initial
pass over integration is done.
2020-07-03 15:33:27 +02:00
c9975088a9 Move volume to new cache management system for undo. 2020-07-03 15:28:09 +02:00
1e255ce031 Fix T72214: Fluids: noise does not work with negative frame numbers
The issue is duplicated code. There are two functions that zero-fill
the frame number. They worked the same for positive frames numbers, but
behaved differently for negative ones.

On frame `-100`, `BLI_path_frame` outputs `-0100` and
`fluid_cache_get_framenr_formatted_$ID$` outputted `-100`.

I changed the behavior of the latter, because we depend on the behavior
of the former for much longer already.

Reviewers: sebbas

Differential Revision: https://developer.blender.org/D8107
2020-07-03 15:27:02 +02:00
2633683b52 Clang-tidy: enable readability-container-size-empty warning
Reviewers: sergey

Differential Revision: https://developer.blender.org/D8197
2020-07-03 14:59:27 +02:00
93da09d717 Cleanup: add const in various places 2020-07-03 14:53:06 +02:00
9dce2c9d14 Cleanup: Editors/GPencil, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/gpencil` module.

No functional changes.
2020-07-03 14:48:38 +02:00
20869065b8 Cleanup: BMesh, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/bmesh` module.

No functional changes.
2020-07-03 14:48:37 +02:00
f3b8792b96 Cleanup: Interface, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/interface` module.

No functional changes.
2020-07-03 14:48:37 +02:00
86e7648f0e Cleanup: Mark overriding function with override keyword
No functional changes.
2020-07-03 14:48:37 +02:00
7704e6a678 Cleanup: bring operator overloads closer together 2020-07-03 14:31:26 +02:00
395b294b61 Cleanup: use nested namespaces 2020-07-03 14:25:20 +02:00
5fbf70b0d0 Cleanup: use trailing underscore for non-public data members 2020-07-03 14:20:42 +02:00
d64803f63b Cleanup: Use trailing underscore for non-public data members
This makes the code conform better with our style guide.
2020-07-03 14:16:02 +02:00
e797c4f28f Fix T78570: Vert/Edge slide doesn't adjust UVs 2020-07-03 09:01:32 -03:00
dfbb13b593 GPencil: Cleanup more comments (cont) 2020-07-03 13:52:04 +02:00
6fea8ec183 Clang-Tidy: Enable redundant static qualifier warning
This change enables readability-static-definition-in-anonymous-namespace
warning in .clang-tidy configuration.
2020-07-03 12:58:13 +02:00
aab41401f9 Move bSound cache handling during undo to new system. 2020-07-03 12:56:21 +02:00
ae5529c848 Cleanup: do not use magic values for enums... 2020-07-03 12:56:21 +02:00
8e0f8bb3e1 New undo cache management: Add Image IDs.
Some notes:
* `Image.cache` acts as some kind of 'main' cache, when it is NULL
  (could not be restored), other caches should also be cleared. Oddly
  enough, previous code was not clearing **all** caches, could not find
  any reason for that behavior, so new code does a full clear.
* `imamap` is still used for Node previews from scenes' compositor,
  however this is actually fully disabled in `direct_link_node()`.
* For render slots we cannot use offsetof as third part of the cache
  key, so we are using a hash of the slot's name instead.

As far as I can tell, this fixes T76989: Visual glitches when undo after
reload multiple images by script (in Material Preview).
2020-07-03 12:56:21 +02:00
5fa6bd8a8d Readfile/Undo: initial refactor of cache preservation code.
Main goal here is to have better specificity using cache keys, to avoid
same memroy address being re-used messing up with cache pointers
restoration after undo had to re-read a data-block.

Once all caches handling are ported  to this new system, it should fix
random issues like the one reported in T76989.

Part of D8183, refactoring how we preserve caches across undo steps in
readfile code.
2020-07-03 12:56:21 +02:00
6cb796e98e IDTypeInfo: add new callback to loop over all cache pointers of an ID.
Part of D8183, refactoring how we preserve caches across undo steps in
readfile code.
2020-07-03 12:56:21 +02:00
5dda6cefb6 Add key structure and hashing utils for ID caches.
Part of D8183, refactoring how we preserve caches across undo steps in
readfile code.
2020-07-03 12:56:21 +02:00
a06d95987e GPencil: Cleanup more comments (cont) 2020-07-03 12:55:47 +02:00
972d1700cd GPencil: Cleanup more comments (cont) 2020-07-03 12:55:47 +02:00
4ccd96f1a4 Cycles: rename viewport denoise Fastest option to Automatic and extend tooltip 2020-07-03 12:36:17 +02:00
83eeaddce8 Clang-tidy: Enable bugprone-lambda-function-name warning 2020-07-03 12:30:20 +02:00
bbeb1b2b52 Depsgraph: Use C++ style of guarded allocation of objects 2020-07-03 12:30:20 +02:00
468adfa4fd Guarded allocator: Override placement new operator
Allows to in-place construct objects which are using guarded allocator.
2020-07-03 12:30:20 +02:00
cdea648117 GPencil: Cleanup move functions to geom from modifier 2020-07-03 11:54:07 +02:00
2193c37768 GPencil: Cleanup Doxygen comments (cont) 2020-07-03 11:54:07 +02:00
b1d3850333 Cleanup: Fluid renaming from old 'manta' naming to new 'fluid' naming
Changed variable names from mmd, mds, mfs, and mes to fmd, fds, ffs, and fes. The author of this commits lights a candle for all the merge conflicts this will cause.
2020-07-03 11:52:08 +02:00
868d6ba1a7 GPencil: Cleanup Doxygen comments 2020-07-03 11:20:00 +02:00
746aec51a7 Cycles: Use TBB's spin mutex
First benefit is reduced boilerplate code.

Second benefit is fixed warnings about using deprecated spin lock
on macOS when using SDK 10.12 and above.

Differential Revision: https://developer.blender.org/D8182
2020-07-03 11:14:26 +02:00
0e1ee29f77 BLI: Use TBB spin_mutex as SpinLock implementation
When building without TBB use native to the platform spin lock
implementation. For Windows it is an atomic-based busy-wait,
for Linux it is pthreads' spin lock.

For macOS it is a mutex lock. The reason behind this is to stop
using atomics library which has been declared deprecated in SDK
version 10.12. So this changes fixes a lot of noisy warnings on
the newer SDK.

Differential Revision: https://developer.blender.org/D8180
2020-07-03 11:14:17 +02:00
0f4049db5f BLI: Switch threads implementation file to C++
Allows to use C++ primitives in the primitive implementation.
2020-07-03 11:14:06 +02:00
edb49d3dc2 Clang-Tidy: Allow use with GCC but warn about possible failure
The compilation using GCC + Clang-Tidy succeeded for me and Sybren
(with some linker caveats for Sybren) but seems that it is doable
to make GCC + Clang-Tidy to officially work for Blender.

Now it should be possible to enable Clang-Tidy doing something like

  make developer debug BUILD_CMAKE_ARGS='-DWITH_CLANG_TIDY=ON'
2020-07-03 10:58:24 +02:00
dfdd23bae6 Clang-Tidy: Silence warning affecting newer code
For now Clang-Tidy should be passable with the codebase as is. This warning
will be addressed as quality day task.
2020-07-03 10:23:44 +02:00
9ea5469178 Initial support of clang-tidy toolchain
Clang Tidy is a Clang based "linter" tool which goal is to help
fixing typical programming errors.

It is run as a separate compile step of every file, which slows
compilation down but allows to fully analyze the file the same
way as compiler does and catch non-trivial bugprone cases.

This change includes:

- CMake option called `WITH_CLANG_TIDY` which enables Clang Tidy
  linter tool on all source in the `source/` directory.

  This option is only available on Linux, as it is currently the
  easiest platform to get the Clang Tidy toolchain to work.

- CMake module which is aimed to find latest available Clang Tidy.

- Set of rules which allows to have Blender fully compiled without
  extra issues.

The goal of this change is to provide a base ground so that solving
all the warnings can happen later on, as a team effort.

It should be possible to use Clang Tidy side-by-side with both GCC
and Clang, but there seems to be some tweaks to be done in CMake to
make it really work for Blender. For now use Clang toolchain if
there are issues with GCC+Clang Tidy.

It will be worked on in the nearest future to bring seamless
experience for all configurations.

Currently there is no official way of getting Clang Tidy on macOS,
and on Windows there are some difficulties of hooking up Clang Tidy
from LLVM package to the MSVC compiler toolchain.

The actual warnings in the code will be addressed as a part of the
Code Quality Days, task T78535.

Differential Revision: https://developer.blender.org/D7937
2020-07-03 09:57:41 +02:00
a272a2a6cd Cleanup: spelling 2020-07-03 11:58:13 +10:00
0fdb79fe58 UI: Add Edge Loopcut Slide to edge menu
This was exposed in the context menu but not the main edge menu.
2020-07-02 20:33:49 -04:00
a68fd2561e Fix T78551 EEVEE: Fix memleak from renderpass ubo 2020-07-03 02:28:06 +02:00
0961ce04cb Fix T78124 Overlay: Image: Camera background image transparency not working
This changes to premultiplied blending for all cases and put the premult
in the shader.
2020-07-03 01:48:39 +02:00
5a13f682ee Fix T77559 Avoid wrong ob->imat leading to several bugs
This fixes T77559 Scale to zero in object mode unable to select
2020-07-03 00:21:56 +02:00
Philip Holzmann
a07922159d Fix T78527: GPencil Mirror modifier is inconsistent with Mesh Mirror (redo)
Simply the same code the regular mesh mirror modifier uses.

Differential Revision: https://developer.blender.org/D8188
2020-07-02 23:02:02 +02:00
Juan
1278657cc2 UI: rename Alpha to Opacity
There was a discrepancy between the Tooltip of the Camera's Background Image that controls the opacity of the image and the operator's name that reads Alpha. The tooltip says **"Image opacity to blend the image against the background color"**, so it was renamed to Opacity to follow the tooltip.
The decision for this change is that the naming Alpha is not the most appropriated, since it has nothing to do if a loaded image has an embedded Alpha channel or not.

{F8540101}

Reviewed By: #user_interface, pablovazquez

Differential Revision: https://developer.blender.org/D7760
2020-07-02 16:47:46 -04:00
Nicola De Mitri
3ea302cf8e UI: Replace "Grease Pencil" with "Annotation" in user-facing options in the Clip editor
This revision affects the menu under: Clip > Track > Detect Features > Placement.
A bit of UI that was probably missed when the legacy GP was renamed to Annotation

{F8647693}

In this state, it may be confusing for the user.

Reviewed By: Blendify

Differential Revision: https://developer.blender.org/D8139
2020-07-02 16:40:42 -04:00
Valentin
f3e4a3473e Cleanup: Remove useless duplicated lines
I spotted a duplicate struct declaration, so I had to check for other duplicated as well
There might be some other but i am not confident enough for deleting them

this regex search for duplicate ^(.*;)$\n(\1)$

Reviewed By: JacquesLucke

Differential Revision: https://developer.blender.org/D8146
2020-07-02 16:36:39 -04:00
ef0ec01461 UI: Dont abbriviate location & rotation
This resolves one of the last few areas where we still use inappropriate
abbreviations. Reading abbreviated words is usually slower, because
users must parse, guess and translate the words. Using abbreviations
such as 'rot' is also especially bad since it's a word in itself too.

The main advantage of abbreviations is that they are faster to *write*,
which just isn't a concern for text in the UI.

Differential Revision: https://developer.blender.org/D8174
2020-07-02 16:28:45 -04:00
33f36b453a GPencil: Cleanup - More rename from gp_ to gpencil_ 2020-07-02 20:04:56 +02:00
c5ec8d91bd Sculpt: Mask By Color
This tool generates masks based on the sculpt vertex colors by clicking
on the model, similar to automatic selection tools in image editing
software.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8157
2020-07-02 18:20:47 +02:00
85980743b0 Cleanup: Fix build error with clang on windows.
Header and implementation signature for ED_object_add_duplicate
were not the same leading to a build error with clang on windows.
2020-07-02 10:16:54 -06:00
95f3397a68 Fix T78525: Status bar not reset after Edit Voxel Size
Reviewed By: sergey

Maniphest Tasks: T78525

Differential Revision: https://developer.blender.org/D8181
2020-07-02 18:08:38 +02:00
7099459245 UI: Use consistent order in ocean modifier 2020-07-02 11:55:37 -04:00
Phil Stopford
17b89f6dac Ocean modifier: Expose eigenvectors for use as map
The eigenvectors in the ocean modifier (plus and minus) can be useful,
but are not exposed. Assuming the particle system was capable, the
eigenvectors could be used to drive spray emission velocities.

This exposes the controls to allow a map to be generated from these
eigenvectors. Currently, the values are mapped into a 0-255 range
similar to foam.

Differential Revision: https://developer.blender.org/D7182
2020-07-02 11:49:15 -04:00
35481fde40 GPUOffScreen: Remove the sample parameter
This is because the DRW module is no longer compatible with drawing using
MSAA.

This also change the Python API.
2020-07-02 17:28:41 +02:00
a4fe8ef236 Fix T78527: GPencil Mirror modifier is inconsistent with Mesh Mirror
The grease pencil mirror was using the current axis rotation but the mesh modifier doesn't use it.
2020-07-02 16:57:20 +02:00
06de1bddae UI: Small Tweaks to Modifier Layouts for Consistency
These changes are smaller, made based on feedback and a pass on all
the layouts for clarity and consistency. The Multires modifier UI will
be addressed in a separate patch. Here is an overview of the changes:

Renaming Options:
  - Build: "Start" -> "Start Frame"
  - Curve: "From Radius" -> "Size from Radius"
  - Screw: "Calc Order" -> "Calculate Order"
  - Displace, Warp, Wave: "Texture Coordinates Object" -> "Object"

Move Mode Toggle to Top & Expand:
  - Bevel, Boolean, Normal Edit, Subdivision

Use Columns for Tighter Spacing:
  - Displace, Explode, Ocean, Particle Instance, Remesh, Shrinkwrap,
    Solidify, Warp, Weighted Normal, Wave

Misc:
  - Bevel: Set inactive properties for vertex bevel
  - Mesh Sequence Cache: Remove box for cache file
  - Skin: Don't align "Mark Loose" and "Clear Loose"
  - Array: Expand relative offset subpanel by default
  - Array: Move start cap, end cap to a new subpanel
  - Bevel: Move width type above width

Differential Revision: https://developer.blender.org/D8115
2020-07-02 10:47:02 -04:00
fb0f0f4d79 Fluid: Added offset to control frame range
Added an offset field to control when to load the simulation files. Since this is a very small but helpful addition it is in my view safe to commit at this point of the bcon cycle.
2020-07-02 16:31:35 +02:00
f58f09c9a9 Fix T78513: Modifier apply shortcut not displayed
We can't specify the "apply_as" enum value, even though it's the default.
2020-07-02 08:26:59 -04:00
Jeroen Bakker
46ae115b88 Fix T78054: Crash Editing Instanced Objects with Tangent Normals
Similar track as for normal mesh. Don't store the tangent normals in CustomData
of the mesh, but in an unassociated CustomData instance.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D8161
2020-07-02 11:34:25 +02:00
Jeroen Bakker
ba2c039b05 Fix T77686: EEVEE environment pass with film transparency
When the film is set to transparent the environment pass should still be
rendered solid. otherwise it renders black.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D8046
2020-07-02 11:27:23 +02:00
945d0269e3 Fix crash calculating vertex parent in edit-mode
Regression in deaff945d0.
2020-07-02 19:12:54 +10:00
22197d7f8a Fix T76886: GPencil - Flickering when use Background or Camera image
The problem was if some stroke was empty and the changed flag was set to the last stroke wrongly.
2020-07-02 09:29:30 +02:00
26ffed7466 Cleanup: spelling 2020-07-02 13:03:46 +10:00
afd976a3b4 Fix T76806 UV Editor: Display as Outline do not work on macOS
This is a simple workaround using polyline shader. This is temporary and
a better solution should be found when we refactor the 2D view using DRW.
2020-07-02 02:32:10 +02:00
8bee200e2f Fix T76229 Overlay: Sulpt overlay not working if object use in-front option
Simple fix similar to paint overlay.
2020-07-02 01:41:02 +02:00
52b125a790 Fix alignment test when snap to edge while in vert or edge slide 2020-07-01 17:17:05 -03:00
b6f35531b6 Revert "Fix alignment test when snap to edge while in constraint"
This reverts commit e16972389e.
2020-07-01 17:13:13 -03:00
e16972389e Fix alignment test when snap to edge while in constraint 2020-07-01 16:42:06 -03:00
792cb8bdc7 Fix T77984: Cycles OpenCL error rendering empty scene 2020-07-01 20:01:25 +02:00
755c5c6e4c EEVEE: Shadows: Remove 1 pixel padding to the cubemap
This avoid having a much higher memory footprint as the underlying texture
size allocated by the driver is likely to be much higher (rounded to next
Power of 2 or other alignement requirements).
2020-07-01 19:52:05 +02:00
4723644e7f Fix T67587 Overlay: WeightPaint color blends with background in wireframe mode
Fix this by rendering to the overlay framebuffer when using alpha blend
mode.
2020-07-01 19:15:52 +02:00
6358c7754c Cleanup: Add functions to check the first brush step and symmetry passes
This adds three functions to check the state of the stroke in the
StrokeCache, removing the references to first_time and
mirror_symmetry_pass from the code. This makes easier to understand what
each code path is doing inside of each tool.

Some tools were using mirror_symmetry_pass incorrectly, so this should
also fix unreported bugs with radial and tiling symmetry related to that.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8164
2020-07-01 19:03:22 +02:00
bf5a656ff6 GPencil: Fix unreported primitive color always set as Vertex Color
When drawing a primitive, the color was always assigned as vertex color, so it was impossible to change it in the material settings.

Now, the color is set to material color or vertex color as expected.
2020-07-01 18:55:02 +02:00
11a1ddfd30 Fix T77780 Overlay: Weight colors are not in render in the right colorspace
This was just a missing conversion.
2020-07-01 18:53:48 +02:00
f228a8948b Cleanup: Two two spaces around python class 2020-07-01 12:36:00 -04:00
927448a1da Cleanup: typos in comment. 2020-07-01 18:10:05 +02:00
e9d1d1f725 Fix T77655 Overlay: Edit mode + wire drawtype + infront not transparent 2020-07-01 18:00:05 +02:00
2788b0261c Cloth: use the original vertex positions to build internal springs.
In order to ensure correct operation of the rest shape key feature,
it's necessary to create a temporary copy of the mesh with rest
vertex positions to run the BVH lookup on. If the rest shape key
isn't used, there is no need for additional overhead.
2020-07-01 18:16:44 +03:00
f4f00661a5 Fix T78330: Duplicating parented objects does not preserve relationships.
Caused by refactor of duplicate code in rBad6cccf058d0, we need to take
into account the duplication of groups of objects here too...
2020-07-01 17:12:12 +02:00
42be3964eb Cloth: correctly use the rest shape to compute the initial pressure volume.
Computing the original volume should use the rest positions of vertices,
like is done for initializing other parts of the simulation like springs.
Otherwise, features like rest shape key don't work correctly.
2020-07-01 17:42:05 +03:00
b5660f71fe Fix missing GPU image free in background mode
This is legacy code from before Eevee and Workbench rendering in background
mode was supported. Avoid memory leak by only queueing GPU textures to be
freed when we know they have been allocated.

Differential Revision: https://developer.blender.org/D8172
2020-07-01 16:05:54 +02:00
Yevgeny Makarov
5db82be980 Fix file-selector entering the directory on Ctrl-Click 2020-07-01 23:32:51 +10:00
6f0aca7973 Fix T78264: Auto Render stops working after rendering manually
Was caused by weird and feedback-loop based issue from a long time ago.

The auto-render was only happening for nodes which are tagged for exec.
This tag is assigned by edit operations on the tree (for example, when
adding or removing links). It is also set in the render pipeline for
nodes which are to be executed.

The issues comes from the fact that "life updates" during editing did
not clear the need_exec flag, ever. This made it so Auto Render was
working as expected. However, rendering the scene resets need_exec
flags at the end of rendering using ntreeCompositClearTags().
The actual need of such clear is not very clear, but it was making it
so Auto Render does not work after render.

To my knowledge the flag didn't really meant that the node is connected
to the output, so it couldn't have acted as attempt to ignore rendering
of an unused scene. It also should be possible to auto-render even if
node tree itself was never altered.

Long story short: lets ignore need_exec flag in auto-render check and
render scene node if the scene is used by the node.

Differential Revision: https://developer.blender.org/D8171
2020-07-01 15:08:16 +02:00
6a302e6845 UI: Fix alignment in kinematic constraint layout 2020-07-01 09:06:50 -04:00
9324e1117a LibOverride: Tweak more poll functions to prevent illegal operations.
We are likely still missing a lot of things, but most operators that
should not be allowed on liboverrides should now be properly disabled.
2020-07-01 14:45:27 +02:00
23cc2a2628 Fix ID reference counting asserts when freeing COW pose channels.
Take the do_id_user flag into account when freeing custom properties
attached to pose channels, so that pointer properties don't cause
assertion failures when DEG frees its COW instances.
2020-07-01 14:42:55 +03:00
323c5e1e0b Fix T78494: Edge slide crashes
Introduced in recent commit 9c29803255.
2020-07-01 21:28:27 +10:00
86e41ca775 UI: remove internal names (custom-data & loops) from tool-tip 2020-07-01 20:17:19 +10:00
ab0d02b704 UI: use term 'Current Frame' instead of 'Playhead'
Keep terminology consistent, 'Current Frame' is used nearly everywhere.
2020-07-01 20:16:27 +10:00
4387aff99e Transform: generalized custom-data correction support
Support custom-data correction based on surrounding geometry for all
transformation modes of the mesh transform operators.

The is the same logic used in Vert and Edge Slide.

In order not to change the current default behavior,
this property does not affect Vert and Edge Slide modes.
2020-07-01 17:49:38 +10:00
8d3c4aa2d7 Nodes: add utility method to access bsocket 2020-07-01 09:33:35 +02:00
6c7d0aebcb Fix T75483: 3D Text selection obscures text
This avoids logic op and having to draw on the render frame-buffer.
2020-07-01 16:55:20 +10:00
9f634a195d Fix crash drawing non-mesh objects with vertex color
Missing NULL check in f7bbc7cdbb
2020-07-01 16:50:28 +10:00
Stefan Werner
8c4703127a GPU: Apple/Nvidia Proxy check
Apple's Nvidia driverPROXY check also fails. Now the
configuration Apple/Nvidia will also bypass the
Proxy test.

Maniphest Tasks: T78175

Differential Revision: https://developer.blender.org/D8160
2020-07-01 07:55:10 +02:00
d885b1141c DRW: optimize mesh data extraction
Change extraction callbacks to take index ranges instead of calling them
for each mesh element (poly, loop, vert & edge).

This gives a minor overall performance gain in my tests, ~5% on average.

Details:

- Use typed parameter structs and macros for looping over elements.
  Without this, changes to these callbacks is time consuming as changes
  need to be made in many places.
- Avoid iterating over polygon-loops when iterating over polygons
  is sufficient.
- Simplify logic to access adjacent loops for faster line extraction.
- Rename 'loop' iterators to 'poly' (as they take polygon ranges)
  the iterator callbacks can operator on either polygon or loop data.
- Use term 'last' for the last index (inclusive),
  use 'end' when this value (not inclusive).
2020-07-01 14:56:39 +10:00
36d6aa428f Cleanup: spelling 2020-07-01 13:12:24 +10:00
63b8cf4518 Cleanup: python enum quoting 2020-07-01 13:11:39 +10:00
38bbd783b3 Cleanup: undeclared functions (make static) 2020-07-01 13:03:22 +10:00
039bfe0e05 UI: Constraints: Use single column for IK constraint 2020-06-30 22:11:11 -04:00
aeb4792044 Fix T77641 Sculpt mode performance regression in 2.83 2020-07-01 02:11:58 +02:00
a3e6b7c2ce Sculpt: Refactor persistent base to make it usable from other tools
This renames the layer persistent base and adds new API functions to get
the mesh state from the base, so it can be used from other tools and
replaced in the future with a better system.

Reviewed By: sergey

Maniphest Tasks: T77738

Differential Revision: https://developer.blender.org/D8003
2020-06-30 22:02:17 +02:00
981d7381cd Fix T77069 EEVEE: Mix shader with holdout & transparent BSDF fails
This follows Cycles closer.
2020-06-30 21:12:44 +02:00
3562be2bda UI: Cycles: Use Split layout for object motion blur 2020-06-30 13:23:12 -04:00
db7d370657 Fix T78201: Paint color not matching the UI and color picker
The color picker and brush->rgb values are in srgb, but sculpt vertex
colors works in linear, so they need to be converted.

Reviewed By: sergey

Maniphest Tasks: T78201

Differential Revision: https://developer.blender.org/D8111
2020-06-30 19:13:45 +02:00
7dbfc864e6 Outliner: Add auto scrolling during drag and drop
Pan the view when dragging elements near the borders. This uses the same
operator that scrolls the region during modifiers drag and drop.
2020-06-30 10:57:27 -06:00
21c2a64e79 Sculpt: Color filter fill mode
This implements a fill mode in the Color Filter tool, which fills the
entire mesh with a specific color.
As this functionality is part of the color filter, this allows to control
the blending of the fill color with the filter strength.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8158
2020-06-30 18:50:13 +02:00
0949140d36 Fix compile error
This is the same issue as in rBbcf49d13e53454.
2020-06-30 18:32:38 +02:00
8262e37d22 Outliner/UI: Show library state icons for data-blocks in "Data API" mode
Previously it was not possible to tell appart a linked data-block from its
override copy. In fact you couldn't tell appart any data-blocks with the same
name (which is possible with linking).
Now we show the library state icon as we do for data-blocks in other display
modes.

Old/new comparison (note the overriden "GEO-head"):
{F8608835} {F8608836}
2020-06-30 18:26:21 +02:00
9693163e2f Pointcache: store owner_id instead of object in PTCacheID
The new simulation type can also reference a point cache, but it is not an object.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D8097
2020-06-30 18:25:08 +02:00
9d80e6a6bb Fix T76480 UI: Proportional Editing Color too Shallow on 2.9a
This changes the drawing by drawing 2 circles with different intensity to
avoid any readability issues. This removes the need for Logic OP which is
implementation dependent.
2020-06-30 18:21:45 +02:00
c2ebf3edb4 Functions: provide dummy multi function
Sometimes it is convenient to be able to return a reference to some
dummy function.
2020-06-30 18:18:48 +02:00
67da2bd23a Functions: add methods to multi-function network classes
Those are necessary to query and modify the network.
2020-06-30 18:18:48 +02:00
d67b7f3b52 Functions: use raw allocator for function signature
This allows multi-functions to have static storage duration.
2020-06-30 18:18:48 +02:00
613f62d15c Functions: add two more customizable multi-functions 2020-06-30 18:18:48 +02:00
d92e5f8950 BLI: support constructing Color4f from float pointer 2020-06-30 18:18:48 +02:00
5c9c3a3234 Nodes: add some utility methods to DerivedNodeTree 2020-06-30 18:18:47 +02:00
e60b6f586b Build: disable OpenXR in make deps for macOS, it's not supported 2020-06-30 18:12:08 +02:00
95ee06d068 Fix T77825: autosave missed too often while sculpting
Previously if a modal operator is active, which might leave Blender in a state
where it's not safe to autosave, it would try again in 10s. Now try again in
10ms so it's much less likely to be missed, since overhead of such a timer is
negligble anyway.

Also remove the debug print that was added to investigate a bug at some point.
2020-06-30 18:12:08 +02:00
d4b9b2c020 Cycles: bump version to 1.13, matching Blender 2.90 release cycle 2020-06-30 18:12:08 +02:00
Miguel Porces
03b8173059 Python API: support setting properties in nested data in node add operator
Differential Revision: https://developer.blender.org/D8093
2020-06-30 18:04:25 +02:00
6add0cc88a LibOverride: Fix lots of poll functions for Object operators.
Prevent operators that should not perform on override data to be
callable in those cases.
2020-06-30 17:52:36 +02:00
438bd82371 Sculpt: Pose Brush option to affect loose parts
This option allows posing meshes with different disconnected elements
using the Pose Brush.

This is achieved by doing the following:
- Creating an ID per vertex that stores the connected component of that vertex.
- By using those IDs, one fake topology connection is created per vertex to the nearest vertex in a different ID. The maximum distance to create that connection is determined by the "Max Element Distance" property. These fake connectivity neighbors are used in the Sculpt API functions iterators, so all the algorithms of the Pose Brush can run without modifications as if everything was part of the same mesh.

In order to make this work, the "Connected only" property of the Pose Brush needs to be disabled. This will add an extra performance cost to the Pose Brush and its preview. To achieve optimal results, max element distance should be as low as possible.

Reviewed By: sergey, campbellbarton

Differential Revision: https://developer.blender.org/D7282
2020-06-30 17:43:37 +02:00
6ac235a6f7 Fix T78038: Cycles crash rendering with volume object and motion blur 2020-06-30 17:36:02 +02:00
27783b4ac7 Fix T78358: random crash editing shader nodes with textures 2020-06-30 16:59:40 +02:00
26cdab02a8 Cleanup: move tests into their corresponding namespace 2020-06-30 16:46:52 +02:00
e0ef574c40 Fix T76337 Overlay: Wireframe: x-ray doesn't deactivate when set to 0
Also fix an issue with antialiasing when xray opacity is set to 0.
2020-06-30 16:12:12 +02:00
49d05687be LibOverride: Add most of Object properties as overridable. 2020-06-30 16:06:32 +02:00
37820651bb BLI: add Array constructor that does not initialize non-trivial types
This should rarely be necessary, but I have a use case coming up soon.
2020-06-30 15:58:29 +02:00
Demeter Dzadik
5b03f49302 Custom Properties: support default values for strings
Differential Revision: https://developer.blender.org/D8102
2020-06-30 15:06:33 +02:00
Vincent Blankfield
e93663363e Fix T77734: random crash when rendering animation
Differential Revision: https://developer.blender.org/D7986
2020-06-30 14:58:50 +02:00
4e9ed1dae9 Fix T78447: Cycles vertex color node not working with hair 2020-06-30 14:36:52 +02:00
8aaca88402 Fix missing relation in compositor depsgraph
This is a fix for c7694185c9. An object without base can still be in the
depsgraph, and then the `VIEW_LAYER_EVAL` node does not exist.

This popped up while @Sergey was looking into T78264.
2020-06-30 14:26:12 +02:00
2a1af5fa48 Cleanup: add missing extern "C" 2020-06-30 14:01:46 +02:00
bdbfdce766 Transform: Reduce the alpha in the Edge Slide drawing
It was very intense and could be confused with the `Even` option.
2020-06-30 09:00:22 -03:00
602cfdeac7 Transform: Add constraint intersection support
Snap to faces and edges is now enhanced in the Edge Slide.

It works in the same way that it already works in the Vert Slide.

Basically it now snaps to the intersection of the slid edge with the
face plane or the edge line.
2020-06-30 08:58:47 -03:00
84901f2eda Nodes: store nodes by bNodeType instead of idname
This is more efficient in most cases.
2020-06-30 13:35:45 +02:00
a6775efb4f Alembic exporter: Fix Windows build errors
Some Windows-specific code needed adjustment after 2917df21ad.
2020-06-30 13:09:44 +02:00
b838a51803 Cleanup: spelling 2020-06-30 20:54:31 +10:00
84f8b47c4c Cleanup: clang-format 2020-06-30 20:50:37 +10:00
0291039079 LibOverride: Add minimal support of liboverrides to shapekeys. 2020-06-30 12:19:11 +02:00
4c3d51326e LibOverride: Refactor 'make override' 3DView operator.
This one now uses a generic 'dependency detection' process to decide
which IDs should be overridden.

This will e.g. allow to override mesh and shapekeys when those have some
values controlled by drivers using an armature bone...
2020-06-30 12:19:11 +02:00
f6394e66ed LibOverride: Fix handling of owned ID pointers in diffing process. 2020-06-30 12:19:11 +02:00
a94a05ec19 LibOverride: Add proper handling of shapekeys to core override code itself. 2020-06-30 12:19:11 +02:00
24c4d3f1f7 LibOverride: Add necessary bits in RNA to deal with embedded IDs paths.
Note that this code is rather rough and slightly hacky, a proper
solution needs to be designed at some point probably, but for now this
should work fine.

As usual, master collections and root node trees remain TODO for now.
2020-06-30 12:19:11 +02:00
7556530bac LibOverride: properly tag owner ID for override refresh, when embedded one is affected.
Note that this is partially WIP code, we only take care of shapekeys
here for now.

Also, move this tagging for liboverride refresh into same chack as the
one for tagging editors, sounds more logical that way.
2020-06-30 12:19:11 +02:00
deb01eb199 LibOverride: Add concept of 'embedded'/'virtual' override.
IDs like embedded ones (master collections, root node trees) cannot be
linked, and thus cannot be real override themselves.

Since they are managed by their owner ID, that one will also have the
overrides for their locally edited properties.

We still need a way to mark them as overridden though, for various UI
and override-internal purposes, this is done using a new ID flag.

Note that since Shae Keys are not linkable, and their pointers are not
editable in RNA, they are also considered as embedded from override
point of view.
2020-06-30 12:19:11 +02:00
34027506f8 Cleanup: ID macros: cast to const ID * instead of ID *.
Allows to pass const pointers without getting complains from the
compiler.
2020-06-30 12:19:11 +02:00
737b0fd762 Cleanup: Use unsigned int when for enum values, instead of signed int. 2020-06-30 12:19:11 +02:00
906d93110e Cleanup: LibOverride: Naming. 2020-06-30 12:19:11 +02:00
fa7d990f10 LibOverride: Fix improper update of depsgraph relations. 2020-06-30 12:19:11 +02:00
0b3313e532 Cleanup: LibOverride: Replace raw pointers checks by proper macros.
This is cleaner, but also crucial to avoid weird issues when behaviors
of those checks are modified...
2020-06-30 12:19:11 +02:00
4783520bfa Cleanup (from clang format)... 2020-06-30 12:19:11 +02:00
2d8c59ccb9 Fix T77095: fix Cycles performance regression with AMD RX cards
Apply the workaround only for known problematic drivers. The latest pro driver
appears to work correctly, hopefully the regular driver will as well once it
is updated to the same OpenCL driver version (3075.13).
2020-06-30 12:01:40 +02:00
9dbe0f9c04 Fix T78367: triangulate modifier does not preserve sculpt vertex colors 2020-06-30 12:00:44 +02:00
2917df21ad Alembic: new exporter based on the USD exporter structure
The Alembic exporter has been restructured by leverages the
`AbstractHierarchyIterator` introduced by the USD exporter. The produced
Alembic files have not changed much (details below), as the Alembic
writing code has simply been moved from the old exporter to the new. How
the export hierarchy is handled changed a lot, though, and also the way
in which transforms are computed. As a result, T71395 is fixed.

Differences between the old and new exporter, in terms of the produced
Alembic file:
- Duplicated objects now have a unique numerical suffix.
- Matrices are computed differently, namely by simply computing the
  evaluated transform of the object relative to the evaluated transform
  of its export-parent. This fixes {T71395}, but otherwise should
  produce the same result as before (but with simpler code).

Compared to the old Alembic exporter, Subdivision modifiers are now
disabled in a cleaner, more efficient way (they are disabled when
exporting with the "Apply Subdivisions" option is unchecked). Previously
the exporter would move to a new frame, disable the modifier, evaluate
the object, and enable the modifier again. This is now done before
exporting starts, and modifiers are only restored when exporting ends.

Some issues with the old Alembic exporter that have NOT been fixed in
this patch:
- Exporting NURBS patches and curves (see T49114 for example).
- Exporting flattened hierarchy in combination with dupli-objects. This
  seems to be broken in the old Alembic exporter as well, but nobody
  reported this yet.

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

Reviewed By: Sergey
2020-06-30 11:38:46 +02:00
a2b7c84ae8 Cleanup: unused arguments 2020-06-30 19:35:32 +10:00
7860fc9539 Codesign: Wait for unsigned directory to appear
Solves problem with different order of codesign server startup and
mount of network shares: avoids exception happening when server is
started prior to the mounts are ready.
2020-06-30 11:21:00 +02:00
53799d3ed2 Codesign: CLeanup, redundant semicolon 2020-06-30 11:20:37 +02:00
4176adaf96 Fix T78455: Failed assert when opening a viewport panel
Mistake from 1fa40c9f8a.
2020-06-30 10:47:49 +02:00
55ae55af66 Cleanup: remove unnecessary namespace specifiers 2020-06-30 10:35:50 +02:00
5d2005cbb5 UI: Add shortcuts for grease pencil modifier panels
See rB1fa40c9f8a81 for more details. The implementation is the same.
The only difference to the mesh modifier  commit is a slight rework of
edit_modifier_invoke_properties in order to pass through to check for
other keymap items with the same shortcut.
2020-06-29 21:04:45 -04:00
Adrian Newton
1d29822fa9 UI: Alphabetize grease pencil modifier list
The Texture Mapping Modifier was out of place

Differential Revision: https://developer.blender.org/D7474
2020-06-29 19:47:38 -04:00
062a843bfb EEVEE: Fix undefined behavior when using BSDF nodes inside volume shaders
This should fix T76171 Eevee bsdf shaders glitches
2020-06-30 01:32:00 +02:00
Adrian Newton
f28e59bd74 UI: Use single column for cycles ray visibility checkboxes
Differential Revision: https://developer.blender.org/D7612
2020-06-29 17:12:19 -04:00
b29fd7bab8 GPencil: Cleanup - Replace gp_ prefix with gpencil_
This was missing in previous cleanup commits.
2020-06-29 22:37:11 +02:00
421ac266d0 UI: Tweak Cache File Template Layout
The template was disorganized and didn't fit with the new layout style.

|          Old         |         New          |
| {F8641166 size=full} | {F8641167 size=full} |

Differential Revision: https://developer.blender.org/D8113
2020-06-29 16:36:19 -04:00
a71d3bd2df UI: Don't show modifier operation reports on button press
The reports should only show when using shortcuts.
2020-06-29 15:06:13 -04:00
1fa40c9f8a UI: Add shortcuts for modifier panels
The shortcuts act on the modifier with its panel under the mouse.
The following shortcuts are enabled by default:
  - Remove modifier: X, Delete
  - Apply modifier: Ctrl A
  - Duplicate modifier: Shift D
More shortcuts can be added in the keymap.

Each panel can now store a custom data RNA pointer, and a new
function is added to get the custom data for the panel under the
cursor. This custom data could be used to refactor the "List Panel
System" to generalize it and integrate it further with RNA.

The same functionality will be added  in further commits where it
applies to constraints, grease pencil modifiers, and effects.

Differential Revision: https://developer.blender.org/D8031
2020-06-29 15:00:25 -04:00
4f8a881715 Fix T78444: Duplicate "From Radius" in Cast Modifier UI
This button was meant to be "Use Transform"
2020-06-29 14:41:46 -04:00
5d31ef0820 Remove Threaded Sculpt option
Threaded Sculpt is now always enabled by default. If it causes
performance problems compared single threaded sculpt it should be
considered a bug.

Reviewed By: sergey

Maniphest Tasks: T77638

Differential Revision: https://developer.blender.org/D7960
2020-06-29 18:20:09 +02:00
3aced11d79 Nodes: rename node_socket.c to node_socket.cc
I have to add some C++ code in callbacks for socket types
for the new particle system.
2020-06-29 17:36:21 +02:00
bcf49d13e5 Fix compile error on Apple Clang
Needs to compile with `CMAKE_OSX_DEPLOYMENT_TARGET` of 10.14 at least to
have `std::optional<>::value()` available. So we have to increase the
minimum required compiler version, but that requires more changes. Just
fix the build error for now.
2020-06-29 17:28:37 +02:00
937d89afba UI: Show library status icons in search menus, rather than letter prefix
Rather than a `L` (linked), `O` (overridden) or `M` (missing) prefix for the
name, show the existing library status icons. See D7999 for screenshots.

Note that when using preview icons, or if the search menu contains items with
own icons (e.g. brush icons), we still fallback to the prefix solution.

Zero or fake user is still indicated with a prefix.

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

Reviewed by: Bastien Montagne, William Reynish
2020-06-29 17:28:37 +02:00
5024c54271 RNA: properly tag 'embedded' ID pointers as owned.
This is important at several level, mainly for overrides currently.

Note that this also includes shape keys, since from RNA point of view
those are also 'embedded' (they are not editable, not linkable, ...).
2020-06-29 17:28:04 +02:00
583cfe2596 LibOverride: ignore all data arrays of meshes.
Those are not overridable, and comparing them is... costly.
2020-06-29 17:28:04 +02:00
28f4e5cd6b RNA: Add a way to prevent automatic addition of 'no ownership' flag for ID pointer properties.
Since makesrna runs after all properties have been defined, we have to
remember with a new internal flag when we explicitely disable the
'PROP_PTR_NO_OWNERSHIP' flag for a property.

Otherwise there was no way to do so for ID pointer properties...
2020-06-29 17:28:04 +02:00
febb2351ad Fix ShapeKeys not being deleted together with their owner ID.
Consistency with e.g. copying (copying a mesh also duplicates its
shapekey typically).

Baby step towards getting rid of this horrible ID, some day...

Note that for now we only do that when taking BMain into account, fancy
code dealing with non-main IDs and such has to deal with those itself.
2020-06-29 17:28:04 +02:00
dcdffe719f Fix ID_swap not keeping original recalc flags.
Note that we might be missing more things there still, maybe some tags
e.g. should also be swapped?
2020-06-29 17:28:04 +02:00
b723d38812 Add utils to remove an ID from the relations runtime data in Main. 2020-06-29 17:28:04 +02:00
cff688ce7b Cleanup: make some type casts explicit
Doing this so that I turn this into a .cc file.
2020-06-29 17:27:03 +02:00
bf87df3485 Fix T78323: Enable Unified and Secondary colors for Scultp Vertex Colors
The report does not include any file, but probably that file is using the
settings for unified colors, which are currently not available in the UI,
so it always paints black. This enables unified colors and secondary
colors for sculpt vertex colors, so it should solve that issue.

Unified color does not make much sense now as the Paint tool is the only
one that has paint capabilities, but it will do in the future when
sculpt and paint at the same time is enabled and the paint capability is
added to more tools.

Reviewed By: sergey

Maniphest Tasks: T78323

Differential Revision: https://developer.blender.org/D8136
2020-06-29 17:25:27 +02:00
3118636f81 Fix Smear Tool too weak on high poly meshes
The defaults for the Smear tool were making it too weak in high poly
meshes, specially the alpha/pressure option enabled by default. Now this
option is disabled, it has a linear pressure curve and less spacing.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8134
2020-06-29 17:23:43 +02:00
9c29803255 Transform: Draw edge considered in the slide value
Useful for identifying how the value is used and which edge
is considered in the snap.
2020-06-29 12:18:59 -03:00
7f1fd1818a Fix T77946: Problem snapping with "Project onto Self" on a curve with generated geometry 2020-06-29 11:38:35 -03:00
164a49f047 GPencil: Cleanup function names replace gp_ by gpencil_ prefix (cont) 2020-06-29 15:47:49 +02:00
a351eb0726 GPencil: Cleanup function names replace gp_ by gpencil_ prefix 2020-06-29 15:47:43 +02:00
399dbb1aa3 GPencil: Cleanup - Rename some functions from gp_ to gpencil_ 2020-06-29 15:47:38 +02:00
1cda374906 GPencil: Cleanup - Rename annotation function to new prefix
These functions were using the old gpencil or gp prefix.
2020-06-29 15:47:24 +02:00
13e2337da7 Fix T78361: Crash When Modelling
Forgot to free the tangent layer for bmesh in the drawing code.
2020-06-29 15:38:17 +02:00
cb5bfb32ba Depsgraph: introduce blender::deg namespace
Reviewers: sergey

Differential Revision: https://developer.blender.org/D8150
2020-06-29 15:21:30 +02:00
81fb08ad57 Fix T74290 Face Dots in front (X-ray) Visual Glitch
This is not likely to be the silver bullet but it fix the common case.
2020-06-29 15:02:29 +02:00
76e252ead3 Cleanup: use blender::bke namespace in simulation.cc 2020-06-29 14:47:00 +02:00
85cde12bff Cleanup: reduce code indentation and simplify some code flow 2020-06-29 09:33:57 -03:00
2476c47d75 VSE: Fix type mismatch introduced in rB8bcfa0d1fb9f
Pass `IMB_Proxy_Size` to `seq_can_use_proxy` and remove duplicate check.
2020-06-29 14:32:00 +02:00
18bff53c99 BLI: remove blender::Optional in favor of std::optional
`std::optional` can be used now, because we switched to C++17.
2020-06-29 14:30:06 +02:00
4fc5233467 Fix T78401: Convert Mesh to Grease Pencil with empty material slot crashes
Also create the 'simple fill' in case there are only empty material
slots.

Maniphest Tasks: T78401

Differential Revision: https://developer.blender.org/D8151
2020-06-29 14:23:10 +02:00
9feb0d5f2e Fix T74220 Mantaflow Color Mapping not ignoring alpha value
And also remove some sRGB hack.
2020-06-29 14:19:52 +02:00
bd6cc282d2 Fix T61573 GPencil: Annotation thickness doesn't work with on OSX
This fixes the issue by using the polyline shader but this does not gives
the best results.

A better way would be to have a dedicated shader for the lines to avoid
the line break at every angle change.
2020-06-29 14:19:52 +02:00
Stefan Werner
0d2e628964 Build: Point ISPC explicitly to the location of LLVM libraries.
Sometimes the ISPC build could pick up the system LLVM librareis
instead of the ones in the Blender lib directory.
2020-06-29 14:06:00 +02:00
9afad1de44 Fix compiler warning for deprecated variable use 2020-06-29 13:13:03 +02:00
8e494f7a45 Cleanup: minor change missed last commit 2020-06-29 21:03:42 +10:00
5a6145f32c Cleanup: use designated initializes for mesh extract structs
Better readability and allows adding new struct members without
adding empty slots to every 'MeshExtract' struct.
2020-06-29 20:52:19 +10:00
38c9deeb5a Cleanup: use std::make_unique instead of blender::make_unique
This is possible, because we use C++17 now.
2020-06-29 12:35:27 +02:00
2def6f5568 Fix T78415: Particle Edit mode Add brush with a radius > 181px crashes
Caused by short overflow, change to int instead.

Maniphest Tasks: T78415

Differential Revision: https://developer.blender.org/D8148
2020-06-29 12:03:39 +02:00
784911a4a0 Cleanup: rename namespace DotExport to dot 2020-06-29 11:53:17 +02:00
b51d6e8012 Cleanup: Use blender namespace in blenkernel 2020-06-29 11:48:22 +02:00
Jeroen Bakker
0baa000b85 Fix T73892: EEVEE Viewport Render Ignores Render As Wire
In the viewport an object can be set to be displayed as wire. When
rendering the viewport this setting is ignored and follows the
path or doing a final render. This patch will add an exception
when rendering a viewport render.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D8043
2020-06-29 08:19:14 +02:00
3b630bd563 Fix T78229: Playhead not refreshing when area is maximized
No other areas were tagged for redraw.
2020-06-29 08:13:48 +02:00
41bfdeaa53 Fix T78176: Sequencer renders playhead line twice 2020-06-29 07:37:40 +02:00
b21ba5e579 GPencil: Cleanup - replace loop with LISTBASE_FOREACH 2020-06-28 17:13:10 +02:00
3bdfd8c916 Fix T78353: GPencil: Make Circle select only select points inside circle
Now, instead of select the section of the stroke that is below circle, only the points inside circle are selected.

Also fixed a bug when segment selection mode is enabled.

Differential Revision: https://developer.blender.org/D8141
2020-06-28 16:51:28 +02:00
Tuomo Keskitalo
fa2c7709ff Deps Builder: Fix OSL build error.
When there is no system python OSL will fail to build the documentation.
Given we don't ship the documentation, this is safe to disable.

Originally part of D8123
2020-06-28 08:00:28 -06:00
6d8b6aec18 Fix T74024 Faces missing, weird faces added
Workaround by adding a special case for that driver in gpu_extensions.c
2020-06-28 15:51:15 +02:00
Ankit
340130719f Use const in nodeFindSocket
Since the function only iterates over the input members,
and matches their identifiers, `bNode *`can be `const`.

All other usages of the `nodeFindSocket` use it with
other functions that modify the node. (e.g.: ``nodeAddLink` )
But an exporter needs the node to be a `const`, so this
creates unnecessary and slightly unsafe design changes.

Reviewed By: JacquesLucke

Differential Revision: https://developer.blender.org/D8142
2020-06-28 15:27:29 +05:30
df8847de6d Fix T77549 GPUTexture: Crash caused by NULL parameter to glBindTextures...
... or glBindSamplers.
2020-06-28 01:44:17 +02:00
59d2dd2237 UI: Remove duplicate modifier error message
Thanks to J. Fran Matheu for pointing this out.
2020-06-27 17:56:29 -04:00
4ea92f775e Fix compile error in recent commit
This was introduced in rBd7b10e5b740fe2.
2020-06-27 21:07:20 +02:00
ff82049642 Functions: add MutableAttributesRef data structure
This will be used to reference the content of a CustomData structure
in C++ code, that does not need to know who owns the data but only
works with it.
2020-06-27 20:58:35 +02:00
e91d581167 Fix T78259: Proportional editing does not work in particle editing
And better identify what is bool and what is flag in the
proportional edit properties.
2020-06-27 14:19:59 -03:00
a55eac5107 UI: Better Grouping of FFmpeg audio settings
Some audio render settings were hidden in the scene properties. These 
settomgs belong in the render properties as they affect the output when 
using ffmpeg video.

Fixes T49241

Differential Revision: https://developer.blender.org/D8137
2020-06-27 12:00:38 -04:00
9f5fae1f2c Revert "Fix T78259: Proportional editing does not work in particle editing"
This reverts commit 5c48592ccd.
Ii introduced a stupid error.

Fix T78352
2020-06-27 11:13:02 -03:00
d7b10e5b74 Fix T78337: Fix crash when use GPencil merge without materials
If the object hadn't material, the index of material was negative.
2020-06-27 15:59:38 +02:00
2350159101 Cleanup: make it easier to check if a CPPType is a specific compile time type 2020-06-27 13:28:46 +02:00
563670ff9e Fix T78336: Gpencil selection unstable
The selection with the tweak tool was inprecise because it was using the bounding box and if the point was in a straight line in the border or in the corners it was very hard to select.

For this tool is better don't use the bounding box check.
2020-06-27 10:55:33 +02:00
fec2b2a809 Palettes: Remove threshold parameter when extract from images
Using a number greater than 1 produce a huge number of entries in the palette because any small variation in the color create a new entry.

Remove the threshold reduce the precision of the color extracted, but always is better than having a palette with thounsands of colors.

Related to T78317

Still pending the memory crash when it's impossible to allocate memory for the palette in the popover, but with this change I don't think we get this error again.
2020-06-27 10:40:37 +02:00
4b96f47831 Docs: correct invalid doxygen params & references 2020-06-27 15:43:20 +10:00
c1c5dff7c0 Doc: correct bpy.msgbus arguments 2020-06-27 13:48:18 +10:00
b7b57e7155 PyDoc: Update Python Package Requirements 2020-06-26 13:24:53 -04:00
daa815d7fc UI: Use term 'Blend Mode' 2020-06-26 13:24:53 -04:00
84e1e0cf95 Fix T78170: Mantaflow Crash | Whitewater Particles Baking
Fixed issue in the upstream Mantaflow repository.
2020-06-26 18:29:43 +02:00
fb68a30af6 Fix crash compiling Cycles OpenCL, after recent TBB changes 2020-06-26 17:44:24 +02:00
9c1d85117c Cleanup: Fix strict compiler warning about variable shadowing
Thanks Howard for double-checking!
2020-06-26 17:29:50 +02:00
06e24f6c91 Fix sample color operator not updating the color in the UI
Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8110
2020-06-26 17:20:12 +02:00
4817426b3e Fix Color Filter not updating during modal operator
The code for tagging the updates was wrong

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8109
2020-06-26 17:18:10 +02:00
0c98bb75cb Fix Edit Voxel Size label rotation and scale in rotated objects
Previously, the text rotation was always calculated in object space, so
the text rotation always had the object rotation applied. Now the
rotation is calculated in world space, so it always aligns correctly to
the view. Same applies to text scale not taking into account the object
position.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8068
2020-06-26 17:17:00 +02:00
5c48592ccd Fix T78259: Proportional editing does not work in particle editing
This is a long-standing bug, possibly proportional editing never worked
in particle mode.

Some parameter definitions in the transform code are scattered and
sometimes duplicated.

Proportional editing is a parameter that depends only on the Convert
type and not `spacetype`, `CTX_` or `obedit_type`.
2020-06-26 12:03:04 -03:00
e6e67da4ea Fix T78129: No audio playback with sound strip pasted to a new scene
Add DEG_relations_tag_update(bmain).

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8130
2020-06-26 17:00:47 +02:00
4006cd2d2c Refactor: use new api for expand in blenloader
This is part of T76372.
2020-06-26 16:53:10 +02:00
9b4e621db0 Fix T77410: Effects doesn't update when Offset property is set
Enabling offset property caused strip to produce `SEQ_CACHE_STORE_RAW`
type image, which is kept in temp cache and is not invalidated.

Change update functions for all properties of effect strips that affect image
to `rna_Sequence_invalidate_raw_update`.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8132
2020-06-26 16:30:03 +02:00
26b428186a Fix T78295: reload scripts disables Cycles render passes in the compositor
Don't auto update render passes in nodes when unregistering render passes or
quitting Blender, this should only happen on explicit user action to change the
engine or passes.
2020-06-26 16:18:46 +02:00
d10990af79 Refactor: use new api for lib linking id properties 2020-06-26 16:04:09 +02:00
5f4a66c0e8 Fix T78049: Wrong icon for add cone tool 2020-06-26 09:53:27 -04:00
d33e715259 Fix T77669: Copy-pasting strip twice crashes Blender
In rBeaee2b411935 I removed BKE_sequencer_base_clipboard_pointers_store from
paste function, because I wanted pasted strip to always reference copied
strip, not recently pasted one. This worked well with ordinary strips, but not
if they reference ID.

Add back BKE_sequencer_base_clipboard_pointers_store call.

I thought that always referencing original strip would be more correct approach,
but it doesn't matter now. Referencing recently pasted seems to be cleanest way
to do this.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8129
2020-06-26 15:51:08 +02:00
8bcfa0d1fb Fix detecting proxy images.
Pass is_proxy_image to functions where images are loaded instead of comparing
image size to render size.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8128
2020-06-26 15:51:08 +02:00
f26d7268bf Silence warning introduced in f7f3b2d318
Call function `BKE_scene_multiview_view_prefix_get` to ensure ext is not
NULL.

This already should happen in `seq_image_strip_is_multiview_render` though.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8081
2020-06-26 15:51:08 +02:00
ea4fa8abb0 Refactor: use new api for lib linking gpencil, palette, key, simulation, ipo and library 2020-06-26 15:44:56 +02:00
14e313bbb2 Refactor: use new api for lib linking hair, pointclout, volume, material, texture and image 2020-06-26 15:39:04 +02:00
26d0fb3aef Fix T78269: Mirror modifier lost UV offset only
Also fixed an issue with a decorator in the same subpanel
2020-06-26 09:37:50 -04:00
96d657cb84 Refactor: use new api for lib linking curve, mesh, cachefiles, armature and vfont 2020-06-26 15:30:43 +02:00
8b070b8a71 Fix T78199: reload scripts error when icon is used multiple times in toolbar 2020-06-26 15:26:51 +02:00
65f07a39b5 Refactor: use new api for lib linking sound, text, camera, light, latt and mball 2020-06-26 15:24:20 +02:00
9ec6b69ed1 Refactor: use new api for lib linking movieclip, world, lightprobe, speaker, paint curve and brush 2020-06-26 15:05:25 +02:00
1ce2457551 Refactor: use new api for lib linking linestyle, object, nodetree and action 2020-06-26 14:52:57 +02:00
0e75aa44fb Fix T78304: Scaling without a constraint axis shows wrong parameters in Adjust Last operator panel
Caused by {rB600fd1c6f0ed}
2020-06-26 09:14:51 -03:00
25eb0c9cf4 Fix T78151: Vertex/Edge Slide after enabling 'Even' doesn't cancel properly
Problem introduced by rBcf42721f
2020-06-26 09:14:51 -03:00
ede6e739dd Refactor: use new api for lib linking collection, scene and workspaces 2020-06-26 13:56:27 +02:00
e707ed43ef Build: show helpful error when accidentally using GNUMakefile on Windows 2020-06-26 11:55:34 +02:00
e1da4f09fc Fixed typo in previous commit (UV fix); had nonsensical self-test. 2020-06-26 07:35:50 -04:00
8b119a5524 Fix T76996: Don't allow baking when domain is not in object mode
This does not work, because the fluid modifier is not called when the
object is e.g. in edit mode. Another possible fix would be to switch
to object mode when baking starts automatically. However, I think it
is reasonable to simply not allow baking while the domain is in edit mode.

Reviewers: sebbas

Differential Revision: https://developer.blender.org/D7848
2020-06-26 13:29:15 +02:00
da2e71be2f Fix T78310: tweak layout in denoising panel to have more spacing 2020-06-26 13:19:34 +02:00
74c49492c2 Cycles: add experimental preference to replace magic debug value 256
Previously you'd have to run with --debug-value 256, now just make it
a preference so the Debug panel can be always available for developers.
2020-06-26 13:19:34 +02:00
d865ad59fc Cleanup: Depsgraph, remove unused Base * parameter
The `Base *` parameter of `DepsgraphRelationBuilder::build_object()` was
made redundant by c7694185c9. This commit actually removes it.

No functional changes.
2020-06-26 12:56:33 +02:00
e3a420c477 Fix T76199 Bevel materials "bleed" over faces.
When there is an odd number of segments, bevel has an ambiguous
choice as to which side face to use to copy face attributes from
and to use for UV (and other loops that have math function) interpolation.
We used to make choice arbitrarily, which led to visually inconsistent
results. Now there is tie-breaking code, face with lexicographic lowest
value in vector with these elements:
  (1) connected component (in math-layer space) id
  (2) selected (0) vs unselected (1)
  (3) material index
  (4,5,6): z,x,y components of face center, in that order.
2020-06-26 06:43:01 -04:00
c7694185c9 Fix T78071: Drivers reading object visibility not updating automatically
A driver reading `Object.hide_viewport` would break when that object was
hidden. Hidden objects don't have the `OBJECT_BASE_FLAGS` node in the
depsgraph, but that node was required for the driver to work.

Now the `OBJECT_FROM_LAYER` component (which optionally contains the
`OBJECT_FROM_LAYER` node) has explicit `ENTRY` and `EXIT` nodes, which
are used for relations with other components. These relations now remain
valid, even when the `OBJECT_FROM_LAYER` node is absent.

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

Reviewed By: sergey
2020-06-26 12:34:38 +02:00
2a72421cfb Fix error when filtering in Outliner "Blender File" mode with libraries
Steps to reproduce were:
* Load factory settings
* Link any library
* Change to "Blender File" display mode in Outliner
* Enable filtering
* -> Assert fails

This may have had further side-effects for linked IDs.
Checked with Bastien, the NULL-check seems reasonable. It was initially there
but removed in d74f9c4b7b.

Fine to backport.
2020-06-26 12:30:59 +02:00
2036b9771e Fluid: Fix typos from OpenVDB update
Some typos that were not noticed in 9951858942.
2020-06-26 11:48:02 +02:00
646ef49e19 Cleanup: use percentage formatting
`str.format` and `f-string` use was minimal.
Prefer using a single style of string formatting
unless an alternative is more widely adopted.
2020-06-26 12:33:19 +10:00
2db4a81fe4 deps: Fix build issue with USD on windows.
When doing a release build the TBB debug libs are not
set which was causing an error during the configure
phase of USD, so always set them even if not used.
2020-06-25 18:50:28 -06:00
c9d94c2aba Fix T71539 EEVEE: Still redraw during playback when it shouldn't 2020-06-26 01:36:44 +02:00
46815753cf Fix T78237 UI: NLA colors black and broken
This was caused by missing GL blend. This patch also fix the broken
strip appearance under timeline zoom.
2020-06-26 01:27:36 +02:00
62aa103d48 Fix for T78191: Timeline lines changing thickness
Fixes issue where lines in timeline are sometimes double-width when hovering in area.

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

Reviewed by Brecht Van Lommel
2020-06-25 14:53:59 -07:00
af4e68357b UI: Slightly simplify box style panel margin offset
A small cleanup to use fewer if statements.
2020-06-25 16:16:29 -04:00
fd0d8c710b Fix T77878: Hard minimum for voxel size of the remesh modifier
This patch fixes T77878 in the same way that T72747 was fixed.
A hard minimum for the voxel size was added to avoid an arithmetics error.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8027
2020-06-25 18:42:43 +02:00
31ad8bda74 Fix T77204: Mantaflow Initial velocity bugged?
Always initialize the particle velocity of newly sampled particles to 0 if there are no initial velocities. Clearing the grid source makes sure that new particles will get a 0 velocity - and not interpolated from the associated grid.
2020-06-25 18:03:08 +02:00
Cody Winchester
2dad5a9754 Fix: Displace Modifier UV Layer UI not a pointer
The displace modifier's uv_layer property should be a pointer in the new
UI like the other modifiers use.

Differential Revision: https://developer.blender.org/D7990
2020-06-25 11:57:06 -04:00
230b9eac69 Fix T70193 Overlay: Grid floor disappears for orthographic camera
The fix is to disable the fading for in the +Z direction in this case.
2020-06-25 18:01:47 +02:00
47ff54b008 GPencil: Ensure previous brush is set when change mode
In some situations, the previous brush is not set. This usually happens with previous version files.

Related to T78155.
2020-06-25 17:13:34 +02:00
495b0eff9a Fix T77285: Incorrect Mantaflow fluid border interaction when collision is turned off
Incorrect boolean for 'open' domain borders.
2020-06-25 16:49:47 +02:00
b77fc70d13 Cleanup: Don't use "Use" in boolean names 2020-06-25 16:38:50 +02:00
dd9c0dbf5e Experimental Features: Use different "categories" for different features
Right now not all the features available there have the same level of
polishing. So I split the existing options in:

* New Features [Particles Nodes]
* Prototypes [Hair]
* Debugging [Undo]

Differential Revision: https://developer.blender.org/D8121
2020-06-25 16:33:19 +02:00
79c2581bfa Fix T78238: issue loading existing .blend files with Optix viewport denoiser
Also add additional validation to ensure the denoiser is supported before
trying to use it.
2020-06-25 15:39:10 +02:00
2b9ac1de49 Fix incorrect Python API description for bpy.data.version
Ref T76058
2020-06-25 15:39:10 +02:00
d0693c160a Revert "Fix T78071: Drivers reading object visibility not updating automatically"
This reverts commit baa0da3e69.

The commit causes some issues I didn't foresee, I'd rather take the time
to do it properly than hastily try and commit a fix for it.
2020-06-25 15:18:59 +02:00
fd5c185beb Cleanup: spelling 2020-06-25 23:14:36 +10:00
baa0da3e69 Fix T78071: Drivers reading object visibility not updating automatically
An object can be targeted by a driver that reads its `hide_viewport` or
`hide_render` property. The existence of such a driver will create a
relation between the 'sync base flags' depsgrpah node, and the datablock
containing the driver. When the object is hidden, however, it has no
base, and thus it had no 'sync base flags' depsgraph node. To support
such a driver, that depsgraph node is now always added, but for hidden
objects it will just be a no-op. If the node is not used by anything, it
will be automatically disconnected and have a negligible effect on
performance.
2020-06-25 14:33:56 +02:00
8903368490 Cycles: add support for rendering sculpt vertex colors
Ref T78041
2020-06-25 13:54:05 +02:00
d69bb06db8 Build: remove unused lapack/hidapi/mingw32 build infrastructure
Ref T76184
2020-06-25 13:15:55 +02:00
d3283ef121 Build: upgrade OpenImageDenoise to 1.2.1
This requires ISPC for building OpenImageDenoise, so that is now added as
a dependency as well. Blender itself does not need ISPC for building so it
is not included as part of the precompiled libraries.

Differential Revision: https://developer.blender.org/D7641
2020-06-25 13:00:58 +02:00
6431b11381 Build: upgrade a few smaller Linux/macOS only libraries to latest versions
* jemalloc 5.2.1
* xml2 2.9.10
* bzip2 1.0.8
* ffi 3.3
* lzma 5.2.5
* ssl 1.1.1g
* sqlite 3.31.1

Ref T78252
2020-06-25 13:00:58 +02:00
b30df982d2 Fix viewport denoising not working if start samples higher than total samples 2020-06-25 13:00:58 +02:00
64a584b38a Python API: add methods to allow copying of constraints.
Blender has an operator to do Copy & Paste of constraints between
objects and bones, but no simple method to do that directly via
the Python API is provided. This adds a copy() method to object
and pose bone constraint collections.

Differential Revision: https://developer.blender.org/D8112
2020-06-25 12:10:18 +03:00
6b53e0adbc Better fix for crash ( with gpu only ) on render end/abort introduced in 0dced1a 2020-06-25 11:06:56 +02:00
cdb69c20e1 Cleanup: spelling 2020-06-25 16:57:52 +10:00
0c4f4de23b Edit Mesh: minor drawing optimization extracting loop data
Gives around ~5% speedup on high poly meshes.
2020-06-25 16:57:52 +10:00
bcc086584f Fix unreported 1 pixel offset when drawing with GPencil
This bug was introduced in d82c3d8615

Reviewers: @fclem
2020-06-25 08:17:23 +02:00
ec776f18ff Fix crashing on render end/abort introduced in 0dced1a 2020-06-24 23:51:57 +02:00
eace5903cb Fix T67741 EEVEE: World update don't update lightcache if one viewport uses lookdev
Just a matter of not clearing the updating flag in this case.
2020-06-24 22:12:09 +02:00
2ad8e16c2d Fix T78215 EEVEE: incorrect Render Passes results when using motion blur
This was caused by a missing DRWPass initialization.

Now we create the passes for every timestep but avoid clearing the
buffer after the first sample.
2020-06-24 21:34:29 +02:00
0dced1af34 Fix T78149: Cycles memory leak rendering animation with Embree 2020-06-24 18:48:16 +02:00
b468023aa1 VR: Properly support outputting sRGB swapchain buffers
Latest SteamVR OpenXR updates brought OpenGL support, but only with sRGB
buffers. I think for DirectX it's the same now.
It's not a big issue for us to use sRGB buffers, so that's what I will
do for now. That way we shouldn't need hardcoded exceptions for specific
runtimes that don't transform linear buffers correctly.
2020-06-24 18:42:53 +02:00
5cfbc722d0 Fix T78047: Fix failing denoiser tests on windows
When we switched to MSVC2019 and C++17 we seemingly
managed to trigger a code-gen bug with MSVC in the
AVX code-path.

This change works around the issue by (hopefully
temporary) disabling the optimizer for the fast_exp2f4
function, given it is only used in a single pass
of the denoiser and nowhere else, this is luckily
not as bad as it could have been.

Once the compiler is fixed or a different fix is
available we'll have to revisit this.

Details and link to the repro posted to MS is
available in T78047
2020-06-24 10:42:00 -06:00
c2ab069dfc Fluid: Use OpenVDB as the default cache format for liquids too
With the updated OpenVDB setup, it is now perfectly fine to use OpenVDB for liquid domains.
2020-06-24 18:38:56 +02:00
ac0852cea0 Fluid: Fix OpenVDB compiler warnings
Kudos to brecht for noticing the issue
2020-06-24 18:36:42 +02:00
ba380fc0bf Fix T78213: Windows 10 Build Errors: Extern_Manaflow error messages
Kudos to LazyDodo for figuring this out
2020-06-24 18:01:34 +02:00
baff05ad1c UI: Add Free Handle Types to CurveProfile Widget
Under the hood the CurveProfile widget (used for bevel custom profiles)
uses a bezier curve, but right now though it only supports two of the
bezier curve handle types, vector and auto. This patch adds support for
free handles and adds all of the logic for editing them.

This is the first step to the ability to import and export curve objects
in the widget.

There's some code cleanup in curveprofile.c. Movement for handles and
control points is abstracted to functions there rather than happening
in interface_handlers.c.

An "Apply Preset" button is also added, which solves a confusing issue
where you apply a preset, then change the number of samples and the
preset doesn't change. The button makes it clear that the preset needs
to be reapplied.

Reviewed By: Severin

Differential Revision: https://developer.blender.org/D6470
2020-06-24 11:50:01 -04:00
ec7510b458 Fix T67319 DRW: Large objects gets incorrectly culled
To avoid this we just bypass culling if the object is too big to avoid
float precision issues.
2020-06-24 17:44:57 +02:00
560a73610b Fix artifact in Clay Strips when producing large deformations
The clay strips brush tip tests distances against a cube with beveled Z
aligned edges. This cube was positioned with its center in the surface
of the mesh, so when producing large deformation, some vertices that
should be deformed were positioned further than the cube's Z dimension,
so they were left behind, producing artifacts.
This displaces and deforms the local space to position the brush tip
cube (now a prism) towards the deformation direction, so more vertices
can be included, removing most of these artifacts.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8004
2020-06-24 17:29:58 +02:00
255638d223 Fix Surface Smooth not taking the sculpt mask into account
The sculpt mask was hardcoded to 0.0

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8071
2020-06-24 17:28:51 +02:00
2b522e3345 Fix T78188: Sculpt mask glitching after using sculpt vertex colors
The face sets color copy to the GPU was done outside of the loop,
probably after a merge error in a rebase.

Also, the default color was initialized using the wrong type.

Reviewed By: sergey

Maniphest Tasks: T78188

Differential Revision: https://developer.blender.org/D8106
2020-06-24 17:27:53 +02:00
0f7851ee79 Fix T78192: Draw Face Sets tool not updating the viewport color
The draw face set tool always needs to redraw the nodes, but it only
needs the full update when in smooth mode because it moves the vertices.

Reviewed By: sergey

Maniphest Tasks: T78192

Differential Revision: https://developer.blender.org/D8108
2020-06-24 17:27:01 +02:00
b4e1571d0b Cleanup: compiler warnings 2020-06-24 17:25:44 +02:00
c78b831e69 Fix T78073 EEVEE: new motion blur and overscan produce wrong render
This was caused by the override viewport size not being maintained after
DRW_cache_restart().

Also this fixes issue with the inv_size not being updated correctly.
2020-06-24 17:22:31 +02:00
e761d0bdc9 Fix T78080: group node has incorrect sockets after changing group
It was only checking for the identifier, but the type has to be equivalent as well.

Reviewers: mano-wii, brecht

Differential Revision: https://developer.blender.org/D8101
2020-06-24 16:53:46 +02:00
ff0df7c546 UI: Add Extrude Manifold Icon
Differential Revision: https://developer.blender.org/D8016
2020-06-24 11:32:06 -03:00
9951858942 Fluid: Improved OpenVDB support for fluid caches
This commit makes uses of the new OpenVDB IO in Mantaflow (introduced in 781f783a66ac).

From now on, fluid cache files in OpenVDB format will contain a list of grids per frame (before: one .vdb file per grid per frame). Besides regular grids, particle systems are also stored using OpenVDBs PointGrid data structures.

All older cache formats will remain fully functional:
- Uni caches (.uni) files are still available from the UI and can be used as before
- Raw caches (.raw) are no longer available from the UI, but loading them is still possible
- Old OpenVDB caches (one .vdb per grid) can no longer be baked either, but loading them is still possible.

It is also no longer possible to choose file formats for 'Noise' and 'Particles'. Instead there are now options to set the file format for 'Volumetric' and for 'Mesh' data.

Known issues (planned to be resolved soon):
- OpenVDB files are currently not taking into consideration the clipping value (FluidDomainSettings). Empty cells are therefore being written too. Depending on the scene, this can make file sizes unnecessarily large.
- Domains are not being exported at their world position. Instead they are always clipped to the origin.
2020-06-24 16:07:35 +02:00
9fe64948ab Fluid: Updated Mantaflow source with latest OpenVDB changes
This updated set of Mantaflow files includes the improved  OpenVDB file IO. With this update it is finally possible to store multiple grids per file. It is also possible to save particle systems and particle data to OpenVDB files.
2020-06-24 16:07:35 +02:00
6fec2e4db0 Cleanup: fix typo in denoiser menu 2020-06-24 16:01:47 +02:00
d645525dae Fix missing WITH_CYCLES_EMBREE in the build configurations 2020-06-24 15:51:08 +02:00
3cfb687b55 Cleanup: make it possible to include util_tbb.h in any order 2020-06-24 15:28:00 +02:00
23b5e10dbd Fix T78112: VSE Sequencer/Preview crash after fullscreen
The region refresh callback wasn't called, which in the VSE ensures valid
region sizes and removes handlers of invisible regions.
2020-06-24 15:22:01 +02:00
669befdfbe Cycles: add Intel OpenImageDenoise support for viewport denoising
Compared to Optix denoise, this is usually slower since there is no GPU
acceleration. Some optimizations may still be possible, in avoid copies
to the GPU and/or denoising less often.

The main thing is that this adds viewport denoising support for computers
without an NVIDIA GPU (as long as the CPU supports SSE 4.1, which is nearly
all of them).

Ref T76259
2020-06-24 15:17:36 +02:00
0a3bde6300 Cycles: add denoising settings to the render properties
Enabling render and viewport denoising is now both done from the render
properties. View layers still can individually be enabled/disabled for
denoising and have their own denoising parameters.

Note that the denoising engine also affects how denoising data passes are
output even if no denoising happens on the render itself, to make the passes
compatible with the engine.

This includes internal refactoring for how denoising parameters are passed
along, trying to avoid code duplication and unclear naming.

Ref T76259
2020-06-24 15:17:36 +02:00
88157b9efb Python API: support integer default for bpy.props.EnumProperty
This must match the specified number in enum items, and is supported for both
static and dynamic enums. Previously dynamic enums did not support a default
value at all.
2020-06-24 15:17:36 +02:00
073ab4703e Fix build error on Windows after recent changes 2020-06-24 15:17:36 +02:00
756e664e4f Fix T77913: Incorrect handling of negative-scale bit in DRWResourceHandle
Reviewers: fclem

Differential Revision: https://developer.blender.org/D8103
2020-06-24 14:42:46 +02:00
e59712b7c8 Sculpt: rename default vertex color layer name from Col to Color
No need for abbreviation here, and helps avoid conflicts with old vertex
color layers.

Ref T76659
2020-06-24 14:32:06 +02:00
e389c05410 Cleanup: move TBB includes into own header 2020-06-24 14:32:06 +02:00
a6c59863d3 EEVEE: Fix crash when using motion blur without postfx blur 2020-06-24 14:27:47 +02:00
dd328be0f0 Fix memory leak calculating deform modifiers in edit-mode
This bug goes back to 2.80 but doesn't seem to have been reported.
2020-06-24 22:13:27 +10:00
074929d1c5 MEM_guardedalloc: allow freeing const arrays with MEM_SAFE_FREE
'const' arrays couldn't use this macro with GNUC.
2020-06-24 22:13:27 +10:00
9b3dfbe651 Fix T77672 EEVEE: Reflections with reflection plane broken (regression) 2020-06-24 13:50:20 +02:00
be0622533d Fix T78190 EEVEE: Render passes broken in final render
This was caused by the step motion blur implementation.
`DRW_cache_restart` was reseting the cache and cause
`EEVEE_renderpasses_postprocess` to not work inside
`EEVEE_render_read_result`.
2020-06-24 13:23:43 +02:00
6f5a9dd8de Fix T78172: Undo crash due to IDTemplate operations missing undo push.
This should be included in 2.83 as well.
2020-06-24 12:51:08 +02:00
5c8e349c28 Cleanup: Replace GSet with Edgeset in Cloth Brush 2020-06-24 15:31:10 +10:00
d295261330 Text: add replace all operator
D8032 by @Poulpator with minor edits
2020-06-24 15:00:12 +10:00
be8f2c698e Cleanup: redundant self assignment 2020-06-24 14:30:18 +10:00
1daaac75b5 Cleanup: clang-format 2020-06-24 14:23:54 +10:00
31dd80e0de Cleanup: unused struct members 2020-06-24 14:19:25 +10:00
a9e5e58e16 Cleanup: unused functions 2020-06-24 14:19:24 +10:00
5b9bb688e7 UI: ShaderFX: Manually add X/Z labels for rim lighting
These need to be labeled manually  because offset is a #PROP_PIXEL.

Matches other changes made in rBbb4cef71eeaf36aa61187d47b8a8ae06ba55f7c0
2020-06-23 19:21:06 -04:00
49234c15e2 UI: Cycles: Use Title Case 2020-06-23 17:54:09 -04:00
c26abd1c29 Fix T66934 Overlay: "Outline Selected" overlay doesnt affect armatures
This is a really small fix. Could be included in 2.83 LTS branch.
2020-06-23 23:45:46 +02:00
b0449cac66 API Docs: Small edits to recent commit
- Revert string formatting change
- Add missing text edit
2020-06-23 17:10:07 -04:00
d82c3d8615 Fix T62961 EEVEE: Viewport refresh when hovering widgets
We now bypass EEVEE's rendering if the TAA accumulation has ended.
2020-06-23 22:59:55 +02:00
5fbbe1fca9 UI: Remove unnecessary ellipsis 2020-06-23 16:56:37 -04:00
65006bfaf4 Snapping: Snap to the origin of Light and Camera objects
I see no reason to ignore them.
This is not a limitation.
2020-06-23 16:18:01 -03:00
ede1a247d8 Fix camera snapping in camera View
The `T_CAMERA` flag was being set in the wrong place.
2020-06-23 16:14:06 -03:00
11a390e85e GPencil: Implement antialiasing parameter to Pixel FX
Related to T78153

Differential Revision: https://developer.blender.org/D8100
2020-06-23 19:20:02 +02:00
f3a8192ef7 Refactor: use new api for lib linking mask, windowmanager and screen
This is part of T76372.
2020-06-23 17:55:23 +02:00
2dd60e6c2c Fix T77830: Crash in VR session when opening material preview
Draw-manager mutex has to be set before activating OpenGL/GPU context.
Otherwise, parallel jobs (like preview rendering) may try to activate
the context from another thread.

Also: Use WM wrappers for activating/releasing OpenGL context, which
have an additional assert check.

Suggest to backport this for 2.83.1.
2020-06-23 17:28:53 +02:00
1e0426da7c Refactor: move more modifier specific code out of readfile.c 2020-06-23 17:25:44 +02:00
9ef5cc44a6 Refactor: move blenloader code of bevel modifier 2020-06-23 17:08:39 +02:00
56f9529775 Refactor: move blenloader code of curve profile to blenkernel 2020-06-23 17:08:39 +02:00
f345625ded Fix T77712: Crash on proxied rig, custom bone shape, driver targeting rig
It turns out that
`DepsgraphNodeBuilder::build_object_data_geometry(Object *object, bool
is_object_visible)` was called for the custom shape with
`is_object_visible=false` when there are drivers, and
`is_object_visible=true` when there aren't any.
2020-06-23 17:03:36 +02:00
adcb7a2ce7 Refactor: move blenloader code of surface deform modifier 2020-06-23 16:51:43 +02:00
8b59b97c10 Refactor: move more blenloader code into modifier files 2020-06-23 16:42:08 +02:00
f7bbc7cdbb Sculpt Vertex Colors: Initial implementation
Sculpt Vertex Colors is a painting system that runs inside sculpt mode, reusing all its tools and optimizations. This provides much better performance, easier to maintain code and more advanced features (new brush engine, filters, symmetry options, masks and face sets compatibility...). This is also the initial step for future features like vertex painting in Multires and brushes that can sculpt and paint at the same time.

This commit includes:
  - SCULPT_UNDO_COLOR for undo support in sculpt mode
  - SCULPT_UPDATE_COLOR and PBVH flags and rendering
  - Sculpt Color API functions
  - Sculpt capability for sculpt tools (only enabled in the Paint Brush for now)
  - Rendering support in workbench (default to Sculpt Vertex Colors except in Vertex Paint)
  - Conversion operator between MPropCol (Sculpt Vertex Colors) and MLoopCol (Vertex Paint)
  - Remesher reprojection in the Voxel Remehser
  - Paint Brush and Smear Brush with color smoothing in alt-smooth mode
  - Parameters for the new brush engine (density, opacity, flow, wet paint mixing, tip scale) implemented in Sculpt Vertex Colors
  - Color Filter
  - Color picker (uses S shortcut, replaces smooth)
  - Color selector in the top bar

Reviewed By: brecht

Maniphest Tasks: T72866

Differential Revision: https://developer.blender.org/D5975
2020-06-23 16:28:50 +02:00
27972c4225 UI: Don't expand bevel active tool setting 2020-06-23 10:16:28 -04:00
4284ddefab Fix mistake in bevel versioning
Use the correct modifier struct name
2020-06-23 10:07:22 -04:00
bab2b02507 Cleanup: style, raw multi-line string sphinx updater 2020-06-23 23:32:47 +10:00
6d639a606c Docs: quiet deprecation warning, add missing context members 2020-06-23 23:32:36 +10:00
Tobias Heinke
23f8ab4250 API docs: intro overhaul
- Update terminology, spelling, formatting.
- Rename screen to workspace.
- Update for 2.8 UI changes.
2020-06-23 23:13:10 +10:00
Jeroen Bakker
0aa7c11788 Fix T77803: IK Degrees of freedom drawing glitch
Forgot to update the lineOutput what resulted in that the sphere was not
rendered on all platforms.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D8098
2020-06-23 14:51:15 +02:00
Jeroen Bakker
8f97a64dec Fix T77893: Crash drawmanager threading custom data
Tangent normals were temporarily saved in the original given layers but
the typeinfo wasn't updated. This lead to several issues since we
changed the threading of the mesh extraction.

This patch stores the tangent normals in a temporary custom data on the
stack this way the typemap doesn't need to be updated.

Still need to run the tests for an hour to see if it is fixed

Reviewed By: Clément Foucault, Philipp Oeser

Differential Revision: https://developer.blender.org/D8095
2020-06-23 14:33:26 +02:00
439b40e601 EEVEE: Motion Blur: Add accumulation motion blur for better precision
This revisit the render pipeline to support time slicing for better motion
blur.

We support accumulation with or without the Post-process motion blur.

If using the post-process, we reuse last step next motion data to avoid
another scene reevaluation.

This also adds support for hair motion blur which is handled in a similar
way as mesh motion blur.

The total number of samples is distributed evenly accross all timesteps to
avoid sampling weighting issues. For this reason, the sample count is
(internally) rounded up to the next multiple of the step count.

Only FX Motion BLur: {F8632258}

FX Motion Blur + 4 time steps: {F8632260}

FX Motion Blur + 32 time steps: {F8632261}

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D8079
2020-06-23 14:04:41 +02:00
Jeroen Bakker
cc3e808ab4 Animation: Only update timeline header during playback
The header of all SPACE_ACTIONs are tagged for redraw. Only when the
action editor is showing the timeline it is needed. No noticeable
performance increase. But better to save some CPU cycles.

Reviewed By: Sybren Stüvel

Differential Revision: https://developer.blender.org/D8074
2020-06-23 13:19:45 +02:00
072a224a28 Cleanup: remove some dead code 2020-06-23 12:23:46 +02:00
ef8aca65d8 Cleanup: renamed do_draw_overlay to do_draw_paintcursor
To make a better distinction with region overlay.
2020-06-23 12:07:50 +02:00
Jeroen Bakker
bbb2e0614f Performance: Draw play head as an overlay
When playing back animations a playhead is updated in all the animation editors.
The drawing of the playhead is part of the drawing of the main region
`RGN_TYPE_WINDOW` that redraws the whole region.

This change will draw the play head and window scrollers when updating the
screen. This affects the Action editor, Timeline, Graph editor, NLA editor and
Sequence editor. There is noticeable speedup when using complex animation files.

Spring 02_020_A.anim.blend fps went from 11.8 to 12.5 when showing a timeline
and a action editor on a Ryzen 1700.

* When playing back animation the markers don't jump up/down when near the
  frame. This could be added back.

Reviewed By: Brecht van Lommel

Differential Revision: https://developer.blender.org/D8066
2020-06-23 12:03:17 +02:00
87ceff3d1b Preferences: New experimental settings for particle system and hair
This replaces the cmake options `WITH_NEW_OBJECT_TYPES` and
`WITH_NEW_SIMULATION_TYPE` with two experimental userpref settings:

* `use_new_particle_system`: Enables the point cloud type and the simulation editor.
* `use_new_hair_type`: Only displays the add-operator in the add menu for now.

Note, in the current state you can't do anything productive with the new particle
system or the new hair type. Features will be added step by step in the upcoming
weeks and months.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D8096
2020-06-23 11:30:46 +02:00
13a5b954c3 Cleanup: USD, move code from USD to blender::io::usd namespace
No functional changes.
2020-06-23 11:07:52 +02:00
309cfbceaa Transform: default to median center instead of bounds
When neither bounds or median is selected, snapping the cursor to
the selection was using bounds which often doesn't give useful results.

Resolves T78135
2020-06-23 18:35:06 +10:00
3a3708cefb Functions: Multi Function Network
A multi-function network is a graph data structure, where nodes are
multi-functions (or dummies) and links represent data flow.
New multi-functions can be derived from such a network. For that
one just has to specify two sets of sockets in the network that
represent the inputs and outputs of the new function.

It is possible to do optimizations like constant folding on this
data structure, but that is not implemented in this patch yet.

In a next step, user generated node trees are converted into a
MFNetwork, so that they can be evaluated efficiently for many particles.

This patch also includes some tests that cover the majority of the code.
However, this seems to be the kind of code that is best tested by some
.blend files. Building graph structures in code is possible, but is
not easy to understand afterwards.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D8049
2020-06-23 10:16:14 +02:00
Yevgeny Makarov
c24b1c060d Fix T77743: Number pad key-map items missing from search 2020-06-23 17:55:36 +10:00
4040cb438f Cleanup: use doxy sections for BLI read/write headers
Add reference between the read/write functions too.
2020-06-23 16:38:52 +10:00
ed68fee665 Fix T78146: Crash using scroll bars
Regression in 2fdca5bd19
2020-06-23 15:22:59 +10:00
374e412813 Correct recent 'name' -> 'filepath' rename (missed Collada) 2020-06-23 14:58:38 +10:00
3f6f89a06b Cleanup: move text.c comments to the struct/flag declarations
Also update/correct some of the comments.
2020-06-23 14:09:13 +10:00
3f89322f08 Cleanup: remove Text.nlines
This isn't needed and wasn't properly updated when new-lines were added.
2020-06-23 13:48:19 +10:00
bdb49890cb Cleanup: use static sets instead of tuples 2020-06-23 13:30:21 +10:00
fd65055b69 Cleanup: A few small comment & naming changes in bevel 2020-06-22 22:41:02 -04:00
6703c7f7f1 Bevel: Refactor profile type input to use an enum
This will allow the easier addition of a constant radius mode in the
future and some changes in the UI to mirror the recent similar change
from "Only Vertices" to the "Affect" enum.
2020-06-22 22:25:55 -04:00
716a8241d3 Cleanup: rename 'name' to 'filepath' for DNA types
Using 'name' for the full path of a file reads badly,
especially when id.name is used in related code.
2020-06-23 11:29:36 +10:00
a573d7e8a1 Cleanup: rename Library.filepath to filepath_abs
Make it clear that this is the absolute path,
allow the 'name' to be renamed to 'filepath'.

Rename is safe since this is only for run-time.
2020-06-23 11:22:30 +10:00
58f3fabb97 Cleanup: unused argument 2020-06-23 09:53:11 +10:00
51bf04383a Fix T78045: CTL-ALT-S does nothing in pose mode and crashes when called from the menu 2020-06-22 19:06:24 -03:00
Jeroen Bakker
2fdca5bd19 Refactoring: View2DScrollers memory allocation
View2DScrollers used the memory manager to allocate memory. This isn't a
problem but in a upcoming change the scrollers will be drawn more often
than it used to (See {D8066}). To limit the number of allocations and
frees this patch will use the stack for allocation.

Reviewed By: Campbell Barton

Differential Revision: https://developer.blender.org/D8076
2020-06-22 21:46:04 +02:00
9335daac2a Trasnform: Support for other snapping types on Edge Slide
This completes T66426.

Since Vert Slide supports these other snapping types (since rBe2fc9a88bc),
it would be easy to miss this on Edge Slide.

So add support for Edge Slide too.
2020-06-22 15:28:38 -03:00
73d3f51c16 Fix T78136: Image editor - crash to desktop with changing the threshold for extract palette
Also fixed the same error in generate GPencil object from image.

The problem was the Render Result image hasn't  ibuf.
2020-06-22 20:06:43 +02:00
15dda0115c UI: Widget: Replace geometry by fragment shader drawing
This means all the antiailasing is done inside the fragment shader.

We use a Signed Distance Field to draw the 2D rounded boxes. This ensure
the best quality for AA.

This reduce the averge Batch for widget to 16 verts instead of ~600 and
reduce overshading a lot.

Theme Emboss alpha and tria alpha needs to be changed after this refactor.

The shadow drawing is left unchanged and still use geometry.

Reviewed By: Severin

Differential Revision: https://developer.blender.org/D7833
2020-06-22 19:57:53 +02:00
3cea42ce29 GPencil: Cleanup comments 2020-06-22 19:27:58 +02:00
9fbbd25e2a Fix T78134: GPencil interpolation crash
Need to verify active frame not NULL.
2020-06-22 19:09:11 +02:00
25d2222c30 Fix T77754: Crash after any alembic import undo in an empty scene
Thanks @mont29 for this patch.

This creates an explicit undo step after the Alembic importer has finished
running. This is necessary when the importer runs as a background job.
2020-06-22 18:10:42 +02:00
fdfe85c616 Fix: Wrong fake user icons in outliner orphan mode
The icons for toggling fake users on orphan datablocks in the outliner
were drawn as the quit and x icons instead of the fake user icon. This
changes to the correct icon, and removes the redundant "F" column.
2020-06-22 09:41:54 -06:00
bfaa41c00d UV Editor: Fix Vertex Overlay color not being color managed
Could be backported to 2.83 LTS
2020-06-22 17:31:51 +02:00
336a8f283f Fix T62917 UV editor: Edge overlay not shown when edge overlay type is Dash
Fix by changing the shader to always compute dash for uv and just change
dash size to something really big for other overlay types.
2020-06-22 17:31:51 +02:00
b175bb2503 Subdiv CCG: Add access to first grid index of a face
Is lazily-initialized array owned by the SubdivCCG. Allows to access
index of a first grid of a given face in the flat array of grids.

Currently unused, but is needed for multires bake.
2020-06-22 17:22:53 +02:00
41158a91f2 Fix (unreported) broken UI of modifiers for liboverrides.
Broken in recent refactor of modifiers UI code...
2020-06-22 16:54:30 +02:00
461ba2c74c Fix random crash in Cycles smoke volume loading
Don't access evaluated mesh data after freeing Blender depsgraph.

Potentially related to T77954.
2020-06-22 16:53:09 +02:00
4a68bf2078 Subdiv: Cleanup, remove unused code 2020-06-22 16:39:04 +02:00
c94a1f5349 Functions: add utilities that allow creating some multi-functions with less typing 2020-06-22 15:50:31 +02:00
6223385043 Functions: Various improvements to the spans and generic data structures
Most of this code is covered by unit tests.
2020-06-22 15:50:31 +02:00
7117ed9691 Fix Preferences not saved when changing translation settings 2020-06-22 15:47:05 +02:00
5726dec0e0 UI: Fix untranslated layout headings 2020-06-22 15:09:54 +02:00
6c76a782e9 UI/BPY: Make layout headings translatable from BPY
This was an oversight when layout headings were added. There's now the regular
translation context option in the Python API.
2020-06-22 15:09:54 +02:00
b0de36a5a3 Fix constraint alignment check on snap axis to plane 2020-06-22 09:53:33 -03:00
508e33842b Tools: rename 'Extrude, Dissolve and Intersect' to 'Extrude Manifold' 2020-06-22 09:20:43 -03:00
e2fc9a88bc Transform: Full snapping support for Vert Slide
Now all options for "snap to" affect the Vert Slide mode.

Reviewed By: campbellbarton

Maniphest Tasks: T66426

Differential Revision: https://developer.blender.org/D3440
2020-06-22 09:08:02 -03:00
85c6f0b472 LibOverride: Add CacheFile properties as overridable. 2020-06-22 14:03:39 +02:00
Damien Picard
961fa2251e External Player: update DJV to version 2 2020-06-22 21:34:56 +10:00
c877c3b8f6 Cleanup: remove workaround for boost 1.46
Part of D8055 by @pioverfour
2020-06-22 21:34:56 +10:00
3d570f7e1f Cleanup: remove blender 2.4 reference in animation playback 2020-06-22 21:34:56 +10:00
99436acde8 Cycles: enable Embree by default for CPU rendering
For GPU debugging purposes, it is still possible to render with the same BVH2
on the CPU using the Debug panel in the render properties.

Note that building Blender without Embree will now lead to significantly reduced
performance in CPU rendering, and a few of the Cycles regression tests will fail
due to small pixel differences.

Ref T73778

Depends on D8014

Maniphest Tasks: T73778

Differential Revision: https://developer.blender.org/D8015
2020-06-22 13:28:01 +02:00
2c41c8e94f Cycles: internal refactoring to make thick/ribbon curve separate primitives
Also removing the curve system manager which only stored a few curve intersection
settings. These are all changes towards making shape and subdivision settings
per-object instead of per-scene, but there is more work to do here.

Ref T73778

Depends on D8013

Maniphest Tasks: T73778

Differential Revision: https://developer.blender.org/D8014
2020-06-22 13:28:01 +02:00
207338bb58 Cycles: port curve-ray intersection from Embree for use in Cycles GPU
This keeps render results compatible for combined CPU + GPU rendering.
Peformance and quality primitives is quite different than before. There
are now two options:

* Rounded Ribbon: render hair as flat ribbon with (fake) rounded normals, for
  fast rendering. Hair curves are subdivided with a fixed number of user
  specified subdivisions.

  This gives relatively good results, especially when used with the Principled
  Hair BSDF and hair viewed from a typical distance. There are artifacts when
  viewed closed up, though this was also the case with all previous primitives
  (but different ones).

* 3D Curve: render hair as 3D curve, for accurate results when viewing hair
  close up. This automatically subdivides the curve until it is smooth.

  This gives higher quality than any of the previous primitives, but does come
  at a performance cost and is somewhat slower than our previous Thick curves.

The main problem here is performance. For CPU and OpenCL rendering performance
seems usually quite close or better for similar quality results.

However for CUDA and Optix, performance of 3D curve intersection is problematic,
with e.g. 1.45x longer render time in Koro (though there is no equivalent quality
and rounded ribbons seem fine for that scene). Any help or ideas to optimize this
are welcome.

Ref T73778

Depends on D8012

Maniphest Tasks: T73778

Differential Revision: https://developer.blender.org/D8013
2020-06-22 13:28:01 +02:00
d1ef5146d7 Cycles: remove SIMD BVH optimizations, to be replaced by Embree
Ref T73778

Depends on D8011

Maniphest Tasks: T73778

Differential Revision: https://developer.blender.org/D8012
2020-06-22 13:28:01 +02:00
1de0e13af6 Cycles: remove __UV__ and __INSTANCING__ as kernel options
The kernel did not work correctly when these were disabled anyway. The
optimized BVH traversal for the no instances case was also only used on
the CPU, so no longer makes sense to keep.

Ref T73778

Depends on D8010

Maniphest Tasks: T73778

Differential Revision: https://developer.blender.org/D8011
2020-06-22 13:28:01 +02:00
fed101a7be Cycles: always perform backface culling for curve, remove option
The hair BSDFs are already designed to assume this, and disabling backface
culling would break them in some cases.

Ref T73778

Depends on D8009

Maniphest Tasks: T73778

Differential Revision: https://developer.blender.org/D8010
2020-06-22 13:28:01 +02:00
c7d940278b Cycles: remove support for rendering hair as triangle and lines
Triangles were very memory intensive. The only reason they were not removed yet
is that they gave more accurate results, but there will be an accurate 3D curve
primitive added for this.

Line rendering was always poor quality since the ends do not match up. To keep CPU
and GPU compatibility we just remove them entirely. They could be brought back if
an Embree compatible implementation is added, but it's not clear to me that there
is a use case for these that we'd consider important.

Ref T73778

Reviewers: #cycles

Subscribers:
2020-06-22 13:28:01 +02:00
e50f1ddc65 Cycles: use TBB for task pools and task scheduler
No significant performance improvement is expected, but it means we have a
single thread pool throughout Blender. And it should make adding more
parallellization in the future easier.

After previous refactoring commits this is basically a drop-in replacement.
One difference is that the task pool had a mechanism for scheduling tasks to
the front of the queue to minimize memory usage. TBB has a smarter algorithm
to balance depth-first and breadth-first scheduling of tasks and we assume that
removes the need to manually provide hints to the scheduler.

Fixes T77533
2020-06-22 13:27:37 +02:00
54e3487c9e Cleanup: remove task pool stop() and finished() 2020-06-22 13:06:47 +02:00
b10b7cdb43 Cleanup: use lambdas instead of functors for task pools, remove threadid 2020-06-22 13:06:47 +02:00
d8c2092b15 Cycles: make TBB a required library dependency, and use in a few places
Now that the rest of Blender also relies on TBB, no point in maintaining custom
code for paraller_for and thread local storage.
2020-06-22 13:06:47 +02:00
ace3268482 Cleanup: minor refactoring around DeviceTask 2020-06-22 13:06:47 +02:00
b7c34c889b Cleanup: use move semantics for task pool functions 2020-06-22 13:06:47 +02:00
f9d138be51 Cleanup: compiler warning 2020-06-22 13:06:47 +02:00
8ffb006077 Add undo step to Alembic and Collada importers...
Re T77754.
2020-06-22 13:06:16 +02:00
c309177edd Fix initialization of Edge Slide with Single Side
It was not being initialized.
Error introduced in cf42721fe2
2020-06-22 07:54:36 -03:00
ba97da21ac Transform: Simplify and rearrange mirror code
No real functional changes.
2020-06-22 07:54:36 -03:00
d6e07a7cd3 Transform: Do not compute island center when not used
No functional changes from the user's point of view.
2020-06-22 07:54:36 -03:00
5db1ae2605 Cleanup: Remove goto in transform_convert_mesh code 2020-06-22 07:54:36 -03:00
2d866d77ae Cleanup: Rearrange transform_convert_mesh into doxy sections 2020-06-22 07:54:36 -03:00
3752c44b44 GPencil: Remove Fill selection with Tweak tool and fix bug
* Fixed selection of point in multiframe mode. The point was not selected.

* Removed the fill area selection because makes the tool imprecise, and for this tool need to be precise or the selection is impossible. Now only select if it's over the point, not over the filled area.
2020-06-22 10:48:49 +02:00
566b4f126d Fix T78123: Can't remove preset with brackets in the name 2020-06-22 18:30:47 +10:00
26e5718e29 Fix T77942: Add Cube scales immediately upon creation after changing Size attribute on prior Add Cube command
Always use the default size here, since desired bounds have been set
interactively, it does not make sense to use a different size from a
previous command.

Maniphest Tasks: T77942

Differential Revision: https://developer.blender.org/D8056
2020-06-22 09:48:30 +02:00
Harley Acheson
19c7b5f45a Fix error using 'char32_t' as 'wchar_t' on windows
FONT_OT_text_insert failed on Windows.

This change was missing from D6198.
2020-06-22 17:13:36 +10:00
61fa710aa3 Fix T77536: Extrude to cursor keybinding missing
Regression in cec7db2004
2020-06-22 17:03:13 +10:00
f8c8a5c092 Fix T77607: Edit-mode shading regression 2.90
Regression in deaff945d0
2020-06-22 16:44:33 +10:00
9215b5d869 UI: report when reloading unsaved text
Address confusion from T78114.
2020-06-22 16:02:42 +10:00
56d0df51a3 Python: support building again version 3.9 (unreleased)
Resolves T78089, no functional changes.
2020-06-22 14:55:36 +10:00
f2b5f731d5 UI: Only show constaint head/tail property with subtarget 2020-06-21 10:55:16 -04:00
0de14fbe78 UI: Fix view reset when toggling subpanel expansion
The view should only reset for the ctrl-click mode that collapses
all other panels.
2020-06-21 10:47:37 -04:00
3fc5826f7c GPencil: Fix unreported missing material onion filter
This feature was removed by error during the refactor done in draw engine.

Differential Revision: https://developer.blender.org/D8082
2020-06-21 15:51:50 +02:00
91117cad0f GPencil: Change effect tooltips for new Shader operators
Instead to use ShaderFx, use Effect and also fixed some wrong cases using Modifier word.
2020-06-21 10:24:08 +02:00
b4ba27f026 UI: A few small fixes for constraint layouts
- Head / Tail was stuck on two rows. It seems there is an issue with
        headings here, which means the first property has to place its own
        label. (So for example the small button can't be first in the row.)
      - Some misalignment and decorator fixes for aligned toggles
2020-06-20 21:51:32 -04:00
a7f1c68938 Cleanup: Outliner walk select naming
No functional changes. Don't use walk_element now that the walk element
flag is removed.
2020-06-20 16:15:42 -06:00
8ce1a60262 Fix T71812: Outliner walk navigation not activating
Walk navigation used a separate flag to select the element. This is
because activation and mode toggling were connected until rB702e00f91088
cleaned up the selection logic.

Now walk navigation can activate objects and other elements without
changing modes. This also addresses renaming in the outliner which
did renaming from the active element, not the walk element.
2020-06-20 16:15:18 -06:00
2d9ab46e0b Fix T77328: Crash on undo Draw Face Sets stroke with dyntopo active
Draw Face Sets does not work in Dyntopo and the sculpt API should be
responsible for that without needing to add checks all over the code,
but it was doing an undo push of type SCULPT_UNDO_FACE_SETS which is not
supported, causing the crash.

Reviewed By: sergey

Maniphest Tasks: T77328

Differential Revision: https://developer.blender.org/D7924
2020-06-20 21:48:11 +02:00
bb58d3d8e2 GPencil: Fix unreported multiuser datablock for onion message
This is not logic after the refactor.
2020-06-20 19:54:44 +02:00
Philipp Oeser
d994391e0c Fix T77994: VSE crash adding a glow effect strip
Since rB47f98a38d0f8 not all 3 effect inputs were assigned anymore. Their
ImBuf's rect was accessed though in do_glow_effect (even though unused in
the following dedicated functions).

Just pass NULL here instead.

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D8064
2020-06-20 06:49:02 +02:00
73ffb3e067 Cleanup: use const args for property name/description access 2020-06-20 13:50:12 +10:00
d7152244f8 Fix T54112: curve.splines.new() ignores Curve.resolution_u/v 2020-06-20 13:17:40 +10:00
92c5b12df6 Fix T75074: Select Hierarchy error, when object is not on view layer 2020-06-20 12:50:24 +10:00
874af5301c Cleanup: Fix build-warning with MSVC
Draco sets CMAKE_CXX_STANDARD to 14, given we
set the c++ standard in the root level CMakeLists.txt
to c++17 this generated build warnings.

Given the rootlevel one is the one we want we can
safely remove this line in dracos cmakelists
2020-06-19 17:28:42 -06:00
466e716495 Bevel: add new 'Absolute' mode for interpreting 'amount' value.
This mode is like Percent, but measures absolute distance along
adjacent edges instead of a percentage.
So, for example, if you use this mode with 2 segments and profile=1,
you will see the length that the bevel moves along unbeveled edges
between beveled ones will match the value specified.
Many users seem to expect this behavior, even though it means the
bevel width is uneven, so this option is for them.
2020-06-19 17:56:01 -04:00
ab72cd2fc1 Cleanup: Spelling 2020-06-19 16:11:15 -04:00
a089286d7b UI: Fix all constraint subpanels empty
Silly typo in earlier fix
2020-06-19 16:07:20 -04:00
bb4cef71ee UI: ShaderFx Drag and Drop, Layout Updates
This patch implements the list panel system D7490 for grease pencil
shader effects. It also moves their drawing to a callback in
ShaderFxTypeInfo in line with the extensible architecture refactoring
goal T75724.

The implementation is basically exactly the same as for the modifier
patch (9b099c8612).

Thanks to Matias Mendiola (@mendio) for helping to develop the layout
changes.

Differential Revision: https://developer.blender.org/D7985
2020-06-19 15:07:13 -04:00
702e00f910 Outliner: Selection cleanup
No functional changes. The outliner selection operators shared many
different functions for selection, activation, mode toggling, and other
actions, but the code paths were not always clear, making any changes
difficult.

This cleans up the code and uses outliner_item_select() as the base
function for selection, activation, mode toggling between the different
selection operators. It also prepares for future features and fixes.

Reviewed By: Severin

Differential Revision: https://developer.blender.org/D5817
2020-06-19 12:43:01 -06:00
ec963d9d7d UI: Grease Pencil Modifier Drag and Drop, Layout Changes
This patch implements the list panel system D7490 for grease pencil
modifiers. It also moves their drawing to a callback in
GpencilModifierTypeInfo in line with the extensible architecture
refactoring goal T75724.

This also adds the "set_error" function for grease pencil modifiers,
which hadn't been copied from mesh modifiers yet.

The implementation is basically exactly the same as for the modifier
patch (9b099c8612).

Thanks to Matias Mendiola (mendio) for providing mockups for many
of the layout changes.

Differential Revision: https://developer.blender.org/D7978
2020-06-19 14:42:08 -04:00
fb7d8e2f4b UI: Fix check for constraint panel default expansion 2020-06-19 14:19:41 -04:00
0ded6f5525 Fix: Crash when closing window while Outliner shows screens
Steps to reproduce were:
* From factory settings, change Outliner Display Mode to "Blender File"
* Open "Screens" item, make sure all listed screens are visible
* Open Preference window, close it
* Mouse hover the outliner -> crash

Fix is to force an Outliner tree rebuild when closing screens.
2020-06-19 20:14:04 +02:00
254f164b27 UI: Minor optimization to Outliner lookup for hovered element
The lookup to find the hovered Outliner tree element would possibly check
children that can be skipped with a simple check.

I experimented with various ways to avoid work in this lookup. This one is
simple and reliable, which others wouldn't have been afaics. Plus, there's not
much performance to be gained here anyway.
2020-06-19 20:06:37 +02:00
15083d9e1e UI: Avoid rebuilding Outliner tree when opening/collapsing items
In big files, the Outliner would have a noticeable lag when opening or
collapsing items. That was because the entire tree was rebuilt, which isn't
actually needed in most cases. So we avoid it where possible now.
2020-06-19 20:06:37 +02:00
f4c0ea1d29 UI: Don't rebuild Outliner tree to remove highlight when leaving area
When leaving the Outliner's area, the highlight would be removed and cause a
full rebuild of the tree. This caused a noticable lag in bigger files.
2020-06-19 20:06:37 +02:00
e15f85f23d UI: Avoid rebuilding outliner tree when changing area size
In big files, ie typical production files, resizing the outliner area would be
very slow. The outliner tree would be rebuilt then, which can easily be avoided.
2020-06-19 20:06:37 +02:00
ce7a5a2376 Fix T78042: GPencil: Strokes go missing after Interpolation from another layer
This was due some strokes could be tagged and as the layer was locked, the strokes were not untagged and removed when all tagged strokes are removed.

The tagged strokes are used as temp ghost of the interpolation and removed at the end of the interpolation.
2020-06-19 19:39:30 +02:00
a24cd69d78 Cleanup: Remove unused BKE_constraint functions 2020-06-19 13:21:39 -04:00
eaa44afe70 UI: Drag and Drop Constraints, Layout Updates
This patch implements the list panel system D7490 for constraints.
In this case the panels are still defined in Python.

The layouts are also updated to use subpanels and the a more organized
single column layout. There may be more tweaks necessary for the
layouts.

Reviewed By: Severin, billreynish, Mets

Differential Revision: https://developer.blender.org/D7499
2020-06-19 12:40:48 -04:00
27fb75fec2 Fix T77476: Transform Align mode using View orientation by default 2020-06-19 12:56:53 -03:00
334e5005f4 USD: Upgrade library 20.02 → 20.05
The Blender USD code didn't have to change for this upgrade. Pixar's USD
did include a change that we had in the patch, so that's been removed
from our patch now. Some of the USD code that we patched changed as
well.
2020-06-19 17:37:14 +02:00
71363dd79c Cleanup: Alembic, replace ABC_INLINE with BLI_INLINE
The `ABC_INLINE` macro has been in the Alembic code since it was introduced
to Blender in rB61050f75b13e. It basically does the same a `BLI_INLINE`,
though, so there is no need to keep it around.
2020-06-19 17:08:21 +02:00
f84414d6e1 EEEVEE: Object Motion Blur: Initial Implementation
This adds object motion blur vectors for EEVEE as well as better noise
reduction for it.

For TAA reprojection we just compute the motion vector on the fly based on
camera motion and depth buffer. This makes possible to store another motion
vector only for the blurring which is not useful for TAA history fetching.

Motion Data is saved per object & per geometry if using deformation blur.
We support deformation motion blur by saving previous VBO and modifying the
actual GPUBatch for the geometry to include theses VBOs.

We store Previous and Next frame motion in the same motion vector buffer
(RG for prev and BA for next). This makes non linear motion blur (like
rotating objects) less prone to outward/inward blur.

We also improve the motion blur post process to expand outside the objects
border. We use a tile base approach and the max size of the blur is set via
a new render setting.

We use a background reconstruction method that needs another setting
(Background Separation).

Sampling is done using a fixed 8 dithered samples per direction. The final
render samples will clear the noise like other stochastic effects.

One caveat is that hair particles are not yet supported. Support will
come in another patch.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7297
2020-06-19 17:05:49 +02:00
e18d6f5206 LibOverride: Cleanup: remove unused parameter. 2020-06-19 17:01:20 +02:00
f6b23c63e1 LibOverride: Parallelize diffing of Main database.
This will not give any noticeable improvements in common editing tasks,
since then usually only a very few IDs are changed and checked for
override updates.

However, it makes full override diffing process several times faster
(happens usually when saving a .blend file, but could also help e.g.
when multi-editing several override objects at the same time...).
2020-06-19 17:01:20 +02:00
9905f5725c LibOverride: rempve ID preview from comparison (diffing) process.
Accessing this from RNA may actually create some data, which we do not
want to happen when comparing data. Further more, preview is not data,
but a view of it, so we should be safe ignoring it entirely here.
2020-06-19 17:01:20 +02:00
df25d3c2a3 LibOverride: add some more debug timing prints... 2020-06-19 17:01:20 +02:00
b50d01cbac Cleanup: Alembic, removed some unnecessary extern "C" {} declarations
No functional changes.
2020-06-19 16:43:27 +02:00
3ceb9faf1a Cleanup: IO, made some functions in AbstractHierarchyIterator protected
These functions are not needed in the public interface, only by the
`AbstractHierarchyIterator` class and its subclasses.

No functional changes.
2020-06-19 16:43:27 +02:00
Stefano Bonicatti
59b523c3c9 Fix build with USD, Clang and Linux
The important distinction for the linker flags is not between GCC and Clang,
but between the macOS and Linux.

Differential Revision: https://developer.blender.org/D8023
2020-06-19 15:42:33 +02:00
697b1736ef Cleanup: Alembic, replace #ifndef guards with #pragma once
No functional changes.
2020-06-19 15:30:18 +02:00
1a448c66ed Cleanup: Alembic, move the C++ code to blender::io::alembic namespace
This commit only moves code into the `blender::io::alembic` namespace,
it does not move `static` functions into an anonymous namespace.

No functional changes.
2020-06-19 15:30:18 +02:00
89b7f785e6 Cleanup: Alembic, moved exporter code into separate directory
This moves most of the exporter-related code
from `source/blender/io/alembic/intern`
to   `source/blender/io/alembic/exporter`

This is to prepare the Alembic code for the switchover to using
`blender::io::AbstractHierarchyIterator`. When that happens, a few more
files will be added, and having things in a separate 'exporter'
directory makes things less cluttered.

Note that exporting consists of multiple steps (determine export
hierarchy, create Alembic archive, and then write data into it), which
is why the directory is called "exporter", but many of the files are
called "writer".

No functional changes.
2020-06-19 15:30:18 +02:00
16d09a5864 Fix T67358: Compositor Disabled Node Config -> SegFault
The issue was caused by wrong conversion happening after some of the
proxies are removed. Easiest solution is to first remove proxies and
then add required converter operations.

Thanks Jeroen for the review!
2020-06-19 14:49:36 +02:00
28d77f9354 Performance: Never draw channels region during playback
Channels aren't visually changed by playing back an animation so there
is no need to do this. As rendering channels is using a lot of logic
(filtering animation data, converting fcurves to samples etc) it has an
noticeable overhead.

This change has no functional limitation. Users are still able to do
everything during animation playback. There are other mechanisms in
place that take care of that.

Spring 02_020_A.anim.blend went from 11.8 to 12.0 on a Ryzen 1700. I
didn't test with scenes but it should be more noticeable with more
complex scenes.

Reviewed By: Brecht van Lommel

Differential Revision: https://developer.blender.org/D8073
2020-06-19 14:45:55 +02:00
90010c3e04 CMake: Correct warning about which C++ version is required
Was only happening on unsupported compilers.
2020-06-19 14:44:03 +02:00
2193e28dfc USD Test: Don't use designated initializers
This isn't really in C++ standard, some corner cases work in some
compilers (like when all fields are specified), but in general they
do not work.

For some reason MSVC builder started to complain about it now,
weird but better not rely on compiler specifics.
2020-06-19 12:36:37 +02:00
e9a7f4d389 Upgrade C++ standard to C++17
Ref T76783
2020-06-19 12:02:21 +02:00
1f5f3b5588 Cycles: Make compatible with C++17 on 10.9 deployment target
OSLRenderServices contains a member which is 64 bytes aligned and this
is onlys supported by default allocators in SDK 10.14. Since we take
care of allocation ourselves ignoring the diagnostic is an acceptable
way dealign with it.
2020-06-19 12:02:21 +02:00
3f5b295084 Freestyle: Fix compilation error with C++17
AutoPtr class became a sub-class of unique_ptr with some special magic
to mimic behavior of auto_ptr for copy constructor.

The code was already there, but for some reason visual studio did not
set __cplusplus correctly for some reason.

The other change is remove of binary function usage, which is not
needed in the Freestyle code.
2020-06-19 12:02:21 +02:00
7ae9227794 Quadriflow: Fix compilation error with C++17
Unary function has been removed.
Unless I'm missing something subclass is not needed here.
2020-06-19 12:02:21 +02:00
b3b445979e Tests: Use explicit signature constants
Are reported by MSVC 2019 after C++17 switch.

One might suggest lets just silence the warning, I will say why to have
specific signed/unsigned types in API just to then (usafely) ignore the
sign conversion.
2020-06-19 12:02:21 +02:00
8c3dd6d83d Upgrade Google libraries
Upgrades Glog from 0.3.5 to 0.4.0, and Gtest from 0.8.0 to 0.10.0.

Hopefully this will solve compilation error on MSVC with C++17.
2020-06-19 12:02:21 +02:00
0f78a57904 Make BLI_edgehash_test compatible with C++17
random_shuffle was removed (at least the used version).
2020-06-19 12:02:21 +02:00
31ae833811 Ceres: Update to the latest upstream version
Using latest master because of various compilation error fixes.

Brings a lot of recent development. From most interesting parts:

- New threading model.
- Tiny solver.
- Compatibility with C++17.
2020-06-19 12:02:21 +02:00
171c4fb238 Update C++ standard to C++14
This is an intermittent state to get all dependencies to compile.

For example, the latest Ceres is needed to bring C++17 support,
but it has bumped minimal requirement to C++14.
2020-06-19 12:02:21 +02:00
9e70129952 Cloth: allow forces to act parallel to cloth.
Currently all force effectors can only act on cloth when the force is
perpendicular to the surface. This makes sense for wind, but not for
other forces; and the user may want even wind to have some friction.

This changes effector code to output two force vectors - although
you of course can pass the same pointer for both. The force is split
between the two outputs based on a new per-effector setting.

Differential Revision: https://developer.blender.org/D8017
2020-06-19 12:17:02 +03:00
f382109f38 Fix T78024: GPencil - Add missing UV Fill prop to RNA
This was changed in the refactor done in 2.83 and was not included by error.
2020-06-19 10:56:10 +02:00
2dff08c8ce Alembic: always export transforms as inheriting
Blender now always exports transforms as as "inheriting", as Blender has
no concept of parenting without inheriting the transform.

Previously only objects with an actual parent were marked as
"inheriting", and parentless objects as "non-inheriting". However,
certain packages (for example USD's Alembic plugin) are incompatible
with non-inheriting transforms and will completely ignore such
transforms, placing all such objects at the world origin.

When importing non-inheriting transforms from Alembic, Blender will
break the parent-child relation and thus force the child to (correctly)
interpret the transform as world matrix.
2020-06-19 10:24:57 +02:00
f106369ce8 Alembic: prevent spaces in names of exported particle systems
Other types already had spaces, periods, and colons replaced by
underscores. The upcoming Alembic exporter (based on the
`AbstractHierarcyIterator` class) will be more consistent and apply the
same naming rules everywhere. This is in preparation for that change.
The `get_…_name()` functions in `abc_util.{cc,h}` will be removed then.
2020-06-19 10:24:51 +02:00
0d744cf673 Alembic: export object data with object data name
Previously the Alembic exporter exported a mesh object to
`{object.name}/{object.name}Shape`. Now it exports to
`{object.name}/{mesh.name}` instead. The same change also applies to
other object data types.

Note that the code now is a bit hackish, as `m_name` is set even in
cases where it isn't used. This hackishness was already there, though,
but it's now just more visible. This will all be cleaned up when the
Alembic exporter is ported to use the `AbstractHierarchyImporter`
structure of the Universal Scene Description (USD) exporter.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D7672
2020-06-19 10:17:41 +02:00
0ae7883d7d IO: ensure export path and export name are always consistent
Before this, there was one code path that set `context.export_path`, and
a different code path for `context.export_name`, allowing the two to
diverge.

Keeping track of the export path of the export parent (which can be, but
is not always, the Blender parent object) also allows a concrete
subclass of `AbstractHierarchyIterator` to find the `AbstractWriter` for
the export parent. In case of exporting to Alembic this is important, as
it's not possible to simply give the Alembic library the full export
path of an object like we do in the Universal Scene Description (USD)
exporter; Alembic needs the C++ object of the parent.
2020-06-19 10:17:41 +02:00
69c3d9804f IO: Allow exporting a subset of the writers
This is in order to prepare for compatibility with the Alembic exporter.
That exporter is capable of writing object transforms and object data at
different (sub)frames.

The rename from `created_writers` to `used_writers` is necessary, as not
all created writers will be actually used in each iteration.

The Universal Scene Description (USD) exporter does not make use of
this.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D7670
2020-06-19 10:17:41 +02:00
084c5d6c7e IO: Move Abstract Hierarchy Iterator into io/common
The goal of the `AbstractHierarchyIterator` class (and supporting
classes) was to use it in different exporters. It shouldn't be part of
the USD module + namespace any more, now that it will also be used in
the upcoming Alembic exporter rewrite.

The source files are moved into `io/common`, which is compiled & linked
into a new library `bf_io_common`. The unittests are still inside the
`tests/gtests/usd` directory. They should be moved to a separate test
module too, but that will be delayed until after T73268 has been
resolved.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D7669
2020-06-19 10:17:41 +02:00
b1ce4ca40c Fix T77997: GPencil insert keyframe on timeline doen't update viewport
The reason was the datablock is changed but it was not tagged for depsgraph refresh.

In some cases it could be possible to tag several times the same datablock, but as this is not the case all the times and the number of tags is always very small, it doesn't worth a complex code to keep a memory list of the datablocks to tag.
2020-06-19 10:10:11 +02:00
fade37ff07 Writefile: move file flags to BlendFileWriteParams
This removes G_FILE_HISTORY, G_FILE_SAVE_COPY & G_FILE_USERPREFS.

Using file-flags made logic harder to follow since it's not so clear
which flags are expected to be in G.fileflags & which are meant to be
set and passed as arguments, these are shared between read & write
functions too.

Add BlendFileWriteParams so options which don't need to be stored
aren't mixed up with flags that are stored for reuse.
2020-06-19 16:47:12 +10:00
5a77f643f4 Cleanup: SPACE_ACTION does not have a RGB_TYPE_TOOL_HEADER
So no need to check this specific case.
2020-06-19 08:13:06 +02:00
d093f61667 Cleanup: use bool and enums in match_region_with_redraws
Function used int for everything.
2020-06-19 08:11:25 +02:00
642b19c8b8 Fix app-templates not resetting the user interface
Regression in 45b5f4e3df
2020-06-19 14:29:24 +10:00
41f0697501 Outliner: Show pose group icons
Pose groups previously showed a dot icon. Now it draws the correct icon.
2020-06-18 21:53:54 -06:00
1ee32ea228 Cleanup: use doxy sections 2020-06-19 13:17:10 +10:00
0479c28ddd Cleanup commented separator. 2020-06-19 02:04:59 +02:00
f1e5fd030a Cleanup: unsupported ATTR_FALLTHROUGH use, clang-format 2020-06-19 09:44:57 +10:00
b89898cbd3 Cleanup: Move snap callbacks to their respective transform mode
These functions are very specific to the mode.

More modes can support snap, and there is no reason to keep all
callbacks for each mode in the transform_snap.c file.
2020-06-18 16:05:48 -03:00
d56444392f Fix T78004: Instant crash when Shift+D duplicating a Collection Instance.
Dummy mistake in own recent refactor of duplicate code...
2020-06-18 20:34:39 +02:00
3aadf68b88 UI: Weight Modifiers Falloff: Use better step icon 2020-06-18 12:46:00 -04:00
d5954ef11c LibOverride: only tag actually changed orig IDs for automatic override diffing.
This makes any operation (including mere bone selection) several times
faster on some complex production character, since we typically now only
need to diff a single ID, instead of tens of them.
2020-06-18 18:27:49 +02:00
722adcfc48 LibOverride: Improve performances by using better string hashing function.
This is not really huge improvements, but 2% are always good to have.
2020-06-18 18:27:49 +02:00
52b8d668f4 Depsgraph: use blender::Map instead of std::map
We decided to use our own map data structure in general for better
readability and performance.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D7987
2020-06-18 18:18:19 +02:00
44f7852660 LibOverride: increase speed of RNA diffing process.
By using own path construction instead of handy printf-like functions,
we get a 10% improvement on overall diffing process!

This remains way to slow on some complex production characters, but
always good to have still.
2020-06-18 18:00:41 +02:00
667ef9917f UI: Place "New Collection" item above list in Move/Link to Collection menu
This way "New Collection" is always assigned the same shortcut (N).
Whereas previously it would be automatically assigned the leftover key
from the list of available collections.

Nice side effect is that since N is next to M in most keyboard layouts,
moving to a new collection is super fast by hitting M then N.

{F8630575, size=full}

Paper-cut pointed out by DerekWatts on [devtalk](https://devtalk.blender.org/t/blender-ui-paper-cuts/2596/4211) (thanks!):
{F8630492, size=full}

Reviewed By: HooglyBoogly

Differential Revision: https://developer.blender.org/D8067
2020-06-18 17:54:49 +02:00
6899cb3c07 Fix for T77095: work around render artifacts with AMD Radeon RX 4xx and 5xx 2020-06-18 14:41:51 +02:00
64bf179a17 Fix T65986: Inaccurate center of mass, calculating mesh center
Use a median center of polygons as an initial value for volume center
calculation since the volume accumulation quickly generates very large
numbers that become inaccurate if the geometry is too far
from it's current center.
2020-06-18 22:37:32 +10:00
55ebf174bc Fluids: fix variable names
This seems to be an error in rBb91b90f0dd3c9bff3b1a6e563c2cce293722ed16.

I found it, because I could not open the file in T77263 anymore.

Reviewers: sebbas

Differential Revision: https://developer.blender.org/D8065
2020-06-18 14:27:58 +02:00
e36c05b3d1 Fix T77764: VSE: snap strip to current frame does not move associated
effect strips keyframes along

Maniphest Tasks: T77764

Differential Revision: https://developer.blender.org/D7996
2020-06-18 13:27:50 +02:00
dbf96e6252 Fix T77957: Height change in Camera Properties column when changing lens type
Remove unneeded extra column from perspective type properties.

Maniphest Tasks: T77957

Differential Revision: https://developer.blender.org/D8060
2020-06-18 11:09:53 +02:00
a5e176a8ed Allow interpolation of matrices with negative scale / axis flips
The matrix interpolation function `interp_m3_m3m3()` decomposes the
matrices into rotation and scale matrices, converts the rotation
matrices to quaternions, SLERPs the quaternions, and converts the result
back to a matrix. Since quaternions cannot represent axis flips, this
results in interpolation problems like described in T77154.

Our interpolation function is based on "Matrix Animation and Polar
Decomposition", by Ken Shoemake & Tom Duff. The paper states that it
produces invalid results when there is an axis flip in the rotation
matrix (or negative determinant, or negative scale, those all indicate
the same thing). Their solution is to multiply the rotation matrix with
`-I`, where `I` is the identity matrix. This is the same as element-wise
multiplication with `-1.0f`. My proposed solution is to not only do that
with the rotation matrix `R`, but also with the scale matrix `S`. This
ensures that the decomposition of `A = R * S` remains valid, while also
making it possible to conver the rotation component to a quaternion.

There is still an issue when interpolating between matrices with
different determinant. As the determinant represents the change in
volume when that matrix is applied to an object, interpolating between a
negative and a positive matrix will have to go through a zero
determinant. In this case the volume collapses to zero. I don't see this
as a big issue, though, as without this patch Blender would also produce
invalid results anyway.

Reviewed By: brecht, sergey

Differential Revision: https://developer.blender.org/D8048
2020-06-18 10:37:52 +02:00
46e4cdf788 Tests: added simple unittests for matrix interpolation
The interpolation of 4x4 and 3x3 matrices will fail when the rotation
component has a singularity, i.e. when there is one axis mirrored. Two
mirrored axes are just a rotation of 180 degrees around the third, and
three mirrored axes are such a rotation + a single axis mirror. To
prepare for a fix, I first wanted to cover the basic functionality with
a few unit tests.

These tests check that `interpolate(A, B, alpha)` always returns `A` for
`alpha=0`, always return `B` for `alpha=1`, and something in between for
`alpha=0.5`.
2020-06-18 10:37:46 +02:00
099d47f8a3 Sequencer: revert selection & keymap changes from D7679
These changes aren't aligned with other timeline selection keymaps
(graph & action for e.g.).

Revert these changes, shortcuts to time-line editors
should take other similar spaces into account.
2020-06-18 16:30:56 +10:00
502e6bd839 Fix doc generation for enum & attr's with multi-line descriptions 2020-06-18 16:26:16 +10:00
3ada1949f8 Python API: path mapping options for library writing function
When "Relative Remap" option was added, the intention was only to remap
paths that were already relative. However it remapped all paths.

This was reported as T62612 and fixed recently,
however some Python script authors depended on the old behavior.

For users, it's reasonable to use the existing operators to make paths
absolute/relative. For scripts however it's useful to be able to write
out individual data-blocks with the ability to make all paths relative.

Now `bpy.data.libraries.write()` takes a path_remap argument which can
be `NONE/RELATIVE/RELATIVE_ALL/ABSOLUTE` allowing the script author to
choose how paths are handled when writing out data-blocks.

Addresses T77768.
2020-06-18 15:49:10 +10:00
aab165b575 Cleanup: remove unnecessary flag clearing
This is not read from blend files.
2020-06-18 14:30:04 +10:00
978e2b6f98 BKE_global: No longer read/write G_FILE_HISTORY
This is a runtime only flag
which doesn't make sense to store in the file.
2020-06-18 14:30:04 +10:00
44f4eaf13b Cleanup: doxy sections for walk/fly operators 2020-06-18 14:30:04 +10:00
3aa1143d57 Cleanup: redundant parenthesis 2020-06-18 14:30:04 +10:00
790d942b69 Cleanup: unused variables 2020-06-18 14:30:04 +10:00
229ed078d1 Fix T75414: Incorrect masking in Color Balance modifier
Color balance factor was infinity. Clamp to +/- `FLT_MAX`

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7884
2020-06-18 05:53:25 +02:00
f7f3b2d318 Cleanup: Remove goto statements from strip rendering functions
Remove goto statement from `seq_render_image_strip()` and `seq_render_movie_strip()`.
`seq_render_image_strip_view()` and `seq_render_movie_strip_view()` is used to render individual views in both monoview and multiview branch.

I have included `seq_can_use_proxy()` for convinience

Reviewed By: sybren

Differential Revision: https://developer.blender.org/D7870
2020-06-18 05:53:25 +02:00
67a822e086 Fix T73056: Cache not invalidated in fade operator
This operator is written in python it is inserting keyframes to create fade
effects.

Add Sequence.invalidate() python function to invalidate strip if it is
changed in python.

Perhaps I could implement cache invalidation to actual curve manipulation.
I guess it wouldn't be very hard to do but having means to invalidate form
python is useful as well.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7885
2020-06-18 05:53:25 +02:00
47f98a38d0 VSE: Fix assigning effect strip inputs
Partialy fixes T73828

Currently all 3 effect inputs were assigned even if not all 3 were used.
This causes problems with reassigning effects in python, because 3rd input is
not accessible.

This patch will only assign inputs that are necessary for effect to work
properly.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D6868
2020-06-18 05:53:25 +02:00
8df99b1c0c Cleanup: Remove unused code from seq_proxy_get_fname()
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7868
2020-06-18 05:53:25 +02:00
ac16d56aa8 Fix T66390: Update missing when snaping strips.
Effect strips bound recalculation was mixed with overlap handling, which
caused, that effects wasn't handled.

In some cases there may be problem with order of strips in seqbase. We should
traverse hierarchy instead. This is design issue that applies to all
operators, and should be fixed separately.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7880
2020-06-18 05:53:25 +02:00
d8206602fe Transform: Snap to the intersection between constraint and geometry
This commit changes the behavior of 4 snapping combinations:

**1. While constraining to a plane, snap to an edge element:**
The snap is made at the intersection between the edge direction and the
constraint plane.

**2. While constraining to a plane, snap to a face element:**
The snap is made to the nearest point between the snap point and the
line that intersects the face plane with the constraint plane.

**3. While constraining to an axis, snap to an edge/line element:**
The snap is made to the nearest point on the axis to the edge/line.

**4. While constraining to an axis, snap to a face element:**
The snap is made at the intersection of the axis and the plane defined
by the face.

To avoid unpredictable jumps outside view boundaries, an alignment
check is made for each of these snapping combinations.

Resolve/fix T66422

Differential Revision: https://developer.blender.org/D5608
2020-06-18 00:01:05 -03:00
18ccf328ac Outliner: Fix (unreported) object select in multiple collections
Previous commits to fix parent selection introduced incorrect behavior
when selecting objects linked to multiple collections. The clicked
object would be selected, but also the first listed object in the tree
would be selected.

Instead of always searching for a parent object to select, only search
back when the selected element is not an ID_OB. This prevents multiple
selection of objects linked to multiple collections.
2020-06-17 20:31:55 -06:00
e079bf6996 GPencil: Chnage default Vertex Color mode to Stroke and Fill
The previous value was Stroke only.
2020-06-17 22:49:59 +02:00
ffa23b6c77 GPencil: Fix unreported Vertex Opacity Overlay not working
This values was not working because was removed by error in refactor.

Reviewed By: mendio, fclem

Differential Revision: https://developer.blender.org/D8061
2020-06-17 22:42:49 +02:00
a874cec02b UI: Match some properties set in keymaps with those set for buttons
This allows the operator's shortcut to appear in the context menu.

Except for the shortcut display, there is no functional change from the
user's point of view.

This fix T77839
2020-06-17 16:30:31 -03:00
eacdcb2dd8 Cycles: Add new Sky Texture method including direct sunlight
This commit adds a new model to the Sky Texture node, which is based on a
method by Nishita et al. and works by basically simulating volumetric
scattering in the atmosphere.

By making some approximations (such as only considering single scattering),
we get a fairly simple and fast simulation code that takes into account
Rayleigh and Mie scattering as well as Ozone absorption.

This code is used to precompute a 512x128 texture which is then looked up
during render time, and is fast enough to allow real-time tweaking in the
viewport.

Due to the nature of the simulation, it exposes several parameters that
allow for lots of flexibility in choosing the look and matching real-world
conditions (such as Air/Dust/Ozone density and altitude).

Additionally, the same volumetric approach can be used to compute absorption
of the direct sunlight, so the model also supports adding direct sunlight.
This makes it significantly easier to set up Sun+Sky illumination where
the direction, intensity and color of the sun actually matches the sky.

In order to support properly sampling the direct sun component, the commit
also adds logic for sampling a specific area to the kernel light sampling
code. This is combined with portal and background map sampling using MIS.

This sampling logic works for the common case of having one Sky texture
going into the Background shader, but if a custom input to the Vector
node is used or if there are multiple Sky textures, it falls back to using
only background map sampling (while automatically setting the resolution to
4096x2048 if auto resolution is used).

More infos and preview can be found here:
https://docs.google.com/document/d/1gQta0ygFWXTrl5Pmvl_nZRgUw0mWg0FJeRuNKS36m08/view

Underlying model, implementation and documentation by Marco (@nacioss).
Improvements, cleanup and sun sampling by @lukasstockner.

Differential Revision: https://developer.blender.org/D7896
2020-06-17 21:06:41 +02:00
d6ef9c157a UI: Solve crash with move to index in modifier menu 2020-06-17 14:43:48 -04:00
bcb2b8ab57 UI: Improve Modifier Panel Header Menu
This makes a few changes to the modifier panel header:
  1. Adds "move to top" and "move to bottom" buttons.
  2. Adds a checkmark icon for "apply"
  3. Makes it narrower, the text is closer to the dropdown icon.
     (Requires the change in ui_block_func_POPUP)

Differential Revision: https://developer.blender.org/D8040
2020-06-17 14:09:17 -04:00
4cfdd10c2b UI: Modifier Panel Header Improvements
This includes a few improvments:
  1. Always expose delete. This is the button everyone wants the most,
     it makes a lot of sense to expose this.
  2. Improve "name hiding capability." Basically always align the mode
     buttons to the right, and count their number to see if the name fits.
  3. Aligns more items, to look better, save space, and make the whole
     header seem more grouped.
  4. In my tests the "switch contexts" button never coincides with the
     delete button, so they share the same space.

Differential Revision: https://developer.blender.org/D8037
2020-06-17 13:51:33 -04:00
c1c02f45f7 UI: Ctrl-click on panel header expands & collapses subpanels
If the panel is already open and you ctrl click on its header, its
sub-panels are now expanded / collapsed instead of toggling the
expansion for all other panels. If you're toggling a panel's expansion
it's already in view anyway, so there is no need to collapse the
other panels.

Differential Revision: https://developer.blender.org/D8042
2020-06-17 13:37:59 -04:00
2e0ac1e0c4 Buildbot: Cleanup, remove unused script and change naming
Follow upstream convention.
2020-06-17 17:39:17 +02:00
e590526af6 Fix T76767: Cycles performance regression with CLI renders
When picking a small tile size when doing a CLI render will
yield many status updates being printed to the console
causing a slowdown in the render process. 2.79 with the
same amount of tiles did not have this slowdown.

The reason for this turned out to be a debugging aid added
in rBd2757d149bf2 which disabled buffering for stdout which
on windows caused every single character being printed to the
console to try to obtain a mutex, and worse the thread being
put to sleep when this mutex was unavailable leading to poor
performance.

This patch changes the behaviour by only disabling the
buffering in debug builds.

CLI render of the default cube with 16x16 tiles at 1080p

2.83 : 37.57s
now  : 17.03s

note: this only affected CLI renders, renders from the UI
do not report this kind of information and had no such
slowdown.
2020-06-17 09:26:49 -06:00
9bfd78ae14 Fix T77914: Blender Crashes if viewport is changed manually while having loop cut selected
The selection engine requires a viewport.
2020-06-17 12:16:32 -03:00
ddf4b909de Cleanup: Rearrange SELECTID_Context members for better alignment 2020-06-17 12:16:32 -03:00
13f591d400 ID Duplicate: Factorize a lot the code.
Now that we have a uniform consistent behavior in all our ID duplicate
funtions, we can easily factorize it greatly. Code gets cleaner,
smaller, and less error-prone.

Note that ultimately, this duplicate/deep copy behavior could be added
as a callback of IDTypeInfo.
We could also rethink the duplicate flags (some data, even some obdata,
like Lattice, are not coverred currently).
And so on. But at least code should now be much more easily maintainable
and extendable.
2020-06-17 17:06:05 +02:00
c84fee1ffe ID Duplicate: uniformize Action duplication.
Previously, object (and sub-data) actions would be controlled by the
user preferences flag, collections actions would never be duplicted, and
scenes actions were always duplicated...

Now they all follow the user preferences settings.
2020-06-17 17:06:05 +02:00
ad6cccf058 Refactor duplicate of data-blocks.
Main change from user side, besides that all pointers should now be
properly remapped to new IDs, is that linked objects are no longer
preserved when doing a full copy of scenes.

Will open a task to check whether we actually still want that behavior
(and re-code it in a more correct way then).

This is the main part of work done here, it aims at uniformizing and
sanitizing that 'deep copy' process for supported IDs (currently scenes,
collections and objects).

Note that there will be more follow up commits after that one, but this
should be the most risky and changing one.
2020-06-17 17:06:05 +02:00
514f80b0c4 Fix (unreported) broken logic in BKE_libblock_relink_to_newid
Existing code would not follow as expected into new sub-IDs if they were
only encoutered once in usages by parent IDs...
2020-06-17 17:06:05 +02:00
26c0ca3aa7 Outliner: Unified delete hierarchy operator
This resolves T73673 by allowing delete hierarchy in all outliner view
modes. It also unifies the collection and object hierarchy delete into a
single operator like in rBae98a033c856. This makes it easier to delete
all selected collection and object hierarchies at once.

This also removes the old object delete hierarchy code in favor of the
batch delete code which has been default for over a year.

Maniphest Tasks: T73673

Differential Revision: https://developer.blender.org/D7675
2020-06-17 09:00:04 -06:00
a2c4e5d222 Cleanup: clang-format 2020-06-17 16:07:26 +02:00
fc7c34e380 Cleanup: fix compiler warnings 2020-06-17 14:36:51 +02:00
25b8dedfb4 Fix T77915: Cycles OSL microfacet closure not working in custom shaders
The code to implement the newer closure in terms of the old one got lost in
the removal of our stdosl.h copy. Now implement it as a builtin closure.
2020-06-17 14:09:28 +02:00
8591ee748f Cleanup: doxy sections for meta-ball operators. 2020-06-17 21:22:08 +10:00
70c061ee0a Fix T63411: Crash adding meta-ball with a small radius
Change how the radius, changing the size of meta plane, sphere & cube.

Previously the size of these primitives would be kept the same,
with only the radius outside the primitive being scaled.

This led to small scale adding a lot of polygons instead
of scaling the primitive down as users would expect.

Also change behavior not to change the resolution when adding
to an existing meta-ball.
2020-06-17 21:13:47 +10:00
7dae6eb5a2 Doc: minor change to curve select more/less
Address T55218
2020-06-17 18:07:53 +10:00
1dfd262f2d Cleanup: name mesh join functions using ED_{type} prefix 2020-06-17 17:07:11 +10:00
4892470a47 Fix T70287: Connect vertex path can create duplicate edges/faces 2020-06-17 16:41:16 +10:00
ba312bc8a7 Cleanup: doxy comments 2020-06-17 14:00:09 +10:00
3ff9769762 Fix T76041: Low contrast dirty vertex colors with loose geometry
Add option to normalize vertex colors.
2020-06-17 13:43:20 +10:00
f9be5374ac Cleanup: warning 2020-06-17 13:43:20 +10:00
c7b03fe9c0 UI: Backspace is one word 2020-06-16 14:15:54 -04:00
efb1bf80df Buildbot: Cleanup, typo in logging 2020-06-16 18:12:15 +02:00
1b2a24aae0 Fix issue with uint in headers in recent own commit.
Would break on some systems/compilers...
2020-06-16 18:03:36 +02:00
16652185ce Fix (unreported) wrong size of UserPreferences' dupflag parameter.
Adding volume obdata option to `eDupli_ID_Flags` enum made it go beyond
the 16 bits of a short... Also, enums should typically be stored in
unsigned integers.
2020-06-16 17:40:30 +02:00
94fba47513 Cleanup: use explicit enum type for duplicate option of BKE_object_duplicate
Using enum type itself in implementations, and uint in headers (as using
enums types in headers is a pain when enum are not defined and used in a
single same header file...).
2020-06-16 17:40:30 +02:00
9e307117f8 Cleanup: remove hierarchy parameter from BKE_collection_duplicate
It makes no sense to deep-copy a collection and not also copy its
children collections... Parameter was not used anymore anyway.

So now this duplicate function will always at least deep-duplicate all
of its children collections, recursively.
2020-06-16 17:40:30 +02:00
2c435cf249 Cleanup: get rid of BKE_collection_copy.
We want to get rid of those for all ID types ultimately, but that one
was only used in one place, being the only one calling
`BKE_collection_duplicate` without hierarchical duplicate and parent
collection pointer, effectively using the full power of the complex deep
duplication code for a mere `BKE_id_copy` call...

This will allow for further cleanup in duplicate code.
2020-06-16 17:40:30 +02:00
2e5ef864ab Refactor: move .blend read/write of mesh deform modifier to MOD_meshdeform.c 2020-06-16 17:17:43 +02:00
25a1ed993a Cleanup: remove unnecessary indirection for .blend read/write of curvemapping 2020-06-16 17:04:03 +02:00
d3de5d7ca5 Refactor: Move curvemapping .blend read/write to blenkernel
This is necessary so that it can be accessed from `blendWrite`
and `blendRead` callbacks from modifiers.
2020-06-16 16:59:52 +02:00
4365de3870 Functions: Multi Function
This adds the `MultiFunction` type and some smallish utility types that it uses.
A `MultiFunction` encapsulates a function that is optimized for throughput by
always processing many elements at once.

This is an important part of the new particle system, because it allows us to
execute user generated node trees for many particles efficiently.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D8030
2020-06-16 16:35:57 +02:00
f721308bd0 Fix bitscan_reverse_uint on MSVC compiler
Was a mistake from the very beginning of implementation.
2020-06-16 16:17:47 +02:00
2c2fd9f036 Buildbot: Switch WIndows builds to MSVC 2019 2020-06-16 16:17:47 +02:00
bc7a4b126a GPencil: Convert and Bake mesh animation to grease pencil strokes
This patch adds two options:

- Convert a mesh to grease pencil strokes.
- Bake the mesh animation into grease pencil strokes.

Both are related and must be included in the same patch.

Related to tasks: T77629 and T77630

Notice: The conversion is done for mesh edges and it's not considering any visibility clipping. All edges are exported, no matters if it's visible or not.

Example of Convert a Mesh to Grease Pencil strokes:

{F8606028}

This conversion was inspired by the technique used by @luamono in this tweet: https://twitter.com/luamono/status/1239983662176841730

Example of Bake Animation (the video is a little outdate, but the basic functionality is the same, only small changes in UI):

{F8606032}

Reviewed By: mendio, pepeland

Maniphest Tasks: T77629, T77630

Differential Revision: https://developer.blender.org/D7983
2020-06-16 15:28:46 +02:00
e54058b121 Fix T77803: IK Degrees of freedom drawing glitch
IK degrees of freedom is rendered using wires and a solid sphere. The
solid used the wireframe drawing what resulted into drawing glitches.
This patch adds a new shader to draw the solid shape.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D8044
2020-06-16 14:36:18 +02:00
76d50c51a3 Buildbot: Support multiple workers talking to single codesign server
Is achieved by replacing hard-coded signed/unsigned file names with
"<uuid>" which acts as a "request ID". This way multiple workers can
put their requests into a single directory without collisions. The
code sign server will handle the requests sequentially in an unknown
order.
2020-06-16 14:08:14 +02:00
21d862494b Buildbot: Don't use builder name in the build directory
The directory layout on worker goes as following:

  <Worker>
    <Builder Name>
      blender.git/
      build/
      install/
      lib/

Adding an extra <Builder Name> after build is redundant.

Differential Revision: https://developer.blender.org/D8045
2020-06-16 12:24:01 +02:00
7d7090710c CMake: Fix compilation errors related on missing dna_type_offsets.h
Some of the files were (indirectly) using dna_type_offsets.h without
adding dependency from bf_dna (which is needed to ensure the file is
generated prior to library compilation).
2020-06-16 12:22:06 +02:00
38c9573b23 BLI: fix Map.foreach_item method 2020-06-16 12:16:07 +02:00
d2587f6f93 Cleanup: unused headers, spelling 2020-06-16 16:59:26 +10:00
Alan Troth
a64b8aca39 Fix T61777: Proportional editing doesn't work with multi edit-mode 2020-06-16 16:45:53 +10:00
f72419b9ae Cleanup: doxy sections for camera, collections, text & seqmodifier 2020-06-16 12:56:45 +10:00
a76542cbbf Cleanup: Use LISTBASE_FOREACH in interface_panel.c 2020-06-15 21:38:16 -04:00
4db63b6486 Fix crash when opening some old/broken .blend files after recent fix.
Now that `BKE_main_collections_parent_relations_rebuild()` is called
from readfile code, we need to make it resilient to potential NULL
master collection pointer in scenes.
2020-06-15 18:49:46 +02:00
6a0ebb8088 Refactor: use new blenloader api for laplacian deform modifier 2020-06-15 18:37:30 +02:00
d97cb98b11 Fix unhandled RECALC options in depsgraph code after recent change.
Spotted by @LazyDodo on IRC, thanks.
2020-06-15 18:25:40 +02:00
bf1e5a2133 Blenloader: call blendRead and blendWrite of modifiers when available
This is part of T76372.
2020-06-15 17:55:06 +02:00
b6981d9e48 Modifiers: New callbacks for reading and writing .blend files
This is part of a greater blenloader decentralization effort (T76372).
For modifiers the goal is that fewer files have to be modified when
a new modifier is added.

This patch just adds the `blendWrite` and `blendRead` callbacks to
`ModifierTypeInfo` but does not change any other code yet. In the next
steps, modifier specific code will be moved from `writefile.c` and
`readfile.c` into their corresponding `MOD_*` files.
2020-06-15 17:43:30 +02:00
eaff606f2d Fix T77460: Easy to create cyclic dependencies in collections and crash Blender.
Cyclic check was not checking for collections instanciated by objects...
2020-06-15 17:25:51 +02:00
89bde99674 Fix (unreported) critical mistake in Collection liblink code in readfile.c.
Prelimenary step to fix T77460.

Not sure how or when that thing was done, but since that call walks
around collections relationships, it's an utterly critical violation of
liblinking principles (code here should never, ever 'get outside' of its
own ID scope).

This was wroking so far only because code called through this function
(`BKE_collection_parent_relations_rebuild`) was only following parents
pointers (in `BKE_collection_find_cycle()`), which would be either valid
or non-existent.

But next commit is going to change that to also check collection's
objects instancing of other collections.
2020-06-15 17:25:51 +02:00
Jeroen Bakker
624994caa2 Fix T77496: Bones Custom Shapes Wires not drawn
Lines loose extraction cannot happen on the fly as the render data isn't
complete. This patch will do the lines loose subbuffer extraction as a
simple task and not on the fly.

This patch introduces 2 sub-types of tasks that are executed single threaded.
`EXTRACT_MESH_EXTRACT` would do the extraction using Mesh/BMesh geometry.
`EXTRACT_LINES_LOOSE` creates the `lines_loose` subbuffer from already cached
`lines` IBO.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7964
2020-06-15 16:47:21 +02:00
Bastien Montagne
df1ff76ee2 Fix T77774: New undo code broken by 'make local' behavior.
This is actually a nice issue due to too much optimization...
* Making an ID local just reuse the linked one whenever possible, instead of
  actually making a copy of it.
* Therefore, the collection containing that ID is seen as unchanged, since
  the pointer itself remained the same.
* But on undo step, there is no way to reuse that local object, which then
  gets deleted, and linked one gets re-created - at a different address.
* Collection, however, since unchanged, is not updated at all and thus keeps
  reference to the to-be-deleted local object, instead of the linked one.
* Issue gets even worse with viewlayers, this leads to the crash.

To address this, this patch adds a 'virtual' update flags that does nothing
in update case, but will ensure that the affected IDs using the one made local
are properly detected as changed across the relevant undo step.

Note that the recalc flags were chosen mostly for a logical reason, and also
because they are already properly dealt with and cleared by undo code,
so this looks like the optimal solution.

Reviewed By: brecht

Maniphest Tasks: T77774

Differential Revision: https://developer.blender.org/D8006
2020-06-15 15:35:49 +02:00
0945a79ed1 Fix crash using shrink-wrap modifier in edit-mode
Regression in deaff945d0.
2020-06-15 23:29:54 +10:00
Jeroen Bakker
ab8a691431 Fix T77342: Fail to draw loose edges
The underlying issue is that the loose edge extraction cannot be
threaded. This patch will extract the loose edges during initialization
of the render mesh data.

When working on this patch the mesh_render_data_update was split into
multiple functions to identify what part was failing. These functions
would also help us with debugging.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7962
2020-06-15 15:26:21 +02:00
Jeroen Bakker
3c717a631b Fix Memory Leak introduced by Draw Manager Threading
The memory leak is noticeable when using custom bone shapes. When using custom
bone shapes objects could be extracted twice. Where the second extraction can
overwrite data created by the first extraction what causes the memory leak.

Options that have been checked:
1. Use two task graphs phases. One for normal extraction (DST.task_graph) and
   the other one will handle extractions that require blocking threads.
2. Keep a list of all objects that needs extraction and only start extraction
   when all objects have been populated.

The second would slow performance as the extraction only happens when all
objects have been populated. In the future we might want to go for the second
option when we have the capability to render multiple viewports with a single
populate. As this design isn't clear this patch will implement the first
option.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7969
2020-06-15 15:22:57 +02:00
ec25084f5a Fix T77541: Unregistering DATA_PT_modifiers doesn't remove modifier panels
This is a pretty quick fix; the solution is just removing all the
instanced panels whena panel is unregistered. This also necessitates
adding the option to call UI_panels_free_instanced with NULL context.

Differential Revision: https://developer.blender.org/D7977
2020-06-15 09:06:54 -04:00
eadbdf170a Fix T77853: Error reloading linked library.
Issue related to how ID refcounting was changed when loading blendfile
data...
2020-06-15 15:03:53 +02:00
cf42721fe2 Cleanup: Rearrange Vert and Edge slide functions
And make `trans_mesh_customdata_correction` a more generic utility.
2020-06-15 09:53:18 -03:00
046afacbc6 Fix T77116: Current frame indicator text color hardcoded
Draw the text with the "header text highlight" theme color, which is
rarely used, making it a good candidate for this special case.

Differential Revision: https://developer.blender.org/D7897
2020-06-15 08:35:52 -04:00
73f8dd0f4c Fix T77596: UI: Correct "offset even" location in solidify modifier
This only applies in the "simple" solidify mode.

Differential Revision: https://developer.blender.org/D7967
2020-06-15 08:23:07 -04:00
2797a63a66 Cleanup: remove unnecessary code
This got committed due to a stupid mistake of mine, it does not belong
there at all.
2020-06-15 12:35:51 +02:00
ee61c1fe22 Cleanup: removed trailing spaces from install_deps.sh
No functional changes.
2020-06-15 11:58:58 +02:00
0d59a643aa x264: update URL and hash in versions.cmake
The old URL did have a Git commit hash in it, but apparently the server
was ignoring it and only used the `master` that was also mentioned in the
URL. As a result, every new download would get the latest version from
the `master` branch, invalidating the SHA256 checksum.

I replaced `master` with the actual commit hash. This should make the
situation stable.

No functional changes.
2020-06-15 11:58:58 +02:00
0102b9d47e Alembic: remove HDF5 support from CMake files
This is a follup to 0c38436227.

No functional changes to Blender, just the build scripts.
2020-06-15 11:58:58 +02:00
76ebc608af Fix T77871: GPencil masked points fails with previous point
If selected a point for masking, the previous point that is part of the same segment was included.

This bug was in Sculpt and Vertex paint modes because the code was very similar.
2020-06-15 11:49:08 +02:00
0c38436227 Alembic: remove support for HDF5 archive format
Alembic is not a single file format, it can be stored in two different
ways: Ogawa and HDF5. Ogawa replaced HDF5 and is smaller and much faster
(4-25x) to read ([source](http://exocortex.com/blog/alembic_is_about_to_get_really_fast)).

As long as Blender has had Alembic support, it has never supported the
HDF5 format in any release. There is a build option `WITH_ALEMBIC_HDF5`
that can be used to enable HDF5 support in your own build. This commit
removes this build option and the code that it manages.

In the years that I have been maintainer of Blender's Alembic code, I
only remember getting a request to support HDF5 once, and that was to
support very old software that has likely since then been updated to
support Ogawa. Ubuntu and Fedora also seem to bundle Blender without
HDF5 support.

This decision was discussed on
[DevTalk](https://devtalk.blender.org/t/alembic-hdf5-support-completely-remove)
where someone also mentioned that there is a tool available that can
convert HDF5 files to the Ogawa format.
2020-06-15 11:12:24 +02:00
ece7ebb3a8 Fix text after '|' being right aligned in the ID selector
Only use this to right align libraries when they are added to the name.

Caused by d62bbf4079.
2020-06-15 19:06:07 +10:00
fbf6eb509a Fix T77869: GPencil material preview not visible before frame 2
The problem was related to the change introduced in commit 11ba9eec70

As now the keyframe is only visible if the keyframe is greater or equal than current scene frame and  the preview file had all keyframes in frame number 2, it was not used in frame 0 or 1.

Now, the keyframes have been moved to frame 0.
2020-06-15 11:01:28 +02:00
b358a92faf Various UI messages fixes... 2020-06-15 10:51:26 +02:00
1d6529873f Fix T77735: Numinput of radial control operator behaved incorrectly
This fixes the behavior of `ctrl+F` and `shift+F` to control the angle
and strength of a brush when the unit scale is not one.

Reviewers: pablodp606

Differential Revision: https://developer.blender.org/D7992
2020-06-15 09:46:27 +02:00
bf8b62e874 Fix curve handle color ID display
Regression in 49f59092e7 caused all handles to display using
the 'aligned' theme color.

Arrange flags to fix this, add assert to avoid this happening again.

Also rename flag so it's use is clearer.
2020-06-15 15:33:42 +10:00
Tobias Heinke
24d77e7db7 API docs: mathutils leaked markup
Reviewed By: Blendify

Differential Revision: https://developer.blender.org/D8021
2020-06-14 19:15:05 -04:00
caa1b16acc UI: Do not use term 'Subsurf'
So not to be confused with subsurf scatter

Differential Revision: https://developer.blender.org/D8005
2020-06-14 19:06:58 -04:00
4155f8dc21 deps/windows/embree: Prevent exports leaking out of blender binary
embree marks a few of its functions with a dll_export macro
forcibly exporting these symbols from whatever binary links
them. Given we link embree statically and we do not want these
exports in the blender binary, the macro needs to be a no-op.
2020-06-14 11:09:32 -06:00
9464260ed7 Fix T76563: Transforming an auto-aligned point won't set it aligned
Correct previous commit that was checking values not yet initialized,
causing T77796.
2020-06-15 01:07:59 +10:00
cbd894e5a8 Cleanup: remove unnecessary header
Introduced in D8007
2020-06-15 01:07:50 +10:00
725cc959c7 install_deps: Update python default version to 3.7.7.
Re T77846.
2020-06-14 09:42:20 +02:00
b325ecef9c Deps builder: Python 3.7.7
This updates python to the latest patch level available for 3.7
also updates some of the packages we rely on:

idna 2.9
urllib3 1.25.9
cerifi 2020.4.5.2
requests 2.23.0
numpy 1.17.5
2020-06-13 15:25:19 -06:00
b29b1c4ef2 UI: Use consistent order for particle display icons
The viewport, render display order matches modifiers, physics,
and the outliner.

Differential Revision: https://developer.blender.org/D7998
2020-06-13 16:58:55 -04:00
23d0361b30 Sculpt: Fix creation of repeated constraints in the Cloth Brush
Previously, constraints were added multiple times from different
vertices. This adds a GSet to check that the same constraint is not
being added twice when iterating over the neighbors of two different
vertices.

Reviewed By: zeddb

Differential Revision: https://developer.blender.org/D8007
2020-06-13 19:15:29 +02:00
fe3ca3f6ce Fix T66786: Audio SDL: Video editor Sound muted without muting it
Porting fix for SDL 2 audio formats from audaspace upstream.
2020-06-13 15:19:03 +02:00
2a51feff99 Fix error selecting similar vertex groups after the 32nd
Replace 32bit int with bitmap to allow selecting
any number of vertex groups.
2020-06-13 16:56:23 +10:00
827959ff98 Cleanup: use const arguments to deform functions
This changes curve deform code not to set the objects inverse matrix,
this shouldn't cause problems as it's not used elsewhere afterwards.
2020-06-13 16:20:09 +10:00
dd4071b379 Cleanup: remove redundant casts 2020-06-13 15:56:40 +10:00
c5a0ce1ade Cleanup: naming for lattice deform functions
- BKE_lattice_deform_data_create    was init_latt_deform.
- BKE_lattice_deform_data_destroy   was end_latt_deform.
- BKE_lattice_deform_data_eval_co   was calc_latt_deform.
2020-06-13 15:56:40 +10:00
ca10903299 Cleanup: use 'r_' prefix for return arguments
Also improve alignment.
2020-06-13 15:56:36 +10:00
75aac463e7 Cleanup: comments, use bool return value 2020-06-13 15:16:18 +10:00
1754828e33 Cleanup: rename 'par', in deform code
Naming is from legacy code where the deforming object was the parent.
2020-06-13 15:02:47 +10:00
9f5833798c Modifier: skip edit-mesh conversion for armature, curve & lattice
This is an improvement over 2.7x which converted edit-mesh to mesh
(CDDM) for all 3 modifiers.

Overall this increases performance in edit-mode by around 15-20%.
2020-06-13 13:19:34 +10:00
a35de34eb7 Cleanup: clang-format, unused variable 2020-06-13 12:50:19 +10:00
dea2c3f256 Cleanup: spelling 2020-06-13 12:50:07 +10:00
098008f42d Fix T77295: Snapping in edit mode only works for non-selected polys/verts/edges
Caused by the optimization of `Skip EditMesh to Mesh Conversion`.

Now that EditMesh is used when the Mesh has no modifiers, do not
skip the selected elements.
2020-06-12 22:07:27 -03:00
fd8d245e6a LibOverride: Remove 'auto override' option.
Now all overrides are handled that way. Performances of the process look
decent enough, even with production characters...

If performance issues still arise, we'll investigate other solutions.

This should also make T73154 obsolete now.
2020-06-12 19:01:54 +02:00
b586f801fc Cycles: Improve CUDA and OptiX error reporting in the viewport
This patch makes the infamous "Cancel" error in the viewport a thing of the past. Instead it
now shows a more useful error message and streamlines the error handling process in CUDA.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8008
2020-06-12 18:24:15 +02:00
Simone Barbieri
5dca72dfc9 Add ability to remove Library data-blocks through RNA API.
Just uses same code as for all the other ID types.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D7995
2020-06-12 17:52:14 +02:00
dupoxy
091d801e9f UI: Use consistent order for physics display icons
The viewport, display order matches modifiers and the outliner.

Differential Revision: https://developer.blender.org/D8001
2020-06-12 11:38:22 -04:00
b1f9799508 Cloth: implement support for a hydrostatic pressure gradient.
When a fluid is put under influence of gravity or acceleration, it
forms an internal pressure gradient, which causes observable effects
like buoyancy. Since now cloth has support for simulating pressure
changes caused by fluid compression or expansion, it makes sense to
also support the effects of gravity.

This is intended for better simulation of objects filled or
surrounded by fluids, especially when constrained by collisions
or pinned vertices, and should result in more realistic shapes.

Obviously, this doesn't actually simulate fluid dynamics; instead
it is assumed that the fluid immediately adapts to changes in the
shape or acceleration of the object without friction or turbulence,
and instantly reaches a new static equilibrium.

Differential Revision: https://developer.blender.org/D6442
2020-06-12 18:19:40 +03:00
0981b55182 install_deps: bumped USD library version 19.11 → 20.02 2020-06-12 17:09:53 +02:00
cfff8aa067 USD: Library upgrade 19.11 → 20.02
This upgrade required a few changes:
- Some parts of our patch are no longer necessary, as the USD library
  now includes those changes.
- The rest of the patch needed adjustment as the `pxr/base/lib/*`
  directories in USD's source code have moved to `pxr/base/*`.
- Updated library names on Windows -- thanks @LazyDodo.

Note that this does not enable the USD Python API for inclusion in
Blender. It just aims at being an as-simple-as-possible version upgrade
of the USD library.
2020-06-12 16:56:31 +02:00
dc80fe5a3f USD: Use new material binding API
The material binding API that we used was removed in the Universal Scene
Description library version 20.02. Using this new API, the code is
compatible with both USD 19.11 and 20.02.
2020-06-12 16:37:02 +02:00
7e43bbb790 Fix T77586 EEVEE: UDIM image Texture doesn't Display properly 2020-06-12 16:17:37 +02:00
9f5cc128d9 Buildbot: Switch to devtoolset-9
Famous "should just work", but will never know until actually attempted
 to be used.

Ref T76783.
2020-06-12 16:06:54 +02:00
326db1b7cd GPencil: Make accessible via python to keyframe type
This can be requiered for some add-ons and for some reason this prop was missing in RNA.
2020-06-12 15:44:58 +02:00
9cc0597556 Functions: Wrap into blender namespace
Similar to previous commit, aims to resolve compilation on
devtoolset-6.
2020-06-12 15:39:16 +02:00
f8696742bb Fix/workaround compilation error on devtoolset-6
Smells like GCC bug [1], which is backed up by the fact that locally
GCC-10 and CLang-10 works fine.

Since the change is trivial (and, arguably, correct since there is
no real difference between tests code and actual code) seems fine to
fix.

Fix suggested by Jacques Lucke, thanks!

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480
2020-06-12 15:17:17 +02:00
fd14d1cceb DRW: Avoid undefined behavior when running multiple iteration
This was caused by DST.dupli_origin not being reset properly. This had
not effect in master but has effect in EEVEE motion blur branch.
2020-06-12 14:06:53 +02:00
a809631ff2 VR: Fix too dark rendering on SteamVR
Apply the sRGB transform workaround we already apply for Monado (and used
to apply for Windows Mixed Reality).
2020-06-12 13:12:45 +02:00
f12fe3c23e VR: SteamVR is now a supported OpenXR runtime! (Windows only)
Steam just released a SteamVR update with OpenXR Developer Preview
support:
https://steamcommunity.com/games/250820/announcements/detail/2396425843528787270.

Once SteamVR is set up for OpenXR (see link above), it works with
Blender "out of the box", thanks to OpenXR!

We have to apply the sRGB transform workaround for SteamVR though,
otherwise it renders way too dark. Done in the next commit.

Note that AMD users may still only see a pink screen, because the
OpenGL-DirectX compatibility fails. I will check on a fix again.
For SteamVR on Linux we may have to wait for until it supports OpenGL
rendering for OpenXR. Alternatively, we *could* add initial Vulkan
support at Ghost level and use Vulkan<->OpenGL interoperability
extensions, Monado uses these as  well.
2020-06-12 13:12:14 +02:00
16595b9ea1 Cleanup: split object data deform functions into their own files
Move armature/curve functions into their headers,
they were previously in BKE_lattice.h
2020-06-12 16:27:46 +10:00
5549fa5466 Cleanup: use doxy sections for armature.c 2020-06-12 15:06:07 +10:00
f79856f9fb Cleanup: minor changes to deform functions
- Use 'float (*)[3]' to avoid casts.
- Remove unnecessary float[3] copy in gpencil_deform_verts.
- Use MEM_SAFE_FREE
- Use const arguments.
2020-06-12 14:39:49 +10:00
24d39620fb Cleanup: split deform functions that take target object-data
Prefer meaningful function names over redundant NULL arguments.

Also clarify variable names as it wasn't obvious the object-data
is part of the object target.
2020-06-12 13:53:25 +10:00
c02baf8b50 Cleanup: use BKE_ prefix for deform functions 2020-06-12 12:52:24 +10:00
c73ee8d998 Makefile: Add build target for release
Fixes T77353
2020-06-11 17:28:01 -04:00
526e8a3da1 GPencil: Cleanup transform code 2020-06-11 20:35:50 +02:00
a03ebe9431 UI: Adjust names for Find/Replace Set Selection
This is really doing two operation so using the ampersand makes more 
sense.
Also selection sounds better than selected.
This also adjusts the name in the text Edit menu which was an issue 
raised in T68738
2020-06-11 14:05:57 -04:00
a61ba6c73d Fix possibility to add objects in override collections.
Override collections do not support that, add proper checks in BKE code
adding objects to collections.

Also try to find a suitable collection in parents in that case.

Note that this is enforced on 'public' API level, internal code can
still bypass those checks if needed. Exposing this possibility to public
API should not be needed.
2020-06-11 17:33:06 +02:00
3d18bd5c51 BLI: define default hash function for const types 2020-06-11 16:16:44 +02:00
49af2f85c3 BLI: fix forwarding with incorrect type 2020-06-11 16:01:25 +02:00
a364032dff Cleanup: fix terminology in comment 2020-06-11 15:39:53 +02:00
e44045745d BLI: don't pass const pointers to placement new operator
This resulted in compile errors.
2020-06-11 15:37:09 +02:00
e22098616c BLI: include <new> header
This header defines default placement versions of operator new.
2020-06-11 15:37:09 +02:00
Jeroen Bakker
ed00b5def6 Fix T77657: NVIDIA Quadro FX4800 crash on startup
Limit support for `GLEW_ARB_base_instance` to OpenGL 4.0 and higher. NVIDIA Quadro FX 4800
(TeraScale) report that they support GLEW_ARB_base_instance, but the driver does not support
`GLEW_ARB_draw_indirect` as it has an OpenGL3 context what also matches the minimum needed
requirements.

We use `GLEW_ARB_draw_indirect` as a target for `glMapBuffer(Range)` what is part of the
OpenGL 4 API. So better disable it when we don't have an OpenGL4 context.

Note: fix should be ported to Blender 2.83 LTS

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7994
2020-06-11 15:34:35 +02:00
9385d887d1 Fix bad poll function for constraints in liboverrides. 2020-06-11 12:01:20 +02:00
95aa8ffed5 BLI: fix printing name in print_stats methods of Map, Set and VectorSet 2020-06-11 11:21:51 +02:00
665acd2903 Fix T69497: Color Correction node ignores mask in certain cases
Happens when some of the color correction terms are mathematically
undefined: foe example, when pow() is to be calculated and the X
argument is negative.

There is no ground-truth result in such cases, so ignore such terms
entirely.

This is a generalization of D6696 from Jacques.

Differential Revision: https://developer.blender.org/D7966
2020-06-11 11:02:33 +02:00
f028760b83 BLI: make Map::Item and Map::MutableItem more accessible
This makes it easier to write range-for loops over all items
in the map without using auto.
2020-06-11 10:48:52 +02:00
3f648f5b42 Fix T77171: File selector doesn't tag preferences to be saved 2020-06-11 17:24:00 +10:00
e43a948a2c Sequencer: view toggle no longer cycles over SEQUENCER_PREVIEW state
- Remove the operator, use a generic operator instead.
- Switch between PREVIEW/SEQUENCER as the mixed state isn't as useful.
- Add menu item  to make the shortcut discoverable.
- Remove unused & broken "View Type" menu.
2020-06-11 16:36:23 +10:00
e916817520 Cleanup: move sequencer view operators into sequencer_view.c 2020-06-11 16:01:47 +10:00
cc064acf0f UI: exclude context menus from menu search
This causes the search result to be less predictable as well as
including menu items multiple times.
2020-06-11 15:39:03 +10:00
a76fc2f7ed WM: utility function to iterate on menu types 2020-06-11 15:35:46 +10:00
2c463a8250 ImBuf: use more accurate DPI/PPM conversion
Use 0.0254 for conversion as 39.3700787 isn't exactly 1/0.0254
and can't be written as a round float/double.
2020-06-11 15:04:11 +10:00
0439094105 Cleanup: make the sculpt convert type follow transform convention 2020-06-10 16:36:16 -03:00
bfa5eceb89 UI: Only set panel data expand flag for active panels
This solves a crash when switching from the modifiers tab to an armature
object and expanding a panel. Thanks to Alexander Gavrilov for mentioning
the problem.
2020-06-10 14:56:52 -04:00
faf5f7b63d Cleanup: fix compiler warning after recent changes
It would be good to use override for all member functions, but doing it for
only somes generates compiler warning.
2020-06-10 20:34:01 +02:00
63930c41bc Fix Cycles viewport missing refresh when changing scene hair settings
This code was not updated for the CoW depsgraph.
2020-06-10 19:48:08 +02:00
0621c13b3e Add proper handling of liboverrides to Scene deep copy.
Followup to rB74ec37b70cbc8dc2, also missed a case in collection
deepcopy then.
2020-06-10 19:45:52 +02:00
14bd92b12f Installdeps: Fix broken commit rBe3396d8bfc94.
Not sure why final version of the change was lost...
2020-06-10 19:45:52 +02:00
91462fbb31 Cleanup: Remove no more used ED_object_single_users.
This utils was only used for scenes' full copy, and was using old
deprecated ways to deal with ID relations and such. Good riddance!
2020-06-10 19:45:52 +02:00
4f314ee5b9 Cleanup: rename BKE_scene_copy to _update.
Matches other similar cases for collection and object, and general
naming rule (copy is for generic ID copying, duplicate is for more
involved and poweful behaviors specific to an ID type).
2020-06-10 19:45:52 +02:00
eee35ebdfb Make BKE_scene_copy fully handle all duplicate modes, deep copy included.
This greatly simplifies and unifies logic.

Also addresses T77255: full scene copy will now use same preferences
parameters as object or collection duplicate to choose which data-blocks
to copy along.
2020-06-10 19:45:52 +02:00
b05fa123d7 Make `BKE_collection_duplicate able to handle master collections.
Those are then assumed already duplicated, and not touched. However, all
of ther objects and sub-collections can still be processed as with any
other regular collection...
2020-06-10 19:45:52 +02:00
474b288933 BLI: add Map.pop_default method
There is a nice use case for this in depsgraph code.

Also I added some previously missing calls to std::move.
2020-06-10 19:02:34 +02:00
20658e6a29 Fix T77047: Dyntopo Sample detail size on hidden mesh causes crash
The `Toolbar` and `Sidebar` hide the corresponding panel
`VIEW3D_PT_sculpt_dyntopo` by polling for context.sculpt_object and
context.tool_settings.sculpt. In the Active Tool in the Properties
Editor this poll does not return False though, thus the
sample_detail_size is possible from there.

Second security check (the operator poll `SCULPT_mode_poll`) checks the
active object -- that is still valid even if hidden, so we are allowed
to execute the operator. However the active object becomes NULL once the
area is switched in `sample_detail()` -- see `CTX_wm_area_set`), leading
to the crash.

Dont think there is a quick and easy way to do this in the poll from the
Properties Editor, so just check for a valid active abject in the
operator and return OPERATOR_CANCELLED if we dont have it.

Maniphest Tasks: T77047

Differential Revision: https://developer.blender.org/D7832
2020-06-10 18:46:41 +02:00
4b39de677d Fix T74101: File Browser in macOS fullscreen crashes or makes windows unusable
When closing the File Browser window after making it fullscreen, Blender would
either crash or all windows would disappear, with no obvious way to bring them
back.

The "fix" is to not allow fullscreen for File Browsers (or any future "dialog"
windows), but only maximizing. From what I can tell that's how secondary
windows are supposed to work on macOS. What we previously did seemed like
something macOS doesn't handle cleanly, and I didn't find a simple way to do so
on our side.
2020-06-10 18:40:05 +02:00
84d4447bc5 BLI: fix type forwarding in Map
Without this change, the code might do an unwanted conversion.
2020-06-10 18:27:18 +02:00
4c172f7ca6 BLI: support constructing StringRef from start and end pointer 2020-06-10 18:27:18 +02:00
2d695367a7 UI: More specific modifier move to index operator description 2020-06-10 11:23:03 -04:00
a9dfad831b Fix T77694: Start panel animation when expansion data changes
During normal drawing there is a rather complicated method to check
whether the panels should be animating. It's not set up to deal with
the panel expansion changing from outside the UI, which is now possible
with the panel expansion connected to the modifier's show_expanded
property.

The solution is to activate panel animation if setting the expansion
property has changed.
2020-06-10 11:16:55 -04:00
b0ac7a89b0 UI: Only set first bit of modifier expansion fag with Python
Only the flag for the top level panels is exposed with RNA, so this adds
a set method to only change that bit.
2020-06-10 11:08:58 -04:00
9b784668ae Cleanup: use proper enum type in parameter of BKE_scene_copy. 2020-06-10 17:01:15 +02:00
74ec37b70c Enable (deep) copy of overrides.
This commit enables basic copy of overrides on generic ID level, as well
as from (deep) copy operators for objects and collections.

So e.g. if your linked overridden caracter is in a collection, you can
now (from the outliner) Duplicate that override collection to get a new
overriding copy of the character.

We still need operators (new or modifying existing ones) to handle that
from 3DView e.g.

Note that deep copy code for objects/collections (and incidently
animdata) had to be modified to avoid duplicating/making local IDs that
remain linked ones being used by overrides ones.
2020-06-10 16:48:49 +02:00
1d0017089c Fix (unreported) disapearance of some overrides after save & reload.
The override operations generated from 'do not follow' RNA pointer
properties (i.e. pointers to other IDs) were not properly clearing their
'no more used' flag, and hence were incorrectly deleted on second save.
2020-06-10 16:48:49 +02:00
3ea04d3e11 Blenloader: Don't just crash when a struct name is not known
Related to T77524.

This brings back the old way of handling corrupted data.
2020-06-10 16:31:41 +02:00
6fe32d7fd6 Fix T77524: Don't try to write storage of node with undefined node
This cannot work, because the storagename is the empty string.
2020-06-10 16:16:03 +02:00
d62bbf4079 UI: Show library names grayed out and right-aligned in menus
Should separate the data-block name better from the library name and improve
readability.
2020-06-10 15:52:10 +02:00
93c8955a72 Mesh Edit: preserve Custom Normal vectors in topology operators.
Custom Loop Normals are normally encoded relative to the default
normals, similar to normal maps, allowing them to naturally follow
mesh deformations. Changes to mesh topology however often result
in nonsensical effects that are not desired.

The Remove Doubles operation especially (now known as Merge By
Distance) is intended as a purely topological operation, and
definitely should not change the vector of the custom normals.

This patch implements that behavior by converting the relative
encoding into an absolute vector layer for the duration of the
operation. It also modifies other Merge types in this way for
consistency, the Rip operator as their inverse counterpart;
and also Delete, Dissolve, Connect Path and Knife operators
as other examples more related to topology than shape.

On the technical side, this ports mesh_normals_loop_custom_set
to BMesh, and then uses a temporary Custom Data layer to store
the normals as vectors for the duration of the above mentioned
operations. When the normals are converted back to custom data,
the caller can choose whether to mark edges as sharp to preserve
distinct normals, or just average them instead. All but Remove
Doubles choose to average for now.

Differential Revision: https://developer.blender.org/D4994
2020-06-10 16:51:22 +03:00
a58dc25b07 Cleanup: improve custom data type names
This is related to T76659.

This just renames data type names to `CD_PROP_STRING`, `CD_PROP_FLOAT`
and `CD_PROP_INT32`. It makes them a bit more specific and removes
unnecessary abbreviations.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D7980
2020-06-10 15:47:31 +02:00
cc26041d36 Depsgraph: use blender::Set instead of std::set
We decided that `blender::Set` should be the default choice for a set
data structure in Blender.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D7982
2020-06-10 15:42:35 +02:00
a7ea07c677 Depsgraph: use blender::Vector instead of std::vector
We decided that `blender::Vector` should be the default choice for
a vector data structure in Blender.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D7981
2020-06-10 15:33:50 +02:00
0852d13bbd Depsgraph: use native Set data structure
Differential Revision: https://developer.blender.org/D7982
2020-06-10 15:24:03 +02:00
044b824c9d Cleanup: remove unused MBALL_NOSEL flag 2020-06-10 23:01:57 +10:00
eda58c47b8 Cleanup: asan warning with bit-shifting flag 2020-06-10 23:01:57 +10:00
4fefe3ac3b BLI: rename tests from "array_ref" to "span"
This was missing in an earlier commit.
2020-06-10 14:50:29 +02:00
a71f073dfb BLI: add Map.pop_try method
I found this pattern in depsgraph code more than once.
2020-06-10 14:47:22 +02:00
75ce20a000 Cleanup: redundant headers 2020-06-10 22:34:11 +10:00
0ca0ad5318 Cleanup: move BKE_mesh_wrapper functions into own header 2020-06-10 22:34:11 +10:00
84a0a6d16c BLI: update behavior of Map.lookup_or_add
Previously, this function would expect a callback function as parameter.
This behavior is now in Map.lookup_or_add_cb. The new version just
takes the key and value directly.
2020-06-10 14:15:04 +02:00
f367f1e5a5 Cycles: Improve OptiX viewport denoising performance with CUDA rendering
With this patch Cycles recognizing when a logical OptiX and CUDA device represent the same
physical GPU and attempts to eliminate unnecessary tile copies for viewport rendering if that
is the case for all active devices. In addition, denoising is now no longer performed on the first
available OptiX device only, but instead it will try to match CUDA and OptiX
rendering/denoising devices exactly to maximize utilization.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7975
2020-06-10 14:12:13 +02:00
d12f6a90b1 Fix T77599 Image UV editor use linear interpolation 2020-06-10 13:37:04 +02:00
d4315040ad Cycles: Fix CUDA compilation after cone sampling fix 2020-06-10 13:02:43 +02:00
146473f083 GPencil: Include new Bevel parameters when convert stroke to Curve
These new parameters allow to define bevel depth and resolution.

Related to T77631
2020-06-10 11:42:35 +02:00
82f51fe913 Fix T77356: Texture Preview not taking alpha into account
Since rB329b4c3363e4 a texture preview is not rendered through the
preview.blend and a renderengine anymore [unlike materials etc.]

Alpha wasnt handled in that commit, take that into account now.

sidenote: not sure if we should be looking into drawing alpha with a
checkerboard in the background for texture previews (see texture
previews elsewhere)?

sidenote 2: might also be good to document where the "calculate" and
"invert" alpha options are still used? [looks a bit inconsistent:
compositor uses it, Image Editor as well as Render Engines dont?]

Maniphest Tasks: T77356

Differential Revision: https://developer.blender.org/D7929
2020-06-10 11:07:20 +02:00
df50104e1c Fix T77068: UV Proportional Edit "Connected Only" option affects UV
clipping (even if the proportional edit itself is disabled)

Checking T_PROP_EDIT_ALL returns true for _any_ of the options, so just
check for T_PROP_EDIT.

Note: this might expand to other similar checks (e.g. header text)

Maniphest Tasks: T77068

Differential Revision: https://developer.blender.org/D7927
2020-06-10 11:02:09 +02:00
fc8a7a44b2 Fix T77560: Bone selection crashes
The was caused by 8b347fc2cd as the old BONESEL_NOSEL flag
handled the -1 case (used for none).

Instead of checking for -1, remove these elements from the array
as selection code makes decisions based on the number of hits detected.
2020-06-10 18:04:01 +10:00
edb4e553f5 LibOverride: Fix issues related to ID name differences.
Local datablocks (including overrides) need to have a unique name, which
can then differ from the reference linked one (especially when there are
several local overrides of a same linked data).

Issue is, ID name is a 'rna name property', and as such used as
reference when dealing with override of collections of IDs, so we cannot
have a changing name.

The solution implemented here should work and is simple, but it may have
some issues in corner cases (time will say), it is not really robust.

Alternative solution would be to store ID pointers as reference in
override operations, instead of there name. But that would potentially
add quiet a lot of overhead to foreach looping in `lib_query.c`.
2020-06-10 09:38:34 +02:00
2d1b560a4e Fix T77632: Deform modifier auto-binding not working
Regression in deaff945d0
2020-06-10 15:54:05 +10:00
a4bb4b6e65 Mesh: utility functions to access wrapped mesh coordinates 2020-06-10 15:54:00 +10:00
48ca66cfe7 Fix T77195: Crash with edit-mesh viewport measurements enabled
Simplify looping over faces & tessellation data.

Regression in 6526c3ced8, the index accessed wasn't valid.
2020-06-10 13:46:10 +10:00
46e0ec05ef Cleanup: Move each special_aftertrans_update to their respective TransData file 2020-06-09 20:27:51 -03:00
63a40ed422 Cycles: Fix uniform cone sampling
This code is currently only used for the Glossy Toon BSDF, but it's a generic
building block that might be used for other things in the future.

To see why the current code does not give a uniform distribution, consider that
it chooses both angles uniformly, but the smaller the angle from the center of
the cone is, the smaller the differential solid angle is (similar to how
sampling disks by choosing radius and phi uniformly does not work).

Differential Revision: https://developer.blender.org/D7948
2020-06-09 22:19:15 +02:00
d3f83d9f95 UI: Remove extra separator in some cases 2020-06-09 15:11:14 -04:00
d1932a8ed6 Fix missing animation decorators for pointer buttons
Also, remove manually placed decorator for vertex groups in modifiers. This was
only needed because of this bug, and the layout was slightly misaligned.
2020-06-09 20:42:22 +02:00
819ebc9901 UI: Set modifier panel expansion on every redraw
This will fix situations where the modifier epansion was set elsewhere
besides the UI, like from the python console, solving the drawing part
of T77502.

Also adds  update tags to the show_expanded property, which means
the properties window redraws when the property changes.
2020-06-09 13:41:50 -04:00
cb9de95d61 Sculpt: Face Set Edit Operator
This operator performs an edit operation in the active face set defined
by the cursor position and updates the visibility. For now, it has a
Grow and Shrink operations, similar to Select More/Less in edit mode or
to the mask filter Grow/Shrink modes. More operations can be added in
the future.

In multires, this updates the visibility of an entire face from the base
mesh at once, which makes it very convenient to edit the visible area
without manipulating the face set directly.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7367
2020-06-09 19:09:50 +02:00
77789a1904 Sculpt: Pose Squash and Stretch deform mode
This implements squash and stretch as a deform mode for the Pose Brush.
It is similar to scale, but it applies different scale values in different
axis. To achieve this, the pivot local space of the transform needs to
be aligned to the segment when using this deform mode to apply the scale
in the correct direction.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7934
2020-06-09 18:49:10 +02:00
075156de9f Voxel Size Edit: Fix text not readable when zooming in the viewport
Previously the scale of the text was using object space, so when working
with scaled objects or small meshes the size of the text was wrong. Now
it calculates a scale in screen space, so the text size should be much
more predictable

Reviewed By: sergey, Severin

Differential Revision: https://developer.blender.org/D7941
2020-06-09 18:28:41 +02:00
69b67d4f07 Fix Edit Voxel Size label in preview
The format string was wrong so it was rendering an extra % character

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7942
2020-06-09 18:27:18 +02:00
53d1a729cc UI: Avoid rebuilding Outliner tree on simple button interactions
E.g. simply on button hover changes, the tree would be needlessly rebuilt.

I wouldn't be surprised if this causes side-effects, for some state changes we
may still have to do a full rebuild.
2020-06-09 18:12:56 +02:00
ee64b595da Fix T77504: Operator search gives wrong results
Regression in e8ab0137f8
2020-06-10 01:18:17 +10:00
e1cc9aa7f2 Nodes: efficient node tree queries and inlining
This adds two data structures that wrap a node tree. However, they work
on different abstraction levels.

`NodeTreeRef` is an immutable structure that makes working with a node
tree in C++ much more efficient and convenient. It supports various
queries efficiently, that are not easily possible using just `bNodeTree`.

`DerivedNodeTree` builds on top of `NodeTreeRef`. It contains a flattened
view on the node tree, i.e. with node groups being inlined. Every inlined
node still knows its "call stack". It supports pretty much the same queries
as `NodeTreeRef`.

Both data structures come with a dot graph exporter for debugging purposes.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D7628
2020-06-09 17:08:41 +02:00
b37fca650e Cleanup: Move pointcache dna to separate file
Reviewers: brecht

Differential Revision: https://developer.blender.org/D7965
2020-06-09 17:01:54 +02:00
0cb59866af Cleanup: extract function for common function call sequence 2020-06-09 16:43:34 +02:00
4622434c34 Fix T76894: Disable clipping region selection in material/rendered mode
In this case the draw engine isn't responsible for the selection, but
the editor is.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7955
2020-06-09 16:31:40 +02:00
Evan Wilson
84a5bd9135 Fix T76984: Normal node not drawing properly in compositor
Differential Revision: https://developer.blender.org/D7827
2020-06-09 16:29:31 +02:00
4e9efa80ca Cleanup: correct enum names in comments 2020-06-09 16:23:27 +02:00
9d75f23566 BLI: remove incorrect const 2020-06-09 16:23:27 +02:00
37d68871b7 GPencil: Keep original stroke when reproject
When reproject a stroke sometimes is good to keep the copy of the original stroke to create volume effects

Related to T77639

{F8603513}

Reviewed By: mendio, pepeland

Maniphest Tasks: T77639

Differential Revision: https://developer.blender.org/D7963
50258
2020-06-09 15:46:55 +02:00
c23b1de2cf Fix T72936: Incorrect gizmo orientation with inherit rotation disabled 2020-06-09 22:35:11 +10:00
3ffb52d114 Fix T77448: Camera Solver constraint can't be converted to f-curve
A regression caused by c57f65c088 as a fix of another issue.

Added an exception for camera solver as that is always pointing
to camera object.

Since this is a regression which happened in 2.83.0 this change is
a candidate to be ported to the 2.83.1.
2020-06-09 14:06:35 +02:00
b7150183e7 Cleanup: Silence some overflow warnings in transform code 2020-06-09 08:51:51 -03:00
8522b429b5 Transform: Fixes after recent refactor
Pointed by strict compiler warnings, but some of the reports were
actually a real bugs:

- Access uninitialized memory of td_mirror_iter.

  Assuming that iterator is to point to the first element of the
  data array.

- Lattice's recalc data was never called.

There is also a fix for redundant declaration of recalcData() and
missing declaration of recalcData_lattice().
2020-06-09 12:19:44 +02:00
5620a09e0d Cleanup: move hashing of OperationIDKey to member function 2020-06-09 12:08:32 +02:00
f7c0f1b8b8 BLI: rename ArrayRef to Span
This also renames `MutableArrayRef` to `MutableSpan`.
The name "Span" works better, because `std::span` will provide
similar functionality in C++20. Furthermore, a shorter, more
concise name for a common data structure is nice.
2020-06-09 11:58:47 +02:00
7d2b4ae9c6 Fix menu operator/search clipping the last character
Noted in T77504
2020-06-09 19:25:59 +10:00
128296129a GPencil: Cleanup doxygen comments 2020-06-09 11:17:21 +02:00
74b0713d8a Fix warning-as-error about int to uint conversion in new BLI CPP code.
Was breaking build for me here...
2020-06-09 11:16:32 +02:00
874a078d86 GPencil: Improve viewlayer masking check
Check if the mask layer is used in a layer that is going to be used in the current viewlayer.

Related to T77667
2020-06-09 11:13:23 +02:00
d68e29b62c Workbench: Fix missing NULL pointer check 2020-06-09 10:59:31 +02:00
9bb7d6ed68 BLI: put C++ data structures in "blender" namespace instead of "BLI"
We plan to use the "blender" namespace in other modules as well.
2020-06-09 10:27:24 +02:00
d8678e02ec BLI: generally improve C++ data structures
The main focus here was to improve the docs significantly. Furthermore,
I reimplemented `Set`, `Map` and `VectorSet`. They are now (usually)
faster, simpler and more customizable. I also rewrote `Stack` to make
it more efficient by avoiding unnecessary copies.

Thanks to everyone who helped with constructive feedback.

Approved by brecht and sybren.

Differential Revision: https://developer.blender.org/D7931
2020-06-09 10:15:43 +02:00
50258d55e7 Cleanup: remove debug prints in py.ops.nla.bake() 2020-06-09 17:57:50 +10:00
7a0ad20e5f Fix mistake in recent fix for text editor overflow 2020-06-09 17:39:43 +10:00
1355d9cc8c Sequencer: restore behavior removed from recent refactor 2020-06-09 16:49:33 +10:00
f88d59ecf8 Fix T77148: Crash changing multiple values for sequencer strips
This was caused by assuming all strips were the same type.
2020-06-09 16:24:50 +10:00
0c4bc09092 Docs: comment text scale behavior
Avoid misunderstanding that caused T77609.
2020-06-09 15:19:31 +10:00
70a27d0a63 Fix T77609: Scale to Fit Text Box fails when text is too narrow
Caused by error in fix for T75965 (83d9ba341e).
2020-06-09 15:07:59 +10:00
f326b6a18e Cleanup: avoid addition with large strings in Python
This is known to be inefficient, use a second write call instead.
2020-06-09 13:40:51 +10:00
9f7d84b656 Cycles: Add support for P2P memory distribution (e.g. via NVLink)
This change modifies the multi-device implementation to support memory distribution
across devices, to reduce the overall memory footprint of large scenes and allow scenes to
fit entirely into combined GPU memory that previously had to fall back to host memory.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7426
2020-06-08 17:55:49 +02:00
0a907657d4 Functions: Run-time type system and index mask
This adds a new `CPPType` that encapsulates information about how to handle
instances of a specific data type. This is necessary for the function evaluation
system, which will be used to evaluate most of the particle node trees.

Furthermore, this adds an `IndexMask` class which offers a surprisingly useful
abstraction over an array containing unsigned integers. It makes two assumptions
about the underlying integer array:
* The integers are in ascending order.
* There are no duplicates.

`IndexMask` will be used to "select" certain particles that will be
processed in a data-oriented way. Sometimes, operations don't have to
be applied to all particles, but only some, those that are in the indexed by
the `IndexMask`. The two limitations imposed by an `IndexMask` allow for
better performance.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D7957
2020-06-08 17:37:43 +02:00
b5846ebce7 Fix T77603: OSL parser fails when script ends with comment without newline
Reviewers: brecht

Differential Revision: https://developer.blender.org/D7958
2020-06-08 17:01:47 +02:00
6f96dfabe5 Simulations: initial simulation state and cache
The current particle state is stored in a `CustomData` instance and
the cache is stored in `PointCache`.

The current state exists on the copy-on-write copies of the simulation,
while the cache only exists in the original data block.

This patch implements a temporary trivial particle simulation that does not
use the node system yet. It is used for testing and will be replaced soon.

`PointCache` still has some limitations that need to be overcome using
separate refactorings. For example, we need to be able to store the number
of particles in the point cache. Also we need to change which attributes
are stored for a particle system more dynamically than is currently possible afaik.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D7836
2020-06-08 15:49:17 +02:00
bf4198cdaf Fix crash running "Edit Voxel Size" operator outside of a main 3D View region
Accessed `RegionView3D` data from context, which of course would only be set if
actually executed from a main 3D View region.
2020-06-08 15:45:00 +02:00
e3396d8bfc Installdeps: better handling of python versions.
now that we stick to some outdated py version, some distro (like current
debian testing) will feature several python3 dev package, but other
dependant libs like numpy are only built against current default version
of python (3.8 now in deb testing)...

In order to be able to use distro packages we need to allow using higher
versions of python, and set relevant CMake option accordingly.
2020-06-08 15:38:11 +02:00
1c189aa70a Fix T70873: Pivot Center doesn't compute mirror elements 2020-06-08 08:23:37 -03:00
335c1e48ee Cleanup: Create a header for TransData declarations 2020-06-08 08:23:37 -03:00
4f4141c8f4 Cleanup: Move TransDataSeq declaration to its TransData file 2020-06-08 08:23:37 -03:00
6e53b28898 Cleanup: Move TransDataNla declaration to its TransData file 2020-06-08 08:23:37 -03:00
e54fb1b819 Cleanup: Move each recalcData to their respective TransData file 2020-06-08 08:23:37 -03:00
826769d1c7 Cleanup: Split transform conversion of edge and uv to their own files 2020-06-08 08:23:37 -03:00
34b4dca9f1 Cleanup: Move TransSeq declaration to tansform_convert 2020-06-08 08:23:37 -03:00
0e040ef3fb Cleanup: Rename function
I forgot to remove the "_access" suffix in a previous rename.
2020-06-08 12:44:33 +02:00
f71a2fc6c3 Fix T76273 Glitches caused by glCopyImageSubData on windows + intel gpu
We limit this fix to Windows Intel GPU whose driver reports at most GL 4.4
support. This limits the fix to the range of reported GPU.
2020-06-08 12:09:51 +02:00
460c1d8e20 Revert "UI: Bevel: Show Offset type before offset amount"
This reverts commit f50222ba2e.
2020-06-08 05:40:19 -04:00
4d168e0b8c Modifiers: fix copy paste mistake in recent refactor 2020-06-08 11:01:32 +02:00
1f6d1213d2 Workbench: Use eGPUSamplerState to change texture sampling behavior
This removes some fragment shader hacks and improve the support of
different repeat & filtering modes.

This fix T77453 Image texture not repeating in viewport
2020-06-08 10:58:45 +02:00
11ba9eec70 GPencil: Show only first frame if current frame is equals or greater than current frame
Previously, the first frame was displayed from frame 0, but now, the first frame is only displayed when the current frame is equal or greater than the keyframe number.

The previous system was logical when the grease pencil was not an object, but now it seems more logical to display the keyframe if the current frame is equal to or greater than the keyframe number.

Reviewed By: mendio, pepeland

Differential Revision: https://developer.blender.org/D7851
2020-06-08 09:04:25 +02:00
917ab4fbf9 UI: use term 'Merge Distance' instead of 'Merge Limit' 2020-06-07 23:40:14 -04:00
c175ff19d8 UI: Fix Wrong UI Label after recent modifier changes 2020-06-07 23:37:17 -04:00
f50222ba2e UI: Bevel: Show Offset type before offset amount
Because this controls how the amount is used in should be set first and 
is more important therefor place it at the top.

This is also consistent with other areas in Blender
2020-06-07 21:03:26 -04:00
b4ef87afb6 UI: Modifiers: Use Falloff subpanel for Weight Proximity
This makes the UI consitent with the weight edit modifier
2020-06-07 20:17:19 -04:00
24904301e5 Fix: Wrong UI Label for mesh cache play mode 2020-06-07 19:09:35 -04:00
112c86fd5d UI: Use Proper Title Case 2020-06-07 19:00:47 -04:00
281319653e UI: Do Use term 'Subsurf' 2020-06-07 18:16:56 -04:00
ccbf858bb8 Fix T77487: Only disable Multires Buttons in Edit Mode
Previously the operator buttons were disabled in every mode but
edit mode and sculpt mode.
2020-06-07 11:49:38 -04:00
00961d062a GPencil: Fix unreported Shift+F OPacity key not working
This wa snot working since the new scale thickness was included.
2020-06-07 16:18:02 +02:00
dc6cee4724 Fix T77520: GPencil viewlayer filter produce crash with masking layers
If a layer is used for masking, it cannot be filtered by viewlayer because the masked layer needs to have the mask layers in the draw pipeline.

This check is only done in final render.
2020-06-07 13:06:39 +02:00
8f25cfdbfd Refactor: use new api for some remaining functions in writefile 2020-06-07 12:22:19 +02:00
3e07d958f1 Cleanup: remove unused functions 2020-06-07 12:14:17 +02:00
561a81eb24 Refactor: use new api in remaining direct linking code 2020-06-07 12:12:48 +02:00
f6524032ca Refactor: use new api for direct linking pointcache and particle system 2020-06-07 12:05:30 +02:00
a7de01aaa9 Refactor: use new api for direct linking customdata 2020-06-07 11:58:58 +02:00
5f7007a962 Refactor: use new api for direct linking packedfile and dverts 2020-06-07 11:55:27 +02:00
1626c526f8 Refactor: use new api to check if endian switch is required 2020-06-07 11:51:07 +02:00
ab2b9821fc Cleanup: remove unused test_pointer_array function 2020-06-07 11:48:18 +02:00
eb31037503 Refactor: use new api for direct linking movie clip data 2020-06-07 11:47:37 +02:00
01132d4a83 Refactor: use new api for direct linking id properties 2020-06-07 11:42:58 +02:00
5ff8a2ca0e Refactor: use new api to simplify IDP_DirectLinkGroup_OrFree 2020-06-07 11:34:23 +02:00
b8afd4e8bb Refactor: use new api for direct linking bones, view layer and userdef 2020-06-07 11:30:32 +02:00
f0f666541e Refactor: use new api for direct_link_id_common 2020-06-07 11:16:14 +02:00
959267ffcc Refactor: use new api for direct linking preview image 2020-06-07 11:08:38 +02:00
766b3037eb Refactor: use new api for direct linking curvemapping and its callers 2020-06-07 11:07:08 +02:00
ee4732ca22 Refactor: use new api for direct linking gpencil modifiers and shaderfxs 2020-06-07 11:00:48 +02:00
ce9a64c454 Refactor: use new api for direct linking modifiers 2020-06-07 10:56:06 +02:00
a99a8061ae Refactor: use new api for direct linking keying sets, node sockets and pose 2020-06-07 10:35:34 +02:00
6c6658ccc0 Refactor: use new api for direct linking animdata 2020-06-07 10:27:42 +02:00
aed11c673e Fix T77456: Broken vertex paint undo on high-poly objects.
This is a critical fix that should also be backported to 2.83.1

Fairly stupid bug in fact, code detecting changes across undo steps was
assuming that each BHEAD (a block of data in blendfiles) would not be larger
than one memory chunk... Which is the case in alsmost every situation,
besides some super-heavy geometries, and other similar things (images
would also be affected e.g.).
2020-06-06 16:18:39 +02:00
03a693922d Cleanup: Fix typo and other issues in some comment. 2020-06-06 16:18:39 +02:00
5198cb1813 Fix typo in recent bone selection refactor
Thanks to @jbakker for pointing this out.
2020-06-06 23:32:46 +10:00
6c114a139b Refactor: use new api for direct linking paint curve, cachefile and workspace 2020-06-06 14:46:27 +02:00
033b6a7fb4 Refactor: use new api for direct linking particlesettings, movieclip, mask, linestyle and palette 2020-06-06 14:43:06 +02:00
9b3fda0357 Refactor: use new api for direct linking armature, action, nodetree and brush 2020-06-06 14:34:57 +02:00
a5e56efc98 Refactor: use new api for direct linking lattice, world, camera, speaker, sound, lightprobe and collection 2020-06-06 14:25:34 +02:00
18b57d3e2c Refactor: use new api for direct linking light, vfong, text, ipo and key 2020-06-06 14:17:27 +02:00
9a3d54943a Refactor: use new api for direct linking mball, material, texture and image 2020-06-06 14:10:43 +02:00
1800127355 Refactor: use new api for direct linking mesh and curve 2020-06-06 14:02:03 +02:00
cf3e617913 Refactor: use new api for direct linking scene and object 2020-06-06 13:55:59 +02:00
125acdf933 Refactor: use new api for direct linking hair, pointcloud, volume and simulation 2020-06-06 13:28:00 +02:00
0eb969dd99 Refactor: use new api for direct linking screen and gpencil 2020-06-06 13:20:20 +02:00
1d066050b6 Refactor: use new api in direct_link_windowmanager 2020-06-06 12:53:59 +02:00
5146034aa9 Blenloader: simplify list reading api 2020-06-06 12:53:36 +02:00
Marcelo Demian Gómez
7bd73f562a Fix T77473: Removing GPencil vertex group mix data
When removing a vertex group from a Grease Pencil object, if the vertex group is not the last one that was added, the information for the remaining groups weights gets mixed up.

Minor edit of the patch for clang format.

Differential Revision: https://developer.blender.org/D7943
2020-06-06 10:19:26 +02:00
f5781384ae GPencil: Fix unreported fill helper lines not displayed
When use the helper lines (red lines) with fill tool, the lines were not displayed in some situations.
2020-06-06 10:04:56 +02:00
a39cc5ae4d Fix for T77478: Quiet Conversion Error/Warning
Quiet warning/error about int and float multiplication.

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

Reviewed by Ray Molenkamp
2020-06-05 17:05:06 -07:00
b74cc23dc4 UI: Ability to Print Bold and Italics
Adds the ability to print text in bold or italics style, synthesized from a single base UI font.

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

Reviewed by Brecht Van Lommel
2020-06-05 15:39:17 -07:00
fc672ce8e2 Refactor: use new api for remaining direct data writing 2020-06-05 21:55:45 +02:00
60b8db587f Blenloader: new write_struct_at_address api functions 2020-06-05 21:55:45 +02:00
f0047e6754 Refactor: use new api for write_movieclip and write_keyingsets 2020-06-05 21:55:45 +02:00
0f1361bbc3 UI: Apply Latest Changes to Multires Modifier
These changes didn't make it through the transition to the new UI layout.
- Add "has_displacement" check
- Add "sculpt_levels" property
- Give subdivide operators the operator name so they work
2020-06-05 15:31:04 -04:00
5340556710 Refactor: remove temporary IDP_WriteProperty_new_api 2020-06-05 21:22:43 +02:00
7949953b1e Refactor: use new api in write_userdef 2020-06-05 21:19:03 +02:00
a77350cce2 Cleanup: remove unused functions 2020-06-05 20:56:36 +02:00
69c9204026 Refactor: use new api for write_curvemapping and its users 2020-06-05 20:55:42 +02:00
26fb0d4258 Refactor: use new api to finish write_object 2020-06-05 20:46:27 +02:00
c3e88fdd03 Refactor: use new api for write_pointcaches 2020-06-05 20:40:38 +02:00
a943b65f1b Refactor: use new api in write_area_map 2020-06-05 20:34:59 +02:00
4df20c058d Refactor: use new api in write_bone 2020-06-05 20:34:59 +02:00
2ee95e91f7 Remove context check from constraint and shaderfx edit poll
This mirrors 1f78e86070 from 2018 for mesh modifiers.

Differential Revision: https://developer.blender.org/D7940
2020-06-05 14:30:15 -04:00
70ad18b94d Fix T77335: Circle Select tool selects faces perpendicular to the view
Internally the face dots are being drawn when the Edges option of the
overlay (not the selection mode) is disabled.
2020-06-05 14:49:57 -03:00
b91b90f0dd Fluid: Cleanup internal Python object names
Manta Python objects should not carry the global ID in their names.
2020-06-05 18:52:33 +02:00
b16a85fe0b Cleanup: use 'r_' prefix for return arguments in math_color 2020-06-06 00:46:25 +10:00
9b099c8612 UI: Drag and Drop Modifiers, Layout Updates
This patch implements the list panel system D7490 for modifiers.
It also moves modifier drawing to a callback in ModifierTypeInfo
in line with the extensible architecture refactoring goal T75724.

This adds a PanelRegister callback and utilities for registering
panels and subpanels. It also adds the callbacks for expansion saving
and drag and drop reordering described in D7490.

These utilities, callbacks, and other common UI elements shared
between modifiers live in MOD_ui_common.c.

Because modifier buttons are now in panels, we can make use of
subpanels for organization. The UI layouts also use the single
column layout style consistently used elsewhere in Blender.
Additionally, the mode-setting buttons are aligned and ordered
consistently with the outliner.

However, the large number of UI changes in this patch may mean
that additional polishing is required in master.

Thanks to William Reynish (@billreynish) who did a fair amount of the
layout work and to Julian Eisel (@Severin) for consistent help.

Differential Revision: https://developer.blender.org/D7498
2020-06-05 10:41:03 -04:00
4e70e0e384 LibOverride: RNA: Cleanup no more needed property-specific override flags. 2020-06-05 16:37:40 +02:00
846dde590f Cleanup: use doxy sections for sequencer edit, select 2020-06-06 00:12:31 +10:00
0f64de6b9b Cleanup: compiler warning 2020-06-06 00:12:28 +10:00
e9659d0e6e Fix failing assert when dragging panel close to region edge
Forgot to include this change from Julian Eisel @Severin in the
previous commit.
2020-06-05 10:05:47 -04:00
859505a3da UI: Pan 2D Region When Dragging to Boundary
This adds a modal operator called Edge Pan, which is meant to run invisibly
while something inside a region is being dragged. This patch applies this
to dragging panels, but it can be used elsewhere too.

The speed (which is defined relative to how far the mouse is beyond the
boundary) and delay are easily adjustible. and the speed also increases
smoothly from a start value to a max to make it feel more interactive
and less robotic.

Differential Revision: https://developer.blender.org/D7465
2020-06-05 10:01:20 -04:00
1270984e13 Refactor: use new api in write_customdata 2020-06-05 15:54:19 +02:00
b77834ceb1 Refactor: use new api for writing modifiers 2020-06-05 15:38:36 +02:00
a8afe509da Refactor: use new api in write_nodetree_nolib 2020-06-05 15:22:43 +02:00
0ee98c654e Refactor: use new api in write_animdata 2020-06-05 15:15:28 +02:00
abeda01ac6 GPencil: Improve Vertex Paint in filled areas
When use the Tint tool, it was very difficult to tint the filled areas if the strokes had very few points or the area was big.

Differential Revision: https://developer.blender.org/D7936
2020-06-05 15:11:08 +02:00
67b17684e6 Fix T77396: crash in memfile undo code after recent optimizations.
Optimizations in rBcda15408582e8de5b405 do not guarantee anymore that
consecutive memchunks in two consecutive undo steps are actually about
the same data (and hence can share the same buffer when unchanged).

This buffer sharing can now happen without any particular order, so we
need to change the process when 'merging' two undo memfiles together.

Note that existing code was not logically correct either, even with
previous undo storage code, since it would blindly transfer ownership of
the buffer to the second memchunk, without checking whether the first
one was actually the owner of it or not (a same buffer can be shared by
matching memchunks in many consecutive memfiles/undo steps).
2020-06-05 14:54:54 +02:00
ff5d24f8be Refactor: use new api in write_iddata 2020-06-05 14:45:32 +02:00
f797a5406d Refactor: use new api for writing object, mesh and particlesettings 2020-06-05 14:41:42 +02:00
a6cd77bad1 Refactor: use new api for writing camera, lattice, vfont and key 2020-06-05 14:32:26 +02:00
0a41a85bf3 Refactor: use new api for writing curve, mball, image, light, world, material and texture 2020-06-05 14:25:07 +02:00
b78fb8b987 Cleanup: remove unused sequencer marker code from 2.4x 2020-06-05 22:18:58 +10:00
74fa600ede Sequencer: split select side of frame out of the select operator
The select operator was getting overloaded with functionality
unrelated to selecting the strip at the mouse position.

- Don't save settings, allowing the keymap only to include
  non-default options.

- Fix selecting strips overlapping the current frame
  overwrite all flags.
2020-06-05 22:14:02 +10:00
d850daf416 Refactor: use new api for writing collection, action and gpencil 2020-06-05 14:09:35 +02:00
43294e5f49 Refactor: use new api in write_scene 2020-06-05 13:55:45 +02:00
60a786e711 Refactor: use compile time dna struct ids in blenloader api 2020-06-05 13:55:45 +02:00
5ed2ed28ab CodeCleanup: Supressed warning 2020-06-05 13:40:22 +02:00
dc69747f72 Refactor: use new api for writing linestyle, cachefile, hair, pointcloud, volume and simulation 2020-06-05 13:29:46 +02:00
e4e8259d39 Refactor: use new api for writing movieclip, mask, probe, nodetree, brush, palette and paintcurve 2020-06-05 13:14:39 +02:00
2396daf921 Refactor: use new api for writing screen, armature, text and speaker 2020-06-05 12:53:39 +02:00
a1d55bdd53 Refactor: use new api in write_workspace 2020-06-05 12:35:20 +02:00
473aaa389c Cycles: Enable OptiX on all Maxwell+ GPUs 2020-06-05 12:33:00 +02:00
56da8dae67 Refactor: use new api in write_windowmanager 2020-06-05 12:29:40 +02:00
0e6c648f3f Refactor: Move IDProperty writing to new API 2020-06-05 12:21:19 +02:00
7d32a259bf Installdeps: make embree use TBB.
Following changes done to makedeps in rBc7329da14b22.
2020-06-05 12:01:18 +02:00
1c5479167f Cleanup: Strict compiler warning 2020-06-05 11:59:45 +02:00
48075b2c05 Blenloader: New API that will be used for blenloader decentralization
Design Task: T76372

This part of a larger refactoring towards a more extensible architecture
in Blender: T75724

The API is defined in `BLO_read_write.h`. It adds the small data structures
`BlendWriter`, `BlendDataReader`, `BlendLibReader` and `BlendExpander`.
Those contain context about the current read/write operation. Furthermore,
it adds many functions with the prefixes `BLO_write_*`, `BLO_read_*` and
`BLO_expand_*`.

Lib linking and expanding will probably be handled by the more generic libquery
system eventually. The corresponding parts of the API can be removed then.
2020-06-05 11:44:36 +02:00
ce7409fd13 Cleanup: use ED_object_ prefix for constraint functions
- ED_object_constraint_list_from_constraint was get_constraint_lb
- ED_object_constraint_list_from_context    was get_active_constraints
- ED_object_constraint_active_get   was get_active_constraint
- ED_object_constraint_active_set   was ED_object_constraint_set_active
2020-06-05 18:59:47 +10:00
5e55153c89 LibOverride: Cleanup: remove useless per-property override flag.
now that we have more 'global' ways to control that, we can save us
quiet a fwe calls....
2020-06-05 10:57:21 +02:00
191edd224a Cleanup: rename suffix 'conv' to 'convert' 2020-06-05 18:27:38 +10:00
f2d5c53966 Fix accessing online manual for PropertyGroups
Alternate fix for the issue raised in D7837
2020-06-05 18:09:00 +10:00
e8b8e16b24 Code Cleanup: fcurve function naming 2020-06-05 09:30:15 +02:00
fe6be70875 CleanUp: Introduce BKE_fcurve_create 2020-06-05 08:41:35 +02:00
e3a32a22bf GPencil: Channel Lock tooltip
After talking with UI team, we decided to change the tooltip.
2020-06-05 08:27:52 +02:00
0aa2c10ad1 Cleanup: remove braces from previous commit (no functional changes) 2020-06-05 16:12:22 +10:00
8b347fc2cd Armature: increase maximum delectable bones from 4096 to 8192
Remove BONESEL_NOSEL which isn't needed.

Addresses issue raised in T77378.
2020-06-05 16:04:35 +10:00
fd63220a35 Cleanup: maybe uninitialized variable warning 2020-06-05 14:55:15 +10:00
9e96c6d054 Cleanup: spelling 2020-06-05 14:34:00 +10:00
b2d1c4873f Cleanup: remove unnecessary inline header
Caused by lsp/clang applying *fixes* automatically, tsk.
2020-06-05 14:33:59 +10:00
c7329da14b Build: use TBB as Embree tasking system
This avoids launching additional threads and solves some console warnings on
Linux + AMD Ryzen CPU.
2020-06-05 00:58:31 +02:00
0b28f0410c Fix make deps build errors with conflicting Boost system packages 2020-06-05 00:58:31 +02:00
b168c255aa GPUTexture: Make GPU_texture_unbind_all faster on newer opengl version 2020-06-04 21:28:19 +02:00
ba5b303c88 DRW: Fix T77370: Redundant anti aliasing/blur effect 2020-06-04 21:28:19 +02:00
1d72fc5a1a LibOverride: Add Pointer properties to 'overridable by default'.
There is in fact no reason not to do so, RNA pointers are either to
other IDs (which is properly handled by default diffing code), or to
sub-structures that should almost always  be diffed as well.

Exceptions (like backward ID pointers or strictly runtime caches and
data) are to be handled with proper 'no comparison' flag in any case.
2020-06-04 18:06:47 +02:00
d71f9b9886 LibOverride: cleanup Collection case.
This should not give any real difference, those were already
overridable.
2020-06-04 18:06:47 +02:00
f2a0532111 Disable gravity in Draw Face Sets brush
Applying gravity to this brush does not make much sense and undo/redo
won't work correctly as it uses a different undo type.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7925
2020-06-04 18:05:46 +02:00
15ed2f841c Fix Sharpen mesh filter in Multires
Instead of accumulating displacement for each vertex into the neighbors, accumulate the opposite displacement from each neighbor into the vertex. I think this is the same and it does not produce artifacts in Multires.

Reviewed By: sergey, brecht

Differential Revision: https://developer.blender.org/D7508
2020-06-04 18:04:07 +02:00
caca3d9c97 installdeps: fix bad FFMPEG official version number.
re T77035.
2020-06-04 17:35:33 +02:00
c7a2ed69be GPencil: Fix Lock Frame Dopesheet tooltip
The old tooltip was not clear enough
2020-06-04 16:55:19 +02:00
c604d2762f Fix T77358: Gpencil can't select geometry within transparent layers
This was an old check of opacity for editable layers, but with new system it's not needed because you can use the edit lines.
2020-06-04 16:41:46 +02:00
733a3e3a70 Fix T77164: scaling/rotation fails for 3 selected NURB points 2020-06-05 00:40:14 +10:00
3da4724f72 Fix T77367: Blender's snap package ignores command line options 2020-06-05 00:39:45 +10:00
fd061f61c7 GPUShaderInterface: Reduce creation time on some drivers.
Querying GL_UNIFORM_BLOCK_INDEX seems to be a problem on apple drivers.
2020-06-04 15:28:45 +02:00
3b4ef08d68 Fix Grease Pencil panel showing as first panel in render properties
Move it lower next to the Freestyle panel.
2020-06-04 14:44:00 +02:00
41866070d3 Cleanup: remove unused flag 2020-06-04 14:37:20 +02:00
953c232db3 Fix T77276: Generating Python API docs raises many warnings 2020-06-04 22:31:54 +10:00
10b34ad697 GPUShaderInterface: Change builtin array to array of location/bind
This reduce the base size of the shaderinterface from 400 to 136 bytes.
Improves memory usage and cache coherency when querying a lot of uniforms
at once.
2020-06-04 14:17:06 +02:00
5837de6879 Cleanup: DRW: Add comment and remove bitfields. 2020-06-04 14:17:06 +02:00
7534bbfa34 GPUShaderInterface: Add Builtin Uniform blocks query
This makes the query of theses mandatory uniforms faster.
2020-06-04 14:17:06 +02:00
1438c1cfd5 Merge branch 'blender-v2.83-release' 2020-06-04 13:49:50 +02:00
30395a491f Fix T77073: Objects cannot be activated after collection exclude
When excluding a collection containing the active object in either
texture paint or particle edit mode, the object could not be reactivated
when the collection was re-enabled. This is because the object's mode
was left in TEXTURE_PAINT or PARTICLE_EDIT, and the activation code did
not have cases to handle these modes.

This moves the code that is run when toggling out of texture paint or
particle edit modes to functions so activation can properly toggle off
the respective interaction mode.
2020-06-04 21:48:04 +10:00
c7c3908b8e Cleanup: split particle & texture paint mode switching into utility functions 2020-06-04 21:36:33 +10:00
0f32029522 Fix T77315 Overlay: Selection Highlighting not working with complex scene
Was caused by a UBO bind to the wrong slot.
2020-06-04 12:57:26 +02:00
78017916f7 Fix error removing the image paint cursor
Mix up with imapaint.paintcursor & imapaint.paint.paint_cursor
Remove imapaint.paintcursor since it wasn't used.

Also rename paint_cursor_start_explicit() to paint_cursor_start(),
removing the existing paint_cursor_start() since it took the paint
struct from the context, a value that's known by all callers.
2020-06-04 20:24:57 +10:00
465a9f65de Cleanup: remove window manager argument for paint cursor API
This caused an additional argument when exiting object modes
and many other low level functions which don't need to access context.

This simplifies fixing T77073.
2020-06-04 18:41:16 +10:00
1a23b0be97 LibOverride: Make all modifiers properties overridable.
This is second and last part of T77083.
2020-06-04 10:26:05 +02:00
f9892bd6cf Fix T77264: Mantaflow: Liquid checkbox doesn't turn on while switching
between fluid types

When switching to gas, the fluids were not actually destroyed, leading to
the situation that they were then destroyed when actually switching to
liquid.

Maniphest Tasks: T77264

Differential Revision: https://developer.blender.org/D7907
2020-06-04 09:49:05 +02:00
244ed645e0 GPencil: Improve selection in Fill areas
Now when use selection if the selection area is inside a filled area, the stroke is selected. Before it was necessary to select the border of the stroke.
2020-06-04 09:37:12 +02:00
fe13f3db81 UV: use selection for 'Seams from Islands'
Use bmesh connectivity data to simplify logic.
2020-06-04 17:10:45 +10:00
67a617e196 Cleanup: move auto-execute operators into userpref_ops.c 2020-06-04 16:23:07 +10:00
7aa47083d0 Cleanup: update sections for wm_files.c 2020-06-04 16:10:01 +10:00
Johan Walles
e723ec04fb UI: more informative light energy description based on light type 2020-06-04 13:23:47 +10:00
67b10fcc22 Fix error in recent fix for T77290 2020-06-04 12:40:17 +10:00
b94ab93dfb Eyedropper: Support get samples from other windows
This fix T77226

Differential Revision: https://developer.blender.org/D7910
2020-06-03 15:45:57 -03:00
a4e0bccb87 Cleanup: Use ELEM Macro 2020-06-03 13:34:24 -04:00
0849af4591 Linux: update appdata for 2.83 release 2020-06-03 19:10:51 +02:00
86385d7ebd Fix build error for Cycles standalone
This does not affect the Blender release.

Ref D7915
2020-06-03 19:10:51 +02:00
bd68312cb6 LibOverride: Make camera data-block properties overrideable.
Note that you still have to make overrides of obdata IDs by hand (and
deal with remapping of pointers yourself) for now.
2020-06-03 18:57:49 +02:00
2cdfc1b4af LibOverride: Make constraints fully overrideable.
All settings of constraints should be overrideable now.
Modifiers will follow tomorrow.

Part of T77083.
2020-06-03 18:46:36 +02:00
fc1bb36668 LibOverride: fix debug timing code. 2020-06-03 18:46:18 +02:00
26aa64b688 Fix broken split layout in encoding options
The "Max B-frames" options were misplaced. Uses the usual layout of a checkbox
together with the number button now.
Reported by Peter Fog (@tintwotin), thanks!
2020-06-03 18:12:29 +02:00
ef0ff4aaf2 GPencil: Fix unreported error in Dots Strokes material initialization
The materials was not initializated in the right mode.
2020-06-03 18:01:34 +02:00
dbb1f56e55 Fix T77290: Crash displaying vertex colors in edit mode
Regression from deaff945d0, follow logic from d98ae27f02.
2020-06-04 01:52:33 +10:00
de9c04c287 Cleanup: clang format, warning 2020-06-04 01:18:39 +10:00
51cd6d22c5 Cleanup: GPUMaterilal: Texture Node: Remove unused functions 2020-06-03 16:43:31 +02:00
15a24f3d7f GPUMaterial: Fix shader compilation when using UDIM textures 2020-06-03 16:42:54 +02:00
Nathan Letwory
211b6c29f7 Remove trailing space 2020-06-03 17:38:22 +03:00
96eab08755 DRW: Always unbind texture after drawing
This fix issues with the image editor
2020-06-03 16:24:04 +02:00
b2dcff4c21 GPUMaterial: Rework/simplify image texture filtering
This use the latest GPUTexture change to use the sampler state to avoid
the pole issues instead of using GLSL hacks.

This should fix T73942: Eevee mipmaps not respecting border mode.

Note that this also fix some discrepencies between cycles and eevee (like
boxmapping + clip).
2020-06-03 16:18:50 +02:00
054923c860 GPUMaterial: Rework/simplify environment texture filtering
This use the latest GPUTexture change to use the sampler state to avoid
the pole issues instead of using GLSL hacks.
2020-06-03 16:18:50 +02:00
47bdb28841 GPUTexture: Fix samplers configuration typo 2020-06-03 16:18:50 +02:00
91cc1f38ae GPUMaterial: Add support for different sampler state per image sampler
This bridge between the new sampler state support from GPUTexture and
draw material handling.

The Sampler State is just the one from the texture for now. No change in
logic.
2020-06-03 16:18:50 +02:00
866e067d65 GPUTexture: Add support for binding textures with custom sampler states 2020-06-03 16:18:50 +02:00
4184371fb0 Fix T77156: GPencil view layer filter by layer not working
This was removed by error during the refactor done in 2.83.

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

Reviewers: @fclem
2020-06-03 15:57:09 +02:00
df17ee202b Fix T77203: Mantaflow Bake All cannot be resumed
The manual is also more explicit about this now (rBM6725).
2020-06-03 14:54:40 +02:00
Nathan Letwory
82e3bd4bbb Ensure submodules are at correct commits for 2.83 2020-06-03 15:23:39 +03:00
Nathan Letwory
3c9f80c898 Move 2.83 from beta to release 2020-06-03 15:21:51 +03:00
Nathan Letwory
dc8475ec6a Splash: new image for 2.83 by Ian Hubert 2020-06-03 15:19:34 +03:00
cda1540858 Undo: Detect/find proper memchunk for a given ID during undo step writing.
Most of the time current (based on order) system works fine, but when you add
or rename (i.e. re-sort) some ID, every data/memchunk afterwards would be out
of sync and hence re-stored in memory (and reported as changed).

Now we are storing the ID's session_uuid in the memchunks, which allows to
actually always find the first memchunk for an already existing ID stored in
previous undo steps, and compare the right memory.

Note that current, based-on-order system is still used almost all of the time,
search in the new ghash is only performed for a few data-blocks (when needed at all).

Reviewed By: brecht

Maniphest Tasks: T60695

Differential Revision: https://developer.blender.org/D7877
2020-06-03 12:07:45 +02:00
Bastien Montagne
3384bb2c66 RNA: add option to enable by default lib overridale flag of defined properties.
Similar to the one allowing to deactivate DNA check, etc.

Will helps reduce verbosity when making many new properties overridable.

Note that pointer properties always remain non-overridable by default,
since basically only ID pointers should be.

Reviewed By: brecht

Maniphest Tasks: T77083

Differential Revision: https://developer.blender.org/D7906
2020-06-03 11:18:11 +02:00
0e14eb7b31 Cleanup: DRW: Remove support for ModelViewProjectionMatrix
This has been replace by manual model+viewproj transform inside the shader.
2020-06-03 11:02:56 +02:00
75015f27ba Cleanup: DRW: Remove support for builtin matrices 2020-06-03 11:02:56 +02:00
d4f1efad00 DRW: Remove use of builtin matrices and replace by common_view_lib 2020-06-03 11:02:56 +02:00
3e4c8d48aa Cleanup: DRW: Remove builtin 3D only shader usage 2020-06-03 11:02:56 +02:00
55f8758b87 GPUImmediate: Fix array uniform not working 2020-06-03 11:02:56 +02:00
59bfcd8c5d Cleanup: DRW: Remove persistent uniform functions 2020-06-03 11:02:56 +02:00
9b0543389b Fix domain voxel size indicator drawing
Use already calculated cell_size directly.

Part of T77030.
2020-06-03 10:58:42 +02:00
6f21137722 Object: refactor mode switching
Functionality here has become confusing over time,
this removes duplicate, similar functions, preferring to set the mode
instead of toggle, enter, exit.

Mode switching utility function behaved differently regarding undo,
'ED_object_mode_toggle' for example didn't skip the undo push
where 'ED_object_mode_set' did.
Some callers chose these functions based on the intended undo behavior,
even when toggling didn't make sense.

There was also ED_object_mode_generic_enter which was similar to
ED_object_mode_set, instead of the reverse of ED_object_mode_generic_exit.

Simplify object mode switching internals:

- Replace ED_object_mode_generic_enter with ED_object_mode_set.
- Remove ED_object_mode_toggle as nearly all callers needed to check
  the current mode so toggling would set the mode argument correctly.
- Use ED_object_mode_set for the object mode switching operator
  to simplify logic.
- Add ED_object_mode_set_ex which has an argument to disable undo,
  needed when loading undo data needs to set the mode.
- Remove unused ED_object_mode_exit.
2020-06-03 18:29:06 +10:00
53cb1a32db Cleanup: remove ED_gpencil_setup_modes from object mode set
Grease pencil mode switching functions already call this.
2020-06-03 18:26:02 +10:00
3b6e223a03 Fix app-template warning disabling a template without a Python module 2020-06-03 14:46:52 +10:00
f0df4d6c35 Fix T67577: Add-on unregister can't access preferences on factory reset 2020-06-03 14:46:52 +10:00
2749e6a639 Cleanup: remove redundant call to addon_utils.reset_all()
This is already called by wm_homefile_read
2020-06-03 14:46:52 +10:00
2004f9a342 Cleanup: move shared functionality to wm_file_read_pre
This matches wm_file_read_post.
2020-06-03 14:46:52 +10:00
45b5f4e3df Cleanup: minor changes to wm_homefile_read
Move app_template assignment to the top of the function,
this simplifies further changes.
2020-06-03 14:46:52 +10:00
a5e9f024f2 Fix T77289: Crash when typing negative numbers
This was caused by an oversight in rB45dbc38a8b15. When the next operation
character is found the offset is shifted in the original string. The remaining
length has to be recalculated with that offset before shifting the remaining
characters to make room for the ")".
2020-06-03 00:37:26 -04:00
2e52b3206c PyDoc: Fix warnings from out of bounds include statement 2020-06-02 18:21:42 -04:00
650dedfd10 Cleanup: GPUTexture: Remove uneeded bind 2020-06-02 23:44:22 +02:00
a1f9eebc0b DRW: Remove automatic bind locations and use hardcoded locations for textures
This cleanup use the recent changes in shader interface to allow querying
the binding location a texture should use.

This should aleviate all issue we have with texture state change recompiling
the shaders at drawtime.

All binds are now treated like persistent binds and will stick until a new
shading group bind a different shader. The only difference is that you can
still change it with a new subgroup or same shader shgroup.

Since unbinding can be heavy we only do it when using `--debug-gpu`.
2020-06-02 23:44:22 +02:00
47eccac21c GPUShaderInterface: Fix out of bound reads 2020-06-02 23:44:22 +02:00
ee4bafc63a GPU: Texture: Remove multibind tracking
This is more of a limitation than it is a solution.
2020-06-02 23:44:22 +02:00
beef67d1df GPUShader: Bind shader for interface creation
This will fix the bindpoints not being set at interface creation
2020-06-02 23:44:22 +02:00
ea92f8207a Revert "UI: Fix T77173: Report Background Colors for 2.83 Release"
This reverts commit 7fc0053c27.
2020-06-02 15:59:37 -04:00
e391b3e0fb Merge branch 'blender-v2.83-release' 2020-06-02 15:58:38 -04:00
a87eee65fc Fix T76196: Curve Display hides wires as soon as any part has faces [due
to filling/extrude/etc]

Caused by rB6da097136cf4.

The file in the report has some parts of the curve object generate faces
[due to success in filling] and some others dont [where filling isnt
possible].

rB6da097136cf4 disabled the wires/curves drawing whenever any faces
would be generated (but the only way to see all wires was to set the
Fill Mode to None then).

So now only skip the wires/curves drawing if we are _not_ in wireframe
viewport shading and the object's viewport display options is above
'WIRE'.

This is an alternative fix to D7594 (and I think the better alternative,
thx @stevewarner suggesting this).

Maniphest Tasks: T76196

Differential Revision: https://developer.blender.org/D7874
2020-06-02 21:42:34 +02:00
7fc0053c27 UI: Fix T77173: Report Background Colors for 2.83 Release
This is a temporary solution for T77173 for the 2.83 release. D7203
provides a more long term solution for future releases.

This adds theme colors for the three report backgrounds, setting them
to the color used in 2.82. A separate commit in the addons repository
will follow for changes to the bundled themes.

Differential Revision: https://developer.blender.org/D7908
2020-06-02 15:04:46 -04:00
85098bdb89 Fix T76776: Implement vertex_visibility_get for PBVH_GRIDS
This was missing from when Face Sets were enabled in Multires, so it was
always considering that all vertices in the grids are visible. This
should also fix other unreported bugs.

Reviewed By: sergey

Maniphest Tasks: T76776

Differential Revision: https://developer.blender.org/D7809
2020-06-02 20:52:46 +02:00
071cc71fb0 Cleanup: Use const context for some UI templates
- uiTemplateID: Straightforward, just const for the template
    and the functions it calls
  - uiTemplateCacheFile: Create a function in rna_ui.c because
    the generated RNA callback doesn't have const context.

Differential Revision: https://developer.blender.org/D7895
2020-06-02 14:09:01 -04:00
dcdbcf1ec1 Fix: Crash Edit Mode Selection RCS 2020-06-02 19:57:02 +02:00
Tautvydas Andrikys
ffb3365fb2 Fix T63588: Cycles unnecessarily updates background importance sampling map
With modifications by Brecht to solve T77273, crash enabling portal lights.
2020-06-02 19:48:51 +02:00
0465086223 Merge branch 'blender-v2.83-release' 2020-06-02 19:48:45 +02:00
52cc412e0f Revert "Fix T63588: Cycles unnecessarily updates background importance sampling map"
This reverts commit 33ce0cb5a1.

Fix T77273: crash enabling portal lights. The optimization for background
updates can be added back later for 2.90 and 2.83.1.
2020-06-02 19:44:12 +02:00
572c472754 Cleanup: Always use pbvh in PBVH BKE files
Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7889
2020-06-02 19:40:08 +02:00
4153606edd Fix: Crash When Selecting In Edit Mode
TaskGraph wasn't initialized in `DRW_draw_select_id`
2020-06-02 19:09:38 +02:00
b08caeb92b Sculpt: Improve twist axis in Pose FK mode
Previously, the twist rotation was aligned using the stroke location.
This was causing unexpected results when rotating some Face Sets rigs.
Now the intersection with the first Face Set in the flood fill is used,
which produces much better results.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7900
2020-06-02 18:39:41 +02:00
ca09625dcc Cleanup: Remove unused grab delta in Pose Brush
The grab delta is not used in do_pose_brush_task_cb_ex, so there is no
reason to add it to SculptThreadedTaskData

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7901
2020-06-02 18:38:20 +02:00
417ebc3845 UI: Expand linked/overriden collections by default in the Outliner
When linking or overriding an instanced collection, the new collection item in
the Outliner is now un-collapsed by default.
Linking and overriding is typically used in production scenes, where
collections tend to contain many items (children, grand-children, etc.). If all
collections in that hierarchy are expanded by default, the Outliner gets
flooded with items. So users ended up manually collapsing the collections.

Part of T76555.

Reviewed by: Andy Goralczyk, Bastien Montange.

Differential Revision: https://developer.blender.org/D7626
2020-06-02 17:59:08 +02:00
bd3ab27410 Library Overrides: Don't move collections to Scene Collection when overriding
When using the "Make Library Override" operator on instance collections, keep
the overriden collection in the parent collection of the instance empty.
Previoulsy the collection would be added to the scene collection, which was
confusing and not what users expected. It was placed there for a reason after
all.

Part of T76555.

Reviewed by: Andy Goralczyk, Bastien Montange.

Differential Revision: https://developer.blender.org/D7626
2020-06-02 17:59:08 +02:00
1743326889 Library Overrides: Unlink instance empty after "Make Library Override"
Unlink (delete if single-user) collection instance empty once an override is
added to the collection through the "Make Library Override" operator. It isn't
used as a collection instance anymore then so the emtpy is an annoying left
over that has no purpose.

Part of T76555.

Reviewed by: Andy Goralczyk, Bastien Montange.

Differential Revision: https://developer.blender.org/D7626
2020-06-02 17:59:08 +02:00
cdf0d95a50 Fix T77126: Documented frame_change_pre and frame_change_post handlers
The documentation for the `frame_change_pre` and `frame_change_post`
handlers was really sparse, and suggested that `frame_change_pre` is
called before the frame changes. This is not the case; it's called after
the frame has changed, but before the dependency graph has been updated
for it.

No functional changes, just updated documentation.

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

Reviewed by: sergey
2020-06-02 17:31:45 +02:00
6a70d7e09f Fix utterly broken versionning code for weight modifier.
Own fault in some recent patch rewiew/commit...
2020-06-02 17:30:02 +02:00
9d9f35d946 Cleanup: factorize duplicated code in WVG modifiers' RNA. 2020-06-02 17:30:02 +02:00
5ef44dd83f Cleanup: unused argument 2020-06-03 01:05:25 +10:00
9713df4e92 Merge branch 'blender-v2.83-release' 2020-06-03 00:59:56 +10:00
2c204432df Merge branch 'blender-v2.83-release' 2020-06-03 00:59:52 +10:00
e69f70e11f Revert "Fix T67577: Add-on unregister can't access preferences on factory reset"
This reverts commit f18ed7ad89.

Better leave the fix for 2.9 series.
2020-06-03 00:59:45 +10:00
50994eace6 Fix T66967: skin modifier crash scaling skin radius to zero 2020-06-03 00:59:44 +10:00
b18c2a3c41 EEVEE: Refactor of eevee_material.c
These are the modifications:

-With DRW modification we reduce the number of passes we need to populate.
-Rename passes for consistent naming.
-Reduce complexity in code compilation
-Cleanup how renderpass accumulation passes are setup, using pass instances.
-Make sculpt mode compatible with shadows
-Make hair passes compatible with SSS
-Error shader and lookdev materials now use standalone materials.
-Support default shader (world and material) using a default nodetree internally.
-Change BLEND_CLIP to be emulated by gpu nodetree. Making less shader variations.
-Use BLI_memblock for cache memory allocation.
-Renderpasses are handled by switching a UBO ref bind.

One major hack in this patch is the use of modified pointer as ghash keys.
This rely on the assumption that the keys will never overlap because the
number of options per key will never be bigger than the pointed struct.

The use of one single nodetree to support default material is also a bit hacky
since it won't support concurent usage of this nodetree.
(see EEVEE_shader_default_surface_nodetree)

Another change is that objects with shader errors now appear solid magenta instead
of shaded magenta. This is only because of code reuse purpose but could be changed
if really needed.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7642
2020-06-02 16:58:07 +02:00
eba3aa1837 Revert "Fix T67577: Add-on unregister can't access preferences on factory reset"
This reverts commit f18ed7ad89.

Better leave the fix for 2.9 series.
2020-06-03 00:54:29 +10:00
b82cb0ad32 Cleanup: GPU: Remove GPU_shaderinterface_uniform_ensure 2020-06-02 16:46:38 +02:00
38cfcdd51b DRW: Remove defered uniform creation 2020-06-02 16:46:38 +02:00
cb59ef1032 OCIO: GLSL: Avoid undefined behavior
Set ubo binding after shaderinterface creation as GPU_shaderinterface_create
will call glUniformBlockBinding.
2020-06-02 16:46:38 +02:00
Jeroen Bakker
0749cff957 Depsgraph: Remove unneeded RNA_path_resolve
Found during research of {T77124}. In `build_driver_data` an identical
 RNA_path is resolved twice. In stead of resolving it twice this patch
will construct the `property_exit_key` based on the resolution of
`property_entry_key`.

This change isn't noticeable for users. Just a cleanup as it isn't
needed to do the same logic twice.

Reviewed By: Sergey Sharybin

Differential Revision: https://developer.blender.org/D7872
2020-06-02 16:02:59 +02:00
Jeroen Bakker
752139556f BVHCache: Performance
This patch changes the BVHCache implementation. It will use
a primitive array in stead of the ListBase. The locking is also
changed from a global lock to a per cache instance lock.

The performance of `gabby.blend` available on the cloud increased from 9.7
fps to 10.5 fps.

Reviewed By: Brecht van Lommel

Differential Revision: https://developer.blender.org/D7817
2020-06-02 16:01:14 +02:00
Jeroen Bakker
bf34b0c8f4 DrawManager: Graph Task Scheduling
This patch uses a graph flow scheduler for creating all mesh batches.
On a Ryzen 1700 the framerate of Spring/020_02A.anim.blend went from 10 fps to 11.5 fps.

For each mesh where batches needs to be updated a sub-graph will be added to the task_graph.
This sub-graph starts with an extract_render_data_node. This fills/converts the required data
from Mesh.

Small extractions and extractions that can't be multi-threaded are grouped in a single
`extract_single_threaded_task_node`.

Other extractions will create a node for each loop exceeding 4096 items. these nodes are
linked to the `user_data_init_task_node`. the `user_data_init_task_node` prepares the userdata
needed for the extraction based on the data extracted from the mesh.

Note: If the `lines` and `lines_loose` are requested, the `lines_loose` sub-buffer is created
as part of the lines extraction. When the lines_loose is only requested the sub-buffer is
created from the existing `lines` buffer. It is assumed that the lines buffer is always
requested before or together with the lines_loose what is always the case (see
`DRW_batch_requested(cache->batch.loose_edges, GPU_PRIM_LINES)` in `draw_cache_impl_mesh.c`).

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7618
2020-06-02 15:54:45 +02:00
0a00fbd265 Fix T66967: skin modifier crash scaling skin radius to zero 2020-06-02 23:45:51 +10:00
21443056b7 Turn most flags in BlenderDefRNA into proper bool. 2020-06-02 15:18:14 +02:00
43ec8c287f Cleanup: RNA: use BlenderDefRNAtruct named members initialization. 2020-06-02 15:14:10 +02:00
cecda64e2e GPU: ShaderInterface: Refactor to setup all uniform at creation time
This remove the complexity of queriying the locations at runtime and
allows for more performance and upfront binding specifications.

The benefit of doing everything at creation time is that we can assign binding
points in a predictable order which is going to be somewhat the same for
every similar shader.

This also rewrite GPU_vertformat_from_shader to not use shaderface.

This is to keep the shaderface simple. If it becomes necessary to not query
the shader after creation (i.e: vulkan?) we could just create the vert
format in advance at compilation for PyGPU shaders.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7879
2020-06-02 12:11:39 +02:00
bdda53fdb2 GPU: Texture: Replace internal sampler state by explicit state object
This makes it easier to track as well as allowing us to sample the same
texture with different sampling parameters (which should fix the related
T73942 in the long run).

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7831
2020-06-02 10:47:56 +02:00
074d469165 Merge branch 'blender-v2.83-release' 2020-06-02 18:39:28 +10:00
ae2f21f378 Fix T76533: Gizmo uses active face center in edge selection mode
Only use the active face when it's selected.
2020-06-02 18:38:58 +10:00
ea516bed72 Merge branch 'blender-v2.83-release' 2020-06-02 10:33:26 +02:00
6aef27602a Cleanup: use C++'s nullptr instead of our own C NULL define, in C++ code. 2020-06-02 10:32:21 +02:00
b724922f1a Merge branch 'blender-v2.83-release' 2020-06-02 10:26:14 +02:00
428c0f9ad5 Fix T77192: Crash when opening bunny.blend file.
New depsgraph code handling drivers was not checking for possible NULL
rna_path, as done everywhere else in code...
2020-06-02 10:21:19 +02:00
c6957e50e8 Merge branch 'blender-v2.83-release' 2020-06-02 18:06:31 +10:00
81f817e7b4 Fix T72088: Missing header redraw when transform changes snap 2020-06-02 18:05:00 +10:00
17d8e7f833 Merge branch 'blender-v2.83-release' 2020-06-02 16:24:30 +10:00
de6c935261 Cleanup: code comments for mode switching
Comment on mode switching cases that are supported,
including the issue from recent regression T77217
which is easy to miss since it's not used in the default key-map.
2020-06-02 16:12:36 +10:00
Johan Walles
9c410c77eb UI: rename Cycles point light Size to Radius, for consistency and clarity
Differential Revision: https://developer.blender.org/D7888
2020-06-02 08:08:59 +02:00
59e793d3bd Cycles: add missing light angle for distant lights in XML reading
Contributed by howetuft.

Differential Revision: https://developer.blender.org/D7891
2020-06-02 08:08:52 +02:00
a8907e409a Merge branch 'blender-v2.83-release' 2020-06-02 08:08:43 +02:00
Stefan Werner
c7280ce65b Cycles: Added shadow terminator offset parameter.
A new user parameter can be used to shift the shadow terminator
towards the light source. With it, one can hide some of the
artifacts that appear on coarse meshes with smooth shading.

Note that this technique is not engery conserving.

This is based on the work by the Appleseed renderer team.

Differential Revision: https://developer.blender.org/D7634
2020-06-02 07:27:14 +02:00
7881c251f3 Fix build error in Cycles standalone without guarded allocator
Solution suggested by howetuft.

Differential Revision: https://developer.blender.org/D7892
2020-06-02 06:27:39 +02:00
Garry R. Osgood
389d550412 Fix T77106: Cycles crash baking with AO shader node
Differential Revision: https://developer.blender.org/D7890
2020-06-02 06:25:08 +02:00
18cda8be87 Cycles: change perspective depth pass to be more standard
Now it matches Eevee, OpenGL and other renderers. Panoramic camera depth passes
are unchanged, and are still distance from the camera center.
2020-06-02 04:54:44 +02:00
98c301d25e Fix NaN in Cycles environment texture importance sampling in some scenes
Cause identified by Ray Molenkamp.
2020-06-02 04:54:39 +02:00
f58e76119a Fix T77239: snap 3D cursor in edit-mode 2020-06-02 12:19:35 +10:00
4f3e686cad Cleanup: Remove Obsolete Current Frame Indicator Drawing Code
This code was made obsolete by the changes to the animation editor
scrubbing areas in D4654.

Differential Revision: https://developer.blender.org/D7898
2020-06-01 22:12:09 -04:00
8b63c6241d Fix snap3d crash (missing NULL check) 2020-06-02 10:50:53 +10:00
1d4bae8566 Sculpt: Cloth Filter
This tool is similar to the cloth brush, but it applies the cloth
simulation deformation to the whole mesh in an uniform way. The
simulation can be controlled using the mask to pin vertices and the face
sets to define force action areas.

It uses the same solver as the cloth brush which now no longer depends
on StrokeCache.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7857
2020-06-01 22:37:06 +02:00
3778f168f6 Sculpt: Pose Brush Face Sets FK mode
This Pose Brush origin mode simulates an FK deformation in the entire
model when clicking on the face sets, as they were controls of a fully
rigged character. Combined with the previous Face Sets modes that allow
creating IK chains, the pose brush should now be able to simulate most
of the common rigs deformations.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7839
2020-06-01 22:30:01 +02:00
5c54a609a9 Cleanup: Remove unused flag 2020-06-01 17:20:28 -03:00
91fb07f361 Fix mesh filter using the wrong face set as active
This was returning the wrong face set in cases where the active vertex
has more than one available face set.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7858
2020-06-01 22:18:59 +02:00
3cce8afe2c UI: Rename "View Camera Center" Op to "Frame Camera Bounds"
The current name isn't very specific about what the operator does.
The operation is more about lining up the edges with the viewport
edges than centering the view.

Differential Revision: https://developer.blender.org/D7866
2020-06-01 11:35:16 -04:00
b0038b8d73 Fix T77139: UI: Add "View Camera Center" to View Menu
The "View Camera Center" operator was not accessible by the new menu search.

Differential Revision: https://developer.blender.org/D7865
2020-06-01 11:34:07 -04:00
45dbc38a8b Fix T74552: Distribute negatives in number input
This applies a relatively simple solution for fixing some unintuitive
cases in unit handling.

Currently entering -1m50cm evaluates to -0.5m, and similarly 1'6"
evaulates to just half a foot. So effectively there's an implied + just
between the numbers, which is quite confusing.

This works by adding parentheses so the negative distributes to the
block of values before the next operator.

For example:
|         Before         |           After            |
| `-1m50cm + 1m -2m50cm` | `-(1m50cm) + 1m -(2m50cm)` |
|   `-4m + 0.5 / -1.1`   |   `-(4m) + 0.5 / -(1.1)`   |
|         `-1'6"`        |         `-(1'6")`          |
|        `-1e-2cm`       |        `-(1e-2cm) `        |

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D7813
2020-06-01 08:22:27 -04:00
8d670546f9 Merge branch 'blender-v2.83-release' 2020-06-01 12:12:57 +02:00
31cf87a29e Fix py api doc gen script after recent versionning changes. 2020-06-01 12:10:56 +02:00
19f3f6cd85 Merge branch 'blender-v2.83-release' 2020-06-01 19:00:23 +10:00
c204e3348c Fix T77217: Object mode toggle doesn't work
Toggling object mode to the previous wasn't working, also resolves a
case when toggling modes would cause an extra, unnecessary mode switch.
Own regression in 5159b8e1ea.
2020-06-01 18:56:43 +10:00
9936e23b85 Merge branch 'blender-v2.83-release' 2020-06-01 16:27:23 +10:00
10966926ce Merge branch 'blender-v2.83-release' 2020-06-01 16:27:18 +10:00
520f08aa56 Fix T77241: NDOF navigation doesn't work with the knife tool
Also allow NDOF with loop-cut.
2020-06-01 16:21:30 +10:00
49bd44f5c8 Cleanup: unused variable warning
Also remove unnecessary function return value.
2020-06-01 15:04:47 +10:00
81c33f0ba7 Cleanup: clang-format 2020-06-01 15:04:30 +10:00
c71be9a552 UI: rename "Select Playhead" to "Select -> Side of Current Frame"
Make this consistent with meshes select side of active,
also rename "Under" to "Overlap" as this is confusing since
strips can be considered above/under each other
relative to their channels.
2020-06-01 15:00:25 +10:00
946ae26349 UI: use term current frame instead of playhead
Avoid mixing different terminologies up,
current frame is used in a majority of Blender.
2020-06-01 15:00:25 +10:00
c315e56434 Cleanup: warning 2020-06-01 15:00:25 +10:00
89cd9f110b Fix T77043: Incorrect cache invalidation when changing resolution.
Invalidate cache of scene, not scene strips using said scene.
2020-06-01 06:25:36 +02:00
d4483b6d15 Cleanup: error building on Linux 2020-06-01 14:14:21 +10:00
f18ed7ad89 Fix T67577: Add-on unregister can't access preferences on factory reset 2020-06-01 14:06:55 +10:00
Peter Fog
b5cfb23fa7 VSE UI: Text panel adjustments
This patch adjusts a number of text panel elements:

- The text entry widget has become larger in order to distinguish it from the strip name.
- Wrap has been moved up under the text, since this doesn't relate to bounding box.
- Alignment X/Y has been renamed to Anchor X/Y, since this is the achor point of the text point, and not the Alignment of the text.
- Offset and Crop was completely missing from the Text strip panel, these has been added.

Reviewed By: billreynish

Differential Revision: https://developer.blender.org/D7869
2020-06-01 05:41:09 +02:00
Peter Fog
adf9ff6359 VSE UI: Add a proxy menu to Preview/View menu
Add Proxy Setup, Build and View to a menu in the Preview View menu.

Reviewed By: ISS, billreynish, pablovazquez

Differential Revision: https://developer.blender.org/D7734
2020-06-01 05:32:36 +02:00
Peter Fog
42dcb1090b VSE: Use color picker for color strip.
Reviewed By: billreynish, ISS

Differential Revision: https://developer.blender.org/D6114
2020-06-01 05:17:20 +02:00
Peter Fog
102a7ae2d9 VSE: Add warnings for failed proxy encoding
Add more descriptive warnings if building proxy fails.
Prevent progressbar from showing if no valid strip is selected.

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D7689
2020-06-01 05:12:06 +02:00
Peter Fog
95e3356a27 VSE: Add select under playhead, and shortcuts for left, right, under.
Add `UNDER` option for `left_right` property of `sequencer.select` operator.
Add Equal as shortcut for select under playhead, and move Insert Gaps to backspace + ctrl.
Add extend shortcut for left, right under options.
The function is added to Select > Playhead menu.

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D7679
2020-06-01 04:39:40 +02:00
d0e028a78e Merge branch 'blender-v2.83-release' 2020-06-01 12:12:06 +10:00
d5a92b188b Cleanup: warnings 2020-06-01 12:06:34 +10:00
fcccee0c33 Cleanup: Remove unnecessary step in calling snap callback 2020-05-31 18:28:52 -03:00
14af27e63d Fix T77194: Force global orientation on select constraint (Shift MMB) not working
This feature was a hack to prevent mmb select to print the orientation from menu in pre 2.80 versions.
Removing this feature as it is no longer an issue.
2020-05-31 18:28:52 -03:00
4cb883b6b2 Deps: Update OIIO + ImageLibs + OSL + Helpers
This is the cluster of OIIO and friends , since they are all kinda tangled best to deal with this as a single unit

OIIO 2.1.15.0
png 1.6.37
jpeg 2.0.4
opencolorio 1.1.1
tiff 4.1.0
OSL 1.10.10
pugixml 1.10
openjpeg 2.3.1

Differential Revision: https://developer.blender.org/D7727
Reviewed by: brecht
2020-05-31 13:15:40 -06:00
6f1056ae63 Deps: iconv 1.16 2020-05-31 10:33:11 -06:00
ba711824b3 Fix T77206: G + MMB Doesn't work in Graph Editor if the transform orientation is set to 'Local'
Scene orientation is used only for 3DView.
2020-05-30 18:11:50 -03:00
347c191292 Remove leftover debugging code 2020-05-30 18:11:50 -03:00
9d725fc0cf Merge branch 'blender-v2.83-release' 2020-05-30 17:33:34 +02:00
ec26260132 GPencil: Fix unreported wrong Sculpt brushes initialization in Templates
The Sculpt brushes were not properly initialized when use 2D template or other templates.

Also, using the default template (not factory settings) could be situations where the brushes were not updated.

This problem was introduced when some versioning code was removed in order to avoid duplicated brush creation.
2020-05-30 17:33:09 +02:00
515e8e4f7c Fix T77166: Transforming bone with constraint does not follow mouse position
Bug introduced in rBc75a665c442e
2020-05-30 12:12:36 -03:00
55598269d2 Cleanup: Deduplicate code 2020-05-30 11:28:53 -03:00
a574478d90 Fix T77183: Axis moves with object when constraint movement and using local transform 2020-05-30 11:10:07 -03:00
3d014fa815 Cleanup: Initialize gizmo snap keymap before using 2020-05-30 10:59:27 -03:00
63bcee81f6 GHOST/wayland: use 'is_dialog' flag to prevent drawing into same window 2020-05-30 12:23:39 +01:00
2ee94c954d Fix LayerTypeInfo for CD_PROP_COL
This was introduced in rBd7282537f016 and had the wrong struct name
specified, leading to errors in writing/saving.

Stumbled over this when testing a color layer for pointclouds.

Differential Revision: https://developer.blender.org/D7882
2020-05-29 20:08:38 +02:00
a9689737b3 Cleanup: Use Consistent Capitalization of "Anti-Aliasing" 2020-05-29 13:57:40 -04:00
664c608fb7 Merge branch 'blender-v2.83-release' 2020-05-29 19:43:32 +02:00
691a1e3357 EEVEE: Fix memory leak when using SSS render pass.
Differential Revision: https://developer.blender.org/D7876
2020-05-29 19:42:53 +02:00
D. O
907cab45ff Modifiers: add invert vgroup weights options to operands of Mix modifier.
Please note that vertices which are in a vgroup are not affected by this
option (which means that affected vertices from 'selection' modes remain
the same). Only the weights of selected vertices get inverted.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D7811
2020-05-29 18:55:28 +02:00
c93a88413d Merge branch 'blender-v2.83-release' 2020-05-29 18:05:04 +02:00
Cody Winchester
43853d0528 Fix: Array modifier start cap not updating with object changes
When setting the start cap of the array modifier it does not update when
updating the start cap objects geometry.

This patch switches the property update to rna_Modifier_dependency_update,
the same as the end cap which works properly.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D7584
2020-05-29 17:56:42 +02:00
Brecht Van Lommel
a86b5df005 Blender: change bugfix release versioning from a/b/c to .1/.2/.3
The file subversion is no longer used in the Python API or user interface,
and is now internal to Blender.

User interface, Python API and file I/O metadata now use more consistent
formatting for version numbers. Official releases use "2.83.0", "2.83.1",
and releases under development use "2.90.0 Alpha", "2.90.0 Beta".

Some Python add-ons may need to lower the Blender version in bl_info to
(2, 83, 0) or (2, 90, 0) if they used a subversion number higher than 0.
https://wiki.blender.org/wiki/Reference/Release_Notes/2.83/Python_API#Compatibility

This change is in preparation of LTS releases, and also brings us more
in line with semantic versioning.

Fixes T76058.

Differential Revision: https://developer.blender.org/D7748
2020-05-29 17:48:26 +02:00
Peter Fog
67795c90fc VSE: Remove delete confirmation pop-up
It is not needed with the current undo system.

Differential Revision: https://developer.blender.org/D7807
2020-05-29 09:53:52 -04:00
d1bc233ffe Undo: Writefile: fix 'id changed' detected when resorting IDs.
The ListBase next/prev pointers will change everytime you add or rename
an ID, also for 'neighbors' data-blocks in the list, causing unnecessary
'changed' detection.

This info is not needed in blendfile anyway, so just NULLify it.
2020-05-29 14:30:02 +02:00
1d2b89304a Fix T77130: Visually broken/stepped wireframe in object mode (regression)
Create a new shader for the selection fix.

Differential Revision: https://developer.blender.org/D7873
2020-05-29 11:59:40 +02:00
Manuel Castilla
582d3153a1 Fix T73972: Collection in outliner grayed out when all collection children are disabled
There is no reason to have the children enable/disable state to
influence the parent collection. Specially considering that the parent
collection itself can have objects that would be visible.

Reviewed by: dfelinto, brecht

Differential Revision: http://developer.blender.org/D7864
2020-05-29 11:31:49 +02:00
7022c73249 Keymap: remove explicit 3D cursor entry for add tool
Passing through events to place the cursor, as other tools do.
2020-05-29 18:13:44 +10:00
8ec59757d1 Gizmo: fix crash in recent snap gizmo addition 2020-05-29 16:12:44 +10:00
654fde2dd2 PyAPI: use bpy_rna_types_capi.c to set type methods
Remove use of '_bpy' as an intermediate module to store functions
which were then assigned in bpy_types.py.
2020-05-29 15:55:25 +10:00
e115b7b06d PyAPI: support static & class methods for C RNA API methods
Previously the static/class flag was ignored,
always using class methods.
2020-05-29 15:55:20 +10:00
5510d5825b Keymap: swap shift and alt for interactive add tool
Match original proposal.
2020-05-29 13:18:50 +10:00
d1f4adab24 Cleanup: spelling, correct reference to 'Mesh.mcol' 2020-05-29 12:58:29 +10:00
dbdb8a3355 Cleanup: line length, single quote enums, invalid URL 2020-05-29 12:45:46 +10:00
5ec18ae4ab Docs: replace warnings with note for complexity information
Reserve warnings for situations such as corrupt data which can
cause crashes.
2020-05-29 12:42:09 +10:00
2deb6c5177 Fix for T77111: Joins Areas Without Creating Invalid Edges
Properly align every involved edge when performing 'tolerant' area joins.

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

Reviewed by Brecht Van Lommel
2020-05-28 11:34:31 -07:00
Peter Fog
1be79dc2a0 VSE UI: Add buttons for swap Effect strip inputs
The feature where the active strip determines what strip will be the
first input in effect strips can be quite a puzzle for users.
The operator to swap the inputs is hidden in the Strip menu.

This adds the swapping to the Effect sidebar panel.

Differential Revision: https://developer.blender.org/D7849
2020-05-28 14:17:22 -04:00
Peter Fog
155cd03599 VSE UI: Move Scene strip and Mask strip above Adjustment in Sidebar
This is consistent with the other strip specific properties.

Differential Revision: https://developer.blender.org/D7677
2020-05-28 12:53:06 -04:00
Peter Fog
b8bcbaaf0e VSE UI: Rename Scene Strip Panel and Move View Panel Up
- Rename "Scene Preview/Render" to "Scene Strip Display",
   since this relates to Scene Strips.
 - Move the "Scene Strip Display" down, so the view settings are on top.

Differential Revision: https://developer.blender.org/D7676
2020-05-28 12:42:44 -04:00
Peter Fog
82cbf93f20 VSE UI: Group Show Elements in View Menu, Use Consistent Naming
Use the "Show..." syntax for Show elements in View menu.

Differential Revision: https://developer.blender.org/D7344
2020-05-28 12:23:11 -04:00
Peter Fog
6cbb56418f VSE UI: rename Trim Offset to Slip Offset
The operator was at some point renamed from Trim to Slip,
but not yet in the header text.

Differential Revision: https://developer.blender.org/D7712
2020-05-28 12:15:41 -04:00
Peter Fog
a099478cad UI: Use Heading to Remove Text strip Shadow Subpanel
The new "heading=" option allows for a more simple way to expose the
Text strip Shadow operator.

Differential Revision: https://developer.blender.org/D7535
2020-05-28 12:11:53 -04:00
3923062d13 Cleanup: GPU: Fix warning 2020-05-28 14:04:52 +02:00
a9073ccb68 Merge branch 'blender-v2.83-release' 2020-05-28 13:43:57 +02:00
ff1040c6fe GPencil: Reduce aliasing for subpixel lines 2020-05-28 13:42:39 +02:00
59b730b643 GPU: Fix compilation warning about uninitialized values 2020-05-28 13:42:11 +02:00
c7a7dc743d Cleanup: DRW: Remove array suffix from uniform name 2020-05-28 13:42:11 +02:00
bf690ecd39 DRW: Add DRW_shgroup_uniform_vec4_array_copy 2020-05-28 13:42:11 +02:00
68d6b73fde Readfile: move all calls to 'id_us_ensure_real' to direct_link functions.
That kind of 'own' ID management has really nothing to do in lib_link
code.
2020-05-28 12:13:16 +02:00
1335f2d272 Fix T65889: Hair Particles not updating when using image sequence 2020-05-28 10:47:01 +02:00
806db47fd8 Depsgraoh: Fix missing texture node allocation
It was causing wrong binding for image animation: since there was no
ID node for texture at the moment of build_animdata original texture
ID was passed to the callback. This is not what is supposed to happen.

This is part of fix for T65889.
2020-05-28 10:47:01 +02:00
3d2f143000 Cleanup: remove unused struct members from RenderStats 2020-05-28 16:57:19 +10:00
4ddb7a33a4 Cleanup: spelling 2020-05-28 16:42:31 +10:00
5c8ccad652 Fix cone primitive creating duplicate vertices
Using remove double wasn't reliable as the matrix argument
could cause vertices to be further apart than the threshold allowed for.

This happened when adding cones using the new add tool.
2020-05-28 16:17:00 +10:00
122cb1aea8 Object: new add object tool, currently for primitive types
- Interactively adding primitives with two clicks.
- Scene orientation used for new objects.
- Depth [view-plane, axis-plane, surface]
- Origin [base, center]
- Primitive types [cube, cylinder, cone, uv-sphere, ico-sphere ]
- Settings for object types in the top-bar.

Shortcuts:

- Snapping (Ctrl).
- Constrain 1:1 aspect (Shift).
- Toggle center (Alt).

Part of T57210 design task.
2020-05-28 15:08:58 +10:00
16943c0146 Object: add scale argument to creation operators
Needed for to create objects of a specific size.
2020-05-28 14:34:00 +10:00
d35a33ef72 Gizmo: add flag for gizmos to ignore keymap events
Needed for the snap gizmo not to steal mouse events from the tool.
2020-05-28 14:34:00 +10:00
cdcbcca25e Cleanup: missing braces warning 2020-05-28 14:34:00 +10:00
d7282537f0 CD_PROP_COL datalayer
This implements a generic color datalayer and its functions. Based on
D5975.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7838
2020-05-27 20:04:46 +02:00
80d6421f28 Ruler: Remove highlight hack 2020-05-27 14:27:37 -03:00
0b793514fa Cleanup: Use bitmaps insteand of bool and char arrays
This was propsed in D7059, so I applied it to the rest of the code

Reviewed By: campbellbarton, sergey

Differential Revision: https://developer.blender.org/D7480
2020-05-27 18:36:05 +02:00
79e529c5ec Fix T77109: Cycles viewport render crash after object add and undo 2020-05-27 18:03:17 +02:00
7e80aa7ca6 Update the default Face Set when creating Face Sets from visible
If all vertices in the sculpt are visible create the new face set and
update the default face set. This is the same as disabling the overlay,
so it will not have the extra performance cost of rendering a colored
face set twice that gives no information.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7530
2020-05-27 17:35:54 +02:00
735119dd0f Fix T75096: Crash when using liquid simulation as dynamic paint brush
Reviewers: sergey

Differential Revision: https://developer.blender.org/D7853
2020-05-27 16:15:06 +02:00
49c295813b Merge branch 'blender-v2.83-release' 2020-05-27 15:31:03 +02:00
28d9368538 Fix T76947: Optix realtime denoiser progressively reduces brightness of very bright objects
The input data to the OptiX denoiser was clamped to 0..10000 as required, but it could easily
exceed that range with a high number of samples (since the data contains the overall sum). To
fix that, divide by the number of samples first and multiply it back in after the denoiser ran.
2020-05-27 15:17:47 +02:00
efa4ae17f0 OpenSubdiv: Only store edges topology for non-smooth edges
This change makes it so vertices of edge are only stored when edge
has non-zero crease. This allows to lower memory footprint of 1.5M
faces from 78 MiB to 54 MiB in the case all creases are zero.

Meshes with crease are more hard to predict due to array-based
storage, so it all depends on index of edge with crease. Worst case
(all edges are creased) still stays at 78 MiB.
2020-05-27 12:07:16 +02:00
8cd17a9529 OpenSubdiv: Allow any order of edge topology/sharpness assignment
Makes it possible to set adjacent vertices after edge sharpness.

Initially it seemed like useful sanity check, but with time it
became rather a burden.
2020-05-27 12:07:16 +02:00
42cb1e3a2c OpenSubdiv: Optimize faces storage in mesh topology
Avoid per-face pointer and allocation: store everything as continuous
arrays.

Memory footprint for 1.5M faces:

- Theoretical worst case (all vertices and edges have crease) memory
  goes down from 114 MiB to 96 MiB (15% improvement).

  This case is not currently achievable since Blender does not expose
  vertex crease yet.

- Current real life worst case (all edges have crease) memory goes
  down from 108 MiB to 90 MiB (17% improvement).

- Best case (no creases at all) memory goes down from 96 MiB to 78 MiB
  (19% improvement).
2020-05-27 12:07:16 +02:00
c971731b8f OpenSubdiv: Add regression tests for mesh topology
While this looks trivial it already allowed to catch issues in one
of previous attempt to optimize memory usage. It will totally be
useful for an upcoming refactor of face topology storage.
2020-05-27 12:07:16 +02:00
38b50fe393 OpenSubdiv: Hide individual topology elements
Move all API to happen via MeshTopology.

This is a preparation for an upcoming memory optimization.
2020-05-27 12:07:16 +02:00
15bcfc5b19 OpenSubdiv: Cleanup, remove unused code
There is no need in edge map anymore.
2020-05-27 12:07:16 +02:00
12c42738f3 OpenSubdiv: Add TODO avoid checking face-varying topology for equality 2020-05-27 12:07:16 +02:00
8e9fdd2f31 OpenSubdiv: Move preliminary geometry counters check to mesh topology 2020-05-27 12:07:16 +02:00
a444400900 OpenSubdiv: Keep explicit storage of base mesh faces
Allows to perform comparison by doing linear comparison of indices.

Before cyclic match was used to deal with possibly changed winding from
OpenSubdiv side.

Speeds up comparison (and hence improves FPS), makes code more reliable
nut uses more memory.
2020-05-27 12:07:16 +02:00
1e0de7c2ea OpenSubdiv: Compare edge topology
This change makes it so topology refiner comparison will check vertices
of all existing/provided edges.

The initial claim that due to manifold nature of mesh there is no need
in "deep" edges check was wrong: some areas might only provide edges
with non-zero creases. So if crease of one edge goes changes from 1.0
to 0.0 and crease of other edge goes from 0.0 to 1.0 the old comparison
code would not have caught it.
2020-05-27 12:07:16 +02:00
6a8193e505 OpenSubdiv: Refactor, move mesh topology comparison to own file
Makes it easier to follow and extend.
2020-05-27 12:07:16 +02:00
ece54172d0 OpenSubdiv: Use explicit storage for edge sharpness
Similar to previous change in vertex sharpness, explicitly store value
provided by the converter.

Allows to avoid rather fragile check for boundary edges.

Also allows to avoid need in constructing edge map. This lowers memory
footprint of the comparison process and avoids memory allocations
during the comparison (which is an extra benefit from the performance
point of view).
2020-05-27 12:07:16 +02:00
16aef5dc4a OpenSubdiv: Allow use of regular ordered map 2020-05-27 12:07:16 +02:00
ad4cef38e3 OpenSubdiv: Refactor, move comparison to own file 2020-05-27 12:07:16 +02:00
614d70a87d OpenSubdiv: Compare sharpness based on converter
This change starts the transition of topology refiner comparison
to compare actual values given by the converter, which will not be
affected by the refinement or face winding synchronization steps.

Currently is only implemented for vertex sharpness, but will be
extended further as followup development.

Fixes T71908: Subdiv: Incorrect topology comparison, leading to poor performance
2020-05-27 12:07:16 +02:00
717d968fb9 OpenSubdiv: Add explicit storage for mesh topology
The idea is to use this explicit storage for topology comparison rather
than using base level. While this will have memory overhead it allows
to simplify comparison of such things as:

- Vertex sharpness (where base level from topology refiner will have it
  refined, meaning it will be different from what application requested
  for non-manifold and corner vertices).

- It will allow to simplify face-vertices comparison, where currently
  O(N^2) algorithm is used due to possible difference in face winding.

- It will also allow to avoid comparison-time allocation of edge map.

Currently no functional changes, just preparing for development which
will happen next.
2020-05-27 12:07:16 +02:00
5d8515ed86 OpenSubdiv: Add move semantic to the namespace 2020-05-27 12:07:16 +02:00
b5ef644ef6 OpenSubdiv: Refactor, pass higher level object through comparison 2020-05-27 12:07:16 +02:00
444ca1a117 OpenSubdiv: Refactor, move utils to base
Also split them across utilities and types.
2020-05-27 12:07:16 +02:00
39cf673132 OpenSubdiv: Refactor, move base C-API file to base folder 2020-05-27 12:07:16 +02:00
98197343e8 OpenSubdiv: Cleanup, use C++ range based loop
Avoid indirection via define.
2020-05-27 12:07:16 +02:00
be03a756e5 OpenSubdiv: Cleanup, move utility function to base type conversion 2020-05-27 12:07:16 +02:00
0ff665e4ce OpenSubdiv: Refactor, move type conversion to base fodler 2020-05-27 12:07:16 +02:00
4886a704b3 OpenSubdiv: Refactor, move evaluator to own folder 2020-05-27 12:07:16 +02:00
6fc9d106ad OpenSubdiv: Completely disable topology verification
Previously it was enabled for debug builds, now it is to be enabled
explicitly.

The reason for this is to reduce overhead when debugging other areas
which might involve subdivision surface. When conversion is to be
debugged set this manually in the code.
2020-05-27 12:07:16 +02:00
0d089ce881 OpenSubdiv: Refactor, move edge map to base folder 2020-05-27 12:07:16 +02:00
4ab36c4393 OpenSubdiv: Refactor creation of topology refiner
Consolidate it inside of the topology refiner implementation class,
which would allow to store extra data acquired during construction
of the OpenSubdiv's object.
2020-05-27 12:07:15 +02:00
57aae2a355 OpenSubdiv: Refactor, use C++ allocation for internal classes
Only use OBJECT_GUARDED_{NEW. DELETE} for structures which are part of
public C-API (and hence can not have new/delete operators overloaded).

Could try being brave and override new/delete from under C++ ifdef.
2020-05-27 12:07:15 +02:00
c81a5f58f8 OpenSubdiv: Refactor, move topology refiner factory to topology folder 2020-05-27 12:07:15 +02:00
67fe31d751 OpenSubdiv: Refactor, move topology refiner to own folder
In the future factory will also be moved there.
2020-05-27 12:07:15 +02:00
7c0bea0d65 OpenSubdiv: Refactor, move device specific code to own files
Also, move all device files to own folder.

Makes it so checks for device availability are done in a localized
place.
2020-05-27 12:07:15 +02:00
Konrad Puklicki
e490dc4346 UI: Skip unnecessary cursor setting
Currently, in sculpting, weight paint and vertex paint modes every cursor
movement triggers redraw of a brush. During that redraw, native cursor is set.
Under the hood, setting the cursor causes freeing of previous cursor and
allocating a new one. In most cases, in previously mentioned modes, recreating
cursor is unnecessary since cursor stays the same.

This patch adds a check which skips cursor change if requested cursor is
already set. The check could be added in pain_cursor.c, but I felt adding it
inside WM_cursor_set function would hopefully skip more unnecessary cursor
reallocations.

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

Reviewed by: Julian Eisel
2020-05-27 12:06:35 +02:00
bab5fbb66c Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-05-27 12:01:04 +02:00
1c3b2b5dd8 Fix T77105: Crashes when clicking "new scene" button
This was introduced on ecc395e473.

Effectively this is reverting that commit for cases when
scene->toolsettings->sculpt is NULL. But since the facesets are only
working for sculpting this should be fine.
2020-05-27 12:00:00 +02:00
Stefan Werner
ecc15c55d4 Cycles: Upgraded Embree to version 3.10.0
Enabled round linear hair in Embree.

Differential Revision: https://developer.blender.org/D7623
2020-05-27 10:10:18 +02:00
7836242065 Cleanup: remove unused Main struct from snap context 2020-05-27 16:54:34 +10:00
355d129965 Gizmo: lazy initialize snap context
ED_gizmotypes_snap_3d_context_get could have returned NULL,
rename _get(..) to _ensure(..) and initialize the snap context
in this function.
2020-05-27 16:47:30 +10:00
1f7a791a53 Ruler: Implement Snap Gizmo
The snap point can now be viewed when activating the tool.
2020-05-27 00:16:32 -03:00
2e73e1390e Gizmo Library: New Snap Gizmo
Generic snap gizmo to be used for different tools.

The Gizmo can be configured initially by the following properties:
- `"snap_elements_force"`, `"prev_point"`

The following properties can be read as return:
- `"location"`, `"normal"`, `"snap_elem_index"`

This property can be linked to another (tool_setting.snap_elements):
- `"snap_elements"`

And this 3 extra utilities have been added:
- `ED_gizmotypes_snap_3d_draw_util`,
- `ED_gizmotypes_snap_3d_context_get`,
- `ED_gizmotypes_snap_3d_update`.

Differential Revision: https://developer.blender.org/D7071
2020-05-27 00:14:11 -03:00
7ed7901c00 Gizmo: add flag to disable tooltip
For some gizmos that follow the mouse cursor, this gets in the way.
2020-05-27 12:24:29 +10:00
43af0f4d16 Cleanup: pass const wm for WM_keymap_active 2020-05-27 12:09:52 +10:00
6c1cf395f2 Cleanup: remove unnecessary copy constructor
Caused deprecated-copy warnings as it wasn't used.
2020-05-27 11:50:54 +10:00
a739dc67ef Cleanup: sort file, structs 2020-05-27 10:52:07 +10:00
e5458fa4e5 Cleanup: warning 2020-05-27 10:52:00 +10:00
a8551f93e6 Merge branch 'blender-v2.83-release' 2020-05-26 16:52:15 -06:00
f772a4b8fa Fix: A few missing outliner selection sync tags
Add selection syncing for object add named (e.g. drag and drop from
outliner to 3D view), outliner right click (a sync when the context menu
is cancelled), and for object selection from Python.
2020-05-26 16:42:21 -06:00
eb5422828a Cleanup: Quiet unused variable warning in non-debug builds 2020-05-26 16:02:08 -04:00
5171d86806 UI: List Panel System
This implements a general system to implement drag and drop, subpanels,
and UI animation for the stack UIs in Blender. There are NO functional
changes in this patch, but it makes it relatively trivial to implement
these features for stacks.

The biggest complication to using panels to implement the UI for lists
is that there can be multiple modifiers of the same type. Currently there
is an assumed 1 to 1 relationship between every panel and its type, but
there can be multiple list items of the same type, so we have to break
this relationship. The mapping between panels and their data is stored
with an index in the panel's runtime struct.

To make use the system for a list like modifiers, four components
must be added:
1. A panel type defined and registered for each list data type, with a
    known mapping between list data types and panel idnames.
1. A function called by interface code to build the add the panel
    layouts with the provided helper functions.
    - UI_panel_list_matches_data will check if the panel list needs to
      be rebuilt.
    - UI_panels_free_instanced will remove the existing list panels
    - UI_panel_add_instanced adds a list panel of a given type.
3. An expand flag for the list data and implementations of
    get_list_data_expand_flag and set_list_data_expand_flag.
4. For reordering, the panel type's reorder callback. This is called
   when the instanced panels are drag-dropped. This requires
   implementing a "move to index" operator for the list data.

Reviewed By: Severin, brecht

Differential Revision: https://developer.blender.org/D7490
2020-05-26 15:39:49 -04:00
Cody Winchester
de257b6366 Modifiers: Add normalize weights option to vertex weight modifiers
Original patch by Cody Winchester (@CodyWinch), several fixes and
cleanup by Bastien Montagne (@mont29).

Differential revision: https://developer.blender.org/D7656
2020-05-26 20:56:27 +02:00
00674c12cc Merge branch 'blender-v2.83-release' 2020-05-26 20:49:53 +02:00
18f33f293b Fix Cloth Brush grab deformation mode
The grab mode was not correctly implemented, so the way it was working
was confusing for users.
- Grab delta was calculated in increments from the last stroke position, so it did not match the behavior of a grab brush. I refactored the grab delta calculation to make this change more explicit.
- Grab displacement was not calculated from the original coordinates
- Grab was using an incorrect strength

Grab is now setting the position of the affected vertices directly and
the constraints solve the rest of the cloth. I also tried to implement
an alternative version based on applying forces to move the vertices to
the grab position, but I think this is more controllable and the grab
falloff can be adjusted by tweaking the simulation falloff.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7756
2020-05-26 20:48:46 +02:00
9aea7dc7c6 Fix Pose Brush origin position with large brush size
When the brush size is bigger than the entire mesh, fdata.tot_co can be
0, so the pose origin will default to (0,0,0), which does not make much
sense. After this patch, the pose origin will be set to the farthest
vertex from the pose origin, which at least should be in the surface of
the mesh and in most cases in the direction the pose brush was already
detecting the origin.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7773
2020-05-26 20:45:20 +02:00
9b0f65c4a6 Fix naming in the PBVH neighbor iterator macro
The only possible name for the iterator was ni, this should fix that.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7774
2020-05-26 20:43:14 +02:00
5f63344e84 Fix PBVH API returning wrong normal when using shape keys and modifiers
The implementation of this function should match the one in
SCULPT_vertex_co_get. This does not solve the issue when sculpting with
modifiers active but I think this code is wrong

Reviewed By: sergey, brecht

Differential Revision: https://developer.blender.org/D7805
2020-05-26 20:40:27 +02:00
a2baf50242 Cleanup/refactor: Workspace API, boilerplate code, early exit
* Simplify workspace API a bit
* Comment on behavior of workspace-layout relations where exposed in API
* Remove annoying getters/setters
* Avoid lookups if we can early exit
* A NULL check is removed in `direct_link_workspace()` that I don't see
  a need for. Am not 100% sure though, fingers crossed.

In general these changes should improve readability and make things
easier to reason about.
2020-05-26 20:32:21 +02:00
1f223b9a1f UI: Windows Shell Links & Improved Mac Aliases
Adds support for Windows Shell Links (shortcuts) to the File Browser. Extended Mac Alias usage. Better visualization of linked items.

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

Reviewed by Campbell Barton
2020-05-26 08:15:50 -07:00
78eae89c39 Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-05-26 16:44:35 +02:00
a1c9d42584 Fix T77021: Alembic export of animated mesh with multiple UV maps fails
This was caused by a side-effect of our exporting code's memory
management (Alembic considers data "written" and "final" when its C++
objects go out of scope) in combination with my change in
rB65574463fa2d. I removed an "only export UVs on the first frame" clause
because it was unclear why this restriction was there. As it turns out,
it breaks the export of the 2nd and subsequent UV maps on an animated
mesh. Effectively, on every frame the Alembic library thought we want to
create a new UV map, instead of continuing to write a new frame of data
to the existing one.

This is resolved by keeping a reference to the C++ objects for the UV
maps in memory while the exporter is running.
2020-05-26 16:42:01 +02:00
4102e7ed81 Fix T77032: Crash when creating GPUOffscreen without GPUContext in Python 2020-05-26 11:38:19 -03:00
d8733539b7 Merge branch 'blender-v2.83-release' 2020-05-26 16:26:16 +02:00
f3cf29ac96 Fix T77074: Collections: Exclude From ViewLayer toggle crashes
Consider this a bandaid fix (similar to rBe2724abc22d5).

Real issue seems to be that object is still in OB_MODE_PARTICLE_EDIT
whereas it should be in OB_MODE_OBJECT after toggling 'Exclude From
ViewLayer'. So while this patch prevents the crash, it leaves the object
in a weird state (it cannot be selected for example), needs further
investigation.

Maniphest Tasks: T77074

Differential Revision: https://developer.blender.org/D7843
2020-05-26 16:22:41 +02:00
4114e89020 Fix overlapping tabs placement when used in right Top-bar split
Didn't respect alignment rules for split layouts.

Reported in T77075.
2020-05-26 15:42:50 +02:00
14b1c55e11 Cleanup: Remove uneeded NULL checks on ed_screen_context
view_layer should never be NULL.
2020-05-26 15:08:45 +02:00
299682bde7 Merge branch 'blender-v2.83-release' 2020-05-26 15:04:17 +02:00
d3275178fe Fix T77082: Greasepencil error accessing material dropdown on an object without materials
Differential Revision: https://developer.blender.org/D7841
2020-05-26 14:55:37 +02:00
35bd596876 Merge branch 'blender-v2.83-release' 2020-05-26 14:53:19 +02:00
2299f6b5a7 Fix T77049: VSE Image cache is not refreshed when strip are muted/
unmuted in metastrip

Maniphest Tasks: T77049

Differential Revision: https://developer.blender.org/D7834
2020-05-26 14:49:19 +02:00
e790f1a8dc Merge branch 'blender-v2.83-release' 2020-05-26 14:24:50 +02:00
23520cbd13 Cleanup: Avoid mixing unlink-operator and menu name for ID-templates
The context menu name for `UILayout.template_ID_tabs()` would be passed
through multiple functions as `unlinkop`.
2020-05-26 13:28:21 +02:00
2a692e05c8 Fix T77075: Crash omitting optional UILayout.template_ID_tabs parameter 2020-05-26 12:56:53 +02:00
13e17cbd47 Cleanup: remove unused includes from lib_query.c 2020-05-26 12:33:28 +02:00
b44c3ac1e9 Fix/Cleanup: Move some animdata versioning code out of liblinking process.
This was propably added way before we had the after-lib-link versionning
code, but now doing that sort of fixes at liblink time is bad.
2020-05-26 12:33:28 +02:00
4835a09bb1 Cleanup: Create afterliblink doversion for 2.90... and move relevant code there.
Seriously... Please comply with design and do not add 2.9x versionning
code to 2.8x versioning functions!
2020-05-26 12:33:28 +02:00
13b10ab852 Fix/refactor foreach_id handling of animdata.
Now callbacks for animdata, nla strip and fcurve are in their own proper
BKE files (mimicking `foreach_id` callback of `IDTypeInfo`).

This commit also fixes some missing handling of ID pointers (text ID and
IDProperties of script fcurve modifier...).
2020-05-26 12:33:28 +02:00
fc2bb44e94 Fix T68209: Crash opening pre 2.8 file with maximized area
Versioning for workspaces didn't update the map used to determine which
layout is active for a workspace in a specific window. Library code now
called the function to make a workspace active (even if it already was
active), which would also use this map to determine the active layout --
the wrong one.

Error in initial workspace integration, but only uncovered recently.
Likely through 0d8a8ce03b.
2020-05-26 12:19:27 +02:00
5a1ab3e9ae Fix T77067: GPencil Object without materials cannot use Vertex Color mode 2020-05-26 12:13:25 +02:00
825d5c9992 Fix T76522: Grease Pencil transform fill and Adjust Last Operation panel issue
The exec method was totally wrong and also the UI panel was not logic. 

Also changes to make the transformation smoother and the code more simple.

Reviewed By: lichtwerk, mendio

Maniphest Tasks: T76522

Differential Revision: https://developer.blender.org/D7741
2020-05-26 11:22:32 +02:00
2dd6d0ce4b Fix T76926: Crash with Full Screen file browser window preference
Alternative fix for T75292 & T73579 (see b75ce05c3b), that does not
cause this crash.

The crash happened because cancelling the file browser removes its
screen (as in bScreen). Before rBb75ce05c3b0f, the file browser event
wouldn't be handled any further then. After it, it would still be passed
to other areas, while the screen pointer was dangling.
Now the event is only skipped for UI handlers.

Reviewed by: Julian Eisel
2020-05-26 10:38:46 +02:00
49f59092e7 Curves: Implement Handles for selected points only
When editing a complex curve is very annoying to have all handles at a time. Also, this is a requirement for the current GSoC Edit Grease Pencil using curves.
I have seen that this improvement can be used in any other area of blender, so I have decided to publish the option in the overlay panel..

Reviewed By: fclem, #user_interface, billreynish, Severin

Differential Revision: https://developer.blender.org/D7754
2020-05-26 10:37:47 +02:00
ecc395e473 Fix T76902: face sets checkbox broken
Due to recent changes the face sets checkbox broke. The cause is that
{7d38f5036794} changed the responsibility of drawing and updating sculpt GPU
buffers to fix render glitches.

This patch moves the checkboxes evaluation to the overlay engine.
2020-05-26 08:48:57 +02:00
77fdd189e4 Fix T76970: Unneccessary update calls viewport
Due to recent changes clicks in the node editor would trigger a
depsgraph update resulting in too many redraws. This patch limits
the updates to when workbench shown in texture mode in any visible
screen.

There are still cases where too many updates are created. For example when
there are a Cycles render viewport and a Workbench texture viewport on the
same screen.

This fix is meant as a workaround. The actual fix should add a mechanism
to the depsgraph and the viewports should check if they need to be redrawn.

Reviewed By: Brecht van Lommel

Differential Revision: https://developer.blender.org/D7830
2020-05-26 08:29:24 +02:00
495a98d623 BLI_assert: prevent abort from suppressing return-type warning
Recent commit deaff945d0 broke release builds but not debug builds,
with this change the warning happens in both cases.
2020-05-26 13:40:21 +10:00
4e8693ffcd Improved Area Border Selection and Dragging
Allow use of the full width of visible borders when dragging to resize areas.

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

Reviewed by Brecht Van Lommel
2020-05-25 16:29:21 -07:00
5254ffa17b Fix T77051: IC keymap hotkey conflict in mode switching with GP object 2020-05-25 21:50:07 +02:00
39aa122a0e DRW: Selection: Extend small object selection workaround to all overlays
Fix T77015 box select doesnt select cameras when zoomed out, lasso and circle select do work.
2020-05-25 19:35:07 +02:00
4a9a8611f2 Fix T72121: Measurements are being drawn incorrectly if one end is off screen
The solution is to distribute the drawing for part to be done in 3d
(dashed lines, arc) and another part in 2d (text and caps).

Ref T72121

Reviewed By: fclem

Maniphest Tasks: T72121

Differential Revision: https://developer.blender.org/D6361
2020-05-25 19:17:59 +02:00
4464a9425b Calculate epsilon values for interp_weights_poly to improve accuracy
interp_weights_poly_v2 would have too large epsilon values for small
polygons. To solve this we now calculate the appropriate epsilon value
so it can gracefully handle big and small values.

To make sure there was no regression, these changes were tested with the
files in T36105, T31581. Also with a surface deform modifier test file
attached in the differential below.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D7772
2020-05-25 18:59:14 +02:00
c19cc7ef81 GPUTexture: Make GPU_texture_clear workaround fast.
This way we have a convenient way to clear individual textures.
2020-05-25 18:37:44 +02:00
6fbeded285 Fix T76926: Crash with Full Screen file browser window preference
Alternative fix for T75292 & T73579 (see b75ce05c3b), that does not
cause this crash.

The crash happened because cancelling the file browser removes its
screen (as in bScreen). Before rBb75ce05c3b0f, the file browser event
wouldn't be handled any further then. After it, it would still be passed
to other areas, while the screen pointer was dangling.
Now the event is only skipped for UI handlers.

Reviewed by: Julian Eisel
2020-05-25 18:33:12 +02:00
31cb4133b9 Fix T77009: texture baking crash on Windows
Only happens in master, but DynamicArray implementation is wrong also in 2.83.
Thanks to Jesse Y and Ray Molenkamp for investigating.
2020-05-25 18:17:30 +02:00
52c356c199 Cleanup wrong format specifier in a debug printf. 2020-05-25 17:49:58 +02:00
396bf6ca78 Fix T73164: Undo does not always properly clear no-more-used library data.
Solution is actually very simple, and even makes existing code simpler:
just write all lib IDs when storing and undo step. That way we do not
have to guess which indirectly used library should be kept or not after
an undo step reading.
2020-05-25 17:44:27 +02:00
6d4dc22e17 Sculpt: Pose Brush Scale/Transform deform mode
This is an alternative deformation brush for the Pose Brush intended
quickly change the proportions of the mesh. The regular mode scales
using the segment's origin as a pivot. The inverted mode drags the
entire segment using the grab delta.

The only difference with the regular pose brush is that it is not
compatible with IK, so the option is disabled and set to 1 segment. The
rest of the options should work as expected.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7374
2020-05-25 17:35:39 +02:00
28d81f7b24 Fix T76957: Rigid body "Animated" text cutoff
Removes the flow layout from the panel. No reason to use that here,
surrounding code doesn't either. Probably an unintentional left-over.
2020-05-25 17:26:22 +02:00
9f1f7ba2bb Fix T76925: more Cycles OpenCL compile errors with some drivers on Linux 2020-05-25 17:06:10 +02:00
f53ae843b3 Fix T76267: Stencil texture with negative scale dissapears after
clicking Image Aspect

Calculate with positive areas here and ensure stencil_dimension stays
positive.

Maniphest Tasks: T76267

Differential Revision: https://developer.blender.org/D7821
2020-05-25 16:57:36 +02:00
ce0db0d329 UI: Fix T76918: 3D Mouse Inconsistent / Inaccessible UI
This consolidates the UI code for NDOF input settings, making all
settings accessible from the preferences. This works around an issue
where the Space Navigator's "Menu" button doesn't trigger the settings
menu in Blender.

I also took the opportunity to redo the UI layout.

Note: Separate commit for 2.83 because UI layouts features
have diverged.

Differential Revision: https://developer.blender.org/D7806
2020-05-25 10:53:17 -04:00
2ba3214a21 UI/Physics: Show error enabling Rigid Body if compiled without Bullet
Would just silently fail, which is confusing.
Should only impact custom builds.
2020-05-25 16:49:18 +02:00
7a51eb5340 Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-05-25 16:37:43 +02:00
219ce574b5 Revert "UI: View3D Cursor Changes"
This change is yet to be followed by a more comprehensive design
proposal including:

* How to differentiate the modes apart.
* More clear definition of tools and the rules for their components (gizmo, cursor).
* Selection as a non-tool vs drag option.

This can be revisited for 2.90 with more time. For now the UI team
agrees to revert this.

--
This reverts commit 4aa703aa14.
2020-05-25 16:28:55 +02:00
1b06d5742e Fix building after rBdeaff945d0b9... sic. 2020-05-25 16:07:37 +02:00
ec0ba8e3b5 VR: Fix big performance bottleneck for simple scenes
Blender's main loop puts the main thread to sleep for 5ms if no user input was
received from the OS. We never want that to happen while the VR session is
running, which runs on the main thread too.

For simpler scenes, where the viewport already draws fast, this may have quite
some impact. E.g. in my tests, the classroom scene went from ~55 to quite
stable 90 FPS in solid mode (total render time as measured and averaged by
Windows Mixed Reality utilities). With Eevee, it only went from 41 to 47 FPS.
In complex files, there's barely a difference. E.g. less than 1 FPS increase in
a Spring file (both Solid mode and Eevee).
2020-05-25 15:52:24 +02:00
026eba8523 Fix T76941: "Set Inverse" in Child Of constraint broken with armatures
When the Child Of constraint is owned by a bone, before the constraint is
run the matrix is converted from world to pose space. However, setting the
inverse should also take the armature object's transform into account.
2020-05-25 15:46:08 +02:00
8b849f39e8 Merge branch 'blender-v2.83-release'
Conflicts:
	source/blender/blenkernel/intern/lib_id.c
2020-05-25 15:43:54 +02:00
849f5bee19 Cleanup: ID makelocal code: remove useless and confusing debug code.
Thing is, user code should not have the responsibility to check that
libquery is valid. Such checks are only source of confusion and errors
as nobody will think about finding and updating them in some obscure
specific area of the code...
2020-05-25 15:38:36 +02:00
b01d2ea72a Libquery: Refactor: add bmain to data passed to callback.
No reason to enforce defining own callback user data for something that
controlling has already available...
2020-05-25 15:28:15 +02:00
e0ff032711 Fix T76997: bad handling of embedded IDs in partial append.
Code dealing with embedded data was pre-existing proper generic
handling of those by `BKE_library_foreach_ID_link()` - and was never
updated for scene's master collection it would seem...

Note that such fix/refactor is a bit risky at this point in the release
cycle, but on the other end previous situation was really broken. So
finger crossed. :|
2020-05-25 15:28:15 +02:00
7a37db6125 Fix T76997: bad handling of embedded IDs in partial append.
Code dealing with embedded data was pre-existing proper generic
handling of those by `BKE_library_foreach_ID_link()` - and was never
updated for scene's master collection it would seem...

Note that such fix/refactor is a bit risky at this point in the release
cycle, but on the other end previous situation was really broken. So
finger crossed. :|
2020-05-25 15:11:36 +02:00
deaff945d0 Mesh: skip conversion from edit-mesh to mesh in edit-mode
This resolves a performance regression in 2.8x where every edit-mode
update performed an edit-mesh to mesh conversion.

Now the conversion will be lazily initialized if/when it's required.

New BKE_mesh_wrapper_* functions abstract over mesh data access.
Currently only edit-mesh and regular meshes are supported.
In the future sub-surface meshes may be supported too.
2020-05-25 23:07:30 +10:00
df8cbdc696 Merge branch 'blender-v2.83-release' 2020-05-25 14:10:20 +02:00
a8a6b3627a Fix autokeyframing masks not updating properly
Spotted while looking into T76872

Maniphest Tasks: T76872

Differential Revision: https://developer.blender.org/D7786
2020-05-25 13:56:49 +02:00
0270941b70 Merge branch 'blender-v2.83-release' 2020-05-25 21:43:54 +10:00
7e9480b6cd Tests: correct the blender path for non-portable installations 2020-05-25 21:28:03 +10:00
dc3f404a70 Cleanup: unused variable warnings 2020-05-25 21:03:45 +10:00
3c40d2485f Merge branch 'blender-v2.83-release' 2020-05-25 21:01:38 +10:00
1a60aba46f Merge branch 'blender-v2.83-release' 2020-05-25 21:01:34 +10:00
d65f60764b GTest: BLI_ghash_performance_test was failing
Change the seed from 0 to 1, so BLI_ghash_performance_test doesn't
assert with duplicate keys.
2020-05-25 20:52:10 +10:00
baa1886791 Fix T76990: Crash shortest path select with 'face stepping' when no faces.
Note that this sometimes gives no solution when there is a mix of edges
with and without faces... But at leat this should be safe fix.
2020-05-25 12:44:10 +02:00
9ef272bae3 Task: Graph Flow Task Scheduling
Add TBB::flow graph scheduling to BLI_task.

Using flow graphs, a graph of nodes (tasks) and links can be defined.
Work can flow though the graph. During this process the execution of the nodes will be
scheduled among the available threads.

We are planning to use this to improve the threading in the draw manager.

The implemented API is still limited it only supports sequential flows. Joins and buffers
are not supported. We could eventually support them as part of an CPP API. These features
from uses compile time templates and are hard to make a clean C-API for this.

Reviewed By: Sergey Sharybin, Brecht van Lommel

Differential Revision: https://developer.blender.org/D7578
2020-05-25 12:38:12 +02:00
87e9557cd1 Simulations: pass simulation data block to update function 2020-05-25 12:23:55 +02:00
60bed34f16 install_deps: update libraries versions.
- FFMPEG: 4.3.2
- OpenSubDiv: 3.4.3
- OpenXR SDK: 1.0.8
- Switch form SDL 1.2 to SDL 2.0

Re T77035, T77007, T77010 and T77011
2020-05-25 11:54:30 +02:00
1c467d77de Cleanup: typo 2020-05-25 11:39:52 +02:00
528f0b95c4 Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-05-25 10:45:39 +02:00
41bb0548b0 Fix T76897: Lamp Power Not Updating from Driver
Lamps were not tagged with `ID_RECALC_SHADING` when they were updated
from drivers. As a result, Cycles considered the lamp as unchanged. This
is resolved by having a (seemingly non-functional) callback in a new
`LIGHT_UPDATE` depsgraph node.

This patch unconditionally adds the `LIGHT_UPDATE` node + the relation
from the lamp's PARAMETERS node.

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

Reviewed by: brecht
2020-05-25 10:07:10 +02:00
9b9f84b317 Fix crash when converting BMesh to Mesh with shape keys
The `BM_mesh_bm_to_me()` function copies shape keys from the BMesh to
the Mesh. However, it tries to copy the same number of shape keys as are
defined on the target mesh. Since the target mesh does not necessarily
have the same number of shape keys as the BMesh, this would crash if the
target Mesh has more.

Found while performing some tests for {D7785}.

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

Reviewed by: brecht
2020-05-25 09:43:01 +02:00
5a842b3412 Merge branch 'blender-v2.83-release' 2020-05-25 15:55:54 +10:00
c15bb3b55f Fix T77031: Blender as pymodule crashes when rendering
No longer enforce WITH_HEADLESS when building as a Python module
as it disables GPU access which is needed for rendering.
2020-05-25 15:53:43 +10:00
ffcb87813b Merge branch 'blender-v2.83-release' 2020-05-25 15:01:01 +10:00
dc429d5910 Merge branch 'blender-v2.83-release' 2020-05-25 15:00:58 +10:00
31f3e9082a Cleanup: make format 2020-05-25 14:55:48 +10:00
f274b8c102 CMake: disable WITH_USD with blender_lite configurations 2020-05-25 14:54:41 +10:00
0700521833 Py Docs: Update Sphinx and Theme Dependencies
`sphinx_rtd_theme==0.5.0rc1` probably should not be used for 2.83 but it 
would be nice to test
2020-05-24 19:23:28 -04:00
5db2d9c82b Deps: ffmpeg 4.2.3 + codecs update
This diff updates:
FFmpeg : 4.3.2
libogg : 1.3.4
flac   : 1.3.3
vpx    : 1.8.2
xvid   : 1.3.7
x264   : 33f9e1474613f59392be5ab6a7e7abf60fa63622

x264 seemingly has given up on even providing snapshots
and has been updated to the latest hash available at
this time.

faad has been removed since ffmpeg has not supported
it since 2010.
2020-05-24 15:18:39 -06:00
f13b687551 Merge branch 'blender-v2.83-release' 2020-05-24 21:14:23 +02:00
0d0df683d9 Fix(unreported): Crash on prefetching while transforming strip.
While investigating T76274, I found crash scenario when playhead is near end
frame and moving a strip. It is not as easy to reproduce, about 5% success
rate, and it will be even harder after rB4066c921fbe5. Exact cause wasn't
identified yet.

I wanted to disable prefetching during modal operator execution in VSE, but
currently I don't have any signalling method in place. Checking for G.moving
seems to resolve this problem, but it doesn't adress root cause of bug.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7820
2020-05-24 21:03:31 +02:00
6b8555e01c VR: Fix big performance bottleneck for simple scenes
Blender's main loop puts the main thread to sleep for 5ms if no user input was
received from the OS. We never want that to happen while the VR session is
running, which runs on the main thread too.

For simpler scenes, where the viewport already draws fast, this may have quite
some impact. E.g. in my tests, the classroom scene went from ~55 to quite
stable 90 FPS in solid mode (total render time as measured and averaged by
Windows Mixed Reality utilities). With Eevee, it only went from 41 to 47 FPS.
In complex files, there's barely a difference. E.g. less than 1 FPS increase in
a Spring file (both Solid mode and Eevee).
2020-05-24 17:26:31 +02:00
8e4c74292a Fix T77000: Preferences window can not be opened from script operator
The operators to open the Preferences, Driver Editor, or Info Log window did
not work when executed from another operator or the Python console. Should work
for all of these now.

I considered using operator properties instead, so the position could be set by
a script, with some fallback (e.g. current window center). But decided that's
not really worth the boilerplate and decreased code readability. Can still be
done if there's a need for it.
2020-05-24 16:14:11 +02:00
f43bb98646 Merge branch 'blender-v2.83-release' 2020-05-24 10:22:28 +02:00
22462fed00 Fix T77003: GPencil Paint presets not initializated
In som ecases, the Paint was not ready when the brushes and palette were created. Now, first the paint is checked.
2020-05-24 10:22:03 +02:00
525fc36a80 Deps : XR_OpenXR_SDK 1.0.8 2020-05-23 15:58:15 -06:00
2ddd9813ef deps: SDL 2.0.12 2020-05-23 15:41:44 -06:00
157b9e78a4 Deps: OpenSubDiv 3.4.3 2020-05-23 15:21:28 -06:00
93f60a4da5 Deps: Freetype 2.10.2 2020-05-23 14:37:17 -06:00
f5cd06ed45 deps: OpenAL 1.20.1 2020-05-23 14:02:34 -06:00
1f34a34fa5 Merge branch 'blender-v2.83-release' 2020-05-23 10:43:41 -06:00
6f8d99322c Fix T76578: Show bone visibility driver in outliner
Allow setting drivers and keyframes for the bone visibility restriction
icon in the outliner. Before the button was a simple icon button, but it
is now connected to the RNA property to show the driven or keyframed
state.

Also when hiding a bone from the outliner it would be deselected, but
from the properties editor it would remain selected. This moves the
deselection to the RNA update function to ensure the bone is always
deselected.

Differential Revision: https://developer.blender.org/D7825
2020-05-23 10:36:54 -06:00
041e440649 Merge branch 'blender-v2.83-release' 2020-05-23 15:26:24 +02:00
b4613e0bca GPencil: Fix unreported Noise modifier does not work in axis aligned strokes
If the stroke is totally straight, the normal was not calculated properly.
2020-05-23 15:25:54 +02:00
08c1f5bf33 Cycles: Improve sampling of area lights
This patch uses the sampling method described in "A Low Distortion Map Between Triangle and Square" by Eric Heitz.
The benefit is avoiding sqrt in the calculation, which could be cheaper on some architectures, and the result is
more even sampling across the triangle surface.

Based on ideas from
https://pharr.org/matt/blog/2019/02/27/triangle-sampling-1.html
https://pharr.org/matt/blog/2019/03/13/triangle-sampling-1.5.html

Reviewed By: Brecht Van Lommel

Differential Revision: https://developer.blender.org/D6566
2020-05-23 14:21:49 +02:00
86fa8dc7f7 Merge branch 'blender-v2.83-release' 2020-05-22 22:59:02 +02:00
ece8ecb4dd Cleanup: remove unnecessary NULL test 2020-05-22 22:57:58 +02:00
Ankit
e8dd8c2829 Cleanup: silence deprecation warnings of Carbon Finder Favorites items
Differential Revision: https://developer.blender.org/D7655
2020-05-22 21:52:38 +02:00
f27e122d95 Fix T76925: Cycles OpenCL compile error with some drivers on Linux 2020-05-22 21:50:24 +02:00
e8209c36e6 Cleanup: Deduplicate code 2020-05-22 14:58:56 -03:00
45f17e10ec Fix redo with local orientation 2020-05-22 14:43:51 -03:00
a958725f81 Fix unused parameter ftext 2020-05-22 14:43:51 -03:00
3bc15c097c Fix T76940: Empty HUD (Redo Panel)
If the redo panel was made visible with the same size it had before
(e.g. stored in the file), the runtime region coordinates wouldn't get
set and ended up being all 0. E.g. the simplest way to cause this was
having a collapsed HUD, saving the file, re-opening it with the same
effective DPI and doing an operation so the closed HUD would appear
again.

Now the size is always recalculated if the visibility state of the HUD
changes.
2020-05-22 18:40:10 +02:00
43d33b3626 Merge branch 'blender-v2.83-release' 2020-05-22 17:48:10 +02:00
98689f51c0 Fix T74443: No render in VP9 lossless mode
We define Lossless as CRF 0 (which is usually the best quality and is
working fine with other codecs afaict), but since WebM only allows for
CRF values between 2-32 and actually has a dedicated "lossless" mode, I
suggest using that (it produces large files though, so double-checking
would be welcome).

https://trac.ffmpeg.org/wiki/Encode/VP9#LosslessVP9

Maniphest Tasks: T74443

Differential Revision: https://developer.blender.org/D7800
2020-05-22 17:41:27 +02:00
cbd4b8ebb0 Fix T76974: Shear Tool Misses Orientation 2020-05-22 12:39:57 -03:00
c75a665c44 Transform: refactoring - unify constraint and default orientation 2020-05-22 12:39:56 -03:00
06860ba29b Merge branch 'blender-v2.83-release' 2020-05-22 17:21:52 +02:00
a76e804309 Fix T76960: fluid baking operators not working with pinned object
Maniphest Tasks: T76960

Differential Revision: https://developer.blender.org/D7819
2020-05-22 17:16:31 +02:00
1633a65d41 RNA: Make enum properties compatible with raw access.
This will allow to use foreach_get/set on enums of RNA collection items,
which can save a lot of time in some cases (see incoming FBX updates).
2020-05-22 15:41:34 +02:00
Jeroen Bakker
0236863c6d Fix T73115: In Front Drawing Bone Envelope Distance
The in front drawing was not supported for transparent part of the   armature. This patch adds a second transparent pass for drawing in
front.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7763
2020-05-22 15:09:48 +02:00
920b698746 Merge branch 'blender-v2.83-release' 2020-05-22 22:42:16 +10:00
8ddcc7fd51 Merge branch 'blender-v2.83-release' 2020-05-22 22:20:01 +10:00
69e331201e UV: remove "UV Local View" for UV editing
This feature was added when Blender used tex-face (per-face images),
but doesn't make as much sense since this was removed.

Removing this from UV edit-mode as this wasn't working in any
of the 2.8x releases, causing UV's to be visible but unselectable.

Resolves issue raised in T76958.
2020-05-22 22:18:32 +10:00
Jeroen Bakker
59aed2a255 Fix T73726: Workbench Closest Interpolation Artifacts
All textures in workbench are using linear interpolation. The fragment
shader modifies the uv coordinates to sample always in the center of a
texel. In rare conditions the GPU could sample an incorrect value due to
rounding errors making some rendering artifacts.

This patch skips the interpolation in the fragment shader to remove
these render artifacts.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7816
2020-05-22 14:11:36 +02:00
f990b42504 Revert "UI: Remove duplicate Mark/Clear Seam entries from Edge menus"
Seams are widely used outside UV context so it's okay to duplicate entries.
Based on community feedback, thanks!

This reverts commit fc62a3366c.
2020-05-22 13:41:48 +02:00
f5c682045d Merge branch 'blender-v2.83-release' 2020-05-22 13:36:23 +02:00
4066c921fb Fix (unreported): prefetching wastes resources when end frame is reached
This bug is not really visible for user. When end frame is reached by
prefetching thread, it doesn't stop and keeps on getting images from
cache.

Add chech for this situation and simplify logic involved in suspending,
so it's easier to read.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7757
2020-05-22 13:31:49 +02:00
c4edc6f3f7 Fix (unreported): Don't restart prefetching during rendering.
Prefetching is stopped in BKE_sequencer_cache_cleanup, but is restarted quickly.

Prefetching has negative effect on performance while rendering.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7751
2020-05-22 13:05:08 +02:00
a1a333a1e9 Fix T76774: Crash on prefetching sequences from another scene.
When rendering another scene, caching in disabled by setting
local_context.skip_cache = true. Precondition checking for this flag was
missing in BKE_sequencer_cache_get and it wasn't first thing to check in
BKE_sequencer_cache_put.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7750
2020-05-22 12:59:26 +02:00
fbbc0229b8 Cleanup: only use nullptr in USD exporter
This removes all use of `NULL` from the USD Exporter, also when calling
into C code.

No functional changes.
2020-05-22 10:12:13 +02:00
b87d81be96 Wayland: support key repeat 2020-05-22 18:09:17 +10:00
fe739f8c26 GHOST: fix GHOST_System::getMilliSeconds()
This wasn't returning milliseconds, causing problems with key repeat.
2020-05-22 18:08:13 +10:00
ce6fd6b6a2 Fix missing header building with wayland 2020-05-22 16:47:59 +10:00
Jeroen Bakker
42f8d52401 Fix T64277: Inverted Wheelmouse
When using CTRL wheel mouse the items were selected in a different order than when opening the menu and use the wheel mouse.

Reviewed By: Brecht van Lommel

Differential Revision: https://developer.blender.org/D7791
2020-05-22 07:32:44 +02:00
3aacd8a4ab Merge branch 'blender-v2.83-release' 2020-05-22 12:40:02 +10:00
1b994a37f4 Fix Python console cursor height 2020-05-22 12:36:39 +10:00
8f21f867e7 Fix T76949: Crash When Selecting Materials Tab.
Dummy typo in own recent libquery refactor, of course that one missed
change was on a line not covered by our tests or the production file
used for validation...
2020-05-21 23:20:29 +02:00
70c483e7db libquery: Cleanup: finish refactor by removing no more used code. 2020-05-21 19:37:57 +02:00
3cb6efd3ab Libquery refactor: Cleanup (remove no more used macros). 2020-05-21 19:36:05 +02:00
1f6ef73f98 Refactor: Move scene foreach_id to new IDTypeInfo structure. 2020-05-21 19:29:55 +02:00
c732edbaa4 Refactor: Move object foreach_id to new IDTypeInfo structure. 2020-05-21 19:09:48 +02:00
ce74df6248 Refactor: Move NOP idtypes foreach_id to new IDTypeInfo structure. 2020-05-21 18:35:11 +02:00
7e4654e4ce UI: Fix T76918: 3D Mouse Inconsistent / Inaccessible UI
This consolidates the UI code for NDOF input settings, making all
settings accessible from the preferences. This works around an issue
where the Space Navigator's "Menu" button doesn't trigger the settings
menu in Blender.

I also took the opportunity to redo the UI layout.

Differential Revision: https://developer.blender.org/D7806
2020-05-21 11:42:23 -04:00
df14b11526 GPencil: Cleanup macro 2020-05-21 16:25:35 +02:00
a39ca327bc Fix T76935: Current orientation not taken in account when using "Align to transform orientation" 2020-05-21 11:01:06 -03:00
de7d32bb7d Fix T76933: 'Align to Transform Orientation' crashes for Custom orientations 2020-05-21 11:01:06 -03:00
2fe615ab9f Merge branch 'blender-v2.83-release' 2020-05-21 23:07:18 +10:00
8a8c61190b Docs: note that the color-ramp uses image alpha
Avoid misunderstanding from T59110
2020-05-21 23:03:24 +10:00
0c9e73845c BLI: improve Vector test 2020-05-21 14:35:19 +02:00
03d8783db0 Merge branch 'blender-v2.83-release' 2020-05-21 19:34:41 +10:00
376b69cbff Fix T73568: Vertex selection fails in weight-paint mode
Lasso, circle, box select fails in weight paint mode with modifiers.
2020-05-21 19:32:15 +10:00
2efd00d4d2 Merge branch 'blender-v2.83-release' 2020-05-21 18:19:10 +10:00
d15efbdc56 Fix T76922: Meta-balls created twice the specified size 2020-05-21 18:18:00 +10:00
850fbe8547 Merge branch 'blender-v2.83-release' 2020-05-21 16:34:36 +10:00
c13bf40ab1 Merge branch 'blender-v2.83-release' 2020-05-21 16:34:20 +10:00
0ff663b6fc Merge branch 'blender-v2.83-release' 2020-05-21 16:33:28 +10:00
8d648e0972 Cleanup: spelling 2020-05-21 16:22:37 +10:00
fcfb87def9 Cleanup: excess blank lines and parenthesis 2020-05-21 16:17:44 +10:00
f66bfb5a86 Cleanup: quiet uninitialized warning
It's possible for the value to be uninitialized
in the case of loading newer preferences into an older Blender.
2020-05-21 15:57:46 +10:00
bbef6fe336 Merge branch 'blender-v2.83-release' 2020-05-21 12:59:55 +10:00
8ecfa6a828 Merge branch 'blender-v2.83-release' 2020-05-21 12:59:51 +10:00
b4a6418e2b Cleanup: add doxy sections for event queue handling
The main function to handle events didn't have it's own section.
2020-05-21 12:22:32 +10:00
522e6c0c06 Cleanup: add asserts for textview drawing
This would have prevented T74298.
2020-05-21 12:22:32 +10:00
8a0840b0ee Merge branch 'blender-v2.83-release'
# Conflicts:
#	source/blender/draw/engines/eevee/eevee_volumes.c
2020-05-20 22:56:09 +02:00
af3a55bb1b Overlay: Wireframe: Add visualization for Hairs in wireframe mode
This only works for particle systems for now.

Fix T61928 Wireframe mode hair not visible
2020-05-20 22:54:04 +02:00
71fa460145 UI: Remove Panel Grid Snapping While Dragging
The reason to have this isn't quite clear, but it looks like a vestige
of the 2.5 transition. Removing this makes dragging panels feel
much more responsive.

Thanks to Julian Eisel @Severin for the original change.

Differential Revision: https://developer.blender.org/D7803
2020-05-20 16:27:44 -04:00
6d7dc2265f UI: Rephrase Tooltip to Avoid 2nd Person 2020-05-20 15:53:45 -04:00
8bff3ec76b Transform: Don't negate the z axis of the View orientation
This was so because of the rotate transformation mode but it can make
other modes confusing and add unnecessary complexity.
2020-05-20 16:22:28 -03:00
600fd1c6f0 Fix T76919: Wrong orientation when changing translate to rotate
During the refactor of the transform operations, in an attempt to
maintain previous behavior, the default orientation of the translate
and resize operations became `Global` and the rotate operation became
`View`.

Now the default is always `View`, and on redo, the translate and rotate
operations are saved as `Global`.
2020-05-20 16:22:10 -03:00
29afadcb15 GPencil: Create new frame when Erase only if additive drawing is enabled
Differential Revision: https://developer.blender.org/D7804
2020-05-20 20:33:49 +02:00
b9aa2acecd Refactor: Move collection foreach_id to new IDTypeInfo structure. 2020-05-20 18:43:47 +02:00
e2b87aabb6 Cleanup collection handling in lib_query code.
Now we do not need anymore that extra function...
2020-05-20 18:43:47 +02:00
1c79484d53 Libquery: refactor: handle scene's master collection like any othe embedded ID. 2020-05-20 18:43:46 +02:00
3a284a37fd Refactor: Move simulation foreach_id to new IDTypeInfo structure. 2020-05-20 18:43:46 +02:00
ee44283393 Refactor: Move pointcloud and volume foreach_id to new IDTypeInfo structure. 2020-05-20 18:43:46 +02:00
2059b30ee2 Cleanup: Keep common IDTypeInfo code separated from ID type specific API.
Also remove useless IDTypeInfo callbacks.
2020-05-20 18:43:46 +02:00
4d613018ee Refactor: Move hair foreach_id to new IDTypeInfo structure. 2020-05-20 18:43:46 +02:00
e2d961809b Cleanup: Keep common IDTypeInfo code separated from ID type specific API.
Also remove useless IDTypeInfo callbacks.
2020-05-20 18:43:46 +02:00
140935ee7e Refactor: Move grease pencil foreach_id to new IDTypeInfo structure. 2020-05-20 18:43:46 +02:00
e4e31e4f14 Fix T76916: Cycles missing deform motion blur for shape key + subdiv modifier 2020-05-20 18:00:34 +02:00
93b5682444 Fix T76909 GPencil: Layers with mask(s) invisible when using "in front"
The gpSceneDepthTexture is using a dummy 1px texture which was generating
wrong values for uvs when sampling gpMaskTexture.

Use the max size of both since any of the 2 can use dummy texture.
2020-05-20 17:48:24 +02:00
e15ffc0c54 UI: Fix Wideline AA for timeline 2020-05-20 17:48:24 +02:00
796412dca0 UI: Allow registering File Browser as child of other child windows
E.g. when opening the File Browser from the Preferences window, it would
be the child of the main window the Preferences belong to. Now it can be
a child of the Preferences window itself.
The File Browser always stays on top of its parent window. Which avoids
some issues with OS window management, see T76418 and T72693.
Also removes a now unnecessary workaround to move the child window back
to the front after closing the file browser (opening the file browser
would move the main window and the file browser to the front).

Fixes T76418, T72693.
2020-05-20 17:10:25 +02:00
8fe448b44d Fix T75197: Eevee does not render instanced smoke
This check was introduced in rBc8005703f298, but does not
seem necessary anymore.

Reviewers: fclem, sebbas, brecht

Differential Revision: https://developer.blender.org/D7799
2020-05-20 16:55:43 +02:00
ccf43fe605 Cycles: Fix rendering instanced smoke domain.
The problem was that Cycles would store a pointer to an object in
`DEGObjectIterData->templ_dupli_object`. This pointer was then accessed
when the iterator was already freed.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D7797
2020-05-20 16:53:28 +02:00
aa0e98d707 Merge branch 'blender-v2.83-release' 2020-05-20 16:52:03 +02:00
b44101950d Fix T73979: Wrong location of fluid mesh when domain origin is not in center
Reviewers: sebbas

Differential Revision: https://developer.blender.org/D7802
2020-05-20 16:52:03 +02:00
c1545c9a9d Fluid: Fix for non-moving liquid particles
Issue was introduced in 7bb3d9787e with new Mantaflow files from 61280e5af3.
2020-05-20 16:37:29 +02:00
717577d5fc BLI: Fix VectorSet copy constructor
Thanks to Howard for pointing that out.
2020-05-20 15:47:32 +02:00
e1050fb395 Merge branch 'blender-v2.83-release' 2020-05-20 15:31:54 +02:00
9897ef6a20 Fix T70948: Library Override: Parenting library override objects does not save offset from parent.
Parent inverse matrix needs to be overridable as well...
2020-05-20 15:31:02 +02:00
22c30219e7 Merge branch 'blender-v2.83-release' 2020-05-20 15:17:21 +02:00
d33c27d68b Fix T75457: Toggle brushes using same hotkey twice is broken
Caused by rB47da01a4db1d.

Above commit did not change the toolname it was setting when the brush
was actually toggled.

Maniphest Tasks: T75457

Differential Revision: https://developer.blender.org/D7792
2020-05-20 15:05:33 +02:00
3a5a158362 Merge branch 'blender-v2.83-release' 2020-05-20 22:16:42 +10:00
707a4c355f Merge branch 'blender-v2.83-release' 2020-05-20 22:16:34 +10:00
eb57377f12 Fix T76794: Number button cursor overrides eyedropper cursor
Pressing 'E' over a number button to pick a distance was keeping
left-right arrows instead of using the eye-dropper cursor.

Workaround this by clearing the active button before setting the cursor.
2020-05-20 22:07:55 +10:00
7d3bf5166d Fix color picker being used for non-color buttons such as rotation
Issue raised in T76794
2020-05-20 22:04:56 +10:00
578b0c00ca Merge branch 'blender-v2.83-release' 2020-05-20 10:43:02 +02:00
3360db83c4 Fix T76883: Zero users scenes after undo.
Some tags need to be preserved when we reuse existing ID entirely.
AFAICT, currently this is only the EXTRAUSER one.
2020-05-20 10:39:50 +02:00
db6e267bfc Fix T74298: Incorrect cursor position in Python console 2020-05-20 18:16:52 +10:00
ec86db82b0 Merge branch 'blender-v2.83-release' 2020-05-20 15:00:57 +10:00
5fe7605f3d Fix the current pixelsize impacting thumbnails 2020-05-20 14:58:57 +10:00
f69ecce14b Merge branch 'blender-v2.83-release' 2020-05-20 13:53:26 +10:00
a296dff2c8 Correct invalid limits in last commit 2020-05-20 13:48:25 +10:00
31137004ae UI: add text to icon-only menu items when displayed in search
Without this icon-only buttons in popovers don't have any text.
2020-05-20 12:43:02 +10:00
bfdfa35e6e Merge branch 'blender-v2.83-release' 2020-05-20 03:34:31 +02:00
aa02a05bc7 Fix T75977: Lower the merge limit in the bisect/mirror operation in symmetrize
This operation is using the code of the mirror modifier, so no default
is guaranteed to work in all cases. This value matches the defaults of
the mirror modifier.

Reviewed By: jbakker

Maniphest Tasks: T75977

Differential Revision: https://developer.blender.org/D7495
2020-05-20 03:24:51 +02:00
dfe8195dfe Cleanup: compiler warning 2020-05-20 01:15:08 +02:00
8f050b6825 Fix Cycles viewport render fully restarting after undo
With the optimized undo datablock pointers remain the same, so Cycles can now
update just the parts that changed.
2020-05-20 01:11:42 +02:00
499c0229f7 Fix T76858: non-thread safe sculpt memory allocation when using --debug-memory
By default the guarded memory allocator is not thread safe, that needs to be
initialized.
2020-05-20 00:33:49 +02:00
4f622c9a08 Fix Windows build after recent guardedalloc changes 2020-05-20 00:32:17 +02:00
e610964e89 Merge branch 'blender-v2.83-release' 2020-05-20 01:22:54 +02:00
183ba284f2 Cleanup: make guarded memory allocation always thread safe
Previously this would be enabled when threads were used, but threads are now
basically always in use so there is no point. Further, this is only needed for
guarded allocation with --debug-memory which is not performance critical.
2020-05-20 01:03:05 +02:00
120e9924c1 Cleanup: remove legacy mmap memory allocation for 32 bit
This helped to go beyond the 4GB limit, but is no longer relevant for 64 bit.
2020-05-20 00:57:41 +02:00
33fc42bd65 Merge branch 'blender-v2.83-release' 2020-05-20 00:46:15 +02:00
5ca8875f69 Fix T73148: Incorrect Repeat Last for transforms with Individual Origins and Normal orientation
`pvec` was confusing and was adding steps that are apparently unnecessary.
So the code has been redone so as not to use this pvec.
2020-05-19 18:54:57 -03:00
3bced3b306 Fix flag conflict in transform operators
This added some redundant properties
2020-05-19 18:54:57 -03:00
5267ce8e03 Merge branch 'blender-v2.83-release' 2020-05-19 23:42:32 +02:00
59cfb20fa1 Fix PBVH parallel range not initializing user data correctly in some cases
This was already changed for the TBB-based BLI_task_parallel_range in master.
This task local storage should always be initialized from the template, not
copied from another task which may be executing at the time the copy happens.

This may not fix any actual bug, we only use this user data for parallel reduce
and it's not clear that TBB ever calls the copy constructor for that case.

Ref T76858
2020-05-19 23:36:28 +02:00
8d63d7337c Fix unnecessary buffer reallocation in sculpt mode, causing an assert
Probably did not cause an actual, the assert is a performance warning.

Ref T76858
2020-05-19 23:36:12 +02:00
20c30534aa Fix T75383:Bevel weird behaviour when using bevel weights
Don't use the cube corner special case when the offsets are different
for the three edges involved. The generic VMesh for this situation isn't
perfect, but it's much better than a failed cube corner VMesh.

Tests pass.
2020-05-19 16:54:05 -04:00
42d77fbea1 UI: Make timeline vertical bars thickness work on OSX
Make use of Polyline shader.
2020-05-19 22:43:42 +02:00
8e0a57f9bd Merge branch 'blender-v2.83-release' 2020-05-19 16:40:53 -04:00
c554f4e14f Fix T75383:Bevel weird behaviour when using bevel weights
Don't use the cube corner special case when the offsets are different
for the three edges involved. The generic VMesh for this situation isn't
perfect, but it's much better than a failed cube corner VMesh.

Tests pass.
2020-05-19 16:40:40 -04:00
13125e0948 GPU: Attempt to fix Crash on startup with Intel HD Graphics 620/630
This only enables the workarounds that we know have effects on intels.
We could add the other workarounds if needed.

Related task T72098
2020-05-19 22:24:25 +02:00
a5a069c272 Fix T76080 Workbench: Background Glitches caused by Screen Cavity effect 2020-05-19 21:37:43 +02:00
0a19b8a5b4 OpenSubdiv: Remove old GPU code
This code was accidentally reintroduced in e73d7d27dc.
2020-05-19 21:35:47 +02:00
a3bdbb5e5b Merge branch 'blender-v2.83-release' 2020-05-19 16:32:43 -03:00
d6cc16831a Fix T73594: Scale Cage sometimes has incorrect center in edit mode
Differential Revision: https://developer.blender.org/D6803
2020-05-19 16:30:21 -03:00
5201bc9dd4 Fix T66916 UI: Wrong information in Status bar after cancelling a render
Fixed thanks to @manowii
2020-05-19 21:23:56 +02:00
e73d7d27dc Merge branch 'blender-v2.83-release' 2020-05-19 21:23:54 +02:00
7bb3d9787e Fix T76812: [Mantaflow] Inflow particles not continuous
Makes use of the new particle skipping option introduced in f25a882955cb.
2020-05-19 21:12:30 +02:00
61280e5af3 Fluid: Updated Mantaflow source files
Includes changes for particle skipping during advection.
2020-05-19 21:12:30 +02:00
fa270a37e8 Fix T76564 Curve: Missing orco cause mesh to not render 2020-05-19 21:01:21 +02:00
a4cbacacbf Fix T73847 Overlay: Camera orthographic scale moves background image 2020-05-19 21:01:21 +02:00
08b4faef01 Properly fix: T71040 / T58983 Ocean Modifier crashes at high resolutions
For a more detailed description of the issue see the commit
message for rB497cd3d7dd6e497be484eb78a8ddb23f53b20343

This change moves fftw to a shared library and reverts the bandaid
we did for 2.83.
2020-05-19 12:28:19 -06:00
a6c0874355 win/deps: generate sndfiles import library with ms lib tool
Unsure what it is that upsets it so much, but when linking
both sndfile and fftw dynamically, the linker gets confused
and thinks that fftw is importing sf_close from the blender
binary (which makes *NO* sense) leading to a start-up error.

Generating the import library from the .def file using the
ms lib tool creates an import library that works fine.
2020-05-19 12:22:36 -06:00
059f79bdd7 Clarify autokeyframe tootip
This applies to masks as well.

Spotted while looking into T76872.

Differential Revision: https://developer.blender.org/D7788
2020-05-19 18:43:30 +02:00
cfb7664d5b Fix: build error due to missing definitions
Reviewers: sergey, brecht

Differential Revision: https://developer.blender.org/D7787
2020-05-19 17:36:40 +02:00
dd62d95687 Merge branch 'blender-v2.83-release' 2020-05-19 17:10:44 +02:00
7fcf2e7d4a Fix T74577: world_to_camera_view broken for off-axis projection
The issue was that the projection would be inverted.
So if you shifted 0.1 along the y axis, world_to_camera_view would act
as if you had shited it -0.1 along the y axis.
2020-05-19 16:27:09 +02:00
813ff8913b UI: Small Changes to Graph Editor Active Vertex Panel
- X / Y value orders are all consistent, between handles and the keyframe.
  - Values are labeled consistently, with just "Frame" and "Value"
  - The more important type property that can affect the others comes first.
  - The "type" property provides nice visual separation between the
    handle properties.

Reviewed By: sybren, billreynish

Differential Revision: https://developer.blender.org/D7738
2020-05-19 10:27:07 -04:00
338abd6f68 Merge branch 'blender-v2.83-release' 2020-05-19 16:03:24 +02:00
0c20fce2f2 Fix T76697: [Mantaflow] mesh generation does not account for some particles
Adapted mesh generation to account for domains with disabled fractionstoo.
2020-05-19 16:02:38 +02:00
Josh Belanich
03fa66d274 Fix T72889: Cycles camera motion blur not usng more than 2 steps
Differential Revision: https://developer.blender.org/D7782
2020-05-19 15:40:56 +02:00
46c35dc283 Fix UV shadow drawing not respecting 'UV Opacity' setting
reapply changes from 30cbbccc60 / D7764 that were only meant for
master. Sorry for the noise!
2020-05-19 15:35:28 +02:00
a95afed6de Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-05-19 15:24:45 +02:00
9ccc73ade8 Animation: Make dopesheet filter labels consistent
There are three different label styles for the three Dopesheet filter
labels:

- "Display Hidden", which uses "Display" rather than "Show" as the other
  two options.
- "Show Errors", which does not use the word "only" to indicate it will
  hide all the non-error channels.
- "Only Selected", so no "show" or "display" in the label at all.

This commit changes:
- Always use the word "Show", not "Display".
- Always use the word "Only" when enabling the filter hides everything
  else.

Reviewed By: billreynish

Differential Revision: https://developer.blender.org/D7742
2020-05-19 15:23:44 +02:00
Jeroen Bakker
9ac4e4a1c7 Fix T76375: UDIM Rectangular Tiled Image EEVEE freezes Blender
When packing the image the height of the tile was checked to the width
of the packing area. This resulted that the tile was ignored.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7784
2020-05-19 15:20:40 +02:00
cc485191e4 Merge branch 'blender-v2.83-release' 2020-05-19 15:18:39 +02:00
a6646fb0d0 Fix T76881: Changing "Use Speed Vectors" deletes all existing cache
Reviewers: sebbas
2020-05-19 15:18:33 +02:00
8c4965f86d Fix build error after 30cbbccc60
That part only applies to master, sorry for the noise
2020-05-19 15:17:11 +02:00
14278cd932 Fix T76694: Fluid cache is deleted when changing Upres Factor
Reviewers: sebbas
2020-05-19 15:13:25 +02:00
eb1cb7cb81 Merge branch 'blender-v2.83-release' 2020-05-19 14:45:07 +02:00
30cbbccc60 Fix (unreported) UV shadow not drawing smooth
When showing UV edges after modifiers [draw_uvs_shadow], these were never
drawn anti-aliased [in contrast to the 'main' UVs].

Also: they did not respect the new 'UV Opacity' setting.

Differential Revision: https://developer.blender.org/D7764
2020-05-19 14:42:19 +02:00
22998abe92 Merge branch 'blender-v2.83-release' 2020-05-19 14:17:40 +02:00
675ba2073d Fix T75694: Compositor Backdrop boundbox missing updates
This adds notifiers for backimage_move & backimage_fit.

Maniphest Tasks: T75694

Differential Revision: https://developer.blender.org/D7778
2020-05-19 14:16:22 +02:00
325307d82b Merge branch 'blender-v2.83-release' 2020-05-19 13:59:39 +02:00
4fa1fc29bd Fluid: Cleanup unused variables 2020-05-19 12:33:17 +02:00
e5c5e25c68 GPencil: Make is_nofill_stroke property editable
This can be used by some add-ons.
2020-05-19 12:24:42 +02:00
82bda82ec4 Fix T76541: OpenGl Depth Picking not selecting frontmost object
The issue was that we used GL_ALWAYS for depth checking here which would
lead to the depth information from objects being messed up.

It would not represent which object was closest to the camera.

Reviewed By: Clément Foucault, Jeroen Bakker, Campbell Barton

Differential Revision: http://developer.blender.org/D7710
2020-05-19 12:22:28 +02:00
25dea3e65e Fix T76717: Set Rotation Mode Incorrectly Recalculates Bone Rotation In Pose Mode
The issue was that we didn't convert the current rotational values.
We simply just switched mode without doing any data conversions.
2020-05-19 12:22:18 +02:00
10528a5cd4 Fix Frame Dropping not dropping the correct amount of frames
Previously the playback mode "Frame Dropping" would not drop the correct
number of frames which would lead to slow playback.

For example, the playback target is 60fps.  However we can only muster
around 32 fps.

The delta frames from the last step is in this case ~1.98 or so.

With the previous code, we would floor this.  That would lead us to step
forward one frame each time, effectively playing back the animation at
half the speed as we will try to render every frame.

To fix this we simply save the remaining fraction from the previous
frame and use it to compute the current frame step.

Reviewed By: Sybren

Differential Revision: http://developer.blender.org/D7694
2020-05-19 12:22:07 +02:00
24e5c64ea2 Made pose push/relax to breakdown behave smooth on rotations
A follow up to T67212. I missed that the rotation interpolation had its
own code path.

The previous rotation push code was actually wrong (but smooth).

Now all of the actions behave correctly and is smoothly interpolated.
2020-05-19 12:21:53 +02:00
cddfa7a449 Fix T72729: Mask Modifier Loose Edges Not Shown
When using the mask modifier loose edges could be added to the mesh.
These edges weren't marked as loose edges and wasn't picked up by other
areas of blender.

This fix recalculates the loose edges so they have the correct flag
`ME_LOOSE_EDGE`.

Reviewed By: Sybren Stüvel

Differential Revision: https://developer.blender.org/D7766
2020-05-19 10:12:57 +02:00
b96ccb5126 Fix T76865: Vertex paint draws hidden but cannot be painted onto 2020-05-19 18:06:27 +10:00
f89b89fa7f CMake: Enable WITH_USD by default
Having USD disabled by default was an oversight, and could have been
corrected earlier. It's already enabled by default in the
`blender_release.cmake` and `blender_full.cmake`.
2020-05-19 09:39:51 +02:00
291136eece Fix T76689: Armature layers not indicating the existence of bones
From what I can see, there are two issues at play in {T76689} and its merged-in report {T76590}:

- In Blender ≤ 2.79 the bone layer dots were updated in the draw code. This ensured the info was up to date before drawing. This is no longer possible, as the drawing code uses evaluated objects, and those should not be written to. This has been addressed in rB709f126e8143 by calling the update function explicitly in various places in the code. The problem is that this wasn't added to all necessary spots.
- When in edit mode, changes are made to the edit bones but not to the 'actual' bones (this is synced when exiting edit mode). This causes undo to mess up the layer indicators.

I think both issues can be addressed by having the dependency graph update the used layer info as part of the armature evaluation. This will make the undo system work properly, and allows the removal of some `BKE_armature_refresh_layer_used()` from various places.

There is still the issue that there are two functions (`BKE_armature_refresh_layer_used()` and `ED_armature_edit_refresh_layer_used()`) that are both responsible for updating `bArmature::layer_used`. This is a trickier thing to solve, though, as the definition of the `EditBone` struct resides in the armature editor module. This means that blenkernel can't iterate over edit bones, but on the other hand the dependency graph shouldn't call any editor functions either. This is why I left the `ED_armature_edit_refresh_layer_used()` calls untouched.

The downside of recalculating `layer_used` from the dependency graph (at least in the way that I did it now) is that it is called every time a user moves a bone in pose mode. This frequency of updates is not necessary.

Differential Revision: https://developer.blender.org/D7709
2020-05-19 09:39:51 +02:00
888427cabb Fix T76780: Freestyle pass for one scene not accessible in compositor in other scenes
Current implementation would update the nodetree of the freestyle scene not the composite scene.

Reviewed By: Dalai Felinto

Differential Revision: https://developer.blender.org/D7770
2020-05-19 08:24:52 +02:00
fc06c248ed Fix T73169: Side by Side Stereo Rendering Glitches
Side by side and top down views were rendered using an unset matrix.
This fix will reset the matrix just before copying the views to the
screen.

Reviewed By: Clément Foucault, Dalai Felinto

Differential Revision: https://developer.blender.org/D7777
2020-05-19 08:22:05 +02:00
ac8b36535e Cleanup: Creator Args Spelling
Differential Revision: https://developer.blender.org/D7735
2020-05-19 00:54:37 -04:00
5fa58fb8a2 Fix T76821: Generalize Use Flow Tooltip 2020-05-19 00:53:59 -04:00
1151bcd53d Merge branch 'blender-v2.83-release' 2020-05-19 13:31:48 +10:00
f557198540 Merge branch 'blender-v2.83-release' 2020-05-19 13:31:44 +10:00
15bf81268c Fix switching to particle edit-mode from editmode
Similar to T76859
2020-05-19 13:27:08 +10:00
1afa97d547 Fix T76859: Cannot switch from editmode to texturepaint mode
Caused by 5159b8e1ea.
2020-05-19 13:18:10 +10:00
7bd07c9f5a Merge branch 'blender-v2.83-release' 2020-05-19 01:33:08 +02:00
ff7a30d928 Fix sculpt mask interpolation in subdivisions
The interpolation function of the datalayer was misssing so the sculpt
mask data was corrupted every time a subdivision surface modifier was
applied.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7640
2020-05-19 01:31:55 +02:00
79a48c5676 Merge branch 'blender-v2.83-release' 2020-05-19 01:08:23 +02:00
7c9c8cee7b Fix T76397: Missing value property on Clear Mask pie menu
Without this value defined it was reusing the same 1.0 value after using
fill mask, so it was not working.

Reviewed By: jbakker

Maniphest Tasks: T76397

Differential Revision: https://developer.blender.org/D7699
2020-05-19 01:07:38 +02:00
393050e8e5 Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-05-18 16:37:57 -06:00
497cd3d7dd Fix: T71040 / T58983 Ocean Modifier crashes at high resolutions
This is not as much a fix as a work around, but given the real
involves replacing how we build fftw, it is not eligible for 2.83
which is in BCON3 already.

The root of the issue lies with (how we build) fftw3

The first issue is: fftw does not build with MSVC, there are other
dependencies that are not compatible with MSVC and for those we
build the libraries required with mingw64, same for fftw

The second issue is: for reasons unknown we really really really
liked all deps to link statically so wherever possible we did so.

Now during the building of the fftw it linked a few symbols from
libgcc (which we do not ship) like __chkstk_ms, for which we passed
some flags to stop generating calls to it. Problem solved! There
is no way this could possibly turn around and bite us in the rear.

fast forward to today mystery crashes that look like a race condition.

What is happening is, we tell the linker that each thread will require
a 2-megabyte stack, now if every thread immediately allocated 2 megs,
that be 'rough' on the memory usage. So, what happens is (for all apps
not just blender), 2 megs are reserved but not backed by any real memory
and the first page is allocated for use by the stack, now as the stack
grows, it will eventually grow out of that first page, and end up in
an area that has not been allocated yet, to deal with that the allocated
page is followed by a guard page, someone touches the guard page it's
time to grow the stack!

Meanwhile in FFTW is it's doing substantial allocation using alloca
(up to 64 kb) on the stack, jumping over the guard page, and ending
up in reserved but not yet committed memory, causing an access violation.

Now if you think, that doesn't sound right! something should have
protected us from that! You are correct! That thing was __chkstk_ms
which we disabled.

Given we do not want a dependency on libgcc while building with MSVC
the proper solution is to build fftw as a shared library which will
statically link any bits and pieces it needs, however that change
is a little bit too big to be doing in BCON3.

So as a work around, we change the size the stack grows from 8k to
68k which gives fftw a little bit more wiggle room to keep it out
of trouble most of the time.

Note this only sidesteps the issue, this may come up again if the
conditions are just right, and a proper solution will need to be
implemented for 2.90.
2020-05-18 16:35:53 -06:00
c4ee94328f Fix invalid bit shift when GPU shader attribute is not found 2020-05-18 21:22:02 +02:00
0bdb827bdf Fix NULL pointer access reported by ASAN (harmless in practice but still weak) 2020-05-18 21:20:10 +02:00
e0ae229acb Fix potential crash due to dyntopo GPU buffer invalid memory access
When the number of triangles in a node became zero, the wireframe batch was
not freed along with the triangles batch and could still reference a freed
vertex buffer.

Ref T76858
2020-05-18 21:01:41 +02:00
afbe71342b Fix T76813: Snap to Edge Center returning a different normal from snap to Edge
This difference was intentional, but using the edge direction as normal is more useful.
2020-05-18 15:19:13 -03:00
06c57d3e7a Refactor: Move workspace foreach_id to new IDTypeInfo structure. 2020-05-18 19:01:20 +02:00
8f10f9d5dc Refactor: Move WindowManager and Screen foreach_id to new IDTypeInfo structure.
That one was a bit more complicated, and is still only partial refactor
(ultimately we want to have a foreach_id callback in SpaceType itself I
think...).
2020-05-18 18:51:06 +02:00
ae97a7ac10 Refactor: Move action foreach_id to new IDTypeInfo structure. 2020-05-18 18:43:11 +02:00
38a8d3aff1 Merge branch 'blender-v2.83-release' 2020-05-18 17:56:57 +02:00
46a4a53824 Outliner: Fix (unreported) more data-changing operators missing undo. 2020-05-18 17:56:33 +02:00
35f9c3b9a4 Merge branch 'blender-v2.83-release' 2020-05-18 17:35:30 +02:00
20b94257dc Fix part of T76544: dyntopo sculpt undo stack memory leak 2020-05-18 17:25:09 +02:00
31fc01eecb OIpenSubdiv: Cleanup, move to a better sounding namespace
The code is not only part of C-API, but also implements Blender-specific
glue level implementation.
2020-05-18 17:25:07 +02:00
9bc7ea5496 Fix T76814: [Mantaflow] Surface Tension always works
Initialize the curvature grid and compute the laplacian only if the diffusion flag is set.
2020-05-18 17:19:51 +02:00
fa116a9bbe Fix T76795: Missing node tree update after remove-on-cancel
Reviewers: brecht

Differential Revision: https://developer.blender.org/D7775
2020-05-18 17:08:57 +02:00
2ad5131f77 OpenSubdiv: Cleanyp, remove old GPU code
All parts of drawing (shaders, GL mesh descriptor, material partitioner
and so on) needs to be redone for the draw manager and new OpenSubdiv
library.

Removing untested code which is doomed to be replaced to make localized
refactoring easier.
2020-05-18 17:06:48 +02:00
22f68f85a4 OpenSubdiv: Cleanup, remove unused topology orientation code
The code was trying to make winding consistent and manifold, same as
OpenSubdiv expects it to.

Unfortunately, the code was having some issues in corner cases so the
winding wasn't really correct.
Fortunately, the latter (compared to when this code was originally
written) supports orientation on OpenSubdiv side.

Removing code which is currently unused in Blender and which had
known issues. Is simple enough to bring the code from Git history
if the functionality is needed in the future.
2020-05-18 17:06:48 +02:00
54665233eb OpenSubdiv: Cleanup, Remove from legacy SubsurfCCG code
The CPU side implementation is done on a new dedicate base ground.
The GPU side must be redone anyway.
2020-05-18 17:06:48 +02:00
151fb62190 Merge branch 'blender-v2.83-release' 2020-05-18 17:04:43 +02:00
0d57ab611c Fix T76851: GPencil brush is reset after change mode
This was introduced by commit rBe58525706328

Now, the brush is not changed when change mode.

Thanks @Alaska for helping with this bug.
2020-05-18 17:04:17 +02:00
6eb00fb02e Fix T76730 DRW: Sorting of empty shading groups.
This is to fix an assert in EEVEE caused by a transparent shading group
that is create but not populated by any drawcall.
2020-05-18 16:59:04 +02:00
0bd7e202fb Curves: Disable Curve Normals by default
This patch just disable the curve Normals by default.

Reviewed By: #user_interface, billreynish, Severin

Differential Revision: https://developer.blender.org/D7755
2020-05-18 16:38:53 +02:00
cb8d8335b2 Fix T76828 Grease Pencil: Toggle Caps doesn't work
This was a logic error.
2020-05-18 16:01:07 +02:00
19413c4a82 Cleanup: GPencil: Fix float double promotion 2020-05-18 16:01:07 +02:00
48a5b1664a Merge branch 'blender-v2.83-release' 2020-05-18 15:54:30 +02:00
27cac4a102 Fix T62422: Baking ray distance do not work
The previous naming scheme for the "selected to active" baking options
lead to confusion and they were not describing what they actually did.

To remedy this, I've added a new settings that does what the older setting implied it did.

Reviewed By: Brecht, Dalai, Andy Davies

Differential Revision: http://developer.blender.org/D7733
2020-05-18 15:50:36 +02:00
121b2c0424 Fix T76799: Crash from undoing the copy-pasting of multiple data blocks.
Bug was actually in outliner code, paste operator would not generate any
undo step...

This was not correct ever, but with new undo code this has become a
critical issue, it cannot survive a situation where current main data
has been changed without a proper undo push.

This illustrates again how much of a catastrophic mess the 'tools'
callbacks of the outliner are currently, it has already caused us quiet
some pain in the past, and will keep doing so until this is fully
sanitized am afraid.

Would strongly suggest getting rid of thosw nasty mix of custom
callbacks requiring manual undo pushes, I do not see the added value of
this compared to regular menus calling regular operators. It only adds
confusion and extra code for nothing...
2020-05-18 15:47:03 +02:00
dcf67fdf7f UI: Widget: Make emboss offset dependent of line width 2020-05-18 15:27:30 +02:00
27b23148fa UI: Widgets: Reduce constants count in shader 2020-05-18 15:27:29 +02:00
6ede93bab3 Cleanup: Put GPU_state_init inside gpu_state.c
Also put glDisable(GL_DITHER) in it since we don't even use it (but is
enabled by default).

Also leave GL_MULTISAMPLE on by default since it has no impact on non-MSAA
framebuffers.
2020-05-18 15:27:29 +02:00
18dd289e1a Merge branch 'blender-v2.83-release' 2020-05-18 21:29:26 +10:00
80b340b034 Merge branch 'blender-v2.83-release' 2020-05-18 21:29:23 +10:00
b487ef6116 Fix T76593: Coordinate limit of 10,000 units
This is no longer needed for number button dragging to work properly.
2020-05-18 21:16:00 +10:00
b75ce05c3b Fix T75292: File-select events not handled while modal handler is active
Reviewers: Severin

Differential Revision: https://developer.blender.org/D7720
2020-05-18 11:59:53 +02:00
b1492b76ba Alembic: Fix bad allocation with invalid knots data
It is not impossible that the number of knots is stored wrong in the
file (for example, it will be 1 knot only).

This change fixes bad memory allocation and bad memory access in such
cases. It also fixes strict compiler warning which was mentioning that
the allocation size is wrong),

There isn't really the correct way of dealing with such situation, so
simply fall back to Blender's knots calculation.

Differential Revision: https://developer.blender.org/D7765
2020-05-18 11:50:34 +02:00
9796cb1661 Fix T76721: ASAN crash on animation rendering
Simple solution: remove the code which was causing bad threading
conflicts.

This code was a part of workaround for a specific state of linked
scene. It seems to be not needed anymore, since the pose is ensured
to be up to date by the following call stack:

- Dependency graph update,
- Copy-=on-write operation called on object.
- object_copy_data().
- BKE_pose_rebuild().

The workaround was a no-functional change for the dependency graph
anyway, because it was modifying original objects, not the ones
which are evaluated.
2020-05-18 11:48:24 +02:00
f3edff2d7d AVI: Fix read past array bounds
It is not enough to copy max of destination buffer size bytes, the
source might be smaller than the destination size.
2020-05-18 11:05:45 +02:00
005d04e145 Manta: Cleanup, strict compiler flag
For some reason was only visible with gcc-10 in release builds.

Kind of makes sense since there is no CMake code which removes strict
compiler flag, so deal with strict flags in the code itself.
2020-05-18 11:05:45 +02:00
a432cb2ad9 Merge branch 'blender-v2.83-release' 2020-05-18 18:58:21 +10:00
008e964940 Fix T76852: Breakdowner remembers limits last used 2020-05-18 18:49:40 +10:00
470ed9f074 Merge branch 'blender-v2.83-release' 2020-05-18 10:49:23 +02:00
04d15f1625 Fix T76573: Make links with Multires leading to crash 2020-05-18 10:48:45 +02:00
52d8b3a014 Fix T76849: Duplicate templates show in the New menu 2020-05-18 17:59:52 +10:00
a4b2734fe2 Fix T76801: Renaming bone in pose mode doesn't redraw the viewport names
The RNA name property of pose bones did not have any update logic defined.

Same issue also applied to the channel name in animation editors.

Duplicated the update logic from (edit-)bones now, other pose bone functions do
this too...
2020-05-18 09:51:20 +02:00
68ba154869 Merge branch 'blender-v2.83-release' 2020-05-18 17:14:28 +10:00
fd8d2ceafe Merge branch 'blender-v2.83-release' 2020-05-18 17:14:24 +10:00
815ffaa6c1 Merge branch 'blender-v2.83-release' 2020-05-18 17:14:17 +10:00
98e18c41b6 Cleanup: unused warning in last commit 2020-05-18 17:11:48 +10:00
2a3797b109 Cleanup: remove NULL checks from object mode switching take #2
Re-apply changes from 54ea356240,
with a poll function that uses the same active object as the operator,
matching other mode switching functions.
2020-05-18 17:07:23 +10:00
ff144edd8c Revert "Cleanup: remove redundant active object NULL check & poll"
This reverts commit 54ea356240 it
introduced crashes when trying to go to edit mode when the active
object was hidden.

Fix T76837
2020-05-18 08:32:07 +02:00
218579fa53 Merge branch 'blender-v2.83-release' 2020-05-18 16:30:34 +10:00
cfea716128 Fix error mixing incompatible enums when generating the proxy name 2020-05-18 16:12:17 +10:00
41825c7e0d Merge branch 'blender-v2.83-release' 2020-05-18 14:37:48 +10:00
9af72792a3 Cleanup: quiet enum conversion warning 2020-05-18 14:36:02 +10:00
5c5a638b57 Fix: Build error with MSVC
A parenthesized type followed by an initializer list is a non-standard explicit type conversion syntax.

Removing the cast seems fine for both MSVC and GCC
2020-05-17 12:22:14 -06:00
dde7a762c3 Fluid: Bake cache for more frames by default 2020-05-17 17:09:29 +02:00
fe257cc384 Fix T74060: Smoke flow force field not working with Mantaflow Gas
cb252ca8d316 was also needed to fix the velocity loading from the cache.
2020-05-17 17:09:28 +02:00
a975cb9207 Fluid: Foundation for new OpenVDB file IO
This commit lays the foundation for support for OpenVDB caching with multiple grids per cache file.
2020-05-17 17:09:28 +02:00
0abe5936b7 Fluid: Cleanup namespace std 2020-05-17 17:09:28 +02:00
eaf7d36d66 UI: Graph Editor: Draw Handles Lines With Smoothing
Enabling "Use High Quality Display" in the graph editor enables
AA for the curves, this enables it for bezier handles too.

Differential Revision: https://developer.blender.org/D7740
2020-05-15 15:12:58 -04:00
d9773edaa3 Cycles: code refactor to bake using regular render session and tiles
There should be no user visible change from this, except that tile size
now affects performance. The goal here is to simplify bake denoising in
D3099, letting it reuse more denoising tiles and pass code.

A lot of code is now shared with regular rendering, with the two main
differences being that we read some render result passes from the bake API
when starting to render a tile, and call the bake kernel instead of the
path trace kernel.

With this kind of design where Cycles asks for tiles from the bake API,
it should eventually be easier to reduce memory usage, show tiles as
they are baked, or bake multiple passes at once, though there's still
quite some work needed for that.

Reviewers: #cycles

Subscribers: monio, wmatyjewicz, lukasstockner97, michaelknubben

Differential Revision: https://developer.blender.org/D3108
2020-05-15 20:25:24 +02:00
3ff8ca60e9 Merge branch 'blender-v2.83-release' 2020-05-15 19:38:40 +02:00
e5ace51295 Fix T76734: Changing Envelope FModifier controlpoints missing update
Issue is that update functions defined in
`rna_def_fmodifier_envelope_ctrl` (namely `rna_FModifier_update`) are
actually never called.

This is because UI code for FCurve modifiers often does not use RNA
buttons but uses custom update functions (or non at all). For example,
rB9a88bd55903a did this for the generators, envelope control points did
not have this at all.

This is now changed to use RNA buttons for the envelope control points,
this could done for other non-RNA buttons as well to get rid of
'validate_fmodifier_cb()'.

Maniphest Tasks: T76734

Differential Revision: https://developer.blender.org/D7732
2020-05-15 19:29:33 +02:00
e1c2eba4de Merge branch 'blender-v2.83-release' 2020-05-15 19:26:02 +02:00
abcb23f5a3 Fix T76698: Movie clip stabilize display ignore footage colorspace
settings

Stabilized ImBuf just needs to use the same colorspace and alpha
settings as the original one.

Maniphest Tasks: T76698

Differential Revision: https://developer.blender.org/D7713
2020-05-15 19:08:58 +02:00
a8fc3c88ef Refactor: Move linestyle foreach_id to new IDTypeInfo structure. 2020-05-15 19:03:53 +02:00
7ff933089a Refactor: Move mask foreach_id to new IDTypeInfo structure. 2020-05-15 19:03:53 +02:00
c44d6fb987 Refactor: Move movieclip foreach_id to new IDTypeInfo structure. 2020-05-15 19:03:53 +02:00
0055aa994d Refactor: Move particle foreach_id to new IDTypeInfo structure. 2020-05-15 19:03:53 +02:00
a952f8dab0 Merge branch 'blender-v2.83-release' 2020-05-15 18:40:19 +02:00
001d70eb2b Fix T76277: Remove wrong cast in rna_NodeTree_update
This patch fixes T76277 by removing the incorrect cast from
`ptr->data` to `bNode`. The address of `ptr->owner_id` and
`ptr->data` both point to the node tree. Passing the node tree
incorrectly as a node into the `ED_node_tag_update_nodetree`
corrupts the data, because it attempts to set flags on the
node.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7747
2020-05-15 18:29:42 +02:00
ecec6547c7 Merge branch 'blender-v2.83-release' 2020-05-15 18:02:10 +02:00
9632a06201 Fix embedded IDs not being enough/properly initialized.
Among other things, they were missing library pointer, session uuid
initialization, etc.

Fix T74546: Corrupted nodegroups crash blender when copy pasting or
appending them.

Fix (unreported) asserts when undoing some production scenes (from
coffee run e.g.).

Initialy caused by rB0aac74f18f2d.
2020-05-15 17:57:13 +02:00
b14243be77 blenlib: BLI_file_attributes() Correction
Adds an Correction to properly handle possibility of overflow of path name.

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

Reviewed by Brecht Van Lommel
2020-05-15 08:11:57 -07:00
0f2c7f3864 Merge branch 'blender-v2.83-release' 2020-05-15 16:54:33 +02:00
0541906162 Cleanup: rename readfile utils dealing with embedded IDs to proper name. 2020-05-15 16:54:03 +02:00
363f18c8b5 Merge branch 'blender-v2.83-release' 2020-05-15 16:51:36 +02:00
1cad0a627e GPencil: Fix unreported missing Sculpt/Vertex/Weight paint brushes
This error was introduced wit the change in commit https://developer.blender.org/rB6a850f3cc840

As the brushes were not created, all modes except Edit were broken. 

Now, the brushes and palette are not created when load the file in versioning code, but when the mode is enabled.

Also, if the brush already exist, the parameters are not reset as it was done in the versioning code in order to keep user settings.

The same logic is used for the default palette.
2020-05-15 16:50:38 +02:00
d6e0b55b1c Merge branch 'blender-v2.83-release' 2020-05-15 16:32:50 +02:00
a269761ec1 Cleanup: clang format
Sorry for the noise, somehow missed that in rB0a32f6c8686c.
2020-05-15 16:31:18 +02:00
b67f649077 Merge branch 'blender-v2.83-release' 2020-05-15 16:02:12 +02:00
266caa1820 Fix T76755: texture paint on udims crash
Caused by rB5593efec01c2.

Use first texture if we dont have an ImageUser (instead of multiview
one). Same fix as in rB9ace7e243978 / T74925.

Maniphest Tasks: T76755

Differential Revision: https://developer.blender.org/D7743
2020-05-15 15:56:35 +02:00
998e26704b Merge branch 'blender-v2.83-release' 2020-05-15 23:16:39 +10:00
fe0036c586 Fix T76563: Transforming an auto-aligned point won't set it aligned
When local origins are used or a single control point is selected,
change the handle types from auto to aligned.
2020-05-15 23:13:57 +10:00
2b36cf3118 Libmv: Fix crash solving when having negative frames
Don't use linear array with frame as an index since it has the
following disadvantages:

- Requires every application to take care of frame remapping, which
  could be way more annoying than it sounds.

- Inefficient from memory point of view when solving part of a footage
  which is closer to the end of frame range.

Using map technically is slower from performance point of view, but
could not feel any difference as the actual computation is way more
complex than access of camera on individual frames.

Solves crash aspect of T72009
2020-05-15 14:59:25 +02:00
86580c437b Cleanup: int->BVHCacheType enum 2020-05-15 13:55:01 +02:00
03659c2cf9 Merge branch 'blender-v2.83-release' 2020-05-15 13:47:04 +02:00
a5d394fad2 Fix segfault when trying to free uninitialized loop normals
Forgot this corner case when I created the new normal flip code.
2020-05-15 13:39:35 +02:00
0a32f6c868 Fix T76710: objects get lost in linked/overridden collections
Right now:
- drag-drop in the Outliner prevents dropping inside linked collections
- drag-drop in the Outliner allows dropping inside overridden
collections (should not be the case)
- `Object Properties` > `Collections` panel allows to add to overridden
collection (should not be the case)
- `Object Properties` > `Collections` panel filters out non-local
collections (so adding to linked collections is forbidden)
- `bpy collection.objects.link()` allows to add to linked collections
(should not be the case)
- `bpy collection.objects.link()` allows to add to overridden
collections (should not be the case)

While this might be supported in the future for overriden collections,
these cases should not be allowed atm. since objects get lost on file
reload.

Note: for the case of the `Object Properties` > `Collections` panel,
this could be improved further to filter out overridden collections as
well.

Reviewers: mont29, brecht

Subscribers:
2020-05-15 13:32:15 +02:00
3a14c011f9 GPencil: Fix unreported crash using U key in Draw mode
The problem was the preview could be not available when press the key.
2020-05-15 13:05:58 +02:00
04517ee936 Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-05-15 12:59:24 +02:00
0ae64a9945 Fix T76695: Not exporting normals properly in Alembic format
When auto-smooth enabled, but no custom normals layer present, the Alembic
exporter would incorrectly assume the mesh was shaded smooth. This is now
corrected, and normals are always written when auto-smooth is enabled.
2020-05-15 12:58:48 +02:00
5f95912afc BLI: add missing include for size_t 2020-05-15 12:48:45 +02:00
7049d2dc58 Fix T76778: Dopesheet "Show Errors" affects timeline
Since the timeline is a variation of the dopesheet, it also respects
some of the dopesheet settings.

The "Selected Only" setting is overridden from a scene property (since
rB4904eadc0f38) and the "Display Hidden" dopesheet setting seems to be
ignored.

This commit adds the remaining "Show Errors" setting to the menu,
allowing it to be updated from the timeline.
2020-05-15 11:54:17 +02:00
547f50b5e0 Libmv: Add map utility 2020-05-15 11:20:45 +02:00
6398892121 Libmv: Cleanup, spelling 2020-05-15 11:20:45 +02:00
f1cb11f0fa Merge branch 'blender-v2.83-release' 2020-05-15 10:53:32 +02:00
19d822c677 Fix T76740: Static Override - Library Override Crash
Missing proper tagging of 'backward' pointer from fcurve to its group in
RNA would lead to infinite loop...

Issue was triggered by override, but crash could be generated from other
places as well (like from py console), on any action actually...
2020-05-15 10:46:55 +02:00
e60560bda0 Fix T76738: Duplicate brushes cause assertion on undo
Changes for 2.90 versioning.
2020-05-15 17:53:03 +10:00
559a8886d6 Merge branch 'blender-v2.83-release' 2020-05-15 17:48:31 +10:00
20c25bffda Merge branch 'blender-v2.83-release' 2020-05-15 17:47:58 +10:00
656692913b Merge branch 'blender-v2.83-release' 2020-05-15 17:47:54 +10:00
3c0fd51cf4 Fix T76738: Duplicate brushes cause assertion on undo 2020-05-15 17:45:41 +10:00
6a850f3cc8 Fix duplicate ID's being created when appending/linking
This removes grease pencil brush creation/dat-block delete on load,
since this causes duplicate data-blocks.

Add assert to prevent this happening in the future
since the error is isn't obvious.
2020-05-15 17:42:01 +10:00
c361f911f9 Fix error versioning paint-slots pre-2.80 2020-05-15 16:51:33 +10:00
191c562f98 Merge branch 'blender-v2.83-release' 2020-05-15 12:52:31 +10:00
4ce1829289 Cleanup: don't check flags as booleans
Causes unexpected behavior when adding new flags.
2020-05-15 12:47:47 +10:00
c880e54a95 Cycles: Refactor microfacet BSDFs to remove separate anisotropy code
Since the sampling and evaluation functions handle both cases anyways,
there's not really a point for keeping the distinction in the kernel,
so we might as well cut down the number of CLOSURE_BSDF_MICROFACETs a bit.

Differential Revision: https://developer.blender.org/D7736
2020-05-15 00:52:57 +02:00
8d918fe0f2 Merge branch 'blender-v2.83-release' 2020-05-14 21:50:07 +02:00
f716bb3b71 GPencil: Add licence text at header 2020-05-14 21:49:44 +02:00
516e1b4031 Fix T76025: Flip/recalc steep custom normals produces wrong result
The issue was the custom loop normal data would be mangled when we
reversed the face loops.

The flip face code will now correctly flip the custom face normals so
they are not left in an undefined state.

Reviewed By: Bastien

Differential Revision: http://developer.blender.org/D7528
2020-05-14 21:17:33 +02:00
2efe77ca51 Fix missing hinting information in default font
Updates the font file to bring back hinting data, which got lost somehow
in dc3f073d1c.

Second and (hopefully) final fix for T75898.
2020-05-14 20:17:26 +02:00
Nikhil Shringarpurey
3ced9c1c72 Fix missing hinting information in monospace font
Updates the monospace font file to bring back hinting data, which got
lost somehow in dc3f073d1c.

Partial fix for T75898.
2020-05-14 20:17:07 +02:00
6716baa1f7 Fix T76476 EEVEE: Invalid Vector to Float conversion for nodegroups
The previous code only handled the RGBA socket case. For vectors, we simply
use the average of the 3 compoments. This is done using a temp Vector Math
node using the dot operation.
2020-05-14 19:57:51 +02:00
4ac748c099 Merge branch 'blender-v2.83-release' 2020-05-14 19:54:15 +02:00
5f31e5031c GPencil: Fix unreported problem filling textured strokes
The internal image used for filling was not correct when the texture was used in stroke and this makes impossible get a right filling.
2020-05-14 19:53:55 +02:00
cc3d3a453e Fix: Broken build with TBB disabled.
Lite builds without TBB and still needs the alternative codepath
2020-05-14 10:39:12 -06:00
Tautvydas Andrikys
33ce0cb5a1 Fix T63588: Cycles unnecessarily updates background importance sampling map 2020-05-14 17:56:50 +02:00
461fee5328 BLI: deduplicate address sanitizer code
Reviewers: brecht, campbellbarton

Differential Revision: https://developer.blender.org/D7731
2020-05-14 17:42:54 +02:00
5940485369 Fix T76168 Workbench: Shadows behind a culled backface are inverted 2020-05-14 17:41:05 +02:00
16d8a683be Fix T73984: unnecessary Cycles viewport updates with object texture coordinates
Remove old code that added extra updates for shaders that have a dependency on
objects. The dependency graph can now tell Cycles when a material is affected by
an object transform.
2020-05-14 17:39:37 +02:00
ea84c12a2b Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-05-14 17:14:12 +02:00
72492eb2a2 Update RNA Manual References after camera fix
There was no link to the base camera* properties (e.g., lens).
2020-05-14 17:13:52 +02:00
dc4983dfdd Merge branch 'blender-v2.83-release' 2020-05-14 16:49:18 +02:00
78e3b7c28d Sculpt: Render Face Sets always as flat shading
This removes the smooth shading rendering from the face set overlay when
smooth shading is enabled.

Reviewed By: jbakker

Maniphest Tasks: T74906, T74622, T75331, T76530

Differential Revision: https://developer.blender.org/D7105
2020-05-14 16:47:50 +02:00
fa23e313f1 Merge branch 'blender-v2.83-release' 2020-05-14 16:32:38 +02:00
e585257063 GPencil: Changes in 2D template
Differential Revision: https://developer.blender.org/D7619
2020-05-14 16:31:51 +02:00
bd80c21635 Merge branch 'blender-v2.83-release' 2020-05-14 16:23:24 +02:00
Ankit
b7386c66f9 Fix T76150: Viewport Axes not toggling correctly when 'Floor' and 'Grid' are turned off
Fix T76150
While comparing with the deleted file [1] in the commit [2], saw this
little addition which most probably was added for optimisation.
Removing it fixes the behaviour too.

To test:
- In Viewport Overlays > Guides, uncheck both Grid & Floor.
- Try toggling all three axes individually.
- Z just sticks. X cannot be shown without Y enabled.

[1] https://developer.blender.org/diffusion/B/change/master/source/blender/draw/modes/object_mode.c;9516921c05bd9fee5c94942eb8e38f47ba7e4351
[2] {rB9516921c05bd9fee5c94942eb8e38f47ba7e4351}

Reviewed By: fclem

Maniphest Tasks: T76150

Differential Revision: https://developer.blender.org/D7568
2020-05-14 16:22:55 +02:00
ada03e8673 UI: Fix Unreported missing background for azone arrow
This was caused by the sRGB viewport changes. The fix is to modify the
alpha values manually. The shader was also missing a srgb fix.
2020-05-14 16:16:29 +02:00
0909b564a9 Fix T76413 Gizmos: Trackball's preselection highlighting is too bright
This was caused by the sRGB viewport changes. The fix is to modify the
alpha values manually.
2020-05-14 16:16:29 +02:00
c233271b0b Fix T76126 Overlay: Glitch when hiding Nurb vertices 2020-05-14 16:16:29 +02:00
97f50c71b9 Fix --debug-cycles printing CUDA devices twice
Reuse the CUDA devices list for Optix device detection.
2020-05-14 16:07:22 +02:00
fc4f2571ba GPencil: Remove creation of Tint brush in versioning code
This is not required.
2020-05-14 15:57:43 +02:00
a260d1cd69 Clip Editor: Fix camera error curve drawing
It didn't work correctly when there in no continuously solved camera
segment (aka there is a single isolated frame with solved camera).

Basically, don't start drawing curve segment until it's known there
is enough points for at least one segment.

On user level it seemed to be fine, but it was assert failure in
debug builds.
2020-05-14 15:44:18 +02:00
16b9841fc1 Cleanup: Remove unused variable 2020-05-14 15:09:12 +02:00
236794d07a Merge branch 'blender-v2.83-release' 2020-05-14 14:30:34 +02:00
Jeroen Bakker
7965c735f1 Fix T73286: Projection Painting Dense Mesh Bleed
When projection painting a dense mesh a face can be marked
PROJ_FACE_DEGENERATE when it is too small. Degenerative faces are
handled differently and as documented can create incorrect results.

Not sure what these incorrect results are and if there could be a better
solution for handling these results.

This fix would only mark a face degenerative when all the verts are the
same.

Reviewed By: Campbell Barton

Differential Revision: https://developer.blender.org/D7662
2020-05-14 14:30:02 +02:00
Jeroen Bakker
c9360b239b Fix T73286: Projection Painting Dense Mesh Bleed
When projection painting a dense mesh a face can be marked
PROJ_FACE_DEGENERATE when it is too small. Degenerative faces are
handled differently and as documented can create incorrect results.

Not sure what these incorrect results are and if there could be a better
solution for handling these results.

This fix would only mark a face degenerative when all the verts are the
same.

Reviewed By: Campbell Barton

Differential Revision: https://developer.blender.org/D7662
2020-05-14 14:28:27 +02:00
08ac4d3d71 Fix T76553: Blender Freezes When Playing Back Animation
In some cases blender could freeze. When threads are blocked (waiting for other tasks completion) the scheduler can let the thread perform a different task. If this task wants a write-lock for something that was read-locked in the stack a dead lock will happen.

For task pools every task is isolated. For range tasks the inner loop will be isolated. The implementation is limited as isolation in TBB uses functors which are tricky to add to a C API. We decided to start with a simple and adapt were we need to.

During testing we came to this setup as it was reliable (we weren't able to let it freeze or crash) and didn't had noticeable performance impact.

Reviewed By: Brecht van Lommel

Differential Revision: https://developer.blender.org/D7688
2020-05-14 13:54:16 +02:00
36d9f7e375 Fix T76541: OpenGl Depth Picking not selecting frontmost object
The issue was that we used GL_ALWAYS for depth checking here which would
lead to the depth information from objects being messed up.

It would not represent which object was closest to the camera.

Reviewed By: Clément Foucault, Jeroen Bakker, Campbell Barton

Differential Revision: http://developer.blender.org/D7710
2020-05-14 13:46:23 +02:00
Jeroen Bakker
eb23b39b7f Fix T76558: Decreasing Viewport Anti-Aliasing Samples Makes Scene Whiter
When setting the Viewport Anti-Aliasing samples in the user preferences
to a lower sample count the anti-aliasing was not reset. This lead to
incorrect result as the accum buffer would still hold the values of the
larger sample count.

This fix resets the TAA when the sample count is changed.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7728
2020-05-14 12:44:42 +02:00
Jeroen Bakker
80fffba132 Fix T76729: Particle Hair Get Occluded by Overlays
When using an external render engine Blender will still draw an OpenGL
depth buffer for the overlay engine to work correctly. Particle systems
were ignored, what lead to occluded hair and other artifacts.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7730
2020-05-14 12:43:14 +02:00
a88316b4a6 Cleanup: Remove uneeded loop
The Region loop was not required.
2020-05-14 12:29:44 +02:00
Jeroen Bakker
7d38f50367 Fix T75908: Sculpt GPU Batches + Render Artifacts
When sculpting the GPU batches are constructed with only the required data
for a single viewport. When that viewport changes shading or coloring mode (object
to vertex) batches might not hold all the needed information.

There is also a case when you have two 3d viewport one in object color
mode and the other in vertex color mode that the GPU batches were
updated without any vertex colors.

In order to fix these category of issues this patch would always
construct the full GPU batches for sculpting.

Reviewed By: Clément Foucault, Pablo Dobarro

Maniphest Tasks: T75908

Differential Revision: https://developer.blender.org/D7701
2020-05-14 11:58:33 +02:00
975c45df9a Cleanup: don't use deprecated exception specifications
Usage of exception specifications is discouraged by the C++ core guidelines.
2020-05-14 11:24:50 +02:00
Yevgeny Makarov
f17e7e0b62 UI: Tweak development branch splash image to exclude rounded corners
The rounded corners are now done at runtime within Blender, see
04828b7d99.

Fixes T76040.
2020-05-14 11:02:56 +02:00
b0686af32b Merge branch 'blender-v2.83-release' 2020-05-14 18:48:48 +10:00
5d2e54af37 Merge branch 'blender-v2.83-release' 2020-05-14 18:48:45 +10:00
21e5a72798 Merge branch 'blender-v2.83-release' 2020-05-14 18:48:43 +10:00
13769bcbe5 Fluid: Rename smoke flow forces to fluid flow forces
Better to use more general term since in theory these forces can be used for smoke and liquid.
2020-05-14 10:41:00 +02:00
9ebb3a386e Fix T76732: Error detecting modifier key clicks
At the time of checking, the previous type isn't the last key pressed.
2020-05-14 18:02:37 +10:00
fee46615f4 WM: include previous value, type in event printing 2020-05-14 17:59:14 +10:00
e22ea3dc0e Cleanup: sync clang-format with master
Avoid noisy diff's & conflicts.
2020-05-14 17:11:24 +10:00
de6a866114 Merge branch 'blender-v2.83-release' 2020-05-14 15:26:32 +10:00
0892ce85b2 Merge branch 'blender-v2.83-release' 2020-05-14 15:26:30 +10:00
cdc7a93c36 Merge branch 'blender-v2.83-release' 2020-05-14 15:26:27 +10:00
1cbc3a8f2b Fix undo-push assert for some modes with zero undo steps
Also fixes files not being tagged as modified with zero undo steps.
2020-05-14 15:18:51 +10:00
0cd9b1243c Fix sculpt/paint missing undo-step limiting 2020-05-14 14:52:07 +10:00
95a47ff226 Cleanup: move assignment out of loop 2020-05-14 13:52:56 +10:00
1fadda344c Merge branch 'blender-v2.83-release' 2020-05-14 04:19:11 +02:00
4341b5b2fe Fix T59954: View all Sequences doesn't show all sequences
Set boundbox_seq start X minimum value to SFRA.

This should be part of rBf66b5edf98c9, but I forgot to include this change.
2020-05-14 04:10:29 +02:00
27ef012ac7 Fix T52782: crash rendering more virtual parent particles than children 2020-05-14 03:42:09 +02:00
db1099c0ae Merge branch 'blender-v2.83-release' 2020-05-14 03:09:33 +02:00
ec324d8741 Fix T59089: --engine command line option does not affect 3D viewport render 2020-05-14 03:08:08 +02:00
879032d2ab Cleanup: Correct order of proxy resolutions
Wrong order introduced by rB7fc60bff14a6: UI: Layout changes for new checkbox layout possibilities
2020-05-14 02:59:19 +02:00
2c61b7f354 Fix T75071: rendering fails when all render layers disabled, but using compositor 2020-05-14 02:45:43 +02:00
88841559de Fix T66005: crash deleting render slot while rendering to it 2020-05-14 02:38:02 +02:00
e2eb47191d Fix T75715: crash rendering animation with persistent images 2020-05-14 02:14:18 +02:00
bd18ffe1f8 Fix T76388: Freestyle not respecting Show Emitter settings 2020-05-14 02:14:18 +02:00
c8060a78fd GHOST/wayland: style fix 2020-05-13 23:51:51 +01:00
a53917152e GHOST/wayland: fix cursor buffer deallocation 2020-05-13 23:13:48 +01:00
bd3c842c56 GHOST/wayland: remove unused 'registry' 2020-05-13 23:13:48 +01:00
d62c98a02d GPencil: Change tooltip 2020-05-13 22:49:30 +02:00
b369d46eb7 GPencil: Add new X-Ray option for Canvas Grid
In some situations is good to have a grid visible anot beeing occulde by meshes.

By default is OFF.

Differential Revision: https://developer.blender.org/D7721
2020-05-13 22:49:24 +02:00
71298a1da9 Revert "GPencil: Add new X-Ray option for Canvas Grid"
This reverts commit fd025b0b7a.
2020-05-13 22:48:52 +02:00
5ee71320c6 Revert "GPencil: Change tooltip"
This reverts commit 7b688a6b04.
2020-05-13 22:48:44 +02:00
7b688a6b04 GPencil: Change tooltip 2020-05-13 22:44:15 +02:00
fd025b0b7a GPencil: Add new X-Ray option for Canvas Grid
In some situations is good to have a grid visible anot beeing occulde by meshes.

By default is OFF.

Differential Revision: https://developer.blender.org/D7721
2020-05-13 22:44:04 +02:00
891b91928a Merge branch 'blender-v2.83-release' 2020-05-13 15:26:34 -04:00
16cc424bc5 Fix T75365: memory leak when writing PNG fails due to lack of disk space 2020-05-13 21:22:06 +02:00
2bc5c18714 Fix wrong Volume object step size tooltip 2020-05-13 21:22:06 +02:00
5e96c43854 Fix T76556: Apply parenting when joining parent into object
The current behavior isn't necessarily "incorrect," but it's unintuitive
and confusing. A simple fix is to apply parentinv before finishing the
operator.

However, there may still be issues when the object's parent has a parent.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7723
2020-05-13 15:21:30 -04:00
4da3044abc Refactor: Move brush foreach_id to new IDTypeInfo structure. 2020-05-13 19:52:19 +02:00
e4890fa564 Refactor: Move lightprobe foreach_id to new IDTypeInfo structure. 2020-05-13 19:39:47 +02:00
c0e1bd815b Cleanup: Keep IDTypeInfo separated from ID type specific API.
Also do not define IDTypeInfo callback when default generic code is
enough...
2020-05-13 19:34:34 +02:00
58cc5c8573 Refactor: Move speaker foreach_id to new IDTypeInfo structure. 2020-05-13 19:30:04 +02:00
3a896bb373 Refactor: Move world foreach_id to new IDTypeInfo structure. 2020-05-13 19:22:46 +02:00
658b254e3e Cleanup: Keep IDTypeInfo separated from ID type specific API.
Also do not define IDTypeInfo callback when default generic code is
enough...
2020-05-13 19:11:19 +02:00
73f38f8db0 Refactor: Move shapekey foreach_id to new IDTypeInfo structure. 2020-05-13 19:08:54 +02:00
9ac5413ac0 Refactor: Move camera foreach_id to new IDTypeInfo structure. 2020-05-13 19:01:20 +02:00
c9048441f5 Cleanup: Do not mix IDTypeInfo code with rest of an ID type specific API... 2020-05-13 18:54:13 +02:00
91ecab5000 Merge branch 'blender-v2.83-release' 2020-05-13 18:48:11 +02:00
2b5e301ea4 Fix T75574: Instant crash: averaging custom normals on model.
Fairly critical code mistake actually, since it uses malloca,
BLI_smallstack should *never* be declared inside a loop...

Also optimized handling of the `loop_weight` heapsimple, we can also
only create and use a single one for all edited objects...

Found two other operators potentially affected by same issue (split
normals, and weld edges into faces).
2020-05-13 18:47:44 +02:00
5445353095 Fix T76654: Wrong text in Face Set boundary automasking brush property
Reviewed By: Blendify

Maniphest Tasks: T76654

Differential Revision: https://developer.blender.org/D7697
2020-05-13 17:06:48 +02:00
95583a398c Fix T76717: Set Rotation Mode Incorrectly Recalculates Bone Rotation In Pose Mode
The issue was that we didn't convert the current rotational values.
We simply just switched mode without doing any data conversions.
2020-05-13 16:29:19 +02:00
5b043b0724 Merge branch 'blender-v2.83-release' 2020-05-13 15:49:26 +02:00
c7f74863dd Fix T76711: override data-blocks could be renamed in the outliner
Overriding datablock should never have an editable name.

This also moves the check for linked/overridden datablocks above the
check for master-collection (otherwise a linked/overriden collection
could still be renamed)

Maniphest Tasks: T76711

Differential Revision: https://developer.blender.org/D7718
2020-05-13 15:30:16 +02:00
3a1426afbd Merge branch 'blender-v2.83-release' 2020-05-13 23:19:29 +10:00
e7d5e16af1 Merge branch 'blender-v2.83-release' 2020-05-13 23:19:22 +10:00
facc9bc878 Merge branch 'blender-v2.83-release' 2020-05-13 23:19:18 +10:00
5159b8e1ea Fix extra undo step when switching object modes
Changing between modes would always add a user visible undo step
that set object mode.

Avoid storing this extra undo step on object mode switching.
2020-05-13 23:14:01 +10:00
54ea356240 Cleanup: remove redundant active object NULL check & poll
This was from 66da2f537a but never did anything,
as a NULL object always exited at the beginning of the operator.
2020-05-13 23:14:01 +10:00
4e32398668 Cleanup: unused arg 2020-05-13 23:14:01 +10:00
ed4647b5d7 Fix missing ID tag when converting objects
Parenting to a curve path animation depends on both geometry and
transform components. Conversion of mesh to curve will make it so
parent have path animation, conversion of curve to mesh makes it
so there is no more path animation. Both cases affects children
of the converted objects, and it's not possible to rely on special
case for curve parent in the dependency graph as that link will be
lost after conversion of curve to mesh.

Simplest approach is to tag object for both geometry and transform
update, which will ensure all children are at valid state after
the conversion.
2020-05-13 14:26:50 +02:00
9db08b77e4 Fluid: Fix for refactor 99ee1de094
Fix incorrect file IO functions.
2020-05-13 13:05:01 +02:00
498bd0772e Merge branch 'blender-v2.83-release' 2020-05-13 13:03:55 +02:00
cbcc15bdaf Fix T65426: GPencil mirror modifier doesn't work as expected
The mirror was not working if the original object had transformations.

Also some code cleanup.
2020-05-13 13:00:24 +02:00
2afb597572 Fix T76665: Wrong files selected when using box select
Reviewers: Severin

Differential Revision: https://developer.blender.org/D7705
2020-05-13 12:50:14 +02:00
b55c78a289 Simulation: Add modifier to access simulation data
For now the "Simulation" modifier only exists for point cloud objects, because
we need this for the particle system. Right now, the modifier is doing nothing.

There is a new `DEG_add_simulation_relation` function that is used
by the modifier to make sure that the simulation is evaluated before
the modifier is executed.

Reviewers: brecht, sergey

Differential Revision: https://developer.blender.org/D7549
2020-05-13 12:39:17 +02:00
23fd95458c Multires: Fix wrong or missing mask propagation
Propagation when changing sculpt level was missing. In fact, the mask
was simply completely removed when changing sculpt level.

Subdivision worked for simple and linear subdivision, but Catmull-Clark
was giving empty results.

Fixes propagation part of T76386.
2020-05-13 12:11:27 +02:00
0790d90d02 Multires: Update and add comments 2020-05-13 12:08:12 +02:00
2843af9357 Multires: Fix mask interpolation weights
Weights were in the different order from corners.

Doesn't fix propagation issues, but fixes an essential step towards
fully correct propagation.
2020-05-13 12:08:11 +02:00
099dd0690c Fix T76481: Fast clicks over Dopesheet toggles trigger renaming
Making this work reliably on the event system side is difficult. So
instead, let the toggle icons take and swallow double-click events on
the UI handler level.

The second change in this patch seems to be only needed for touchpads.
Without it, renaming would still be triggered sometimes, because the
hovered button wasn't re-activated fast enough.
2020-05-13 11:51:52 +02:00
61a3d55d06 Merge branch 'blender-v2.83-release' 2020-05-13 11:42:56 +02:00
eb27595ac4 Fix T76703: GPencil bone parenting missing dependency update
Maniphest Tasks: T76703

Differential Revision: https://developer.blender.org/D7715
2020-05-13 11:30:37 +02:00
6fbb01e641 Merge branch 'blender-v2.83-release' 2020-05-13 10:39:59 +02:00
cda25f8f38 Fix T76646: Crash when changing Size in Add Cube pop-up in some cases.
Remove resetting of ID uuid session counter, it is not really needed
anymore, and not trivial to do this properly everytime.

Thanks @brecht for investigating this.
2020-05-13 10:37:02 +02:00
d8274efcdb Merge branch 'blender-v2.83-release' 2020-05-13 18:24:07 +10:00
79511fca20 Fix zero tablet pressure for simulated events
Impacted sculpt/paint tests.
2020-05-13 18:19:54 +10:00
7415855042 Fix typing Z ignores in text fields
Own error undo/redo key check.
2020-05-13 17:43:15 +10:00
adcc81341d UI: show an error when a search fails
Useful in cases when making a typo before pressing enter.
2020-05-13 17:03:46 +10:00
e8e003ee8b Merge branch 'blender-v2.83-release' 2020-05-13 16:08:59 +10:00
8799fbbef8 Merge branch 'blender-v2.83-release' 2020-05-13 16:08:56 +10:00
7ff47680c6 Merge branch 'blender-v2.83-release' 2020-05-13 16:08:50 +10:00
3edfe352ee Merge branch 'blender-v2.83-release' 2020-05-13 16:08:41 +10:00
0e0ebdb65c Fix crash accessing the clipboard
The clipboard can change between checking it's length and
copying into the allocated buffer.

Move this from RNA to the C/Python API.
2020-05-13 16:01:26 +10:00
75d0287cee PyAPI: support PyGetSetDef when extending RNA types
Support extending properties as well as methods.
2020-05-13 15:57:29 +10:00
8f4f3cce03 Cleanup: split RNA type extension methods into it's own API
This isn't so closely related to the RNA API,
it's a way to use the C/Python API to extend RNA types
and can be in it's own file.
2020-05-13 15:54:09 +10:00
13130ca293 Cleanup: warning 2020-05-13 15:47:51 +10:00
429841e5fd Merge branch 'blender-v2.83-release' 2020-05-13 03:00:34 +02:00
9253386dcb Fix T76488: fix mask extract poll function
This was returning true in edit mode, causing the crash

Reviewed By: jbakker

Maniphest Tasks: T76488

Differential Revision: https://developer.blender.org/D7645
2020-05-13 02:59:31 +02:00
05dd9ca06c Fix T75347: Update cloth brushes in versioning with a valid mass value
The file attached in the report has a cloth brush saved with a particle
mass of 0.0, which causes all sort of issues in the solver. I don't know
how that brush was created, but it does not seems to be possible to do
in the current version (reset values are correct, property limits are
correct and a default brush is created in versioning_defaults). This
resets all brushes with an invalid value to 1.0.

Reviewed By: jbakker

Maniphest Tasks: T75347

Differential Revision: https://developer.blender.org/D7698
2020-05-13 02:55:30 +02:00
ce35cfd208 Fix T76306: Disable use creases when there is displacement data
Use creases changes the limit surface, so the displacemente data is
won't be correct if this option is modified without updating the
displacement.

Reviewed By: sergey

Maniphest Tasks: T76306

Differential Revision: https://developer.blender.org/D7700
2020-05-13 02:52:46 +02:00
bf0a554114 Fix T75968: PBVH raycast returns wrong active vertex
nearest_vertex_co was not reset when a new triangle was intersected by
the ray, so it was always returning the closest vertex to the real
cursor position in any triangle, which was not always the triangle under
the cursor.

Reviewed By: sergey

Maniphest Tasks: T75968

Differential Revision: https://developer.blender.org/D7485
2020-05-13 02:49:38 +02:00
f9d0f59bed Merge branch 'blender-v2.83-release' 2020-05-13 00:14:44 +02:00
50ef801a79 Fix T76320: Thread race condition on undo with prefetching enabled
Stop prefetch jobs before undoing.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7633
2020-05-13 00:10:58 +02:00
75e989dab6 GHOST: fix cursor buffer handling when toggling visibility 2020-05-12 23:05:24 +01:00
5b86fe6f33 UI: About Blender Dialog
Adds an 'About Blender' dialog to the 'App' menu to display information like branch and hash.

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

Reviewed by Campbell Barton
2020-05-12 14:29:59 -07:00
613715a994 Merge branch 'blender-v2.83-release' 2020-05-12 23:19:00 +02:00
be69f23b68 Fix T70612: Sequencer Crash on enabling Prefetch
Disable (skip) preftching scene strips if they target 3D scene.
Try to continue prefetching complete frame if disk cache images are found.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7514
2020-05-12 23:13:18 +02:00
5873bd82da Merge branch 'blender-v2.83-release' 2020-05-12 22:31:29 +02:00
4930eb15f7 Fix T74012: missing fluid simulation domain panels in workbench
Maniphest Tasks: T74012

Differential Revision: https://developer.blender.org/D7706
2020-05-12 22:19:53 +02:00
5ca1eb96c7 Merge branch 'blender-v2.83-release' 2020-05-12 21:57:04 +02:00
829dce524d Fix T72920: Snap package fails to play audio and blocks audio in other apps
ALSA and OSS are not available for the snap packages, and trying to initialize
them seems to cause some problems for other applications. Instead configure
OpenAL and SDL to use PulseAudio, and set PULSE_SERVER environment variable to
make it work.
2020-05-12 21:52:43 +02:00
a5eee1f935 Fix T76535: Eevee + Freestyle render crash with many strokes
Freestyle would create a huge amount of material slots with the same material,
causing issues in Eevee use of alloca().
2020-05-12 21:51:12 +02:00
bfdb27f494 Fix incorrect assert in Cycles node socket get/set functions
Thanks to Subrahmanya Oruganti for spotting these.
2020-05-12 21:50:49 +02:00
80953aed33 Fix CMake using different OpenEXR / USD includes and libraries in some cases
Search for all potential library names in each directory, otherwise e.g.
libImath-2_2.a from a system directory will be preferred over libImath.a even
if we specified a directory.
2020-05-12 21:50:49 +02:00
122a3169e2 Fix missing standard OpenColorIO roles, as reported by ociocheck
These are not used by Blender, but can be used by other software using our
configuration.
2020-05-12 21:50:42 +02:00
289242fef9 Transform orientation tweaks
If the orietation is setted as a parameter, it is best to refer
to it as a constraint orietation so that it can be reused in
successive axis presses.

This is useful to retrieve the orientation of the extrude for example.
2020-05-12 15:44:19 -03:00
36e3847093 Fix T76635: Clicking the text button X in a pop-up doesn't clear
In this case giving `CTX_wm_menu()` priority over `CTX_wm_region()` is all
that's needed and makes sense (since we want exactly the hovered button, not
some other active button in the region/menu hierarchy).

The situation with pop-ups is still tricky, see T73565. But as a first step
it's probably good to let functions be more explicit about what they want when
querying UI context. So I added a variation of a UI-context function for cases
like this.
2020-05-12 20:40:56 +02:00
fc59febb1b UI/Animation: Don't change Graph Editor cursor from scrubbing region
Do not execute the operator to change the Graph Editor cursor when changing the
active frame through the scrubbing region. This is not what users expect, see
T76599.

Removes an explicit exception to not let the regular frame change operator
execute in the Graph Editor. It was needed to let the cursor operator run
instead, but the interplay between the two operators is now handled at keymap
level.

Fixes T76599.
2020-05-12 19:40:41 +02:00
94b9141c95 Fix T76693: Inconsistent rotation Shortcut vs Gizmos
Problem introduced in rB4deea4f4c57a
2020-05-12 14:35:27 -03:00
fc62a3366c UI: Remove duplicate Mark/Clear Seam entries from Edge menus
These already exist in the UV menu (both in the 3D Viewport and UV Editor)
which makes it more clear that this feature is related to UV Unwrapping.
2020-05-12 19:07:15 +02:00
13d0f74b80 Refactor: Move lamp foreach_id to new IDTypeInfo structure. 2020-05-12 18:54:57 +02:00
8ce0c9111d Refactor: Move texture foreach_id to new IDTypeInfo structure. 2020-05-12 18:54:57 +02:00
5fd64c014f Refactor: Move armature foreach_id to new IDTypeInfo structure. 2020-05-12 18:54:57 +02:00
9996688b71 Refactor: Move library foreach_id to new IDTypeInfo structure. 2020-05-12 18:54:57 +02:00
70b73732fe Refactor: Move lattice foreach_id to new IDTypeInfo structure. 2020-05-12 18:54:57 +02:00
b1b93c2ef1 Refactor: Move metaball foreach_id to new IDTypeInfo structure. 2020-05-12 18:54:57 +02:00
ef6610dec5 Refactor: Move Curve foreach_id to new IDTypeInfo structure. 2020-05-12 18:54:57 +02:00
1606e732c2 Merge branch 'blender-v2.83-release' 2020-05-12 18:00:41 +02:00
ac1a6565df Fix T76113 GPU: Crash closing file browsers with AMD GPUs
This fixes crash in the free mesa driver for amd gpus. This crash seems to
only happen on linux.
2020-05-12 18:00:00 +02:00
33f9fe3c62 Merge branch 'blender-v2.83-release'
Conflicts:
	release/scripts/startup/bl_ui/properties_render.py
	source/blender/blenkernel/BKE_blender_version.h
2020-05-12 17:54:20 +02:00
f24e9bb038 GPencil: Add new parameter for SMAA threshold
This parameter allows to define the threshold for SMAA algorithm.

Differential Revision: https://developer.blender.org/D7708
2020-05-12 17:48:28 +02:00
be4b3c64ad Fix T74694: Sculpt Mask Influences Weight/Vertex Paint Drawing
Sculpt overlay assumed that the sculpt session was always in sculpt
mode. But the sculpt session was also used for Vertex/Weight painting.
This resulted that when a mask was defined in the sculpt mode this
resulted into render artifacts.

This patch adds a check to see if the object has a sculpt session for
OB_MODE_SCULPT.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7704
2020-05-12 16:21:38 +02:00
25c67a65d6 Merge branch 'blender-v2.83-release' 2020-05-12 16:16:30 +02:00
8da7ab11cf Fix T76053: Rigid Body properties disappears after deleting rigid body constraint object and undoing.
Since we re-use same addresses of IDs with newly read data, and never
remap old IDs to 'proper' 'old' ID pointers, it implies that old IDs
being deleted will have many ID pointers to new, valid data that we want
to keep.

In general anyway, code from IDTypeInfo (i.e. low-level ID management
code) should never do anything outside of its own ID scope, we cannot
guarantee that given ID is in fully valid state regarding its relations
to other data-blocks.
2020-05-12 16:13:52 +02:00
fd271b6b24 Merge branch 'blender-v2.83-release' 2020-05-12 15:58:35 +02:00
c7651be1e1 Multires: Cleanup, clarify comments 2020-05-12 15:58:21 +02:00
dbc13a37ca UI: Rename 'View Zoom In/Out' to 'Zoom In/Out'
This rename was done time ago but still missing in some areas.
2020-05-12 15:58:00 +02:00
08b4c9a815 Multires: Correct NULL-pointer check
There is some hard-to-reproduce scenario when top level
would have masks allocated, but without masks on the sculpt
level.

Need to check proper array before accessing its elements.
The check for top-level masks is done by the caller.
2020-05-12 15:49:31 +02:00
82e8df01ac UI: Rename 'View All' operator to 'Frame All'
This change was done time ago but it was still missing in some operators.
2020-05-12 15:44:59 +02:00
1b289029bb Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-05-12 15:08:03 +02:00
94cbfb71bc Fix T76132: Can't import Alembic with changing UVs
In the Alembic importer, the animation of UVs and normals was
overlooked; when the mesh geometry is not animated, the entire mesh was
considered constant.

T76132 concerns both the exporting and importing of changing UVs. This
commit fixes the importing.
2020-05-12 15:07:09 +02:00
65574463fa Fix T76132: Can't export Alembic with changing UVs
In the Alembic exporter, UVs were only exported on the first frame. This
is an issue, as when exporting an animated mesh the topology can change,
and then the UV coordinates of the first frame are no longer valid.

T76132 concerns both exporting and importing changing UVs. This fixes
the exporting.
2020-05-12 15:07:09 +02:00
e5bb02aaa4 Fix T76669: Crash when doing right click on channel
Reviewers: lichtwerk, sybren

Differential Revision: https://developer.blender.org/D7702
2020-05-12 14:47:21 +02:00
f7715b3337 Merge branch 'blender-v2.83-release' 2020-05-12 22:10:21 +10:00
4d8ec4439f Merge branch 'blender-v2.83-release' 2020-05-12 22:10:17 +10:00
94934199e7 Merge branch 'blender-v2.83-release' 2020-05-12 22:10:13 +10:00
03727082e9 Merge branch 'blender-v2.83-release' 2020-05-12 22:10:10 +10:00
65381e220e Fix T76507: Reading clipboard blocks keyboard input on X11 2020-05-12 22:09:11 +10:00
2b7741003e Cleanup: tag unused function 2020-05-12 22:09:03 +10:00
973ab436f0 Fix T76514: Invalid geometry in Alembic crashes Blender
Even though {T76514} is caused by invalid geometry, and thus technically
constitutes a bug in the software that created the Alembic file, I would
like Blender not to crash on importing such a file.

The error in the Alembic file consists of invalid mesh loops, where
consecutive loops refer to the same vertex. The `BKE_mesh_validate()`
can actually correct these errors, so this commit focuses on two things:

- Letting Blender survive the situation until the mesh is loaded, and
- Detecting the error so that `BKE_mesh_validate()` can be called only
  when necessary. This ensures there is only a minimal impact on
  performance when loading actually valid data.

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

Reviewed By: JacquesLucke
2020-05-12 13:58:40 +02:00
fffcb6e480 Fix T74818: improve tooltip for initial fluid velocity 2020-05-12 13:55:58 +02:00
94734d6454 Fix Frame Dropping not dropping the correct amount of frames
Previously the playback mode "Frame Dropping" would not drop the correct
number of frames which would lead to slow playback.

For example, the playback target is 60fps.  However we can only muster
around 32 fps.

The delta frames from the last step is in this case ~1.98 or so.

With the previous code, we would floor this.  That would lead us to step
forward one frame each time, effectively playing back the animation at
half the speed as we will try to render every frame.

To fix this we simply save the remaining fraction from the previous
frame and use it to compute the current frame step.

Reviewed By: Sybren

Differential Revision: http://developer.blender.org/D7694
2020-05-12 13:24:20 +02:00
07fc240d72 UI: invoke operators in search menu instead of execute
Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D7639
2020-05-12 13:19:51 +02:00
06763eace7 Merge branch 'blender-v2.83-release' 2020-05-12 12:23:41 +02:00
cfbcc94451 Fix T75492: Only positive shrink factor values can be animated
A better fix would probably be to check if the value is animated,
but I'm not sure how to do that.

Reviewers: zeddb

Differential Revision: https://developer.blender.org/D7692
2020-05-12 12:22:36 +02:00
0c1b1e734e Merge branch 'blender-v2.83-release' 2020-05-12 12:21:16 +02:00
a50c131a0d Fix T75889: Cannot bake mantaflow via Python API
The issue was the usage of the global `__main__` Python module.
When running scripts in the text editor, Blender would overwrite
the `__main__` module.

Reviewers: sebbas

Differential Revision: https://developer.blender.org/D7690
2020-05-12 12:18:09 +02:00
2008bcb0bb Fluid: remove special treatment for running Python code on windows
We discussed this in D7690 and could not find a reason for this
code anymore. It might just be leftover from some even older code.
2020-05-12 12:18:09 +02:00
390d27548c Cleanup: Remove print statement 2020-05-12 12:05:48 +02:00
e0b5a20231 Preferences: Customize default empty size for collection instances
The old value (1.0) was often too large in practice. When many collection
instances are created, the large empties create a mess in the viewport.

This adds a new preference setting in `Editing -> Objects -> New Objects`
called `Instance Empty Size`.

The value will be used as display size for new empties containing a
collection instance.

Reviewers: Severin

Differential Revision: https://developer.blender.org/D7650
2020-05-12 10:59:41 +02:00
f1f3381873 Merge branch 'blender-v2.83-release' 2020-05-12 10:39:00 +02:00
d896df3ccd Fix T73973: GPencil Fill fails when zoom the image
The problem was related of how the initial pixel to create outline was detected. Now, a limit is set for any image to keep a fillable image in all situations, not only when some strokes contain the fill.
2020-05-12 10:35:56 +02:00
c1d8eb01c5 GPencil: Cleanup wrong ID delete
Differential Revision: https://developer.blender.org/D7691
2020-05-12 10:35:49 +02:00
f20133aeec Merge branch 'blender-v2.83-release' 2020-05-12 07:59:47 +02:00
Jeroen Bakker
24140444f2 Fix T75556: Select Emitter Object via Hair
{rB3685347b4172} introduced a conservative depth rendering for
selection. The conservative depth rendering assumed that all geometry
are triangle based. Hair is lined base.

This patch will use a normal depth shader for rendering hair.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7661
2020-05-12 07:58:37 +02:00
Jeroen Bakker
849672a991 Fix T75556: Select Emitter Object via Hair
{rB3685347b4172} introduced a conservative depth rendering for
selection. The conservative depth rendering assumed that all geometry
are triangle based. Hair is lined base.

This patch will use a normal depth shader for rendering hair.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7661
2020-05-12 07:51:45 +02:00
859eee7e15 Merge branch 'blender-v2.83-release' 2020-05-12 14:41:54 +10:00
21fdd00108 Merge branch 'blender-v2.83-release' 2020-05-12 14:41:50 +10:00
bbb5fa2a16 Merge branch 'blender-v2.83-release' 2020-05-12 14:41:43 +10:00
eaa21df505 Fix T71882: Offset Edge Slide doesn't switch selection mode
Based on D6335 with modifications.
2020-05-12 14:38:01 +10:00
Anthony Edlin
750b370c25 Fix EDBM_selectmode_disable_multi_ex return value
This always return changed, even when no changes were made.
2020-05-12 14:33:29 +10:00
bff679f8f9 UI: add offset edge slide to edge menu
This was only available in the context menu which only shows
when the selection was set to edge-mode, even though this
works in other modes.
2020-05-12 13:53:46 +10:00
9947b1fda6 Merge branch 'blender-v2.83-release' 2020-05-12 12:53:48 +10:00
8770f35305 Cleanup: remove DNA_screen_types.h, use struct qualifier
Also remove draw-manager & depsgraph headers in interface_icons.c

Change this in 2.83 to prevent merge issues in master with
interface_intern.h header.
2020-05-12 12:46:29 +10:00
5852f97dc2 API Docs: Fix broken url markup 2020-05-11 21:35:33 -04:00
1e12468b84 UI: undo/redo support for text fields
Support undo/redo when editing text buttons.
2020-05-12 11:32:14 +10:00
542ff416e2 Fix T76285: Missing 'Toggle X-Ray' operator description
Author: @Alaska

Differential Revision: https://developer.blender.org/D7591
2020-05-11 17:02:11 -04:00
a692418bc2 Merge branch 'blender-v2.83-release' 2020-05-11 21:20:32 +02:00
8956e9e5f6 Fix mathutils box_pack_2d docstring
Differential Revision: https://developer.blender.org/D7667
2020-05-11 21:18:42 +02:00
9618875b96 Merge branch 'blender-v2.83-release' 2020-05-11 20:59:12 +02:00
a116912fd6 Fix (unreported) greasepencil crash calling transform_fill from outside
3DView

Operator relies on 3DView, poll for it.

Spotted while looking into T76522.

Reviewers: antoniov

Differential Revision: https://developer.blender.org/D7665
2020-05-11 20:46:13 +02:00
e10eaaad13 Merge branch 'blender-v2.83-release' 2020-05-11 20:31:58 +02:00
acd5f5285e Fix T76538: Prevent nodesocket creation on certain nodes
- no sockets on Frame nodes
- no Input sockets on Group Input nodes
- no Output sockets on Group Output nodes

Maniphest Tasks: T76538

Differential Revision: https://developer.blender.org/D7671
2020-05-11 20:26:00 +02:00
4deea4f4c5 Fix T76504: Extrusion doesn't take in account the current transform orientation
Use orientation defined in the scene when changing constraint
2020-05-11 15:10:50 -03:00
b026965f80 Revert "Fix T76504: Change in behavior of constraints orientation"
This reverts commit 2f63e47931.
2020-05-11 13:43:29 -03:00
508124b5be Fix error in last transform orient commit 2020-05-11 13:25:37 -03:00
3c56746863 Windows: Re-enable incremental linking
It was disabled in D7520 to keep the pdb's from growing out
of control however the increased link time is just not worth
it.

I'll keep an eye on the dailies and see if we have to come up
with a different solution.
2020-05-11 10:01:54 -06:00
dfbb3d82f7 Merge branch 'blender-v2.83-release' 2020-05-11 17:54:32 +02:00
365e9cb6aa Overlay: Replace depth blitting by GPU_texture_copy
This is an attempt to fix the related T74243.
2020-05-11 17:53:45 +02:00
a1363f74bf Fix T76216 Workbench: Glicht when switching from quad views to normal view
This was because of the use of uninitialized buffers for TAA.
This patch is a quick fix for the issue which is a missing tagging for a
complete viewport update.
2020-05-11 17:53:45 +02:00
e3861b949a DRW: Fix debug performance stats 2020-05-11 17:53:45 +02:00
15e71781b9 Merge branch 'blender-v2.83-release' 2020-05-11 17:38:50 +02:00
4e1a6b48e7 Fix T76559: Crash after deleting material leaves invalid pointer in node editor.
No idea why node editor remap callback was only handling scene IDs (and
not any other ntree owner)...

Note that this should be a safe fix, but it unvails a nice can of worm,
at some point we should ba able to handle all of that through libquery
only, get rid of editor's remap callbacks, and probably sanitize usages
of ID pointers by some of them, like that nodetree editor.

Current situation remains a fairly fragile mess...
2020-05-11 17:24:56 +02:00
6f5bc1fc2b Merge branch 'blender-v2.83-release' 2020-05-11 17:14:15 +02:00
249ccab111 Fix T76621: UILayout.prop_search() broken for data-block names
If the search menu was used for a string property, and a data-block was
selected from the search, the value set would be an invalid name. The property
would get the modified UI string, not the proper data name set.

Mistake in rBd6cefef98f87.

This is more of a temporary fix to make the menu behave like before above's
commit. So the library hints this added will not be shown for string properties
anymore. This would need further changes in the UI code (see
https://developer.blender.org/P1380) but is too unsafe for 2.83 at this point.
Even if this is done, the note below still applies.

NOTE: Data-blocks should not be referenced by name only, as it's possible to
have duplicate data-block names with linking and especially with library
overriding.
Instead, pointer properties should be used, `UILayout.prop_search()` can then
properly deal with linked and overridden data-blocks.
2020-05-11 17:13:04 +02:00
ccf97e1013 Version bump to 2.90.1 for versioning code 2020-05-11 16:28:16 +02:00
e407fdd9c4 Cleanup: Add space line removed by error 2020-05-11 16:28:15 +02:00
bdcf2083a3 GPencil: Cleanup unneeded initializations 2020-05-11 16:28:15 +02:00
d63956d0e5 GPencil: Replace material name with material pointer for Modifiers filter
Before, the material name was used to filter the effect of the stroke, but after the last changes in the ID code, now it's not working.

After talking with @severin, we agreed to replace the material name with a pointer. Also, this fix a design issue when the materials were linked.

Related to T76594

Differential Revision: https://developer.blender.org/D7681  with some minor changes
2020-05-11 16:28:15 +02:00
870e081bcd UI: Curve Edit Stroke Panel Layout
Also removes the 'Curve Stroke' panel that showed globally for curve
edit mode. This means the settings will not be available without the
draw tool selected.

Reviewed By: billreynish, campbellbarton

Differential Revision: https://developer.blender.org/D7652
2020-05-11 10:16:52 -04:00
af8bd43e35 Merge branch 'blender-v2.83-release' 2020-05-11 10:45:20 -03:00
Sergey Sharybin
27e3361eb5 Fix T74713: Unpredictable active texture node for Workbench
The selection operator was not being correctly marked for update.
This restores the behavior seen in blender 2.79.
2020-05-11 10:44:19 -03:00
Sergey Sharybin
4d677ec90d Fix T74713: Unpredictable active texture node for Workbench
The selection operator was not being correctly marked for update.
This restores the behavior seen in blender 2.79.
2020-05-11 10:35:30 -03:00
8c6391a9b3 Merge branch 'blender-v2.83-release' 2020-05-11 15:32:50 +02:00
86a16e7381 Fix T76512: Sculpt mode: crash when applying base
Differential Revision: https://developer.blender.org/D7663
2020-05-11 15:26:09 +02:00
76c64af00c Fix T76630: Crash when changing transform value with Custom Orientation 2020-05-11 09:47:25 -03:00
815855b91b Fix T76642: Incorrect behavior limiting undo steps 2020-05-11 22:20:51 +10:00
267e4d130a Merge branch 'blender-v2.83-release' 2020-05-11 13:55:52 +02:00
3d3a75fc2a Fix T76598: GPencil - Set a lower limit for Thickness modifier
The old value was too high. Now, the limit of pressure is 0, but anyway, the stroke will be always visible because there is a minimum thickness of 1 pixel.
2020-05-11 13:55:21 +02:00
ced4dfa349 Cleanup: Toggle X-Ray button, removed nested ternary operators
Replaced two nested ternary operators combined with dynamic attribute
access, with a simple `if`/`elif`/`else` construct.

No functional changes.
2020-05-11 13:02:21 +02:00
a1593fa05b GPencil: New Percentage parameter in Build modifier
Add a factor to determine the percentage affected.

This parameter is used to hide part of the stroke and to have a full control of how the points are displayed and not linked to current scene frame.

{F8526502}

{F8526511}

Reviewed By: mendio, pepeland

Differential Revision: https://developer.blender.org/D7682
2020-05-11 12:57:22 +02:00
e82d8c60f0 Annotations: Small tooltip change 2020-05-11 12:39:32 +02:00
Juanfran Matheu
9a7c4e2d44 Annotations: Add Stabilization for draw tool
This patch adds the stabilizer feature of GP to the annotations.

It has a toggle to activate it "Use Stabilizer", and two properties to control the behaviour of the smooth effect (factor and radius).
You can also use shift at start or in the air to temporaly use this feature.

{F8518283}

Differential Revision: https://developer.blender.org/D7648
2020-05-11 12:39:23 +02:00
672a0af081 Fix T76438: Wrong calculation of depth for Follow Track constraint
Need to transform direction as such, without adding translation component
of the camera matrix.
2020-05-11 11:45:20 +02:00
38732c74fc Tracking: Cleanup, split code of follow track constraint
Makes a set of more isolated individual functions, which should make
it more clear what's going on. Improved naming, added some comments.

Some extra cleanup is possible to get rid of generic vectors called
vec and disp.
2020-05-11 11:24:44 +02:00
de53c039ad UI: show tool-tips in menu search 2020-05-11 18:43:50 +10:00
067587c51b Merge branch 'blender-v2.83-release' 2020-05-11 18:31:04 +10:00
1a382d0579 Merge branch 'blender-v2.83-release' 2020-05-11 18:30:59 +10:00
668867558e UI: apply vertical tool-tip offset in pixel-space
Was applying in ui-block space which changed offset
at different zoom levels.
2020-05-11 18:30:02 +10:00
d6f48e21fc Cleanup: unused arg, clang-format 2020-05-11 18:08:21 +10:00
0e41305344 Cleanup: reference 'bpy.types.bpy_struct' directly
Previously there wasn't a way to access this directly from bpy.types.
2020-05-11 16:56:09 +10:00
364780bce5 Docs: list inherited C/Python API functions 2020-05-11 16:43:49 +10:00
63849aac95 Fix duplicate property references in generated API docs 2020-05-11 16:41:06 +10:00
e3673fd869 Fix building docs with sphinx 3.x 2020-05-11 16:09:56 +10:00
f4d65b0d6e Docs: update API docs, adding reference to bl_rna_get_subclass. 2020-05-11 15:48:51 +10:00
6222a9bf27 Cleanup: unused variable 2020-05-11 15:48:51 +10:00
9bda322468 Merge branch 'blender-v2.83-release' 2020-05-11 07:31:09 +02:00
0461727553 Fix T75998: Precision of 'Unit Scale' and 'Grid Scale' are mismatched
Change hard limits of scale_length RNA property to 1e-9 - 1e+9.
This makes it easier to work with small or large metric units.
2020-05-11 07:23:22 +02:00
51ac411ce8 Cleanup: add ED_screen_areas_iter to clang-format ForEachMacros 2020-05-10 15:42:06 +02:00
4816b1f11d Merge branch 'blender-v2.83-release' 2020-05-10 08:29:52 +02:00
eaee2b4119 Fix T36263: Pasted strip doesnt have F-Curve keyframes from the original
Original code for copying strips tried to change strip name 2 times before
copying and once again after pasting.

Store structs in clipboard in unchanged state, so we can reference data after
pasting easily.

Better method would probably be storing animation data in clipboard as well,
so we can copy animated strips even between scenes.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7638
2020-05-10 08:26:24 +02:00
78296366df Merge branch 'blender-v2.83-release' 2020-05-10 08:05:03 +02:00
a1b3effd55 Fix T71300: Crash on rendering scene recursively from sequencer
Adding recursive scenes has been disabled, but old files still can be opened.

Add check if scene will render itself.
Opening such file will produce warning on open and error on running render.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D7562
2020-05-10 07:51:20 +02:00
76e56e2ba7 Windows: Ignore context record for backtrace is address is 0.
T76602 reported a crash with the exception address being 0,
this stack naturally could not be walked and no backtrace was
reported for the main thread. Which would have been helpful.

This change modifies the behaviour of the crash handler to ignore
the context record if it contains no useful information and
walk the current stack to get some information about what lead
to the crash.
2020-05-09 18:12:14 -06:00
f2178b7f97 deps/windows: Fix wrong crt for libjpeg and pthreads
The msvc linker had been warning about libcmt being dragged
in for a bit, finally tracked the issue down to the deps of
jpeg and pthreads which both ignored our cflags.

this diff changes them both to use the dynamic crt rather
than the static one so they'll be in line with all our
other libraries.
2020-05-09 12:47:59 -06:00
633fee72d5 Fix T76427: edit mesh undo hanges when building without TBB
Background task pools would not restart threads if reused multiple times,
thanks to Jeroen for identifying the cause of this problem.

Differential Revision: https://developer.blender.org/D7659
2020-05-09 17:17:20 +02:00
9be28095cb Fix building on NetBSD 2020-05-09 23:22:50 +10:00
9b02415ec8 Cleanup: doxy comments 2020-05-09 17:36:12 +10:00
d06384aa41 Cleanup: spelling 2020-05-09 17:19:28 +10:00
00e99959d3 Cleanup: double-spaces in comments 2020-05-09 17:15:43 +10:00
904249b4f3 Doxygen: Fix warnings in Doxyfile 2020-05-08 19:53:32 -04:00
6f985574b7 Cleanup: take includes out of 'extern "C"' blocks
Surrounding includes with an 'extern "C"' block is not necessary anymore.
Also that made it harder to add any C++ code to some headers, or include headers
that have "optional" C++ code like `MEM_guardedalloc.h`.

I tested compilation on linux and windows (and got help from @LazyDodo).
If this still breaks compilation due to some linker error, the header containing
the symbol in question is probably missing an 'extern "C"' block.

Differential Revision: https://developer.blender.org/D7653
2020-05-08 18:22:41 +02:00
0d0dcfd643 Install_deps: Add support to compile TBB when we cannot find version.
We now want to use fairly recent TBB (2018 at least?), so distro a bit
old will not have required package anymore...

Tested with Debian, other distro "should work" (c), but tests there are
much welcome! ;)
2020-05-08 18:05:30 +02:00
2d30c4a35b install_deps: Fix (unreported) typo in OpenXR build code.
Was breaking up proper behavior of 'need to rebuild' checks for that
lib.
2020-05-08 18:05:30 +02:00
e517734708 install_deps: Fix (unreported) broken logic in OIIO building.
Not sure where that code was comming from, but it was breaking the
cleanup/update_deps logic...
2020-05-08 18:05:30 +02:00
7d8c5d5623 install_deps: Fix (unreported) broken Boost source URL. 2020-05-08 18:05:30 +02:00
be3c0862ba Cleanup: install_deps: Simplify the 'no distro' code a bit.
We never deal with packages then, and only ever build (if we do
anything), no reason to make things more complicated than needed...
2020-05-08 18:05:30 +02:00
883dfda024 install_deps: Fix (unreported) bad handling of deps between libs.
Previous code would forec built libs to always be rebuilt when one of
their deps was using a package. While this could be useful when said
package was actually updated, this generates way too much false
positives.

Now only rebuild a built lib when we actually switch from built to
package for one of its deps.
2020-05-08 18:05:30 +02:00
96f305c63d Windows: Include symbol file in module information
When writing out the module information in a crashdump
we did not include what symbol file was loaded and if
that symbol file actually matches our executable.

Given the backtraces may contain invalid information
if the symbols are unmatched this is relevant to know.

This diff adds the symbol file and an indication if
unmatched symbols are used.
2020-05-08 10:01:56 -06:00
a1c2441390 Windows: Improve private symbol detection
To detect if private of public symbols were loaded we were relying
on a strcmp with a known filename, which was not great, the symbol
api has a field we can query which should be more flexible and
reliable.
2020-05-08 09:46:39 -06:00
cc1fb9d177 Windows: Fix BLI_assert backtrace.
With the recent backtrace overhaul, the fact that BLI_assert calls
BLI_system_backtrace slipped somehow trough the cracks, causing
issues for debug builds.

This change allows BLI_system_backtrace to run again without having
an exception record.

Also minor improvements to the comments.
2020-05-08 09:39:41 -06:00
fc0842593f USD: Export hair/particle system with name of system (and not its settings)
Particle systems have two names: the name of the particle system itself,
and the name of the particle system settings. The USD exporter used to
use the latter name, and now switched to the former. This is to be in
line with the Alembic exporter, as well as to give users more freedom in
the naming (the particle system can have a unique name but still share
settings from other particle systems).
2020-05-08 17:28:00 +02:00
d359a84430 Merge branch 'blender-v2.83-release' 2020-05-08 17:03:51 +02:00
385559843e Fluid: Adjusted secondary particles timestep and gravity options
Secondary particles are now compatible with the new gravity setup.
2020-05-08 16:59:11 +02:00
ebbaae625f Fluid: Updated Mantaflow source files
Includes more flexible options for dt, dx in secondary particles plugin.
2020-05-08 16:59:10 +02:00
Robert Guetzkow
ce76e17584 Fix T65012: Update depsgraph for matcap flipping
The matcap flipping didn't work with the workbench engine in rendered mode because
of a missing depedency graph update. This commit tags the scene id for a dependency
graph update in `toggle_matcap_flip`.

Reviewed By: fclem, sergey

Differential Revision: https://developer.blender.org/D7657
2020-05-08 16:49:54 +02:00
470cdeeae0 Fix Assert: Wireframe XRay during Sculpting
In the situation that the viewport was set to solid/texture mode and
switch to wireframe and sculpt mode, an assert was triggered in
`workbench_cache_sculpt_populate`.
2020-05-08 15:47:04 +02:00
ac9fe9c2c1 Cleanup: USD, removed unnecessary variable
No functional changes.
2020-05-08 15:41:50 +02:00
163f21db8c Cleanup: USD test, clarfied comment
No functional changes
2020-05-08 15:41:50 +02:00
c3570ab51d Cleanup: USD, made AbstractHierarchyIterator::get_writer const
No functional changes.
2020-05-08 15:10:28 +02:00
d931981d24 Cleanup: USD, added some clarifying comments
No functional changes.
2020-05-08 15:10:28 +02:00
f9d9bf41f6 Tests: Alembic, log entire command when abcls fails
This makes it easier to manually run the `abcls` when a test fails, aiding
inspection & fixing.

No function changes to actual Blender code.
2020-05-08 15:10:28 +02:00
18f833be29 Additional fix for T76426: Mantaflow Liquid - Gravity not respecting Time Scale from domain.
Removed time scale from another conversion factor. See also changes from 6400f54b4c.
2020-05-08 13:11:39 +02:00
d9a9e64e8c Cleanup: USD, refactored export graph construction
The construction of the export graph is now split into a few steps:
- Construct a `HierarchyContext` object for the to-be-exported object.
- Determine the graph index, i.e. the export-parent and the duplicator.
- Update the `HierarchyContext` object for this graph index.

This allows the upcoming new Alembic exporter to override the location of
an object in the export graph, in order to support "flattened" exports.
Aside from that, this also simply makes the code cleaner.

No functional changes.
2020-05-08 12:26:25 +02:00
163a48f203 Cleanup: Alembic, moved axis conversion functions into their own files
The long-term goal is to move code out of `abc_util.{h,cc}` into either
files with better, more concrete names, or simply into the one file
where they are used.

No functional changes.
2020-05-08 12:19:43 +02:00
298356a9c0 GPencil: Fix typo error in previous rename 2020-05-08 11:15:42 +02:00
32f7495e5a Cleanup: clang-format 2020-05-08 19:02:03 +10:00
c532c6c109 Merge branch 'blender-v2.83-release' 2020-05-08 18:57:32 +10:00
fc3cc2ca3a Merge branch 'blender-v2.83-release' 2020-05-08 18:57:29 +10:00
3daf1b151b Merge branch 'blender-v2.83-release' 2020-05-08 18:57:25 +10:00
f10fb04162 Merge branch 'blender-v2.83-release' 2020-05-08 18:57:20 +10:00
b1c4db1fbe Fix T76484: Infinite event handling when loading with load_ui=False
When loading a file from the Python console with load_ui=False,
the event was never freed from the queue causing the command
to continuously be executed.
2020-05-08 18:55:24 +10:00
a2f4d7b8a3 GPencil: Refactor - Rename modifier and shder functions
This change is to align names with changes in T76498
2020-05-08 10:34:42 +02:00
2bb9a465e6 Fix T76498: Refactoring - Rename BKE modifiers funtions 2020-05-08 10:34:35 +02:00
b4d50d3f07 Cleanup: Doxygen: fix markup warnings for links 2020-05-07 23:43:19 -04:00
34792f5e81 Cleanup: Doxygen: Remove Blank Page 2020-05-07 23:43:19 -04:00
21dd3524c0 Fix typo in recent quadric cleanup 2020-05-08 12:42:10 +10:00
eefa82a022 Cleanup: callback naming for search button & update doc-strings
Callback naming didn't always make it clear which function updated
the search contents and the function used to execute the action.
2020-05-08 12:36:35 +10:00
7f5570ceff Fix T76324: face set operators not working from Python console by default
Operators should almost always implement exec() so that they can work without
user event input. In this case there was no reason to have invoke() at all
since no event is needed.
2020-05-08 02:02:49 +02:00
2a8ba9c08e Fix T76471: timer not removed after changing file browser to another type
The file browser exit() callback was not called. RNA get functions should never
modify data, here the area type info to be changed before the screen and area
were properly updated.
2020-05-08 01:51:40 +02:00
7a4e045d8f Fix T76525: crash drawing metaballs with multiple material slots 2020-05-08 00:51:32 +02:00
c6cda3c09c Merge branch 'blender-v2.83-release' 2020-05-07 23:33:20 +02:00
e6dd29ce6e Fix T75958 Overlay: Blender Crashes when selecting without Depth Picking 2020-05-07 23:33:01 +02:00
933c721ccb Fix T76045 Gizmo: line_width does not work in latest version 2020-05-07 23:33:01 +02:00
4d5af14852 Fix T76393 Gizmo: Crash on assert(batch->program_in_use == 0)
This also fix line width support for button2D shape batch
2020-05-07 23:33:01 +02:00
04c04b6f4d Merge branch 'blender-v2.83-release' 2020-05-07 22:06:22 +02:00
05fafb05b1 Fix T76510: Eevee OpenVDB render artifacts due to texture clamping 2020-05-07 22:02:39 +02:00
b5eeef834f Fix direction of the Gizmo Extrude adjustment axis
The extrude adjustment gizmo reads the last constrained axis set.
So it is important to keep the final value actually used.
2020-05-07 16:51:51 -03:00
2f63e47931 Fix T76504: Change in behavior of constraints orientation
The Extrude operator, whose orientation is NORMAL, has undergone some seemingly accidental changes:
- In 2.79 if you press the same key as the axis in constraint, it changes from Normal to No Contraint -> Global -> Normal and repeat this.
- In 2.80 it changes from Normal to Local -> No Contraint -> Global -> Local and repeat this.

This committee resumes the behavior of 2.79
2020-05-07 16:51:51 -03:00
5473f0c49d Fix T76468: volume sequence render not using correct frame in renders
Render datablocks were copying state from original datablocks, where the frame
number and loaded volume grids were out of sync.
2020-05-07 21:14:30 +02:00
ab122c73ba Fluid: Use cached value for total time value
The old time_total initialization was in trouble if scenes made use of a variable framelength (e.g. by animating the time scale parameter).
2020-05-07 17:33:35 +02:00
6400f54b4c Fix T76426: Mantaflow Liquid - Gravity not respecting Time Scale from domain.
Removed timescale from conversion factor - factors should stay constant even if timescale changes.
2020-05-07 17:33:35 +02:00
b09189500d Refactor: libquery: Add NodeTree foreach_id support. 2020-05-07 16:54:32 +02:00
95f8f321b6 Refactor: libquery: Add Material foreach_id support. 2020-05-07 16:49:11 +02:00
339c3e3473 Fix (unreported) mistake in argument passing.
passing the address of the pointer instead of the pointer itself...
2020-05-07 16:49:11 +02:00
cb8a197bc7 Refactor: libquery: Add Mesh foreach_id support. 2020-05-07 16:49:11 +02:00
e39878b90e Initial step to move libquery to IDTypeInfo.
Part of T74960 (and hence T75724).

This commit only adds the basics helper code, and alter some internal libquery
code to use it.

Porting each IDType to the new system will be done gradually from there,
to allow better detection and handling of potential issues.

Differential Revision: https://developer.blender.org/D7598
2020-05-07 16:49:11 +02:00
c59c318f33 Cleanup: sort includes 2020-05-07 16:06:51 +02:00
82704ac3ed UI: support context menu in menu search popup 2020-05-07 23:38:44 +10:00
daf10d17f4 Cleanup: split search menu separator argument into own function 2020-05-07 23:32:14 +10:00
74c01afe22 Cleanup: split button search callbacks into their own struct 2020-05-07 23:32:14 +10:00
7181342e62 Merge branch 'blender-v2.83-release' 2020-05-07 15:14:54 +02:00
d8c3aad800 GPencil: Add support for Link Modifiers
This adds support to the Link modifiers data. This was missing.

Also I did a small cleanup using LISTBASE_FOREACH macro.

Related to T76478

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D7643
2020-05-07 15:12:36 +02:00
b571516237 GPencil: Include new Brush random curves
Now the brushes have several new random settings and use curves to define the effect. The curves have been moved below the parameter to keep UI standards and extra curve panels have been removed.

{F8505387}

The new curves are:

* Hue.
* Saturation.
* Value.

New option to random at stroke level instead to random at point level for the following values:

* Thickness.
* Strength.
* UV.
* Hue.
* Saturation.
* Value.

Curves have been moved below the corresponding parameter and only are displayed in properties panel. Display the curves in the popover made it unusable.

{F8505392}

Also, the Pressure random has been renamed to Radius because the old name was not clear enough.

Reviewed By: mendio, pablovazquez

Differential Revision: https://developer.blender.org/D7577
2020-05-07 15:11:16 +02:00
9b7754883b Merge branch 'blender-v2.83-release' 2020-05-07 14:40:55 +02:00
Nicolas Fauvet
1c0e22b982 VR: Fix OpenXR state freeze on Oculus after taking off HMD
With the Oculus runtime, the VR session would freeze when taking off the HMD
and putting it back on. This was caused by the deletion of graphics resources
too early in the OpenXR state machine, at least for Oculus.
The resources will now only be freed once the session is actually destroyed.

Also fixes an issue where it wasn't possible to stop the session via the UI
when the HMD was taken off.

Reviewed By: Julian Eisel

Differential Revision: https://developer.blender.org/D7635
2020-05-07 14:38:10 +02:00
Jeroen Bakker
ed1fb242a8 Fix T76469: OpenCL 1.2 Compilation
Recent changes assumed OpenCL 2.0 platform. This adds a check to see if
we are compiling on an OpenCL 2.0 platform.

Patch was tested on:
* AMD Radeon Pro WX 7100 with amdgpu-pro-19.50-1011208-ubuntu-18.04 drivers
* AMD Vega 64 with amdgpu-pro-20.10-1048554-ubuntu-18.04 drivers
* AMD RX 5700 with amdgpu-pro-20.10-1048554-ubuntu-18.04 drivers

Reviewed By: Brecht van Lommel

Differential Revision: https://developer.blender.org/D7637
2020-05-07 14:34:50 +02:00
Nicolas Fauvet
6e0540671c VR: Fix OpenXR state freeze on Oculus after taking off HMD
With the Oculus runtime, the VR session would freeze when taking off the HMD
and putting it back on. This was caused by the deletion of graphics resources
too early in the OpenXR state machine, at least for Oculus.
The resources will now only be freed once the session is actually destroyed.

Also fixes an issue where it wasn't possible to stop the session via the UI
when the HMD was taken off.

Reviewed By: Julian Eisel

Differential Revision: https://developer.blender.org/D7635
2020-05-07 14:28:28 +02:00
850a539c90 BLI: improve linear allocator documentation 2020-05-07 14:21:48 +02:00
45adcc51b2 macOS: Remove workaround for old quit dialog
Got added in 1a30e52142 (and tweaked in follow-ups) but shouldn't be needed
anymore with the newer popup based quit dialog.

It prevents Blender from quitting properly in case macOS closed all Blender
windows. This may happen in some corner-cases unfortunately (e.g. T74101) which
would be nice to have addressed at some point. Until then, users shouldn't have
to force-kill Blender to shut it down if they run into this.
2020-05-07 13:55:14 +02:00
b9491476e5 Cleanup: remove unused operator arguments to UI_popup_block_invoke_ex
Add optional can_refresh argument, useful to prevent text field
from exiting on refresh.
2020-05-07 21:38:08 +10:00
8d1e3594fe Merge branch 'blender-v2.83-release' 2020-05-07 13:24:25 +02:00
18dbc8f5c1 Resolve keymap conflict for poselib
Caused by rBe07b245fe1f4 (new 'Select Linked' posemode op).
Above commit took CTRL+L (and this is kept for consistency with other
'Select Linked' operators).

So now keymap for poselib is:
poselib browse: ALT+L (was CTRL+L -- conflict here)
poselib add pose: SHIFT+L (same as before)
poselib remove pose: SHIFT+ALT+L (was ALT+L)
poselib rename pose: SHIFT+CTRL+L (same as before)

ref. D7542
2020-05-07 13:22:13 +02:00
4f846d9d2a Merge branch 'blender-v2.83-release' 2020-05-07 12:53:19 +02:00
2a2aa6abd0 Fix T75793: Mirror modifier UV flip only works on first UDIM Tile
Was flipping around the 0-1 range, now (optionally) flip around each tile.

Also added this option for BMesh bmo_mirror.

Reviewed By: campbellbarton

Maniphest Tasks: T75793

Differential Revision: https://developer.blender.org/D7460
2020-05-07 12:48:58 +02:00
45a77ba09d Merge branch 'blender-v2.83-release' 2020-05-07 12:17:00 +02:00
3fed85f9d2 Fix T76500: Annotation Tooltip in Movie Clip Editor is using old grease pencil text 2020-05-07 12:16:33 +02:00
ebd7e87f33 Cleanup: Replace for loop with LISTBASE_FOREACH macro 2020-05-07 10:11:57 +02:00
Stefan Werner
04a3bdcc52 Blenlib: Added explicit BLI_INLINE in perlin noise.
A few tiny functions were not inlined even in some release
configurations. Added BLI_INLINE as extra compiler hint in
places that the profiler showed at hot spots when populating
geometry with hair.
2020-05-07 10:04:19 +02:00
a834c819ee GPencil: Add support for Link Modifiers
This adds support to the Link modifiers data. This was missing.

Also I did a small cleanup using LISTBASE_FOREACH macro.

Related to T76478

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D7643
2020-05-07 09:58:08 +02:00
b1374a8ce9 Fix menu search expanding file browser menus 2020-05-07 12:27:10 +10:00
1dced6d814 Cleanup: use eSpace_Type in switch statements
Use eSpace_Type in cases where it's likely newly added spaces
should be handled.
2020-05-07 11:15:32 +10:00
5cb143cc4c Cleanup: comments for menu search 2020-05-07 10:55:39 +10:00
d2ee2abde7 Fix uninitialized variable in recent menu search commit 2020-05-07 10:46:48 +10:00
05da8132d8 BLT: include a non-executing reference to context in macros
Prevent errors when building without translations.
2020-05-07 09:00:38 +10:00
b0f3a53989 Cleanup: missing header 2020-05-07 08:50:30 +10:00
786ff13540 Fix UI string without title-case
When using Preferences->Lights->Install, the type option in the operator
properties would show as "type", but should be "Type".
2020-05-06 23:55:14 +02:00
9605c26166 Fix Python error in scene without sequencer 2020-05-06 18:18:32 +02:00
a5ffc6309e GPencil: Split Curve geometry functions to new file
This prepare the code for future curve editors
2020-05-06 18:14:05 +02:00
3bc3b58e4c Fix build error after rBb9bb752e0e852d
This looks like a misplaced variable definition, which is then used
out of scope later.
2020-05-06 10:26:59 -04:00
43f601f1c4 Merge branch 'blender-v2.83-release' 2020-05-06 11:13:50 -03:00
c57f65c088 Fix T76440: Follow Track -> Constraint to F-Curve has no effect
Differential Revision: https://developer.blender.org/D7630
2020-05-06 11:11:32 -03:00
Juanfran Matheu
668dd146f6 Annotations: Add different arrow styles for line tool
This patch adds different kind of shapes/styles for the line extremes while using the annotation line tool.

Current Styles: (following @mendio mockup)
  - Arrow (closed arrow)
  - Open Arrow
  - Segment
  - Square
For future it would be great to have icons, it would be more intuitive (and less space) with previews of what each end / start of line does, like the google slides one as reference:

{F8511116}

Reviewed By: #grease_pencil, antoniov, HooglyBoogly

Differential Revision: https://developer.blender.org/D7608
2020-05-06 15:58:12 +02:00
969d6b157e Fix expanding time-line menus when searching 2020-05-06 22:52:52 +10:00
0f0f06645f Fix error in last commit 2020-05-06 22:52:10 +10:00
b9bb752e0e UI: search menus from all visible areas when using the edit menu
Without this, only actions in the top-bar were visible
which isn't very useful.

Now menus are extracted from the areas used in the active window,
unless this search is activated by the key shortcut,
in this case the current area is used.
2020-05-06 22:40:21 +10:00
5461c7526a Depsgraph: Fix memory leak
I introduced the issue in rBb21a3e77027.
2020-05-06 14:01:44 +02:00
578e976710 Merge branch 'blender-v2.83-release' 2020-05-06 13:25:48 +02:00
11d440f1a2 Fix T76430: Quick smoke not rendering Cycles and Eevee
Temporary fix that will skip cache invalidation from flow / effector objects.
2020-05-06 13:25:00 +02:00
f90c93b2c3 Merge branch 'blender-v2.83-release' 2020-05-06 12:40:25 +02:00
7043f8b815 Fix T76416: Armature Deform parenting option doesn't work with Grease Pencil objects
If we parent with type `PAR_ARMATURE` (where vertexgroups are already
set up and named correctly according to the corresponding bones), we
still need an armature modifier. This just wasnt added.

In contrast to meshes [which add their armature modifier early in
`ED_object_parent_set`], grease pencil used to do this (adding the
armature modifier) in `ED_gpencil_add_armature_weights`.

Now split ED_gpencil_add_armature_weights in two:
- ED_gpencil_add_armature
- ED_gpencil_add_armature_weights (which calls ED_gpencil_add_armature)
- use ED_gpencil_add_armature for the PAR_ARMATURE case

Maniphest Tasks: T76416

Differential Revision: https://developer.blender.org/D7625
2020-05-06 12:26:56 +02:00
6fdbe25094 Merge branch 'blender-v2.83-release' 2020-05-06 12:22:25 +02:00
c98240139e Fix T76470: GPencil sequence interpolate crash when not enough frames in layer
If try to interpolate a layer without an active a next frame, the interpolation failed.

Now, check for both frames before start interpolation.
2020-05-06 12:21:53 +02:00
09603401ca Cleanup: Remove unused parameter 2020-05-06 10:18:48 +02:00
f14319e2d7 Cleanup: Remove old invalid comment 2020-05-06 10:15:11 +02:00
c0bbf1553f Cleanup: move search templates into their own files 2020-05-06 16:00:09 +10:00
6fe3bbed34 Cleanup: restore text alignment lost by clang-format 2020-05-06 15:38:32 +10:00
61d35c06a1 Cleanup: use doxy sections 2020-05-06 12:45:04 +10:00
9959322d6e Merge branch 'blender-v2.83-release' 2020-05-06 12:26:01 +10:00
4dc124f642 Cleanup: warning 2020-05-06 12:25:51 +10:00
c6aa014d3a Fix T76445: Selecting an object no longer cycles past the active
In 2.79, selecting an object would cycle past the first object
even if selection cycling wasn't in use.

Restore this behavior as it wasn't intentionally removed
and it's useful to be able to select an object behind the
current active object.
2020-05-06 12:18:18 +10:00
8b74d6673a Fix num-pad access on wayland
Always interpret keypad keys as if numpad is enabled,
this matches other platforms.

Also add missing quote key.
2020-05-06 11:10:29 +10:00
Christian Rauch
4af9578ab7 Fix T76429: GHOST/Wayland event's don't correspond to physical keys 2020-05-06 10:20:32 +10:00
b0d6b03763 Merge branch 'blender-v2.83-release' 2020-05-06 08:30:37 +10:00
c0798cad02 Merge branch 'blender-v2.83-release' 2020-05-06 08:30:31 +10:00
c036ef1369 Fix T76392: Crash loading app-template with Load UI disabled 2020-05-06 08:28:20 +10:00
39ea222339 Cleanup: warnings 2020-05-06 08:18:00 +10:00
84eaaad94c Fix wrong XR notifier bit value 2020-05-05 22:56:00 +02:00
c9ff8b5cd6 Various fixes, cleanup and improvements to i18n module.
* Remove multi-processing in messages class update, was no giving much
  speedup if any at all.
* Remove some debug prints.
* Make messages class pickleable.

* Filter better actual setting values from Settings class.
* Make settings pickleable.

All this will allow to use multi-processing in the i18n addon itself.
2020-05-05 18:08:40 +02:00
527c81c6f8 Merge branch 'blender-v2.83-release' 2020-05-05 17:16:27 +02:00
e6fab27d6a Fix T75743: Implement restore for brushes that modify their own data
This implements the restore function for Draw Face Sets and Layer, which
don't affect coordinates or masks directly. This is needed for the
anchored and dot brush strokes.

Layer frees the current displacement and a new one is created on each
stroke sample. Draw Face Sets copies the data back from the first undo
node to the mesh datalayer.

Also fixes T75727

Reviewed By: jbakker

Maniphest Tasks: T75727

Differential Revision: https://developer.blender.org/D7442
2020-05-05 17:14:30 +02:00
9d8a583482 Fix T76414: crash using Python module that uses NVRTC
Hide the nvrtc* symbols just like we did for cu* already.
2020-05-05 16:01:18 +02:00
9535dbcee0 UI: Gray out shortcut indicator in search menus
In other menus we already gray out the shortcut string, just in the search menu
that wasn't the case.

We may also want to draw other hints like this in the future, e.g. the library
name for linked data-blocks in search menus. And then it's also nicer to have
it grayed out to separate it visually from the data-block name.
2020-05-05 15:37:11 +02:00
e7470c9dbe Merge branch 'blender-v2.83-release' 2020-05-05 15:14:09 +02:00
bb7a23bdff Fix build with precompiled libraries picking up OpenEXR from install_deps.sh 2020-05-05 15:06:49 +02:00
d97c83712c Cycles: mark CUDA 10.2 as officially supported
It appears to work fine after a recent bugfix and testing for the past few
weeks.
2020-05-05 15:06:49 +02:00
4e5a328e55 Tasks: support build with TBB version 2017
Make the task pool implementation compatible with older versions that are
used by install_deps.sh.
2020-05-05 14:06:08 +02:00
c54ced9f55 Build: print TBB ON/OFF state on first configure, cleanup old TBB logic 2020-05-05 14:06:08 +02:00
be498a21ed Fix T76417: Gpencil Join did not supported weight join
Now the operator keep the weights of all strokes when joining.
2020-05-05 12:51:48 +02:00
c4d50b9ed4 Merge branch 'blender-v2.83-release' 2020-05-05 19:22:31 +10:00
da48defcfa Fix T76402: App templates prevent factory settings theme reset 2020-05-05 19:20:53 +10:00
db09b57d4e Cleanup: use int instead of short for lasso array length
There was no reason to use a short here,
this was just a convention from existing code.
2020-05-05 16:26:14 +10:00
65194dc71a Cleanup: clang-format
Minor difference caused by clang-format v10.0
2020-05-05 16:06:12 +10:00
f55e92107a Cleanup: warnings 2020-05-05 16:05:51 +10:00
8217fba8c5 Merge branch 'blender-v2.83-release' 2020-05-05 13:47:10 +10:00
9b8e0c6d0f Merge branch 'blender-v2.83-release' 2020-05-05 13:47:05 +10:00
75be3bc4b9 Merge branch 'blender-v2.83-release' 2020-05-05 13:46:58 +10:00
36ad59b550 Fix T76224: Grid fill offset doesn't work
Regression in own recent commit b1037aa88f.
2020-05-05 13:13:48 +10:00
d8133b3eb9 Fix T76318: lower part of new preferences window does not work
Regression after recent changes. The precise cause is unclear to me, but
we do not need to update the size right after creating a new window.
2020-05-04 23:58:58 +02:00
ac6be6759e Fix Cycles Python error when device name is not a valid UTF-8 string
This may fix or help diagnose T76378.
2020-05-04 23:07:01 +02:00
375a50dad9 Merge branch 'blender-v2.83-release' 2020-05-04 18:18:15 +02:00
8b5868cc15 Fix T75883: Smoke simulations with Adaptive Domain broken for 'Final' bakes with OpenVDB in 2.83
Config files always use the .uni extenstion.
2020-05-04 18:16:09 +02:00
1771c7e441 Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-05-04 18:08:17 +02:00
0c8b872188 Fix T76355: USD test fails in debug mode
Thanks @LazyDodo for the help!

No functional changes.
2020-05-04 18:03:19 +02:00
41da5df29b Merge branch 'blender-v2.83-release' 2020-05-04 17:49:49 +02:00
4a38a12024 Fix T76251: Animated procedural texture does not influence particle system
Dependancy missing while building depsgraph for particle systems.
fix: adding a relation texture->particles when texture has animation data.

Reviewed By: sergey

Maniphest Tasks: T76251

Differential Revision: https://developer.blender.org/D7573
2020-05-04 17:48:26 +02:00
673f44fa16 Merge branch 'blender-v2.83-release' 2020-05-04 17:40:57 +02:00
1222f561a2 Revert "Fix T76313: Redo in Multires doesn't bring back stroke made after a subdivide"
The fix was actually missing few bits:

- Firstly, the operator itself is not to do UNDO push
- Secondly, multires sculpt/top level are not pushed to the undo
  node, so undo can not happen reliably.

It should be possible to incorporate some of the work from WIP patch
for propagation undo, but it needs more work.

Reverting code base to the previous state, since currently things
are actually a bit more confusing then they used to be.

This reverts commit 0c928087a3.
2020-05-04 17:38:15 +02:00
7b35a9818c Merge branch 'blender-v2.83-release' 2020-05-04 17:17:38 +02:00
df16c23832 Add StringMap.LookupOrAdd and StringMap.LookupOrAddDefault 2020-05-04 17:12:23 +02:00
0c928087a3 Fix T76313: Redo in Multires doesn't bring back stroke made after a subdivide
Differential Revision: https://developer.blender.org/D7620
2020-05-04 17:10:16 +02:00
ba43c2a040 Windows: Silence LNK4099 warning.
Ever since debug symbols were added for release builds the linker
has been on the chatty side about symbols being missing for our
binary libs.

There's currently no plans to supply those, so best for the linker
not to warn us about them.
2020-05-04 08:29:48 -06:00
d8011902f4 Merge branch 'blender-v2.83-release' 2020-05-04 10:21:07 -04:00
133c2381ec Fix T76062: Interpolate Radius in Curve Subdivide Special Case
Differential Revision: https://developer.blender.org/D7523
2020-05-04 10:20:25 -04:00
b3553c0961 Cleanup: USD tests, use EXPECT_LT and EXPECT_FALSE where appropriate
Unfortunately there is no `EXPECT_NOT_LT`; as the `HierarchyContext` only
has an `operator<()` function, testing for `(A < B) == false` is different
than simply testing `(A >= B)`.

No functional changes.
2020-05-04 16:17:54 +02:00
37182c369a GPU: Set Default Buffer Size Immediate Mode
We set the default buffer size for strict buffers to 0. This increased
the performance on intel but reduced the performance on old AMD cards.
This patch sets back the default buffer size for strict buffers. After
testing I didn't detect a slow-down anymore.

Note that today new firmwares were pushed to the device what might fix
some issues.
2020-05-04 16:00:47 +02:00
194070e6f4 Added missing return statement
Every code path through the `fcurve_eval_keyframes_interpolate()` function
has a valid `return` statement, but in debug mode GCC still doesn't like it.
2020-05-04 15:47:33 +02:00
0a1fbfee2b Tweak the pressure/size dynamic range of Clay Strips
The current clay strips brush has a huge dynamic range which is nice for
certain effects, but in some pen tablets it is quite hard to control on
the higher values and it ends up producing unwanted artifacts. This
changes the input curves a bit in an attempt to make it more
controllable.

After adding a brush management system I will expose all these values to
be configurable per brush (the round version of clay strips is a little
bit better with different curves, but that is something that we can't
support now), but for now this default are probably safer.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7524
2020-05-04 15:41:28 +02:00
31ba186983 Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-05-04 15:30:17 +02:00
079fc65e0a T76121 Driver depending on animated modifier property does not update
This fixes an issue where an animated modifier property that's used as
variable in a driver wouldn't animate that driver's value.

Building the relations for the driver target creates the relation
`PARAMETERS_EVAL` → `DRIVER(variable)`. Building the relations for the
FCurve targeting the modifier property creates the relation
`ANIMATION_EXIT` → `GEOMETRY_EVAL_INIT`.

This means that there is NOT a relation `ANIMATION_EXIT` →
`PARAMETERS_EVAL`, and as a result, the driver is not properly updated
when its variable reads animated data. This is resolved in this commit
by adding the missing relation.

Differential Revision: https://developer.blender.org/D7615
2020-05-04 15:29:19 +02:00
19ea4ba9c5 Fix T76399: Wrong API docs for mathutils.Vector.dot 2020-05-04 14:33:48 +02:00
d1226a6d9d Revert "Possible fix for T76113: Use GL_STATIC_DRAW in immBegin"
This reverts commit 7df51ca11a.
Did not solve the main problem.
2020-05-04 08:41:07 -03:00
6ea71cb104 Fluid: Fix for refactor 99ee1de094
Use booleans instead of 0 / 1 in Python
2020-05-04 13:39:05 +02:00
838e1f248d Nodes: add Combine Strings and Group Instance ID node UIs
Reviewers: brecht

Differential Revision: https://developer.blender.org/D7494
2020-05-04 12:49:25 +02:00
9adb81f584 Modifiers: Rename Simulate category to Physics
While the name "Simulate" might be more accurate, there is
a naming collision with the new modifier added in D7549.
Therefore, we decided to rename the category for now.
2020-05-04 12:24:12 +02:00
9eb46d6c29 Cleanup: rename mcords to mcoords
- 'coords' is an abbreviation for coordinates, not 'cords'.
- Rename 'moves' to 'coords_len'.
2020-05-04 19:50:06 +10:00
2addc868de Cleanup: pass ARegion, View2D as const 2020-05-04 19:32:59 +10:00
411c5238a2 UV: support edge-selection for box/circle/lasso select 2020-05-04 19:20:08 +10:00
88b9505b84 BLI: simplify memory management in OpenAddressingArray 2020-05-04 11:11:46 +02:00
fdebdfa320 Cleanup: rename uv_sel_co_from_eve, pass in UV layer offset 2020-05-04 17:08:57 +10:00
a9ef6d5ad7 Cleanup: replace UV_SELECT_ISLAND_LIMIT macro with a function
Also make return argument last for uvedit_pixel_to_float.
2020-05-04 17:00:11 +10:00
b048272825 Cleanup: split selection operations into uvedit_select.c 2020-05-04 16:59:35 +10:00
b84c380aaa Merge branch 'blender-v2.83-release' 2020-05-04 08:24:08 +02:00
000fdd8a6e GPencil: Fix Chisel Brush pressure
In previous commit the pressure was disabled by error.
2020-05-04 08:23:27 +02:00
7b9d6ef2b6 Cleanup: use ELEM macro 2020-05-04 14:03:41 +10:00
33bdd91fb8 Windows: Move tbb to being dynamic library
Static tbb has always been frowned upon [1] sofar it has worked for us but
given our reliance on tbb is about to increase (D7475), I'd like to move the library
to more supported configuration. Which means moving it to be a dynamic library

The libs part of this change is in rBL62416

Reviewed By: Brecht

Differential Revision: https://developer.blender.org/D7570
2020-05-03 16:25:56 -06:00
70fe988dc4 Fluid: Cleanup use of std in MANTA wrapper
Moved std namespace to beginning of class.
2020-05-03 21:10:52 +02:00
82f9ed9305 Fluid: Cleanup in main MANTA wrapper
Use shorter variable names.
2020-05-03 21:10:52 +02:00
99ee1de094 Fluid: Refactored 'Modifier Data to Python' value transfer function
This function needed a bigger cleanup, especially after the problem from T76276.
2020-05-03 21:10:51 +02:00
57cfa8e2d0 Merge branch 'blender-v2.83-release' 2020-05-03 20:42:37 +02:00
331bf04fad GPencil: Hide Canvas Grid when Surface or Stroke mode is enabled
This was introduced by error during refactor. The grid must not be visible in these modes.
2020-05-03 20:42:18 +02:00
bbfae8f184 Merge branch 'blender-v2.83-release' 2020-05-03 20:35:30 +02:00
a577291b03 Fix T76364: GPencil grid is not located in the right place
During the refactor, the location of the grid was broken. Now, the grid is in Object origin or 3D cursor origin as it was in 2.82.
2020-05-03 20:34:48 +02:00
ff8288ad1e Windows: Replace BLI_File* calls with system calls in system_win32.c
Using BLI calls in this file triggered a condition where
poorly modelled dependencies in cmake (ie bf_blenlib using
zlib headers but not linking the libraries) leading to
linker error in debug builds of some of the tests.

This diff sidesteps the dependencies issue by using native
calls rather than BLI calls to check if a file exists and
what its size is. Effectively sweeping the issue right back
under the rug where I found it.

The best solution would be to audit all libraries and ensure
they have proper link requirements set, but that requires
significantly more time than I have available right now.
(zlib in blenlib was one of them and would have been easy
to fix, but there were others that required more work)

The alternative is tests that fail to build which worse.

I'll revisit this and fix it properly but for now this will
have to do.
2020-05-03 12:07:22 -06:00
fe891d581d Audaspace: update from upstream
- Changing API for time values from float to double for better precision.
- Fixing minor mistakes in the documentation.
- Fixing minor unnecessary large memory allocation.
2020-05-03 15:30:35 +02:00
2b7d5caae8 Merge branch 'blender-v2.83-release' 2020-05-03 13:34:55 +02:00
1a6119c8e4 GPencil: More changes to improve Chisel brush
More small tweaks to get the right "feeling" when drawing.

The defaults has been tested by @pepeland.
2020-05-03 13:34:35 +02:00
6a0cb48149 GHOST: cleanup platform checks, fix Wayland + X11
- Building with Wayland + X11 missed an exception include.
- Move HEADLESS check first, since it's the same on all platforms.
2020-05-03 20:24:24 +10:00
a6380d063f Cleanup: store BLF buffer size in a variable 2020-05-03 18:10:25 +10:00
ccaab72685 BLF: use 'int' for internal glyph x,y bearing
These were stored as float but were originally cast from an int
and were often cast back to int.

Also use int pairs for dimensions values.
2020-05-03 18:01:20 +10:00
Harley Acheson
5366eb89c6 UI: improve widget text cursor position
Use BLF_boundbox_foreach_glyph for more accurate cursor placement.
2020-05-03 17:08:05 +10:00
0d65520f05 BLF: add new arguments to BLF_GlyphBoundsFn
- glyph_bounds: to get the character width.
- glyph_bearing: lower left character starting point.

These values are needed for more precise glyph calculations.
2020-05-03 16:51:34 +10:00
d388c1c524 Cleanup: sort file lists 2020-05-03 13:45:40 +10:00
76be35efb2 Cleanup: clang-format 2020-05-03 13:42:49 +10:00
b64fdbfb98 Cleanup: remove unused alpha argument 2020-05-03 13:40:56 +10:00
6408cd00c5 Annotations: Remove old unused code
This code was part of the old grease pencil when annotations was not a separated module.
2020-05-02 18:01:58 +02:00
7df51ca11a Possible fix for T76113: Use GL_STATIC_DRAW in immBegin
This fixes a freeze when closing temporary windows with `AMD Radeon HD 7570M`
The performance is practically the same between calls (with a micro advantage for `GL_STATIC_DRAW`)
I couldn't check the difference in memory usage.
The ideal would be profile in different setups.
But due to the seriousness of the bug, these tests were postponed.
2020-05-02 10:21:38 -03:00
5ef94c9c41 Merge branch 'blender-v2.83-release' 2020-05-02 13:35:19 +02:00
1623fdb3bc Cleanup: Fix return NULL from bool type function 2020-05-02 13:33:23 +02:00
719cff1414 Merge branch 'blender-v2.83-release' 2020-05-02 10:48:15 +02:00
cfdff4fb63 GPencil: Improve Market Chisel angle algorithm
With the previous commit, the angle effect was too subtle. Now the effect is more visible,
2020-05-02 10:47:45 +02:00
03b911dd87 Merge branch 'blender-v2.83-release' 2020-05-01 22:12:47 -06:00
e590199949 Revert "Outliner: Fix selection sync for various operators"
This reverts commit 92d62148be.

When merging in from blender-v2.83-release the merge was somehow rebased
after viewing the log.
2020-05-01 22:10:46 -06:00
92d62148be Outliner: Fix selection sync for various operators
Add missing outliner selection sync tagging for various non-outliner
operators.
* Curve separate
* Grease Pencil separate
* Mesh separate
* Make instances real
* 3D view paste
* Sequencer paste
* Armature delete, dissolve, separate, duplicate, subdivide, extrude,
  click extrude, primitive add
* Pose Group select, delete

Resolves T71404
2020-05-01 21:42:56 -06:00
c06a40006d Outliner: Fix selection sync for various operators
Add missing outliner selection sync tagging for various non-outliner
operators.
* Curve separate
* Grease Pencil separate
* Mesh separate
* Make instances real
* 3D view paste
* Sequencer paste
* Armature delete, dissolve, separate, duplicate, subdivide, extrude,
  click extrude, primitive add
* Pose Group select, delete

Resolves T71404
2020-05-01 21:13:19 -06:00
83304e4c22 Merge branch 'blender-v2.83-release' 2020-05-01 23:55:13 +02:00
7212dbd7be Fix T76062: Interpolate Radius in Curve Subdivide Special Case
Differential Revision: https://developer.blender.org/D7523
2020-05-01 16:49:36 -05:00
bba11c68c4 Fix T75995: Cycles render artifacts with overlapping volumes
This is a workaround, but a proper solution requires significant changes to
ray intersection in the kernel.
2020-05-01 23:42:42 +02:00
447a7f510e Fix T76309: changing AOV type does not update compositor socket 2020-05-01 23:10:45 +02:00
433eaffd55 Fix some LLVM symbols outside of the llvm namespace being public on Linux
This may help with T68052, crashes with Intel NEO OpenCL driver.
2020-05-01 22:59:01 +02:00
805a78e396 Cleanup: compiler warning with clang 10 2020-05-01 22:58:57 +02:00
06839379c5 Transform: Allow orientation change with custom matrix in modal 2020-05-01 17:41:06 -03:00
Nikhil Shringarpurey
51aa0ea58f Fx build error with MSBuild on Windows
Differential Revision: https://developer.blender.org/D7587
2020-05-01 22:03:26 +02:00
87602d886f Merge branch 'blender-v2.83-release' 2020-05-01 21:28:55 +02:00
Richard Antalik
98990f6ba4 Fix T76033: VSE crash with prefetch, disk cache and meta strips
`BKE_sequencer_prefetch_get_original_sequence()` didn't look in metas
and returned NULL. This caused crash in disk cache that was trying to
read seq->name.

Add function that will look in meta strips recursively and condition
that seq must not be NULL.

Reviewed By: brecht

Maniphest Tasks: T76033

Differential Revision: https://developer.blender.org/D7597
2020-05-01 21:22:04 +02:00
b52b5e15af Outliner: Fix selection extend not toggling
An unintentional side-effect of rBfe7528ee919b was that when
extend-selecting a selected element in the outliner, it would be
deselected and activated rather than selected and activated.

This commit restores the expected toggling behavior. Consistent behavior
for extend-selecting child datablocks is not resolvable without a much
larger cleanup of the outliner select functions.
2020-05-01 13:01:31 -06:00
9ca78c9bcc Fix for T76281: Engine Info Overlay Formatting
Allow render engine info to display correctly among other text overlays and scene statistics.

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

Reviewed by Brecht Van Lommel
2020-05-01 10:30:38 -07:00
eddddceb8e Merge branch 'blender-v2.83-release' 2020-05-01 19:17:29 +02:00
716638458d GPencil: Fix unreported noise using Market Chisel pen
The interpolated points recalculated the angle again and this added noise. The angle must not be calculated and must use the previous thickness.
2020-05-01 19:17:04 +02:00
57d1db27c7 Cleanup: Animation, refactored FCurve interpolation
Early returns are used to heavily reduce code indentation and clean up
some code flow.

No functional changes.
2020-05-01 17:37:28 +02:00
5b6ee80351 Cleanup: Animation, split FCurve interpolation into separate function 2020-05-01 17:37:28 +02:00
9c2c697011 Tracking: Cleanup, localize variable
Also avoid possible accumulation of floating point error.
2020-05-01 16:13:10 +02:00
b22abd112d Tracking: Cleanup, localize iterator variables 2020-05-01 16:13:10 +02:00
60741cfe18 Fix: Fix build error on windows
Headers and implementation had slightly different signatures
2020-05-01 08:06:34 -06:00
b83a8d6fc4 Cleanup: Animation, unify FCurve extrapolation
Previously there were two functions for FCurve extrapolation, one for
before the first keyframe, and the other for after the last. After the
previous cleanup made the variable names consistent, it was clear that
the code was almost identical. The biggest difference was in the sign of
many of the calculations, which was cancelled out by swapping `B-A` to
`A-B`. This showed that the computations are actually the same, and the
only remaining difference was which neighbouring handle to use in case
of Bézier curves.

No functional changes.

# Conflicts:
#	source/blender/blenkernel/intern/fcurve.c
2020-05-01 15:38:45 +02:00
f651548c2e Cleanup: Animation, refactored FCurve extrapolation
Variables have been renamed so that they refer to the endpoint and its
neighbor (rather than `bezt`, `prevbezt`, or `lastbezt`), and
unnecessary variables have been removed. By returning early the code
flow is also easier to understand.

No functional changes.
2020-05-01 15:38:45 +02:00
75370684fa Cleanup: Animation, split FCurve extrapolation into separate functions
The `fcurve_eval_keyframes` consists of three parts:
- Before the first keyframe
- After the last keyframe
- Between the keyframes

This commit splits the first two parts into separate functions. This is
the first of a series of refactors, which will be committed into smaller
parts so that each is easier to follow & validate.

No functional changes.
2020-05-01 15:38:45 +02:00
b523911e86 Windows: Support backtraces on release builds.
This diff add supports for crash logs on windows for
release builds. This can be toggled on/off with the
`WITH_WINDOWS_PDB` cmake option. by default it is on.

Things to take into consideration:

Release builds are hightly optimized and the resulting
backtraces can be wrong/misleading, take the backtrace
as a general area where the problem resides rather than
an exact location.

By default we ship a minimized symbol file that can only
resolve the function names. This was chosen to strike
a balance between growth in size of the download vs
functionality gained. If more detailed information is
required such as source file + line number information
a full pdb can be shipped by setting `WITH_WINDOWS_STRIPPED_PDB`
to off.

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

Reviewed by: brecht
2020-05-01 07:37:48 -06:00
4cc8123377 UI: Use property split layout and decorators for material properties
Use the automatic property split layout (hence, change to the new 40/60% split
ratio) and add decorator buttons for animatable properties.
This actually applies to all node input buttons in the properties, e.g. world shading,
light shading, texture nodes.

Doing this makes the layout more consistent with other layouts in the
properties. But the decorators are also a useful hint for users that these
options can be animated. Previously using decorators and the automatic split
layout wasn't possible, I've done a number of changes now to have it supported.
Before I moved the socket icons to the left side, the decorators also looked
weird (two circle icons next to each other).

{F8497704} With nested items: {F8497708}

Reviewed By: William Reynish, Pablo Vazquez

Differential Revision: https://developer.blender.org/D7544
2020-05-01 15:21:41 +02:00
2188175891 Transform: Invert shear direction aligned to view
Issue introduced in rBc57e4418bb85.
2020-05-01 10:00:13 -03:00
d49b148459 Revert "Improve proportional edit drawing"
Accident!

This reverts commit ae049a6c6a.
2020-05-01 09:35:29 -03:00
185e1d5395 Fix T76254: 'Normal' Transformation Orientation using Global
Issue introduced in rBc57e4418bb85.
2020-05-01 09:32:22 -03:00
ae049a6c6a Improve proportional edit drawing
(This is a simplified version of D4786)

The advantage of highlighting the points would be to indicate more
clearly what is affected by the proportional edit.

The default circle is not so informative and sometimes it is even off
screen so the user loses the quick identification of the influence.
(See T75482)

The disadvantage of this design is that the points could end up hiding
the mesh.

The original patch added the option `draw_proportional_gradient`, but I
prefer to avoid adding more options and more information to the
interface.

I'm not sure if the advantages outweigh the disadvantages.

{F8504097}

Reviewers: #user_interface, #modeling

Subscribers:
2020-05-01 09:32:22 -03:00
aa72e3abf9 Cleanup: moved drivers to BKE_fcurve_driver.h / fcurve_driver.c
All the driver-specific code in `fcurve.c` has been moved into a new file
`fcurve_driver.c`. The corresponding declarations have been moved from
`BKE_fcurve.h` to `BKE_fcurve_driver.h`.

All the `#include "BKE_fcurve.h"` statements have been investigated and
replaced with `BKE_fcurve_driver.h` where necessary.

No functional changes.
2020-05-01 13:08:22 +02:00
28bdf669a9 Fix: added missing buildinfo to BKE_fcurve test 2020-05-01 12:45:53 +02:00
d7d140ec7f CMake: add WITH_GHOST_X11 option
- Support building only with Wayland.
- In this case, show useful error messages
  when Wayland fails to load.
2020-05-01 20:07:01 +10:00
9a4844cfdb Tests: Animation, added unittests for FCurve evaluation
This introduces unittests for FCurve evaluation.

No functional changes to actual Blender code.

Differential Revision: https://developer.blender.org/D6778
2020-05-01 11:56:59 +02:00
d1c0d77e18 Merge branch 'blender-v2.83-release' 2020-05-01 11:47:55 +02:00
Demeter Dzadik
b2d850efc0 Cleanup: Solidify modifier: Remove unneccessary error message.
For any modifier, the expected output when the input mesh is empty, is an
empty mesh. So this error message was useless, and could spam the
console in some usecases of the modifier stack...

Reviewed By: weasel, mont29

Differential Revision: https://developer.blender.org/D7571
2020-05-01 11:41:38 +02:00
e28d2e5184 Cleanup: duplicate include, define from Wayland patch 2020-05-01 19:28:43 +10:00
7ded7610ce Cleanup: rename WITH_X11 to WITH_GHOST_X11
Matches WITH_GHOST_{SDL|WAYLAND}
2020-05-01 19:14:50 +10:00
47fea20dc8 GHOST: set the window state on wayland startup 2020-05-01 18:43:11 +10:00
d602af73d3 WM: remove X11 hard coded window size workaround
Causes issues with Wayland and is no longer required for Gnome/KDE.
2020-05-01 18:43:00 +10:00
aff5e18adb Cleanup: replace inline dot-product with dot_v4v4 2020-05-01 15:05:39 +10:00
ff1174e52c Cleanup: improve readability for color assignment 2020-05-01 15:05:25 +10:00
a6fbd4c9c8 Cleanup: pass const arguments to texture functions 2020-05-01 14:40:35 +10:00
b7117b5728 Cleanup: avoid returning a bit-flag as a float
Texture functions were returning a float which was cast back to an int
to use as a flag.
2020-05-01 14:19:04 +10:00
f7d98d3582 Cleanup: rename externtex to RE_texture_evaluate
- Pass in return arguments last.
- Pass in RGBA as a vector.
- Use boolean return argument.
2020-05-01 14:03:12 +10:00
635754a876 Cleanup: use sections for outliner sources 2020-05-01 13:27:20 +10:00
5ee1c7f695 Cleanup: spelling, comments 2020-05-01 12:36:19 +10:00
0cb53d4740 Cleanup: warnings 2020-05-01 12:34:43 +10:00
7a809a7504 Curve: Force pretesselate modifier to output a Mesh output
This is to improve the case of T71055 where curves share the same batch
cache when they shouldn't.

This however, does not help to fix edit mode display.

The real fix would be to have a similar handling to what the mesh modifiers
do and duplicate the whole Curve data. But this is too much work/change for
the 2.83 release.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7569
2020-05-01 00:07:38 +02:00
4d790516fb Curve: Force pretesselate modifier to output a Mesh output
This is to improve the case of T71055 where curves share the same batch
cache when they shouldn't.

This however, does not help to fix edit mode display.

The real fix would be to have a similar handling to what the mesh modifiers
do and duplicate the whole Curve data. But this is too much work/change for
the 2.83 release.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7569
2020-05-01 00:03:28 +02:00
03f4d20bcf Revert "Windows: Support backtraces on release builds."
Issues with older cmake.
2020-04-30 14:00:11 -06:00
Israel Medina
99cb6dbe65 VSE: Add frame interpolation option to speed effect
Do cross transition from current to next frame instead of displaying
one image for n frames.

Reviewed By: ISS, sergey, campbellbarton

Differential Revision: https://developer.blender.org/D7417
2020-04-30 21:51:22 +02:00
1d63db2044 Fix: Windows build bot script error
Partial revert of D7520
2020-04-30 13:34:11 -06:00
1960b8a361 UI: Fix animating panels after drag changing region size
The previous commit for this issue, 8e08d80e52, missed the case
where the panel animates to its aligned position when the mouse is
released.
2020-04-30 14:21:14 -05:00
713ad9d971 Fix T76276: Compiler Error C1061 due to too many nested if/else in MANTA_main.cpp
The compiler error should be fixed by removing the 'else if' blocks. However, this function should still be refactored in the future.
2020-04-30 20:54:53 +02:00
d8abef6d7c clean-up: Remove left over debug print. 2020-04-30 12:54:32 -06:00
f90a716e68 Windows: Support backtraces on release builds.
This diff add supports for crash logs on windows for
release builds. This can be toggled on/off with the
`WITH_WINDOWS_PDB` cmake option. by default it is on.

Things to take into consideration:

Release builds are hightly optimized and the resulting
backtraces can be wrong/misleading, take the backtrace
as a general area where the problem resides rather than
an exact location.

By default we ship a minimized symbol file that can only
resolve the function names. This was chosen to strike
a balance between growth in size of the download vs
functionality gained. If more detailed information is
required such as source file + line number information
a full pdb can be shipped by setting `WITH_WINDOWS_STRIPPED_PDB`
to off.

The Release in the title of this diff refers to the
release build type, not the official blender releases.

Initially this will only be enabled for nightly build
bot versions of blender, official releases as of now
will not ship with symbols.

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

Reviewed by: brecht
2020-04-30 12:41:16 -06:00
Julian Eisel
8e08d80e52 Fix dragging panels changing region size
While dragging panels, the region size would change which would feel glitchy.

See D7462 for a demo of the issue.
2020-04-30 19:20:01 +02:00
d44f323df5 Fix crash when switching subdivision level in Multires
When using multires_reshape_context_create_from_ccg to create the
context mmd is null, so the subdivision smooth mode can't be checked
there.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7579
2020-04-30 18:43:59 +02:00
38456d3e82 Cleanup: Fix compiler warning 2020-04-30 18:10:23 +02:00
31d3f034ab Fix T76097: Simulations don't take animated gravity into account
Together with 21485e94aa this commit should fix the issue with animated gravity values.
2020-04-30 18:09:05 +02:00
4612ca3ede Cleanup: simplify a bit libquery code. 2020-04-30 18:01:47 +02:00
f4b020eec3 Merge branch 'blender-v2.83-release' 2020-04-30 17:57:46 +02:00
f5237f7704 Fix long OptiX BVH build times in Cycles with many objects
Looping over all primitives for every object is really slow, so this patch avoids that by moving
the necessary assignments inline with the primitive merging done for every geometry.
2020-04-30 17:57:01 +02:00
21485e94aa Fluid: Refactored fluid gravity settings
Refactored setup that converts from Blender to Mantaflow units.
2020-04-30 17:33:22 +02:00
c4a850b7c2 Updated Mantaflow source files 2020-04-30 17:33:22 +02:00
e7e6b02ed9 Fluid: Minor cleanup and sanity checks 2020-04-30 17:33:22 +02:00
713b4c10a6 UI: Statistics Visual Changes
Improving scene statistics readability, and showing objects count while in Edit mode.

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

Reviewed by Campbell Barton
2020-04-30 08:16:33 -07:00
134619fabb Multires: Subdivide Simple and Subdivide Linear
This introduces two alternative subdivision modes that generates
displacement on the grids that look as Simple subdivisions but while
using the Catmull-Clark subdivision type in the modifier. This way,
Simple and Catmull-Clark subdivision can be combined when creating new
levels if needed, for example, to sculpt hard surface objects.

Subdivide simple smooths the sculpted data when creating a new
subdivision level. Subdivide linear also preserves the sharpness
in the sculpted data.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7415
2020-04-30 16:57:29 +02:00
f28875a998 Multires: Unsubdivide and Rebuild Subdivisions
This implements the main unsubdivide algorithm which rebuilds a base mesh and extracts the grid's data from a high resolution mesh.
It includes the Rebuild Subdivisions operator, which generates all subdivision levels down to the level 0 base mesh.

It supports:
- Rebuilding an arbitrary number of levels (Unsubdivide) or as many levels as possible down to level 0 in a single step (Rebuild Subdivisions).
- Rebuilding with already existing grids.
- Meshes with n-gons and triangles
- Meshes with more than 2 faces per edge
- Base mesh made completely out of triangles
- Meshes without poles
- Meshes with multiple disconnected elements at the same subdivision level

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7372
2020-04-30 16:49:56 +02:00
d4c547b7bd Multires: Enable sculpting in all subdivision levels
Return the correct sculpt level in BKE_multires_sculpt_level_get and
enable the property in the UI

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7575
2020-04-30 16:45:01 +02:00
6a7e9f2b76 GPencil: Add material selector to context menus
Now it's possible to select the material in context menu and new menu to select material.

The patch and workflow  has been tested in greasepencil-object branch.

* New Material selector in Draw mode Context menu:

{F8499259}

* Pressing `U`key in Draw mode display material menu.

{F8503224}

Reviewed By: mendio, pepeland

Differential Revision: https://developer.blender.org/D7554
2020-04-30 16:13:23 +02:00
dc0a564c06 Merge branch 'blender-v2.83-release' 2020-04-30 15:55:35 +02:00
9ee7fc15af Fluid: Removed domain size option from diffusion panel
Domain size parameter no longer needed (unsed right now). Domain size is directly taken from object.
2020-04-30 15:42:44 +02:00
4d63dfca4c Fluid: Reset noise emission value at the beginning of an adaptive frame
Emission values should not accumulate beyond one frame, only during the adaptive steps of one frame.
2020-04-30 15:42:44 +02:00
6121c28501 Fix T75895: Unable to Compile Cycles on NAVI/Linux
This patch will add some compiler hints to break unrolling in the
nestled for loops of the voronoi node.

Reviewed by: Brecht van Lommel

Differential Revision: https://developer.blender.org/D7574
2020-04-30 15:04:40 +02:00
7163e159c5 UI: add all operators to search menu when developer extras is enabled
This allows developers to easily access operators they're working on,
without having to add them to the interface first.
2020-04-30 21:54:50 +10:00
ea77584d36 Fix orientation change in Redo
Some transform redo operations require contraint to be enabled.
Issue introduced in rBc57e4418bb85.
2020-04-30 08:52:38 -03:00
41b45d9159 Fix T76260: Inverted rotation in non-3d views
Issue introduced in rBc57e4418bb85.
2020-04-30 08:38:18 -03:00
ae98a033c8 Outliner: Add new delete operator
In the industry standard keymap, both deleting objects and collections
were mapped to the same keys causing confusion when only collections
could be deleted through the keymap.

This adds a new delete operator to delete all selected objects and
collections, accessible from both the keymap and context menu. Now any
selected objects and collections are deleted when Delete is chosen from
the keymap. This also updates the tooltip description which was
previously undocumented.

Resolves T67462
2020-04-30 19:53:36 +10:00
79269e4237 Merge branch 'blender-v2.83-release' 2020-04-30 10:48:09 +02:00
36bf067ddc Fix T76236: GPencil drrawing resetting posed positions with armature after layer renaming
The datablock was not tagged for updating.
2020-04-30 10:47:39 +02:00
7f4c4011ce Cleanup: replace unordered_map with switch statement
Was performing 2x look-ups, checking keys doesn't benefit noticeably
from hash look-ups.
2020-04-30 17:56:51 +10:00
328da12598 Merge branch 'blender-v2.83-release' 2020-04-30 09:55:31 +02:00
2b094be949 Fix T75985: Texture paint brush gradients results in wrong color
A Colorband's CBData color **is not** considered `PROP_COLOR_GAMMA`.
A Brushes color **is** considered `PROP_COLOR_GAMMA`.
(PROP_COLOR_GAMMA is used for colors which would be color managed before
display, could be renamed to something better once...)

This leads to different rgb values in ColorBand.CBData of br->gradient
and brush->rgb for seemingly identical colors. (this is because color
pickers do differently in case block->is_color_gamma_picker/
ui_but_is_color_gamma)

Now it looks like `paint_brush_color_get` is expected to return a color
in sRGB (according to @jbakker this is for legacy reasons) so we need to
run the colorband colors through linear -> sRGB.

It might very well be the case that a much deeper cleanup in this area
is needed, this is just a fix to get gradient brush colors
consistent again...

Maniphest Tasks: T75985

Differential Revision: https://developer.blender.org/D7501
2020-04-30 09:54:09 +02:00
02c77e4e5c Fix animation player checkerboard drawing with alpha channels
Was using uninitialized theme values.
2020-04-30 17:45:02 +10:00
070bf01d37 GHOST: fix WITH_GHOST_DEBUG option
Changing the order of include changes broke GHOST_DEBUG,
however it was using defines in a fragile way.

Fix by removing 'GHOST_DEBUG' and use 'WITH_GHOST_DEBUG' which
was already defined by CMake.
2020-04-30 17:28:28 +10:00
52186a39af Cleanup: printf warning 2020-04-30 17:28:28 +10:00
e1d4c3bc36 Cleanup: clang-format 2020-04-30 17:28:28 +10:00
040e98dfc9 Cleanup: unused variable warnings 2020-04-30 17:28:28 +10:00
d8a3f3595a Task: Use TBB as Task Scheduler
This patch enables TBB as the default task scheduler. TBB stands for Threading Building Blocks and is developed by Intel. The library contains several threading patters. This patch maps blenders BLI_task_* function to their counterpart. After this patch we can add more patterns. A promising one is TBB:graph that can be used for depsgraph, draw manager and compositor.

Performance changes depends on the actual hardware. It was tested on different hardwares from laptops to workstations and we didn't detected any downgrade of the performance.
* Linux Xeon E5-2699 v4 got FPS boost from 12 to 17 using Spring's 04_010_A.anim.blend.
* AMD Ryzen Threadripper 2990WX 32-Core Animation playback goes from 9.5-10.5 FPS to 13.0-14.0 FPS on Agent 327 , 10_03_B.anim.blend.

Reviewed By: brecht, sergey

Differential Revision: https://developer.blender.org/D7475
2020-04-30 08:09:21 +02:00
a18ad3c3b6 CMake: use system include for generated headers 2020-04-30 16:01:41 +10:00
66e70fe299 GHOST: initial Wayland support
Usable with the CMake option 'WITH_GHOST_WAYLAND'

The following functionality is working:

- Building with X11 and Wayland at the same time,
  wayland is used when available.
- Keyboard, pointer handling.
- Cursor handling.
- Dedicated off-screen windows.
- Drag & drop.
- Copy & paste.
- Pointer grabbing.

See D6567 for further details.
2020-04-30 14:21:50 +10:00
00e0034b13 Merge branch 'blender-v2.83-release' 2020-04-29 21:38:18 +02:00
cd833d8879 Readfile: debug check all IDs are properly linked at the end.
Should prevent issue fixed by previous commit to happen again (since
read code, especially in undo case, is not really straight forward to
follow anymore).
2020-04-29 21:35:13 +02:00
d07dab0d61 Fix T76225: Cycles View layer filters are grayed out while still working
Mistake in rB7fc60bff14a6.

Maniphest Tasks: T76225

Differential Revision: https://developer.blender.org/D7566
2020-04-29 19:25:17 +02:00
a54c1f1e77 Fix T76155: 'Object lost data' on copy-pasting with new undo code. 2020-04-29 18:11:33 +02:00
7f5367eaae Windows: Fix RelWithDebInfo missing symbol information
issue introduced in rB55a2682348df94d0ff2f57d786b7a557312d0345
2020-04-29 09:17:34 -06:00
080732ae5c Fix crash with Orbit Around Selection
Missing check of `NULL` `op` introduced in rBc57e4418bb85.
2020-04-29 12:12:28 -03:00
b7bcd0a87c Tracking: Implement Nuke/Natron distortion model
Neither Nuke nor Natron support OpenCV's radial distortion model
which makes it impossible to have any kind of interoperability.

The new model is available under the distortion model menu in Lens
settings.

Differential Revision: https://developer.blender.org/D7484
2020-04-29 16:39:30 +02:00
0ddf5860f5 Fix Python bz2 module failing to import on older macOS versions
Found by failing bundled modules test. The bz2 library was compiled without
proper minimum SDK version flags.
2020-04-29 16:25:46 +02:00
6c4ef6159c Fix T71334: top part of render window disappears on repeated renders 2020-04-29 14:56:17 +02:00
0cfd2d6f4b VR: Reset pose offsets when changing base pose
The offsets are applied after toggling positional tracking off, so that
the view does not jump at that moment. But when changing the base pose,
keeping that offset doesn't make sense. Especially with landmarks, which
are supposed to give precise positions/rotations to jump to. For that
part the VR Scene Inspection Add-on will need a little adjustment
though.

Also exposes an explicit function to the Python API to reset the
offsets, to be used by the Add-on.

This is mostly untested since I don't have access to an HMD currently.
2020-04-29 13:53:25 +02:00
c57e4418bb Transform Orientation Refactor
- Use `t->spacemtx` as the orientation matrix instead `t->orient_matrix`.
- Unify constraint behavior between modal and non-modal.
- Simplify code to remove old workarounds and rearrange struct members.

This fix T66142 since the actual `orient_type` (in the case
`V3D_ORIENT_NORMAL`) is used during Redo instead of always using
`V3D_ORIENT_CUSTOM_MATRIX`).

Differential Revision: https://developer.blender.org/D7469
2020-04-29 08:07:25 -03:00
980cebc459 Merge branch 'blender-v2.83-release' 2020-04-29 11:44:56 +02:00
157f836493 Depsgraph: use native BLI data structures in registry
Reviewers: sergey

Differential Revision: https://developer.blender.org/D7559
2020-04-29 11:37:19 +02:00
2845b232a7 Fix T75522: Math node truncate operator tooltip provides no explanation 2020-04-29 11:36:20 +02:00
657188c1a2 Merge branch 'blender-v2.83-release' 2020-04-29 11:25:08 +02:00
08048f7cce Fix T75810: Child bone frozen when both Auto IK and X-Axis mirror are
used

Caused by {rBa6a9a12e8f32}

Other relevant commits:
rBb8ca806b7798e2f8dd6effca8f0d081b3cd8c23f
rBde530a95dc7b482dc22c933b9b8b2a98c79b5663

The issue is caused by some leftover BONE_TRANSFORM_MIRROR flags on a
bone from previous runs (file in the report had the flag still on
forearm.R).

With these false leftover flags still set, `pose_grab_with_ik()` cannot
work correctly. Culprit commit above removed the early clearing of this
flag on all bones, this should be restored [this happened in
`count_set_pose_transflags()`].

This should only be done in the beginning of the transform process, so
now still clear the flags early in 'createTransPose()' [but dont restore
this in 'count_set_pose_transflags()' -- this will be called from
special_aftertrans_update again, so placing the clearance here only
complicates things (autokeyframe_pose() still needs to work as well)...]

Maniphest Tasks: T75810

Differential Revision: https://developer.blender.org/D7527
2020-04-29 11:18:38 +02:00
fed5e0ca04 Merge branch 'blender-v2.83-release' 2020-04-29 11:10:24 +02:00
e07b245fe1 Armature posemode: 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 rB536055e1ee0b.

This patch adds an operator independent from mouse position that just
selects all bones in relation to selected bones (and adds back menu
entries, adds keymap entry CTRL+L).

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)

ref T76071

Maniphest Tasks: T76071

Differential Revision: https://developer.blender.org/D7542
2020-04-29 11:06:41 +02:00
cedf9f5cb7 Fix/cleanup: lib_query: missing case handling of new ID_SIM type.
Also update comments.
2020-04-29 11:05:45 +02:00
9a9ecad65f Merge branch 'blender-v2.83-release'
Conflicts:
	source/blender/blenkernel/intern/lib_query.c
2020-04-29 10:57:47 +02:00
afeddd42e6 Cleanup: use LISTBASE_FOREACH iterator everywhere possible in libquery.
Done also in 2.83 release branch to avoid too much conflicts on merging
(some of those were already done for nodes in master, and gave me
conflicts yesterday...).
2020-04-29 10:53:34 +02:00
3af52c6ec3 Merge branch 'blender-v2.83-release' 2020-04-29 10:27:42 +02:00
839fe335d2 Fix crash after 475bd6b occuring on each render end, we need another nullcheck here
(cherry picked from commit 3ea67e08fe)
2020-04-29 10:26:32 +02:00
1e58255c40 Merge branch 'blender-v2.83-release' 2020-04-29 10:16:42 +02:00
Anthony Edlin
b3ac6d1348 nstall_deps: USD: Add root usd library directory to build args.
Add root usd library directory to build arguments, same as other libraries.
Also fix error/typo in compile_USD regarding _is_building.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D7563
2020-04-29 10:15:55 +02:00
770605312f Merge branch 'blender-v2.83-release' 2020-04-29 10:14:55 +02:00
601a1a3fda Fix T76185: GPencil from Curve ignores Cyclic when curve has only 2 points
Also changed default thickness to 10 because after draw engine refactor the final line was too thin.
2020-04-29 10:14:20 +02:00
21ef8c4d44 Cleanup: use const args for depsgraph functions 2020-04-29 12:36:33 +10:00
af835ee6f8 Cleanup: use doxy sections for multires & subdiv sources 2020-04-29 12:21:12 +10:00
3ea67e08fe Fix crash after 475bd6b occuring on each render end, we need another nullcheck here 2020-04-28 23:49:52 +02:00
cec9dbc997 Merge branch 'blender-v2.83-release' 2020-04-28 22:42:15 +02:00
05274ca829 Fix T75432: Cycles progressive refine render slow with denoising data
Only perform denoising prefilter for the last sample, not every sample.
2020-04-28 22:40:44 +02:00
d66aa52528 Cleanup: Use more descriptive names for functions
count_set_pose_transflags --> transform_convert_pose_transflags_update
count_bone_select --> armature_bone_transflags_update_recursive

Also don't mix `BONE_TRANSFORM_MIRROR` with `BONE_TRANSFORM` in
transflag. (This was a mess introduced in rBde530a95dc7b).
2020-04-28 17:32:05 -03:00
b443e1b7d4 UI: Improve DataTransfer Modifier Error Message
Differential Revision: https://developer.blender.org/D7546
2020-04-28 15:15:36 -05:00
4d06c1c25b BLI: add VectorSet.is_empty method 2020-04-28 19:18:12 +02:00
44ac789a3a GPencil: Remove redundant UVs text
It's clear you change the UVs
2020-04-28 18:42:26 +02:00
cdd980cd56 GPencil: Rename modifier Texture to Texture Mapping 2020-04-28 18:40:18 +02:00
d366658d2d GPencil: Remove redundant Control word from UI 2020-04-28 18:35:49 +02:00
c1e6865ee3 Cleanup: remove unnecessary includes 2020-04-28 18:08:00 +02:00
67bd6bbcdd Depsgraph: use BLI::Vector for Relations
Reviewers: sergey

Differential Revision: https://developer.blender.org/D7556
2020-04-28 17:53:09 +02:00
05283f8c96 Depsgraph: Use BLI::Map for constraint_to_pchan_map_
Reviewers: sergey

Differential Revision: https://developer.blender.org/D7553
2020-04-28 17:44:36 +02:00
7dfa1b18c1 Depsgraph: use BLI::Set for entry_tags
Reviewers: sergey

Differential Revision: https://developer.blender.org/D7555
2020-04-28 17:40:23 +02:00
7bc4a436a0 Merge branch 'blender-v2.83-release' 2020-04-28 17:18:01 +02:00
475bd6b829 Fix T76179: Unable to select render passes when a render has fewer
passes than one in another slot

If a particular pass is not available in a slot we are switching to,
still show the menu, but with a blank name for the currently selected
item so that the user can change it to a valid value.

thx @brecht for providing the standard way Blender deals with these
kinds of situations.

Maniphest Tasks: T76179

Differential Revision: https://developer.blender.org/D7552
2020-04-28 17:06:53 +02:00
a72eed7dd5 BLI: rename Vector.empty to Vector.is_empty 2020-04-28 17:04:07 +02:00
c05ef1459c BLI: add Set.clear method 2020-04-28 16:41:37 +02:00
d575b72c16 BLI: add Set.is_empty method 2020-04-28 16:35:49 +02:00
69e8de434f Depsgraph: use BLI::Map in RootPChanMap
Reviewers: sergey, sybren

Differential Revision: https://developer.blender.org/D7521
2020-04-28 15:56:53 +02:00
6278b48ea1 Merge branch 'blender-v2.83-release'
Conflicts:
	source/blender/blenkernel/intern/lib_query.c
	source/blender/depsgraph/intern/builder/deg_builder_relations.cc
2020-04-28 15:40:12 +02:00
37e08e526c Depsgraph: Add IDProperties handling.
Fix T75279: BLI_assert failed when deleting object in debug build
(only).

And all general cases of ID pointer idproperties that would use a
data-block not referenced anywhere else in the depsgraph.

This includes idproperties from:
* All ID types;
* Bones and pose bones;
* Sequences;
* Nodes and sockets.

Differential Revision: https://developer.blender.org/D7551
2020-04-28 15:31:08 +02:00
9f090bac5c IDProperties: add a foreach looper and use it in libquery code.
Note: part of fix for T75279.

Differential Revision: https://developer.blender.org/D7550
2020-04-28 15:25:19 +02:00
1c7317a6da BLI: add library to simplify writing dot graph exporters
See D6799 for some examples on how to use the library.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D6799
2020-04-28 14:05:24 +02:00
9c65ac7311 BLI: add Map.lookup_or_add_default method 2020-04-28 13:55:36 +02:00
7d85b6431f Fix T76044: update Cycles to build with OSL 1.11 master 2020-04-28 13:50:31 +02:00
2c60221080 Cleanup: Missing include directories after recent cleanup 2020-04-28 13:33:18 +02:00
20100009f6 Fix armature roll test failing on macOS 2020-04-28 13:31:59 +02:00
7d1bb2edfd Cleanup: Strict compiler warning in release mode 2020-04-28 13:31:01 +02:00
8da80e7771 Merge branch 'blender-v2.83-release' 2020-04-28 13:02:06 +02:00
2db4a5bb9f Cleanup: remove unused string module
This is legacy code that can simply be replaced by std::string.
2020-04-28 12:57:39 +02:00
2580fa1602 Cleanup: remove STR_String usage from GHOST 2020-04-28 12:57:39 +02:00
6cab53eaaa Tests: fix some tests passing even if there are Python errors
Blender was not configured to exit with non-zero return code on Python errors.
A bunch of tests worked around this but not all. This removes the need for such
workarounds.
2020-04-28 12:50:16 +02:00
b21a3e7702 Depsgraph: Use BLI::Map in more places
Reviewers: sergey

Differential Revision: https://developer.blender.org/D7519
2020-04-28 12:49:52 +02:00
a7bd835644 Fix Python bundled module test error
We don't bundle cffi, rather the ffi library is used for ctypes. This test is
currently passing even when there are errors, that will be fixed next.
2020-04-28 12:48:29 +02:00
Himanshi Kalra
b9f422c4be Tests: add physics tests cloth and softybody
This uses the same framework as automated modifier tests. It adds a physics
modifier, bakes and compares vertex coordinates on the end frame.

Differential Revision: https://developer.blender.org/D7017
2020-04-28 12:29:46 +02:00
18e9626e41 Strengthen modifiers test validation, from D7397.
Submitting on behalf of Jesse Y (deadpin).
In test harness for modifier testing, now run mesh validation
on output mesh. Also, fix printing so it interleaves properly.
2020-04-28 12:27:33 +02:00
4adc68bdf8 Fix T75973: don't show raw Python errors to users for invalid shortcut paths
There are cases when a user can accidentally assign an operator to toggle an
invalid property to e.g. left click, which shows Python errors to the users.
Rather than throw an error and e.g. break 3D viewport selection for the user,
just print an error to the console.

The root cause of such bugs should be fixed as well, but a working Blender
is most important here.
2020-04-28 12:27:33 +02:00
9c2715ffda BLI: add Map.is_empty() method 2020-04-28 11:44:10 +02:00
7acc8a5a92 Depsgraph: Use BLI::Map for RNANodeQuery.id_data_map_
Reviewers: sergey

Differential Revision: https://developer.blender.org/D7512
2020-04-28 11:39:49 +02:00
0372121e17 UI: Title case for 'Prefetch Frames' in VSE 2020-04-28 11:27:05 +02:00
a66162e1f6 Cleanup: trailing whitespace 2020-04-28 11:11:35 +02:00
3afa2e94ba Merge branch 'blender-v2.83-release' 2020-04-28 18:38:15 +10:00
90f01d5048 Fix select linked in pose mode
Only one of child bones would be selected when the bone under the
cursor had multiple children.
2020-04-28 18:35:52 +10:00
c7144d780d Merge branch 'blender-v2.83-release' 2020-04-28 16:17:12 +10:00
64e242244d Fix T75993: Mark Seam from UV editor operates on unselected faces 2020-04-28 16:14:09 +10:00
4f639b893b Merge branch 'blender-v2.83-release' 2020-04-28 15:48:44 +10:00
612757b524 Fix T76098: Dragging text selection with offset resets select start 2020-04-28 15:47:09 +10:00
a8d684d87f Merge branch 'blender-v2.83-release' 2020-04-28 13:49:25 +10:00
ef1187387b Fix T76152: Shortcut underline under wrong letter
Use glyph bounds to calculate a better underline position.
2020-04-28 13:48:15 +10:00
e78470d954 BLF: add utility function to loop over glyph bounds 2020-04-28 13:34:56 +10:00
33017e9529 Cleanup: unused variable 2020-04-28 13:05:18 +10:00
fd0cb58122 Merge branch 'blender-v2.83-release' 2020-04-27 21:15:11 +02:00
133bf05b18 Fix T75736 Viewport update problem when switching between view layers
The problem comes from the fact by no data being modified when switching
viewlayers.

To follow what the external render engines do, we completely reset the
viewport by freeing the GPUViewport to avoid any cached data from being
kept.
2020-04-27 21:14:10 +02:00
84e40ee846 Fix T75910 Overlay: Face Orientation not working for "In Front" objects 2020-04-27 21:14:10 +02:00
6830307b94 Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-04-27 13:05:22 -06:00
ad01bab6c3 cleanup: Remove unused variable 2020-04-27 13:04:44 -06:00
15081cf6df Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-04-27 13:01:24 -06:00
7951ec2641 Cleanup: Fix warning about initialization order with MSVC 2020-04-27 13:00:53 -06:00
ea75701529 Merge branch 'blender-v2.83-release' 2020-04-27 20:06:10 +02:00
a1b1f2acd4 Workbench: Fix weight paint overlay and wireframe for infront object
This fix case where you have wireframe on top of infront objects but
workbench AA conflicts and they appear to not be occluded.

Also T74923 is still fixed but we extend the fix to not mess the case when
using a mode that does not support infront.
2020-04-27 20:05:42 +02:00
94c514cf34 Merge branch 'blender-v2.83-release' 2020-04-27 18:32:32 +02:00
yves
af876b12f1 Fix T75519: Graph editor tooltips give false impression of the toggle state
It is just a quick fix for the tooltips in the graph editor, it replaces:
-  "F-curve modifiers are disabled" with "Enable F-Curve modifiers"
-  "F-curve is visible in graph editor for editing" with "F-Curve visibility in Graph Editor".

Reviewed By: billreynish

Maniphest Tasks: T75519

Differential Revision: https://developer.blender.org/D7387
2020-04-27 18:27:48 +02:00
5f3990d69a Merge branch 'blender-v2.83-release' 2020-04-27 18:15:47 +02:00
fbae4c5ba3 Fix T74700: "Convert Text to Curve" disregards "Text on Curve"
There was an assert here as well since using the original object to read
from was having an empty runtime curve cache.

Now use BKE_vfont_to_curve_ex instead of BKE_vfont_to_curve, so we can
read from the evaluated object and write to the original curves in order
to have the modified data taken into account on next object evaluation.
(BKE_vfont_to_curve would read and write to/from the same object)

Final solution provided by @sergey in that report, thx!
2020-04-27 18:04:19 +02:00
0a7dd1ec49 Merge branch 'blender-v2.83-release' 2020-04-27 12:09:17 -03:00
a4df7f78a8 Fix T75398: Redo with Shift R always uses the previous pivot center
Overwriting the pivot center was an attempt to fix T71455.
The solution now is to save the direction in the "mirror" property.
2020-04-27 12:07:29 -03:00
61f0941321 Cleanup: Use common utility to get direction for TIME_EXTEND 2020-04-27 12:07:29 -03:00
b0f207db15 UI: (Internal) utility for more controllable property split layout
Adds a wrapper-struct to create and return the three layouts required
for the propery split layout (i.e. `UILayout.use_property_split`). This
gives more flexibility for special treatment.
E.g. needed for adding the arrow icon buttons when there is a hierarchy
of nodes to be represented in the material properties (needs inserting
in the text column to not offset the split layout).

This commit also makes use of the utility for
`uiItemL_respect_property_split()`.
2020-04-27 17:01:40 +02:00
5559edf3c7 Merge branch 'blender-v2.83-release' 2020-04-27 16:57:58 +02:00
995611640e Cleanup: clang format
missed in rB4fd005fefb01.
2020-04-27 16:55:59 +02:00
4119e9c60b Merge branch 'blender-v2.83-release' 2020-04-27 16:46:17 +02:00
4fd005fefb Fix T76131: Crash combing Hair using Python
Caused by rBe82827bf6ed5.

DRW_draw_depth_object calls DRW_mesh_batch_cache_create_requested with
NULL scene, but that is accessed later on...

Scene is actually available, so pass that around.

Maniphest Tasks: T76131

Differential Revision: https://developer.blender.org/D7540
2020-04-27 16:40:45 +02:00
6842958c9b UI: Add (internal) option to use property splitting for label-less items
Usually items without labels don't use the property split layout and
just use the full layout width. In some cases that is not wanted because
it looks odd if single items within the split layout use the full width.
The option is unused but would be needed for adding decorators to the
material properties.
2020-04-27 16:38:27 +02:00
b6592c83b5 Merge branch 'blender-v2.83-release' 2020-04-27 16:26:59 +02:00
8f289196cf Fix T76111: UV editor's View Selected not working in multiobject editing
Seems like this was left out when UV operators were converted to multi-
object-editing, ref T54645.

Maniphest Tasks: T76111, T54645

Differential Revision: https://developer.blender.org/D7537
2020-04-27 16:18:09 +02:00
7c782b8f27 Merge branch 'blender-v2.83-release' 2020-04-27 16:13:44 +02:00
536055e1ee remove "Select Linked" from the posemode select 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 D7542 for this)

Note: We had the same thing for particles recently:
rBdd9dfadaac9b: remove "Select Linked" from the particle select and
context menu
rB5ca7c85e105d: Particle editmode: add mouse independent "Select Linked"
operator

Fixes T76071

Maniphest Tasks: T76071

Differential Revision: https://developer.blender.org/D7543
2020-04-27 16:10:31 +02:00
3d7ac7feba Merge branch 'blender-v2.83-release' 2020-04-27 23:24:49 +10:00
b1037aa88f Fix T76148: Grid fill crashes with multiple connected loops 2020-04-27 23:22:58 +10:00
3c858246cd UI: Support array properties for UILayout.prop_decorator()
Previously `UILayout.prop_decorator()` (or `uiItemDecoratorR()` in C)
only worked for single items, not for arrays. The decorators are added
vertically, like `UILayout.prop()` adds them.
This will be needed for adding decorators to material properties, but
will likely have other use-cases as well.

Also, `None` (or `NULL`) can be passed for the data-pointer and property
now to create blank decorators (as already possible for
`uiItemDecoratorR_prop` in C).
2020-04-27 14:57:29 +02:00
f346fd3212 Merge branch 'blender-v2.83-release' 2020-04-27 10:49:56 +02:00
7300e8a9fe GPencil: Change defaults for Gradient materials
The old values did not display a valid gradient by default.
2020-04-27 10:49:33 +02:00
fc1ea38c63 Merge branch 'blender-v2.83-release' 2020-04-27 16:50:24 +10:00
Robert Guetzkow
bb1e794d58 Fix T72476: Crash when drag & drop Color in the Image Editor 2020-04-27 16:44:47 +10:00
Christian Rauch
0da05720de GPU: add assert for immBegin buffer size & context 2020-04-27 15:27:53 +10:00
Christian Rauch
54eb701978 Cleanup: add newline to ghost warning print 2020-04-27 15:27:18 +10:00
490c32c425 CMake: add WITH_LINKER_LLD option for unix platforms
Can give considerably faster linking, especially for debug builds.

This may be enabled by default but needs to be more thoroughly tested.
2020-04-27 14:14:00 +10:00
13abd3784a Merge branch 'blender-v2.83-release' 2020-04-27 00:57:17 +02:00
d0d16eb7d3 Fix T74346 VSE: Prefetching doesn't work properly with property animations
Make sure depsgraph was updated before evaluating the animation.

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D7467
2020-04-27 00:51:44 +02:00
Peter Fog
8a94903c09 VSE: Remove decorate from Expand and Mute in Modifiers
Remove decorate from Expand and Mute in VSE Modifiers,
since these elements aren't using decorate elsewhere.

Reviewed By: billreynish

Differential Revision: https://developer.blender.org/D7420
2020-04-27 00:14:04 +02:00
0edf3f5680 Merge branch 'blender-v2.83-release' 2020-04-27 00:06:00 +02:00
c13ad410a6 Fix T74603: Tweaking offsets causes strips to "reverse"
Add range function to RNA properties.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7285
2020-04-27 00:04:23 +02:00
576ecbd694 Merge branch 'blender-v2.83-release' 2020-04-26 23:44:12 +02:00
dea1c1b9eb Fix T75495: Blender crashes opening a VSE .blend file
During scene copy modifier mask strips are relinked to point to strips in
new scene. If strip used as mask is in different seqbase, this can fail,
if seqbase is not copied yet.

Add SEQ_DUPE_IS_RECURSIVE_CALL flag to avoid relinking modifiers during recursive call.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7412
2020-04-26 23:40:18 +02:00
a2de3d86de Fix utterly wrong decorator button logic
This was in fact completely messed up, but it worked by accident for all
current cases. That is, we always inserted the decorator buttons
immediately after the button they applied to. So the first button
comparision in ui_but_anim_decorate_find_attached_button() would
succeed, because it just compared a few values that all happened to be
NULL and thus the comparison returned true.

Further, avoid NULL-pointer dereferences and incorrect printing.
2020-04-26 17:39:12 +02:00
066b0248df Merge branch 'blender-v2.83-release' 2020-04-26 12:26:26 +02:00
05b94c9c54 GPU: Add better support for texture copy fallback
Depth texture copy using glCopyTexSubImage2D is undefined behavior since
you cannot bind GL_DEPTH_ATTACHMENT to glReadBuffer.

Using glBlitFramebuffer as a fallback.
2020-04-26 12:25:52 +02:00
8d8414cd21 Merge branch 'blender-v2.83-release' 2020-04-25 19:42:52 +02:00
f418eddf8e GPencil: Fix unreported small offset when use Stroke mode
When using the Stroke mode, the reprojection function add a small offset of 0.5 to +X and +Y. Now this effect is removed subtracting this value before doing the conversion.
2020-04-25 19:40:12 +02:00
e54a206e15 GPencil: Fix unreported jagged lines when using Stroke mode
When use the Stroke reproject mode, the precission of the conversion makes the line produce a very small noise effect.

Now, if the stroke mode is enabled, a small smooth is done using a factor depending of the input samples.

The values of the smooth effect were provided by @pepeland after several testing.
2020-04-25 19:37:06 +02:00
78887318e2 Merge branch 'blender-v2.83-release' 2020-04-25 10:41:44 +02:00
53106934f9 Fix T76078: GPencil: frames interpolation erase strokes
In some situations the stroke could be tagged and this tag was used to delete the interpolated strokes.

Now, the frames used as interpolated range are untagged before creating the interpolated strokes.
2020-04-25 10:40:09 +02:00
2b95f2439e Merge branch 'blender-v2.83-release' 2020-04-24 20:53:34 -06:00
4ab85a3380 Cleanup: Select sync from outliner
Move the condition to check if selection syncing is enabled to inside
the syncing function rather than before each time it is called.
2020-04-24 20:22:46 -06:00
5d14463e1a Fix: Selection syncing for outliner operators
A few outliner operators that modify selection were not tagging for a
selection sync which led to selection inconsistencies. This adds syncing
for the following operators:
* Duplicating and deleting collections
* Selecting/deselecting collection contents
* Drag and drop
* Object select, deselect, delete, and delete hierarchy
2020-04-24 20:18:39 -06:00
c5f4d5e448 BLI: add LinearAllocator
This allocator is useful when it is necessary to allocate many small elements.
2020-04-24 23:52:55 +02:00
1f2b1d520f BLI: improve StringRef.copy 2020-04-24 23:35:17 +02:00
ebe0d7ca5e BLI: add DefaultHash specializations for StringRef and StringRefNull 2020-04-24 23:14:33 +02:00
62f6255b47 BLI: Implement StringMap.add and StringMap.add_or_modify 2020-04-24 22:33:48 +02:00
fd10ac9aca UI: Move Scene Statistics to the 3D Viewport
Removes statistics from footer and to an (optional) overlay in 3DView.

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

Reviewed by Campbell Barton
2020-04-24 11:05:40 -07:00
a8441fc900 Fix T69753 Instanced Metaballs not rendering but showing up in Viewport
This hides the original metaballs when they are used in
duplifaces/-verts instancing, and still shows the instanced metaballs.

The visibility of the original metaballs is now determined by the
visibility of the instancer. I'm not too thrilled about this, but at
least it gives users the ability to show/hide the metaballs for
viewport/render.

Differential Revision: https://developer.blender.org/D7478
2020-04-24 17:23:44 +02:00
be5c9d45bd Tests: use explicit Python to run unit tests
CentOS on the buildbot still runs Python 3.6, which is also used for the
unit tests. This means that the tests can't use language features that
are available to Blender itself. And testing with a different version of
Python than will be used by the actual code seems like a bad idea to me.

This commit adds `TEST_PYTHON_EXECUTABLE` as advanced CMake option. This
will allow us to set a specific Python executable when we need it. When
not set, a platform-specific default will be used:

- On Windows, the `python….exe` from the installation directory. This is
  just like before this patch, except that this patch adds the
  overridability.
- On macOS/Linux, the `${PYTHON_EXECUTABLE}` as found by CMake.

Every platform should now have a value (configured by the user or
detected by CMake) for `TEST_PYTHON_EXE`, so there is no need to allow
running without. This also removes the need to have some Python files
marked as executable.

If `TEST_PYTHON_EXE` is not user-configured, and thus the above default
is used, a status message is logged by CMake. I've seen this a lot in
other projects, and I like that it shows which values are auto-detected.
However, it's not common in Blender, so if we want we can either remove
it now, or remove it after the buildbot has been set up correctly.

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

Reviewed by: campbellbarton, mont29, sergey
2020-04-24 17:10:22 +02:00
be00902082 Defaults: Change default axes for Track To constraint
The main use-case for the Track To constraint is camera tracking, so
this sets up a better default for this. That is, track to -Z with Y up.

Agreed on internally with Pablo Vazquez and William Reynish. Should
there be a reason to revert this, that would be fine compatibility-wise.
2020-04-24 16:17:47 +02:00
246d59ff0f Defaults: Reduce near-clipping in factory settings
For newly opened 3D Views, the default would actually be 0.01m. But the
code to update the default for all existing 3D Views in the
startup.blend was missing. So the defaults were out-of-sync.

0.01m is the more reasonable default as agreed on by the UI team.
2020-04-24 16:17:47 +02:00
47ae0affc8 Depsgraph: Use BLI::Map instead of GHash for operations_map
Reviewers: sergey

Differential Revision: https://developer.blender.org/D7509
2020-04-24 11:34:04 +02:00
69b6c89842 Depsgraph: Use BLI::Set instead of std::unordered_set
Reviewers: sergey

Differential Revision: https://developer.blender.org/D7506
2020-04-24 10:48:25 +02:00
ed32afd962 Merge branch 'blender-v2.83-release' 2020-04-24 10:40:42 +02:00
4542b50afc T75631: New multires shrinkage problem
The old Subdivide button was behaving as if subdivision modifier was
applied on top of the multires. This was the source of shrinkage since
the behavior of the limit surface: limit surface of a sparse point
from another limit surface makes final result appear smaller.

The new behavior is based on propagating delta against base mesh's
limit surface to the top level. Effectively, this is as if we've
sculpted on old top level and then propagated to the new top level.

Differential Revision: https://developer.blender.org/D7505
2020-04-24 10:29:26 +02:00
0de591ac39 Merge branch 'blender-v2.83-release' 2020-04-24 18:14:18 +10:00
1625b7c37c Fix T75749: UI button text selecting is broken by text offset 2020-04-24 18:13:43 +10:00
c2bf0c1d54 Merge branch 'blender-v2.83-release' 2020-04-24 17:41:34 +10:00
e8d3996e67 Fix edit-mesh selection mode switching causing two undo pushes 2020-04-24 17:39:11 +10:00
b0b6fb8a93 Fix edit-mesh moving from edge to face mode with Ctrl held
Faces could be selected without any of their edges or vertices selected.
2020-04-24 17:28:46 +10:00
a8e89db291 Merge branch 'blender-v2.83-release' 2020-04-24 17:07:23 +10:00
9b56b2b2b9 UI: add mesh skin-resize to menu
Resolves T75925
2020-04-24 17:06:55 +10:00
d4ffd1d91f Cleanup: declare values for enum types
Avoids accidents when adding/removing items from an enum.
2020-04-24 15:52:01 +10:00
c1e4b369b0 Merge branch 'blender-v2.83-release' 2020-04-24 13:28:11 +10:00
001629a362 Fix T75946: Intersect (knife) doesn't cut all intersections 2020-04-24 13:26:17 +10:00
d2aa4ada50 Merge branch 'blender-v2.83-release' 2020-04-24 12:27:12 +10:00
d428cca124 Fix T63787: Knife intersect crashes 2020-04-24 12:18:29 +10:00
9667f89e82 Cleanup: correct printf warnings for bmesh interesect debugging 2020-04-24 11:47:41 +10:00
af0a042da7 Cleanup: remove unused arg, clang-format 2020-04-24 11:43:30 +10:00
826f6dd9ee Merge branch 'blender-v2.83-release' 2020-04-23 23:08:20 +02:00
d712f1f83a GPU: Add Polyline shader (wide line emulation)
This new shader is able to emulate smooth wide lines drawing using a
geometry shader.

This shader needs viewportSize and lineWidth uniforms to be set.

There is multiple variants to replace the usage of wide lines for most
shaders.

This patch only fix the gizmo_types files and the navigation gizmo.
Other areas could be fixed afterward, I just limited the patch size.

Fix T57570.

Reviewed By: billreynish

Differential Revision: https://developer.blender.org/D7487
2020-04-23 23:07:48 +02:00
d0ff3434cf Fix T73741 Grid Floor render on top of Wireframe objects
Go for a bias towards background to avoid loosing wireframe objects.
2020-04-23 22:21:22 +02:00
54e1b63567 Fix T74173 Assert when scaling camera in viewport to zero 2020-04-23 21:50:32 +02:00
ed4f33a7bd Cleanup: silence unused parameter warning 2020-04-23 20:49:42 +02:00
8f5a4a4da3 BLI: various data structure improvements
* Rename template parameter N to InlineBufferCapacity
* Expose InlineBufferCapacity parameter for Set and Map
* Add some comments
* Fixed an error that I introduced recently
2020-04-23 20:05:53 +02:00
7d98dfd6bb Merge branch 'blender-v2.83-release' 2020-04-23 18:26:22 +02:00
0fbcb824d0 Fix T76014: correct description of COLLECTION_OT_objects_remove_all
before rB17bd5c9d4b1e it was "Remove selected objects from all groups"

- `BKE_object_groups_clear` is not checking if a collection is linked
to the current scene...
- rB713010bd7795 did not change that either

So this indeed removes selection from _all_ collections, so account for
that in the operator description/idname.

Reviewers: brecht

https://developer.blender.org/D7500
2020-04-23 18:20:26 +02:00
c03b6f6f0b Fix T73195: stereo camera view does not show background image 2020-04-23 18:01:33 +02:00
40f2c92460 Fix T72506 EEVEE: Collection Holdout propagates accross material instances
This fix the issue by introducing a default material only for collection
holdouts. This avoids hash colision when the same material is used in
collections without holdout enabled.
2020-04-23 17:41:21 +02:00
2467f4df79 Fix T75607: crash trying to sculpt while remesh is in progress
The interface is already locked, but the paint brush drawing could stll be
reading the mesh that was being edited in another thread.
2020-04-23 17:10:23 +02:00
53de2c3e4f Cleanup: Add assert to crash earlier
This makes T75096 crash earlier.
2020-04-23 15:47:38 +02:00
5e04548500 Merge branch 'blender-v2.83-release' 2020-04-23 15:45:46 +02:00
869472b3f0 Fix T75611: slow transform of many objects at the same time
Solve O(n^2) time complexity problem where a dependency graph iterator loops
over all nodes to clear flags, which happened for every object at the start
of transform.

Differential Revision: https://developer.blender.org/D7503
2020-04-23 15:41:57 +02:00
3b47f335c6 BLI: remove TaskParallelRangePool
This is not currently used and will take some work to support with TBB, so
remove it until we have a new implementation based on TBB.

Fixes T76005, parallel range pool tests failing.

Ref D7475
2020-04-23 15:39:34 +02:00
1fce2ea743 Merge branch 'blender-v2.83-release' 2020-04-23 15:15:04 +02:00
694c0547c2 Fix T73680: Scene and fluid modifier gravity are scaled differently
Reviewers: sebbas

Differential Revision: https://developer.blender.org/D7483
2020-04-23 15:10:20 +02:00
6524aaf685 Fix T76008: Fluid inflow with negative initial velocity is not working
This is a regression introduced in rBa0fe22095e6d9b8b194c2cf6f9a7c7b419d7e61c.

I changed it so that the velocity with the highest magnitude is considered and
not the highest value per coordinate.

Reviewers: sebbas

Differential Revision: https://developer.blender.org/D7502
2020-04-23 15:00:48 +02:00
5afba30c69 Fix T75987: crash entering edit mode with keyed particles 2020-04-23 14:51:41 +02:00
1c84cd8198 Merge branch 'blender-v2.83-release' 2020-04-23 14:49:38 +02:00
a0652430d0 Array modifier: limit maximum amount of generated geometry.
Fixes T75278: Crash when modifier "Array-Fit Curve-Relative Offset"
nears zero.
2020-04-23 14:48:48 +02:00
35ecfefaec Made pose push/relax to breakdown behave smooth on rotations
A follow up to T67212. I missed that the rotation interpolation had its
own code path.

The previous rotation push code was actually wrong (but smooth).

Now all of the actions behave correctly and is smoothly interpolated.
2020-04-23 14:15:31 +02:00
8f51f60948 Fix T76005: BLI_task test failing after recent changes
This was an error in changes made to this test to accomodate the new reduce
callback.
2020-04-23 14:04:29 +02:00
3a0af215b9 Fix headless build failure on macOS 2020-04-23 13:19:54 +02:00
614621747e BLI: optimize VectorSet implementation
Instead of building on top of `BLI::Vector`, just use a raw array
and handle the growing in `BLI::VectorSet`.

After this change, the existing `EdgeSet` can be reimplemented using
`BLI::VectorSet` without performance regressions.
2020-04-23 12:02:06 +02:00
68cfce1519 Merge branch 'blender-v2.83-release' 2020-04-23 18:38:41 +10:00
8dedbb1747 Fix T75836: Light target misses updates while dragging 2020-04-23 18:25:29 +10:00
6c0ddf1110 Merge branch 'blender-v2.83-release' 2020-04-23 16:15:55 +10:00
b900a5e452 Fix T74172: Mirror with bisect results in holes
Enable snap-to-center when bisecting.
2020-04-23 16:14:07 +10:00
6489f5a8ec Merge branch 'blender-v2.83-release' 2020-04-23 15:09:54 +10:00
83d9ba341e Fix T75965: Scale to Fit Text Box fails with a single word 2020-04-23 15:03:47 +10:00
b785feb3d7 Merge branch 'blender-v2.83-release' 2020-04-23 12:12:34 +10:00
e812512e1d Cleanup: clang-format, unused warning 2020-04-23 12:10:41 +10:00
5491c045af Cleanup: add explicit enum values in DNA_rigidbody_types.h 2020-04-23 12:06:35 +10:00
101ec2f3b8 Merge branch 'blender-v2.83-release' 2020-04-23 12:02:25 +10:00
c3accabef9 Fix invalid rigid body constraint values during 2.83 development
Own error in cleanup from 5dcb6fb22f unintentionally
changed enum values. Although this code violated our own
rules to use explicit values to avoid this happening.
2020-04-23 11:46:52 +10:00
c632396733 Fix T75991: crash when rigidbody encounters unknown constraint type
This just adds a check to prevent the crash,
Versioning invalid types still needed.
2020-04-23 11:31:47 +10:00
f6f4ab3ebf Merge branch 'blender-v2.83-release' 2020-04-22 21:42:09 +02:00
a68bd94d11 Workbench: Use GPU_texture_copy instead of GPU_framebuffer_blit for TAA
This fixes T75477 which seems to be a driver but caused by framebuffer
blitting.
2020-04-22 21:41:10 +02:00
f7753bf97f GPU: Add GPU_texture_copy
This allow to copy entire texture in a faster way than using framebuffer
blitting.

This uses ARB_copy_image extension if available and fallback to
glCopyTexSubImage2D for older gl version.

Both method should be as fast if not faster than the framebuffer blitting.
2020-04-22 21:41:10 +02:00
6f8d5eaa28 Merge branch 'blender-v2.83-release' 2020-04-22 21:04:58 +02:00
d17b371a83 UI: Always check if IME Supported After Changing Language
Changing from IME-enabled language to English did not turn off IME.

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

Reviewed by Campbell Barton
2020-04-22 21:03:13 +02:00
c3d8fa1301 UI: Always check if IME Supported After Changing Language
Changing from IME-enabled language to English did not turn off IME.

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

Reviewed by Campbell Barton
2020-04-22 11:28:15 -07:00
821316b034 Reset submodule to the right place in master
Accidently changed on rB0dfe30502a02.
2020-04-22 20:20:48 +02:00
22cf2572d9 Merge branch 'blender-v2.83-release' 2020-04-22 19:20:11 +02:00
0dfe30502a Fix T75938: Workbench normal direction for matcaps
Set useMatcap to ensure correct normal direction when using matcaps
in the workbench engine.
2020-04-22 19:13:38 +02:00
f9649e2bf1 Fix T75994: Crash with 'Split Edges and Faces' | Auto-Merge
It occurred when an edge was collapsed into a vert that was not part of it.
This is common when the distance for merging is relatively large.
2020-04-22 12:53:19 -03:00
f5b540593c Fix T75994: Crash with 'Split Edges and Faces' | Auto-Merge
It occurred when an edge was collapsed into a vert that was not part of it.
This is common when the distance for merging is relatively large.
2020-04-22 12:48:16 -03:00
de168b4115 Merge branch 'blender-v2.83-release' 2020-04-22 17:13:21 +02:00
878cd0e124 Silence annoying error message in writefile on undo step storage.
Fix T75318: Error spam in console when opening file from 2.7x.
2020-04-22 17:12:49 +02:00
cdc399a055 Merge branch 'blender-v2.83-release' 2020-04-22 17:05:04 +02:00
45f8d1783b Cleanup: Fix strict compiler warning 2020-04-22 16:56:43 +02:00
cf5147f69f Fix T74423: Cycles rendering artifacts with CUDA 10.2
Work around what appears to be a compiler bug, just changing the code a bit
without any functional changes.
2020-04-22 16:40:52 +02:00
138b0c970e GPencil: Change Thickness Profile icon 2020-04-22 16:40:26 +02:00
0fe3e38b57 Cleanup: Spelling in function name
Should be no functional changes.
2020-04-22 16:32:45 +02:00
07ed64aae6 Fluid: Use maximum for initial velocity grid application
Using MAX2 when writing intial velocities into the grid prevents overriding initial velocities when using multiple flow objects that are close to each other.
2020-04-22 16:19:19 +02:00
f148bd3795 Fluid: Fixes for cache 'Replay' mode
General fixes and improvements for the cache. Previous commits on fluids broke the 'Replay' cache a bit.
2020-04-22 16:19:19 +02:00
6485d8b78a Fluid: Fix for caches being released when file is loaded 2020-04-22 16:18:13 +02:00
fdea3dd7e7 Fluid: Fix for inconsistent behavior with flow and effector objects
Fixes issue with flow and effector objects which were not being used after resuming a bake job.
This issue has been reported in T75729 and T75758.
2020-04-22 16:18:13 +02:00
d19277c72f Fluid: Added missing outflow object type to enable / disable flow flag
There is no reason to not include outflow objects here too.
2020-04-22 16:18:13 +02:00
650f9cfe93 Fluid: Improved cache 'Replay' option
When using the 'Replay' cache mode the cache needs to be invalidated whenever simulation variables have been changed.
The invalidation will always only affect the according subcaches, e.g. when changing a mesh paramter only the mesh cache will be invalidated, the base cache will remain intact.
Before this change Blender always invalidated the entire cache.
2020-04-22 16:16:23 +02:00
abdd4117b1 Fluid: Cleanup in MANTA main class
More concise return types for cache import functions and general cleanup.
2020-04-22 16:16:23 +02:00
40e9dc638b Fluid: Remove noise bake call from Python
Saving noise cache files is handled in fluid.c.
2020-04-22 16:16:23 +02:00
06e3df4ce4 Fix T75681: Mantaflow crash when trying to bake a cupcake: The CG solver diverged, residual norm > 1e30
Ensures that there are no enclosed holes between an obstacle and the domain walls.
2020-04-22 16:16:23 +02:00
5cae44ef6d Fluid: Minor UI fix for diffusion panel
Was missing active option.
2020-04-22 16:16:23 +02:00
912ac457a6 Merge branch 'blender-v2.83-release' 2020-04-22 16:01:17 +02:00
9000ec3013 Cleanup: clarify and update some flags descriptions in libquery code. 2020-04-22 15:58:55 +02:00
6a1056c6a8 Merge branch 'blender-v2.83-release' 2020-04-22 15:54:04 +02:00
28f7c80c46 Fix invalid RNA path for transform orientations.
Fix T75861: Impossible to set Shortcut (hotkey) on Transform Orientation
or Pivot Point.
2020-04-22 15:53:33 +02:00
6c9bebd827 Tests: Fix build error in BKE_armature test
Test does not link due to missing symbols, needs
buildinfoobj to link against when WITH_BUILDINFO is on
2020-04-22 07:47:32 -06:00
a0fe22095e Fluid: Use maximum for initial velocity grid application
Using MAX2 when writing intial velocities into the grid prevents overriding initial velocities when using multiple flow objects that are close to each other.
2020-04-22 15:30:06 +02:00
8d5ae15040 Fluid: Fixes for cache 'Replay' mode
General fixes and improvements for the cache. Previous commits on fluids broke the 'Replay' cache a bit.
2020-04-22 15:26:51 +02:00
a47a975a55 Merge branch 'blender-v2.83-release' 2020-04-22 14:38:59 +02:00
6c9a882340 Fix T75964: changing object's viewport display color does not update
cycles

Caused by rB00466e756e33.

While that commit sounds logical, Cycles uses is_updated_transform() to
detect updates.

Now introduce is_updated_shading() and use that on top.

Maniphest Tasks: T75964

Differential Revision: https://developer.blender.org/D7493
2020-04-22 14:31:32 +02:00
e5052e8bde Merge branch 'blender-v2.83-release' 2020-04-22 14:28:10 +02:00
9aeb475e99 Subdiv: Fix wrong non-manifold subdivision in certain cases
Was happening when only partial subset of callbacks was specified.

The reason was that there was a callback to specify edges sharpness
but no callback to specify vertex sharpness, so the special case for
non-manifold edges was not run.

Fixes T75697: Multires in simple mode doesn't work correct on a plane
2020-04-22 14:26:12 +02:00
c69a047b90 Merge branch 'blender-v2.83-release' 2020-04-22 14:23:00 +02:00
Brecht Van Lommel
aa09a46fd7 Objects: add infrastructure for hair, pointcloud, volume modifiers
There is no user visible difference in standard builds, as there are no
volume modifiers yet. When using WITH_NEW_OBJECT_TYPES some deform only
modifiers are now available for hair and pointcloud objects.

Differential Revision: https://developer.blender.org/D7141
2020-04-22 14:20:31 +02:00
dfe22c2900 Cleanup: comment and semicolons 2020-04-22 14:17:19 +02:00
470f17f21c Fix T75974: Multiobject editing UV hiding/unhiding does not work
Seems like this was left out when UV operators were converted to multi-
object-editing, ref T54645.

Maniphest Tasks: T75974

Differential Revision: https://developer.blender.org/D7492
2020-04-22 14:07:43 +02:00
bc83fc9c04 Fix T75981: crash in sculpt mode with mesh that used to have multiple materials
The material indices in a mesh can exceed the number of available materials
slots in the object or mesh, sculpt drawing was not taking that into account.
2020-04-22 13:59:14 +02:00
b2cc2dda9c Fix 3D viewport select using grease pencil engine when not needed
Other draw loops also avoid the overhead of grease pencil drawing when there
are no grease pencil objects in the scene. It's a little faster to skip those
shaders and buffer when not needed.
2020-04-22 13:44:06 +02:00
aba78caa11 Fix T75625: crash on exit in macOS after selecting objects
This code to free shaders by casting a struct to a pointer array is not valid
in general, and particularly when compiling with Clang (on Linux and macOS) it
fails and can read invalid/uninitialized memory .
2020-04-22 13:44:06 +02:00
8eeae02cb0 Merge branch 'blender-v2.83-release' 2020-04-22 21:41:28 +10:00
c7991bcefc BLI: add ScopedTimer
This adds a simple timer that can be used for performance measurements in C++.
More sophisticated timers are possible (e.g. one that takes averages, logs the results, ...).
However, I found that this simple timer is good enough for 99% of my use cases.

To use it just write `SCOPED_TIMER("my timer name");` or more commonly `SCOPED_TIMER(__func__);`
into some scope.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D7491
2020-04-22 12:53:47 +02:00
3542c5eb72 Fix T75971: 3D Text invisible when fill set to None 2020-04-22 19:46:53 +10:00
21f811cb6d Merge branch 'blender-v2.83-release' 2020-04-22 11:37:36 +02:00
1998154ff4 Undo: Minor optimization: do not write Scene's 3DCursor.
Probably not much gained here, but that's one thing less potentially
making the scene seen as changed in undo steps...
2020-04-22 11:37:09 +02:00
0faeca806c Fix T75719: Undo system: Debug assert while undoing several operations.
Caused by some pointer collision when re-allocating data-blocks during
undo (due to creation/deletion of those).

Patch by @brecht, many thanks.
2020-04-22 11:37:09 +02:00
f7374737ef Fix T75909: icons memory leak in headless build 2020-04-21 21:44:44 +02:00
13e3a1c532 Fix T75969: view layer add with Copy Settings does not copy all data 2020-04-21 19:59:35 +02:00
8845b27dce Merge branch 'blender-v2.83-release' 2020-04-21 18:29:25 +02:00
bc3aab3fa5 Fix T75893: Undo causes crash with "Load UI" disabled.
We need to re-generate a new session uuid for the UI-related data-blocks
that are kept across file reading, when load UI is disabled. Otherwise
there will be several IDs with same uuid, which is an ensured way to
crash in new undo code.
2020-04-21 18:26:32 +02:00
93e193399d Tests: added unit test for mat3_vec_to_roll() function
This was used to investigate T73840. Since the armature math is far from
simple, I thought it would be a good idea to start writing some unit
tests for it.

No functional changes in Blender itself.
2020-04-21 17:58:27 +02:00
38f4b95635 Cleanup: added missing header to BKE_armature.h
No functional changes.
2020-04-21 17:58:27 +02:00
29e9506a7f BLI: simplify naming of listbase wrapper 2020-04-21 17:38:19 +02:00
3059353b38 BLI: Use .hh extension for C++ headers in blenlib 2020-04-21 17:31:56 +02:00
0e52b91f97 BLI: add float2, float3, float4x4, Color4f and Color4b
Reviewers: brecht, campbellbarton, sergey

Differential Revision: https://developer.blender.org/D7450
2020-04-21 16:57:00 +02:00
805c52b1fd Libmv: Cleanup, naming
Initial bundle adjustment only supported OpenCV's radial distortion
model, so the cost functor was called after it.

Nowadays it supports more than this single model, so naming was a bit
wrong and misleading.
2020-04-21 16:41:23 +02:00
b08e18ff36 CleanUp: Remove thread_id from TaskFreeFunction
It isn't used; cleanup related to {D7475}
2020-04-21 15:57:51 +02:00
2d6ad88466 CleanUp: Renamed BLI_task_pool_userdata to BLI_task_pool_user_data
In preparation for {D7475}
2020-04-21 15:37:36 +02:00
23919d2275 Fix T75845: some dependencies update missing when painting textures.
issue: Painting a texture that is set as a particle system influencer, doesn't
update particles. An external trigger (such as changing influence slider)
is required to update particles.

fix: The root cause is a missing relationship from image to texture in the
dependency graph.

test: Once fixed, image texture painting updates expected dependencies
such as particle system influence or displacement modifier.

Reviewed By: sergey

Maniphest Tasks: T75845

Differential Revision: https://developer.blender.org/D7472
2020-04-21 15:27:21 +02:00
6505dd1985 UI: Use heading for File Browser column toggles in popover 2020-04-21 15:13:58 +02:00
ec14bee20d Cleanup: remove unused includes 2020-04-21 14:57:19 +02:00
2de0cc5adc Merge branch 'blender-v2.83-release' 2020-04-21 14:34:22 +02:00
b4993a9032 Fix: Incorrect f-string in previews.py
Contributed by @deadpin

Differential Revision: https://developer.blender.org/D7458
2020-04-21 14:33:37 +02:00
f4ee9643ad Fix Linux/GCC build error after recent changes 2020-04-21 14:28:26 +02:00
Miguel Porces
ad23b1e91d UV: add Reset operator to menu in uv editor
Differential Revision: https://developer.blender.org/D7482
2020-04-21 14:20:42 +02:00
a93ed3bcb7 Strengthen modifiers test validation, from D7397.
Submitting on behalf of Jesse Y (deadpin).
In test harness for modifier testing, now run mesh validation
on output mesh. Also, fix printing so it interleaves properly.
2020-04-21 08:15:26 -04:00
9528fa2c46 Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-04-21 13:24:47 +02:00
6f598ecc1a Fix T75472 Crash on "Remove Empty Animation Data" in NLA editor
The `ANIMFILTER_NODUPLIS` option, to prevent duplicates in the list of
animation data to be freed, was missing. This caused a use-after-free.
2020-04-21 13:24:20 +02:00
81d29a9f61 Merge branch 'blender-v2.83-release' 2020-04-21 13:17:39 +02:00
5fed9ac9b5 Fix clang-format differences between version 6 and 9
Version 6 does not appear to respect clang-format off for header sorting.
2020-04-21 13:16:59 +02:00
1c86912068 Cleanup: clang-format 2020-04-21 13:16:34 +02:00
06a2ae281b Merge branch 'blender-v2.83-release' 2020-04-21 12:55:40 +02:00
c73d6162be Fix T75920: Add object - Align to 3D cursor not working.
3DCursor is UI data (hence not expected to be affected by undo) that is
stored in actual data (Scene)... So it needs some special care during
undo.

New undo code now re-reads data into existing memory, which means
copying of 3DCursor data has to happen earlier in that case, when we
still have both old and newly read data available.
2020-04-21 12:52:18 +02:00
49a29c9c76 Cleanup: Fix strict compiler warning 2020-04-21 12:49:12 +02:00
a02da85b55 Libmv: Cleanup, spelling and naming in bundle adjustment
Just more things which were discovered to be annoying on unclear when
adding more features to this code.
2020-04-21 12:25:45 +02:00
55a2682348 Windows: Add sccache support.
sccache [1] is one of the few ccache like solutions that will
work on windows.

sccache support can be enabled with the `WITH_WINDOWS_SCCACHE`
cmake option however it will only will work with ninja as the
build system, msbuild is not supported currently.

Advanced option, developes are expected to obtain and configure
sccache on their own.

```
Full build no cache 1428.90s (100.00%)
Full build cached    434.34s ( 30.40%)
```

[1] https://github.com/mozilla/sccache

Reviewed By: nicholas_rishel, Brecht

Differential Revision: https://developer.blender.org/D7466
2020-04-20 12:51:43 -06:00
9618bd9202 Merge branch 'blender-v2.83-release' 2020-04-20 18:55:08 +02:00
be7c51d076 Fix T75885: Mesh deform modifier not updating on own transforms
Added the missing relation.

Maniphest Tasks: T75885

Differential Revision: https://developer.blender.org/D7473
2020-04-20 18:50:18 +02:00
749181ff4d Libmv: Cleanup, spelling in comment 2020-04-20 17:26:45 +02:00
e9c9e1c2c7 Libmv: De-duplicate creation of residual block
Allows to centralize logic which is needed to check which cost functor
to use for the specific intrinsics.
2020-04-20 16:26:39 +02:00
f0e8965090 Libmv: Cleanup reprojection cost function
Make it smaller and more clear how and what it operates on.
2020-04-20 16:26:32 +02:00
ce82e9e64a Libmv: Pass entire camera intrinsics to reprojection error functor
Currently no functional changes, but allows to have access to some
invariant settings of camera intrinsics such as image dimensions.
2020-04-20 16:26:32 +02:00
c334020d8f Libmv: Cleanup, rephrase comment 2020-04-20 16:26:32 +02:00
838d452843 Libmv: Cleanup, fix indentation 2020-04-20 16:26:31 +02:00
584f112548 Libmv: Cleanup, spelling in comments 2020-04-20 16:26:31 +02:00
3135791395 Tracking: Specify image image for (un)distortion model
Allows to support distortion models which needs to know actual
image dimensions to apply or inverse camera intrinsics.
2020-04-20 16:26:31 +02:00
Henrik Dick
7865185d98 Fix T75840: Add check for not generated edges
The value of `new_edge` is `SOLIDIFY_EMPTY_TAG=2^32-1` if the edge is not generated.
The code from D7334 was missing this check.

Reviewed By: mont29

Maniphest Tasks: T75840

Differential Revision: https://developer.blender.org/D7463
2020-04-20 16:16:04 +02:00
665bf41f3c Cleanup: rename "nested" to "embedded"
Reviewers: mont29

Differential Revision: https://developer.blender.org/D7476
2020-04-20 16:14:45 +02:00
d1da2f0b9e Fix: Add extern "C" to RNA_enum_types.h 2020-04-20 15:58:59 +02:00
7ff0f896e8 UI: Use different icon to remove user-created shortcuts in Preferences
There was no way for users to visually tell appart shortcut items
they've added themselves and the default ones. Both used the same 'x'
icon to remove the item.
Modified items already showed a back-arrow icon; this commit makes
user-created shortcuts use an icon that has both, a back-arrow and a
'x'.

The icon is in fact from the Movie Clip Editor, but William Reynish and
I concluded that it's not worth creating and adding a new one just to
short-term fix this small annoyance. And the icon actually fits the
purpose surprisingly well :) {F8485176}
2020-04-20 15:56:57 +02:00
8dbbac43bb Simulations: Add Boolean Math, Switch and Float Compare node UI
Reviewers: brecht

Differential Revision: https://developer.blender.org/D7424
2020-04-20 15:27:58 +02:00
dcb45992bf Merge branch 'blender-v2.83-release' 2020-04-20 15:27:27 +02:00
aa2544793d Various typos fixes in UI messages. 2020-04-20 15:27:01 +02:00
b78f2675d7 Simulations: Use some shader nodes in simulation node trees
Reviewers: brecht

Differential Revision: https://developer.blender.org/D7422
2020-04-20 15:17:36 +02:00
915866f0d9 Fix T75914: Assert Knife Tool
Actually the assert was incorrect. It tested for an active buffer, but
an batch would also be ok.
2020-04-20 15:10:21 +02:00
9f7bea6e83 Simulations: UI for core particle nodes
This commit adds the initial set of particles nodes. These are fairly
low level and are expected to be put into groups that we ship with Blender.

See D7384 for a description of the individual nodes.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D7384
2020-04-20 14:47:13 +02:00
e7acf17b74 Nodes: Add emitters, events, forces and control flow socket types
These socket types will be necessary for particle nodes.
The way these sockets are drawn can be changed separately.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D7349
2020-04-20 13:41:21 +02:00
8759813abd Nodes: New Object and Image socket types
Those new socket types will be necessary for particle nodes.

The main difficulty with adding these socket types is that they
are the first that reference ID data in their `value`.
Therefore, user counting code had to be added in a couple new places.

Reviewers: brecht, mont29

Differential Revision: https://developer.blender.org/D7347
2020-04-20 13:27:45 +02:00
2b2d3c14fe Simulations: Embed simulation node tree in simulation data block
This adds an embedded node tree to the simulation data block dna.
The UI in the `Simulation Editor` has been updated to show a list
of simulation data blocks, instead of individual node trees.

The new `SpaceNodeEditor.simulation` property wraps the existing
`SpaceNodeEditor.id` property. It allows scripts to get and set
the simulation data block that is being edited.

Reviewers: brecht, mont29

Differential Revision: https://developer.blender.org/D7301
2020-04-20 12:56:16 +02:00
8d53e59e32 Cleanup: Remove unnecessary callbacks where default behavior is fine
See comments in D7225.
2020-04-20 11:22:55 +02:00
1b01d10998 Cleanup: typo 2020-04-20 11:22:55 +02:00
67593a41dd Merge branch 'blender-v2.83-release' 2020-04-20 11:20:38 +02:00
25e774422c Cleanup: ID management: Light ID type.
Keep IDType code at head of each ID file, instead of mixing it with more
specific API. Also do not define callbacks when defautl generic handling
is fine.
2020-04-20 11:20:05 +02:00
bc71074d0a Fix T75922: Removing custom orientation doesn't update gizmo 2020-04-20 19:12:46 +10:00
0247ee5f53 Simulations: Add simulation node tree type
This implements a new builtin node tree type called `SimulationNodeTree`.
It is not yet embedded in the `Simulation` data block.

The node tree will initially be used for the new particle nodes system.

When the cmake option `WITH_NEW_SIMULATION_TYPE` is enabled, a new
`Simulation Editor` is shown in the editors menu (which is just a node editor).

This patch does not add entries to the Add Node menu, so it is empty.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D7287
2020-04-20 10:58:43 +02:00
eb4e3bbe68 Simulations: Add new simulation data block
This data block will be the container for simulation node trees.
It will be used for the new particle node system (T73324).

The new data block has the type `ID_SIM`.
It is not visible to users and other developers by default yet.
To enable it, activate the cmake option `WITH_NEW_SIMULATION_TYPE`.

New simulation data blocks can be created by running `bpy.data.simulations.new("name")`.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D7225
2020-04-20 10:45:18 +02:00
5f5ec7b0ed Merge branch 'blender-v2.83-release' 2020-04-20 18:36:48 +10:00
005bba2a81 Keymap: Add sequencer scrub with box-select & RMB select
Also support selecting by dragging a box over the strips which
previously did nothing.
2020-04-20 18:35:41 +10:00
0e7871f9c3 Merge branch 'blender-v2.83-release' 2020-04-20 17:40:39 +10:00
0e6c56760c Fix T74600: Sequencer blade tool inaccessible with RMB select
Declare `anim.change_frame` explicitly for each editor.

In sequencer, scrubbing in editor area is possible only with
select/tweak tool.

This change is to resolve conflict between scrubbing and tool actions.
2020-04-20 17:15:47 +10:00
2a96e8be39 Cleanup: redundant parenthesis, NULL checks 2020-04-20 12:15:49 +10:00
9d3b1d361d Merge branch 'blender-v2.83-release' 2020-04-20 12:15:03 +10:00
23bb42a06e Cleanup: accidental value declaration with struct type 2020-04-20 12:11:12 +10:00
b293517d7b Merge branch 'blender-v2.83-release' 2020-04-20 11:58:15 +10:00
30bfa991f8 Fix invalid comparison checking button unit type
Checking button unit type was length for proportional
multi-button adjustment wasn't working.
2020-04-20 11:54:47 +10:00
9776b8a05e Merge branch 'blender-v2.83-release' 2020-04-20 02:19:42 +02:00
Pablo Dobarro
28f667c7c4 Fix T75778: Missing ME_VERT_PBVH_UPDATE in Surface Smooth
Without this flag the PBVH won't update taking the modified vertices
into account.

Reviewed By: brecht

Maniphest Tasks: T75778

Differential Revision: https://developer.blender.org/D7453
2020-04-20 02:18:28 +02:00
7e72b74713 Fix T75766: Smooth mask using mesh vert indices direclty
In the vertex iterator vd.index should always be used. I probably
introduced this in a refactor.

Reviewed By: jbakker

Maniphest Tasks: T75766

Differential Revision: https://developer.blender.org/D7446
2020-04-20 02:14:11 +02:00
44a386b88c Fix T75329: Missing show_face_sets checks for Multires
These values were hardcoded before Face Sets were enabled for Multires,
so enable the show_face_sets checks now.

Reviewed By: jbakker

Maniphest Tasks: T75329

Differential Revision: https://developer.blender.org/D7444
2020-04-20 02:12:28 +02:00
65aaa13a00 Fix T75662: Surface Smooth filter not checking face sets
In the main mesh filter loop vertex that do not have the active face set
are skipped, so in the following surface smooth displacement loop these
vertices were deformed using an uninitialized laplacian_disp value.
Now the main loop initializes the laplacian_disp for all vertices and
the deformation based on face sets is skipped in the second loop.

Reviewed By: jbakker

Maniphest Tasks: T75662

Differential Revision: https://developer.blender.org/D7443
2020-04-20 02:10:42 +02:00
Pablo Dobarro
35cbf3b5dc Fix crash on Multires Face Set visibility sync
Multires uses the data of the Face Sets stored in the base mesh to
manage the grid's visibility, so these pointers can no longer be set to
NULL when editing Multires objects as they are requried for some operations.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7431
2020-04-20 02:07:49 +02:00
251234ad43 Merge branch 'blender-v2.83-release' 2020-04-20 01:06:49 +02:00
d290bdd42a Fix missing Outliner selection syncing on "Select Hierarchy"
Adds syncing to a few operations that change selection, to avoid some
annoyances (like drag and drop of hierarchy to a different collection
only linking the parent to the collection).

Note that there's further refinement work for selection syncing in
D5572, but is awaiting some code design decisions. Meanwhile such quite
annoying issues should be fixed.

Addresses T75610.
2020-04-20 01:00:02 +02:00
a331d79900 Fluid: Fix for caches being released when file is loaded 2020-04-19 21:15:40 +02:00
76c1a91cfa Fluid: Fix for inconsistent behavior with flow and effector objects
Fixes issue with flow and effector objects which were not being used after resuming a bake job.
This issue has been reported in T75729 and T75758.
2020-04-19 21:15:40 +02:00
6c4a7e0ac3 Fluid: Added missing outflow object type to enable / disable flow flag
There is no reason to not include outflow objects here too.
2020-04-19 21:15:40 +02:00
c1c97c3d4a Merge branch 'blender-v2.83-release' 2020-04-19 21:07:59 +02:00
2816b22b38 Fix T75902 Workbench: render crash 2020-04-19 21:07:47 +02:00
1760b8c59f Fix T75878: Modifiers disappearing from UI
Typo in 4f9a56cbc4.
2020-04-19 19:06:11 +02:00
d7f05fd445 Fix T74809: Use after free when merging specific areas
Was incorrectly triggering animation for panels which would be free'd
before the animation ended.
2020-04-19 19:05:49 +02:00
5cc7e2ae16 Cleanup: Remove extra line 2020-04-19 17:29:35 +02:00
Cody Winchester
a39a6517af GPencil: Add Texture modifier
This patch aims to add a new modifier for grease pencil objects that gives more control over the strokes texture UVs.

There are 3 modes.
1 Control the stroke texture UVs alone
2 Control the fill texture UVs alone
3 Control both the fill and stroke texture UVs

For the stroke texture UVs there are 2 options for fitting the texture to the stroke.
1 The texture uvs are kept a consistent length how it currently is set by default.
2 The uvs are normalized to fit the length of the stroke regardless of how long or short it gets allowing the texture to fit the length of the stroke.

 There are then 2 controls to scale up and down the uvs and an offset value that allows moving the texture along the stroke.

For the fill texture UVs it includes all of the transformational controls. Location offset, scale, and rotation.

Reviewed By: antoniov, mendio

Differential Revision: https://developer.blender.org/D7439
2020-04-19 17:29:35 +02:00
a0a59972e7 Fix T75878: Modifiers disappearing from UI
Typo in 4f9a56cbc4.
2020-04-19 15:03:44 +02:00
3cd147b49f Fix T74809: Use after free when merging specific areas
Was incorrectly triggering animation for panels which would be free'd
before the animation ended.
2020-04-19 14:36:22 +02:00
1f1520a045 Merge branch 'blender-v2.83-release' 2020-04-18 18:48:40 +02:00
89d49ae218 GPencil: Disable animation for Onion Custom Colors
This was forgotten by error. All Onion props must be disabled.
2020-04-18 18:48:17 +02:00
221a7002a9 GPencil: Make properties animatable
Make use lights and mask properties animatable.
2020-04-18 16:23:58 +02:00
bfdcb6bed6 GPencil: Add header to Use Lights
This use the new header column
2020-04-18 16:18:17 +02:00
1c62ba80b1 Merge branch 'blender-v2.83-release' 2020-04-18 16:09:48 +02:00
101f00e696 GPencil: Fix missing patch of default Material names 2020-04-18 16:09:22 +02:00
a444c7e0e2 Merge branch 'blender-v2.83-release' 2020-04-18 13:16:20 +02:00
d809a0260e GPencil: Fix duplicated default brushes and change settings
Removed old duplicated brushes and change the settings of some brushes.
2020-04-18 13:15:51 +02:00
fda754145a Annotations: Add Onion Skin support in VSE
This was removed in previous versions, but can be useful in some situations.
2020-04-18 10:49:42 +02:00
62103e7d42 Industry Compat keymap: Add keys for Remesh 2020-04-18 08:33:38 +02:00
746684519b UI: Use new layout features for the NLA sidebar
Improves alignment.
2020-04-18 08:32:21 +02:00
f96a689b3b Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-04-17 18:20:16 -06:00
Gary Oberbrunner
8fd9516a71 Fix: Build error on headless build
This simple patch removes an "UNUSED_VARS" macro referencing
a variable which doesn't exist (r_unit_size).

It only affects the headless build

Differential Revision: https://developer.blender.org/D7464
Reviewed By: harley
2020-04-17 18:19:56 -06:00
0fe8239470 UI: Make headings fit within regular Properties width
Before recent changes, we used Min/Max here too.
2020-04-17 22:06:06 +02:00
a6c14faa06 Merge branch 'blender-v2.83-release' 2020-04-17 22:04:10 +02:00
76b3aac802 Fix T75842: GPencil Edit mode of unselected object is visible
The overlay must be enabled only for the active object.
2020-04-17 22:03:46 +02:00
59d7fbb052 Merge branch 'blender-v2.83-release' 2020-04-17 21:54:26 +02:00
156319d2b3 Fix T74199 Overlay: Turning off overlays also hides edges 2020-04-17 21:53:38 +02:00
842e817bf7 Fix T73815 Overlay: Z axis line doesn't show alone on the workspace 2020-04-17 21:08:34 +02:00
c3994aa443 Fix typo causing compilation to fail
Sorry guys I thought I had compile before testing.
2020-04-17 20:57:25 +02:00
f2acfb460f UI: Add separator after Local Camera row 2020-04-17 20:43:12 +02:00
b7d603b41c Fix T75832 DRW Hair: Crash caused by shader compilation
This also fix it the volume velocity needles.
2020-04-17 20:43:05 +02:00
cad1ddc1e8 GPU: Fix typo making RG16F use 16 bytes instead of 4 2020-04-17 20:28:55 +02:00
2fc8daff10 GPU: Fix missing SRGB8_ALPHA8 debug string 2020-04-17 20:27:58 +02:00
a2f075b996 Merge branch 'blender-v2.83-release' 2020-04-17 19:42:53 +02:00
75ded99ff9 Fix T75811: GPencil Sculpt not working when use Subdivide
When use the subdivide modifier the number of points was not correct and can produce segment faults.

Also, the points were selected by default and this was wrong.
2020-04-17 19:41:57 +02:00
23c52d9584 Merge branch 'blender-v2.83-release' 2020-04-17 18:41:25 +02:00
e491573060 Fix poor video sequencer preferences UI layout
Sequencer related properties were not grouped together, and it wasn't
clear that the disk cache settings were about the sequencer. Now moved
sequencer settings into own panel.
2020-04-17 17:59:14 +02:00
1f232e9ae9 Merge branch 'blender-v2.83-release' 2020-04-17 17:53:37 +02:00
f915549ee7 Fix T75786: GPencil Modifiers were not overridable... 2020-04-17 17:49:12 +02:00
4ffa5e5703 Fix (unreported) bda locking of whole GP modifiers whem GP obdata is linked.
Only applys to obdata feature is supposed to be locked in that case, not
the whole modifier.
2020-04-17 17:49:12 +02:00
398d0bf57e Fix python registration error in previous commit 2020-04-17 17:08:37 +02:00
7fc60bff14 UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit.

Some examples:
{F8473507} {F8473508} {F8473509} {F8473510}
For more screenshots, please see D7430.

We use column or row headings here to bring more structure, and to give
the eye visual anchors which aid eye-scanning. The left-aligned
checkboxes likewise help with this. And we keep the adherence to the
center line, so the alignment matches up between the various buttons and
controls.

* Changes the property split percentage from 50/50% to 40/60%. This is
  needed to give enough space for the checkboxes. But in most cases this
  looks better anyway - see Transform panel. In some cases it simply
  fills out the available space more efficently.
* Fix various hacks where we previously used manually defined splits.
  When we did this, the alignment was never quite right, and the layout
  code was a mess.
* Adds column headings to many places where a list of checkboxes all
  share a common purpose or leading text.
* Add checkbox + value configurations various places where a checkbox
  only serves to enable the value slider
* Removes most uses of grid flow layout. The grid flow layouts combine
  poorly with column headings, and also they would mess alignment up
  badly. The grid flow layouts also often made buttons and controls jump
  around on the screen if you would just resize editors slightly,
  causing visual confusion, making users lose their place. The logic for
  at what time the list of items would re-flow was often flawed, jumping
  to multiple columns too fast or too late - and frankly, the grid flow
  layouts would often just look bad.

Maniphest Task: https://developer.blender.org/T65965

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

Reviewed by: Brecht Van Lommel, Pablo Vazquez.

Most work here by William Reynish, few changes by Julian Eisel.
2020-04-17 17:00:57 +02:00
219049bb3b UI: Better split layout support for checkboxes
Makes the following layout changes possible:
{F8473498} {F8473499} {F8473502}

The next commit will contain many layout changes to make good use of
these new possibilities. The result should be more consistent, easier to
read and should give a more organized impression. Additionally, it
should be possible to replace many sub-panels with compacter layouts.

Main changes:
* Checkboxes now respect the property split layouts
* Add support for row and column headers (i.e.
  `uiLayout.column(heading="Foo")`, `uiLayout.row(heading="Bar")`). If the
  first property added to this layout doesn't insert anything into the label
  split column, the heading is inserted there. Otherwise, it's inserted as own
  item.
* Add support for manually inserting decorators for an existing item
  (`uiLayout.prop_decorator()`). That way layout creators can manually insert
  this, which was the only way I saw to support property split layouts with a
  checkbox before the actual property. {F8471883}
* Autogenerated layouts for operator properties look bad if there are only
  checkboxes (which only use half the region width). So before creating the
  layout, we iterate over visible properties and disable split layout if all
  are booleans. I think this is fine, if needed we could also add layout hints
  to operators.
* `uiTemplateOperatorPropertyButs()` now handles macros itself, the caller
  used to be responsible for this. Code that didn't handle these so far never
  used macros I think, so this change should be invisible.
* Remove manual property split layout from autogenerated operator properties
  layout.
* Padding of checkboxes is tweaked to make their label visually more connected
  to the checkboxes.
* Support split layout for menus (should work for `uiLayout.menu()`,
  `.operator_menu_enum()`, `.prop_menu_enum()`, maybe more)

Maniphest Task: https://developer.blender.org/T65965

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

Reviewed by: Brecht Van Lommel, William Reynish, Pablo Vazques
2020-04-17 17:00:57 +02:00
20614d331d Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-04-17 16:39:40 +02:00
6adb254bb0 Fix T75686: Animating scene audio volume doesn't work
Scene audio volume changes require the scene to be tagged with
`ID_RECALC_AUDIO_VOLUME` (see `BKE_scene_update_sound()`). Tagging
happens in the RNA update function `rna_Scene_volume_update()`, but that
function is not called by the animation system. As a result, animated
volume changes are not sent to the audio system.

This commit adds a new depsgraph operation node that sets this tag when
necessary, so that the animated values are used in the rest of the
depsgraph evaluation.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7429
2020-04-17 16:33:05 +02:00
d923fb784f Task: Separate Finalize into Reduce And Free
In preparation of TBB we need to split the finalize function into reduce
and free. Reduce is used to combine results and free for freeing any
allocated memory.

The reduce function is called to join user data chunk into another, to reduce the
result to the original userdata_chunk memory. These functions should have no side
effects so that they can be run on any thread.
The free functions should free data created during execution (TaskParallelRangeFunc).

Original patch by Brecht van Lommel
{rB61f49db843cf5095203112226ae386f301be1e1a}.

Reviewed By: Brecht van Lommel, Bastien Montagne

Differential Revision: https://developer.blender.org/D7394
2020-04-17 16:06:54 +02:00
74fcb531de Merge remote-tracking branch 'origin/blender-v2.83-release' 2020-04-17 08:05:13 -06:00
27941b027b Windows: Fix working directory issue in debug batch files
Batch files did not work when you ran them from a
different working directory.
2020-04-17 08:04:49 -06:00
795a874d0b Merge branch 'blender-v2.83-release'
Conflicts:
	source/blender/makesdna/DNA_userdef_types.h
	source/blender/makesrna/intern/rna_userdef.c
2020-04-17 15:16:16 +02:00
c565d0764f Enable new undo code by default.
Note that given how experimental is working currently, I had to rename
and inverse the effect of the experimental undo flag, which will now
instead activate legacy code when set.
2020-04-17 15:13:25 +02:00
a250be980a Fix T74805 Workbench: Back faces flicker with Auto Depth is enabled 2020-04-17 14:57:36 +02:00
96825403a6 Overlay: Fix unreported bug: Edit mode overlays drawing during auto depth
This would double draw the edit cage on top of the other overlays.
2020-04-17 14:57:35 +02:00
95a018aa32 Workbench: Fix unreported bug: garbage viewport when changing AA settings
Was caused by uninitialized buffer.
2020-04-17 14:57:35 +02:00
c87dd76937 Fix T75774: rename Musgrave texture output from Fac to Height
To make it clear that's not in the 0..1, but more of a terrain height value
without a strict range.
2020-04-17 14:28:24 +02:00
493c623b13 Merge branch 'blender-v2.83-release' 2020-04-17 20:24:03 +10:00
adc6659de5 Fix T75820: Child bone head vanishes when connected parent is hidden 2020-04-17 20:21:25 +10:00
40d90456ea Fix logical error in BLI_hash_pointer_to_color
'hash_b' was always zero as it's range was bit-shifted away.
2020-04-17 19:30:14 +10:00
f8ca1da138 Merge branch 'blender-v2.83-release' 2020-04-17 19:19:22 +10:00
1b7ceb0aff Fix normal smoothing for light positioning gizmo 2020-04-17 19:18:08 +10:00
53ff71725a Merge branch 'blender-v2.83-release' 2020-04-17 18:52:27 +10:00
b6279b7415 Fix T75794: Light point gizmo translate jumps
Holding Ctrl while dragging the light point gizmo would use
uninitialized stack memory if the normal had not been
initialized by a surface.

Now holding Ctrl can be used to drag,
even when there is no surface to orient to.
2020-04-17 18:51:09 +10:00
e77821eeca Merge branch 'blender-v2.83-release' 2020-04-17 18:17:23 +10:00
774b61189c Fix T75796: Misaligned quit dialog keymap 2020-04-17 18:09:05 +10:00
841b0c2bf5 Merge branch 'blender-v2.83-release' 2020-04-17 08:25:10 +02:00
42224bf623 GPencil: Add always empty frame when add new layer
The dopesheet needs to have a frame to display the channel, so an empty frame is created in the current frame.

See T66505 for details of why an empty channel cannot be displayed.
2020-04-17 08:24:22 +02:00
03faffa10b UI: support A-Z accelerator keys for pie menus
Converting menus to PIE's was removing convenient key accelerators.
2020-04-17 15:50:47 +10:00
f1f68b3f9a Fix toggling quad-view loosing 3D view clipping 2020-04-17 15:30:18 +10:00
19c7ef3067 UV: minor adjustments to opacity adjustment
- Allow 0.0..1.0 range, as even at 0.0 the selection is still visible.
- Correct versioning code, not to overwrite the value for new files.
2020-04-17 13:53:15 +10:00
cbd6c5735d GNUmakefile: remove style checking targets
This has been removed since clang-format now enforces code-style.
2020-04-17 12:33:40 +10:00
0f0436c15e Cleanup: comments for ui_draw_menu_item & correct argument name 2020-04-17 11:16:48 +10:00
ab93e568eb Cleanup: use colon after doxygen parameters, spelling 2020-04-17 11:15:00 +10:00
0733bd0d64 UI: Fix bad flow layout
The layout of the new sequencer disk cache were not handled well with 
large preference windows.
2020-04-16 20:00:14 -04:00
27e39cc533 GPencil: Add always empty frame when add new layer
The dopesheet needs to have a frame to display the channel, so an empty frame is created in the current frame.

See T66505 for details of why an empty channel cannot be displayed.
2020-04-16 22:43:41 +02:00
9029690a5d UI: Remove old hacks for dynamic scrollbar hiding
Although we still dynamically hide scrollbars, they don't change the
region size anymore. They are simply drawn on top of the region content.
Because of this, some hacks introduced by fa28e50ac2 are no longer
necessary.
Without these hacks, the scrollbar visibility is evaluated much more
often (cheap operation) which should be more reliable and possibly solve
some glitches.

Also replaces integers passed as booleans.

Fixes T75782.
2020-04-16 20:50:51 +02:00
b374fcc98f Merge branch 'blender-v2.83-release' 2020-04-16 17:45:07 +02:00
8cb10c124e Fix T75675: Unlinking [with setting users to zero] not clearing
LIB_TAG_EXTRAUSER_SET flag

For example in the Image Editor, an assert would be triggered after
unlinking an image [with setting users to zero] and then setting the
image for the Image Editor again.

Whenever we set an Image for Image Editor, the Image ID is flagged
LIB_TAG_EXTRAUSER_SET, when we unlink [with setting users to zero] this
flag was not cleared.

quote @mont29: "a proper fix would be to move this to modern code, and
actually delete the ID..." but that is for later.

Maniphest Tasks: T75675

Differential Revision: https://developer.blender.org/D7452
2020-04-16 17:38:05 +02:00
67ddf68dd9 Merge branch 'blender-v2.83-release' 2020-04-16 17:09:01 +02:00
e9bf624a49 Fix T75680: Nodegroup user count increased when file saved in edit group mode.
This editor's code was a bit schizophrenic, some parts considering its
nodetree usages as real refcounted ones, others, as shallow 'user one'
ones...

Editors should not be real ID users anyway, unless there are *very* good
reasons for it, so swich it to fully 'shallow' usage now.
2020-04-16 17:08:46 +02:00
db600fd639 Fix Memory Leak in Shader Interface 2020-04-16 16:55:46 +02:00
2a68b41b7d Fix T74964 Stereo 3D anaglyph and interlace not working
Caused by framebuffer initialized in the wrong context.
2020-04-16 16:24:22 +02:00
e22e766cf8 Merge branch 'blender-v2.83-release' 2020-04-16 16:22:08 +02:00
81bb2a143c Fix T75730: Properly remove unused override properties/operations.
While code is supposed to handle gracefully invalid override operations,
it is much cleaner to avoid those completely.
2020-04-16 16:21:11 +02:00
dac6091207 Fix (unreported) crash on use-after-free in liboverride deletion code. 2020-04-16 16:21:11 +02:00
0438944b34 Refactor/strengthen a bit invalid operands checks when applying an override operation. 2020-04-16 16:21:11 +02:00
e3d575b376 Fix T75730: Crash on read of liboverride data when missing source modifier.
While this should not happen, we still want to handle those errors
gracefully from user perspective (i.e. assert for devs, no crash for
users).

Actual fix of root cause of the issue will come later.
2020-04-16 16:21:11 +02:00
d34c5eec19 GPU: Fix Negative Shift
glAttributes also include `gl_` names. These don't have a location and
should be ignored during shader interface creation. Those internal names
received a location of -1 and therefore the bitmasking was undefined.

Users wouldn't notice this, but ASAN warned developers of this situation.
ASAN could quit making ASAN un-usable as most shaders have this issue.

Reviewed By: Clément Foucault`

Differential Revision: https://developer.blender.org/D7448
2020-04-16 16:20:40 +02:00
Brecht Van Lommel
79a58eef05 Fix T73977, T73825: ignore Python user site-packages directory by default
This goes along with the existing changes to ignore PYTHONPATH by default.
--python-use-system-env now controls both.

Differential Revision: https://developer.blender.org/D6962
2020-04-16 15:58:31 +02:00
a1420da027 Merge branch 'blender-v2.83-release' 2020-04-16 15:57:37 +02:00
a9dd6d004b Fix T75780: Gpencil Sculpt brushes not working with old files
The patching of brushes was not done.
2020-04-16 15:53:58 +02:00
816597d6da Fix T75785: "Extrude Faces Along Normals" throws error 2020-04-16 10:44:48 -03:00
8a506b9660 Merge branch 'blender-v2.83-release' 2020-04-16 10:32:46 -03:00
dcb443416e Fix memcpy overlapping buffers
This crashes with ASAN enabled.
```
==39366==ERROR: AddressSanitizer: memcpy-param-overlap: memory ranges [0x6230000ae848,0x6230000ae85a) and [0x6230000ae851, 0x6230000ae863) overlap
```
2020-04-16 10:31:51 -03:00
7ef2dd8424 UI: Move node socket icons to the left of node input buttons
Node input buttons (e.g. in the material properties) used to draw their
icons on the right of the buttons. However since they represent inputs,
it makes more sense conceptually to have them on the left.
Further, we might want to add the usual decorator buttons (to control
keyframes or display other states) to the material properties as well.
Having two circle icons next to each other would be confusing.

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

Reviewed by: Brecht Van Lommel, William Reynish
2020-04-16 15:29:19 +02:00
675d42dfc3 UI: Draw real node sockets for node input buttons
For buttons representing node inputs (e.g. in the material properties)
rather than drawing some generic socket icon, the actual sockets are
drawn now. That includes color, shape and the selection outline.

This should make it easier to understand what these buttons relate to.

Screenshots: {F8469252}, {F8469248} (The left alignment will be done in
a follow-up commit.)

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

Reviewed by: Brecht Van Lommel, Clément Foucault, William Reynish
2020-04-16 15:29:19 +02:00
737a4309e8 Cleanup: typo in comment 2020-04-16 15:22:15 +02:00
cdd406f4bd Cleanup: unused variable warning
Not needed since rB1685f5824d91.
2020-04-16 14:34:14 +02:00
13876d50ce Merge branch 'blender-v2.83-release' 2020-04-16 14:12:09 +02:00
3ea4d3dc07 Fix (unreported) Image Editor UI drawing too dark
Caused by rBf0221ff6674f.

Only draw the Image buffer itself in display space.

Differential Revision: https://developer.blender.org/D7449
2020-04-16 14:04:30 +02:00
70a6c737ec Cleanup: Deduplicate getting node tree from id
Differential Revision: https://developer.blender.org/D7438

Reviewers: mont29
2020-04-16 12:06:01 +02:00
3468434b6b Theme: adjust active UV face color in the theme
This color had it's alpha reduced in the drawing code,
as the active face is no longer stippled.

Now the color is used from the theme without adjusting the alpha.
2020-04-16 18:46:32 +10:00
90d3fe1e4d UV: support changing the opacity of the UV overlay
Add this option as it's useful to adjust how much UV's
cover the image when UV mapping.

D5348 by @EitanSomething with edits
2020-04-16 18:26:07 +10:00
ec263547b5 Merge branch 'blender-v2.83-release' 2020-04-16 08:58:25 +02:00
Jeroen Bakker
5d9d246851 GPUImmediate: Use 2 Buffers For (Un)Strict
We used to have a single buffer that was shared between strict and
unstrict draw calls. This leads to many recreation events for the draw
buffers. This patch separates the Unstrict draw buffer from the strict
draw buffer.

This improves performance on Windows Intel 10th gen platform.
On a reference platfor before the patch I got 10 FPS, after this patch
it became 34fps. Note that the same test normally on a low end GPU can
get to 60fps so this does not solve all teh bottlenecks yet.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7421
2020-04-16 08:46:31 +02:00
Jeroen Bakker
502b8e0f08 GPUViewport: Use GPUBatch for viewport drawing
When drawing the viewport to the screen the draw calls were not batched.
This resulted in measurable slowdown on Windows Intel 10th gen
platforms.

This patch would cache the last draw calls per viewport. Our API does
support partial redrawing of the viewport, but that isn't used anywhere.

This patch does not include stereoscopy rendering. This still uses the
imm approach and would still be slow on certain hardware.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7357
2020-04-16 08:41:53 +02:00
a703bbb4d7 Fix T75567: Paint Mode Wireframe Incorrect
The loop normal VBO is used in two manners. In edit mode to draw the
edge normals. And in paint mode to draw the wireframe. This commit
checks which VBO is needed and build the correct one.

This allows show the wireframe correct in paint mode, when the object is
subdivided.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7419
2020-04-16 08:34:55 +02:00
ef19cd395f Fix T75455: High World Space Cavity Samples Crash
When setting the number of cavity samples to a high number blender could
write out of bounds.

This patch will harmonize the number of iterations in the same way how
it is done during execution.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7425
2020-04-16 08:32:34 +02:00
0301aff285 Fix T75620: Lamp gizmo flips direction for negative scaled objects 2020-04-16 15:55:04 +10:00
e322f7a3a2 UI: disable shade flat/smooth in sculpt mode 2020-04-16 12:06:50 +10:00
002752f021 Object: only apply smooth/flat to the active object in paint modes
Also some minor improvements:

- Only run once per object data instance.
- Correction for mesh smooth flag being used on curves.
- Move curve operation into utility function.
2020-04-16 11:47:48 +10:00
1685f5824d Cleanup: remove unused scene argument 2020-04-16 11:05:52 +10:00
bc0ed16537 Cleanup: use sections for object_edit.c 2020-04-16 10:59:41 +10:00
d409ce1593 Logging: log warnings which had been disabled since 2.4x 2020-04-16 10:59:41 +10:00
32cd853294 Merge branch 'blender-v2.83-release' 2020-04-16 00:31:33 +02:00
f0221ff667 Fix T75750 Image Editor: Rendered result is much brighter than in viewport 2020-04-15 23:34:19 +02:00
e0d7b6c78d Fix T75751 Overlay: Clipping Region crashes Blender 2020-04-15 22:30:55 +02:00
e08ac50a5c Fix T75443 Color Management: Use after free crash when using curve mapping
The root cause is that viewport can draw cached version of themself but
the scene can have been updated and the pointed curvemapping could have
been freed.

To workaround this we just keep a copy of the curvemap at the viewport
level.
2020-04-15 22:30:55 +02:00
851baa40a1 Operator: Add 'dissolve_and_intersect' option for 'Extrude and Move on Normals'
This allows easy choice of operators when editing keymaps
2020-04-15 16:02:28 -03:00
03a931a876 Cleanup: Remove unused operator 2020-04-15 16:02:28 -03:00
ed8184cff0 UI theme: Make Properties panels opaque
The resulting colors are unchanged, but panels now appear opaque when dragging over other panels
2020-04-15 20:12:43 +02:00
3b0d86d8b1 UI: Draw subpanels on top while dragging
Currently the background of a panel is drawn on top of its subpanels
when it is dragged. The solution is to also "select" the subpanels so they
are drawn on top in UI_panels_draw.

Differential Revision: https://developer.blender.org/D7440
2020-04-15 13:11:48 -05:00
e9a3a1afd1 Mantaflow: Change Defaults to Improve Instantaneous Playback
- Change the default cache method to replay
- Change the default resolution to 32 (The same as old smoke)
  which have a speedup of about 4x (~4 FPS vs. ~16 FPS on initial 
playback)

Peformance was tested with 3700x and RTX 2070

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

Fixes T73799
2020-04-15 13:54:08 -04:00
f49ffd7f1c Update RNA Manual References 2020-04-15 13:48:59 -04:00
11a6d840da Merge branch 'blender-v2.83-release' 2020-04-15 18:50:17 +02:00
Vincent Blankfield
eb46b55e56 Fix T75613: "In Front" setting did not override image empty "Depth"
Differential Revision: https://developer.blender.org/D7418

Reviewers: campbellbarton, brecht
2020-04-15 18:49:32 +02:00
4dc534aa04 Merge branch 'blender-v2.83-release' 2020-04-15 17:46:09 +02:00
f250b1f5a0 Fix assert for Image Editor invert/resize operators
Caused by rB2bf4c74130ff.

For undo, the ImageUser's scene should be NULL (see D7022 for
discussion).

PaintTiles were already doing it beforehand in ED_image_paint_tile_push,
but Image ops [scale/invert] are calling
ED_image_undo_push_begin_with_image directly.

Now actually set the UndoImageHandle iuser.scene to NULL (rather than
asserting)

ref T75675

Maniphest Tasks: T75675

Differential Revision: https://developer.blender.org/D7435
2020-04-15 17:20:59 +02:00
ec574b5b09 Cleanup: remove (unused) RNA update cache
Introduced in 2011 in rB6a392e8cb505, it was disabled again soon after
in rBb062056c05a3 and traces to it partly removed in rB21744217cea9.

Now remove completely.

quote @sergey:
We shouldn't be having partially working unused code.
If we ever need some sort of update cache it would need to have clear
design first, and the code could be resurrected from history if needed.

Differential Revision: https://developer.blender.org/D7432
2020-04-15 17:05:33 +02:00
b79a5bdd5a View3D: New tool 'Extrude, Dissolve and Intersect'
Basically this new tool constitutes a macro that uses the parameters of
the Extrude and Translate operators that were recently implemented.

Thanks to @CandleComet for initial implementation.

Differential Revision: https://developer.blender.org/D7222
2020-04-15 12:01:54 -03:00
8f86da71fe Operator: Add 'use_automerge_and_split' option for Translate 2020-04-15 12:01:54 -03:00
fe513a5b61 Operator: Add 'use_dissolve_ortho_edges' option for Extrude 2020-04-15 12:01:54 -03:00
7af84255c7 Cleanup: typo 2020-04-15 16:57:28 +02:00
debd8aab4a UI: default to searching menus instead of operators
Menus from the top-bar, space-header and key bindings are used
to gather menus to populate the search popup.

Giving better context and default options for operators.

Part of T74157

Enabling "Developer Extras" exposes operator search in the Edit menu,
as this can be useful for developers to run operators
without first exposing them in the interface.
2020-04-16 00:32:30 +10:00
f83ccbc673 Cleanup: unused variable, spelling 2020-04-16 00:12:39 +10:00
549b854187 Fix: Replace ID_HA with ID_PT in pointcloud.c 2020-04-15 15:57:25 +02:00
7d1c7a6485 Fix splash screen not showing button to load config from 2.83 into 2.90 2020-04-15 15:54:42 +02:00
Nathan Letwory
5fb4ff7711 Ensure 2.90 is still alpha for bcon1 2020-04-15 16:02:24 +03:00
Nathan Letwory
69a2af7e84 Merge branch 'blender-v2.83-release' 2020-04-15 16:01:49 +03:00
Nathan Letwory
b9ec9afce1 Bump master to 2.90 alpha for bcon1 2020-04-15 16:01:35 +03:00
7de86ad61f Fluid: Improved cache 'Replay' option
When using the 'Replay' cache mode the cache needs to be invalidated whenever simulation variables have been changed.
The invalidation will always only affect the according subcaches, e.g. when changing a mesh paramter only the mesh cache will be invalidated, the base cache will remain intact.
Before this change Blender always invalidated the entire cache.
2020-04-15 14:22:47 +02:00
0f6044610f Fluid: Cleanup in MANTA main class
More concise return types for cache import functions and general cleanup.
2020-04-15 14:22:47 +02:00
d9db8f8b7c Fluid: Remove noise bake call from Python
Saving noise cache files is handled in fluid.c.
2020-04-15 14:18:00 +02:00
e21fdfc8e4 Fix T75681: Mantaflow crash when trying to bake a cupcake: The CG solver diverged, residual norm > 1e30
Ensures that there are no enclosed holes between an obstacle and the domain walls.
2020-04-15 14:18:00 +02:00
d6de81eed6 Fluid: Minor UI fix for diffusion panel
Was missing active option.
2020-04-15 14:18:00 +02:00
Nathan Letwory
54736d5058 Bump release cycle to beta for 2.83 2020-04-15 15:03:05 +03:00
Nathan Letwory
9ca1b721b4 Ensure master points at latest submodule heads 2020-04-15 14:41:47 +03:00
8fcbbcf2e6 Fix unreported Auto IK crash when using targetless IK.
Needed to use a temporary pchan iterator to make sure that we keep track
of the selected bone.
2020-04-15 13:25:44 +02:00
6547d9d3e2 Fix T75649: Using "Auto IK" on FK controls with Rigify will crash Blender.
Fixed a coding mistake when adding temp IK chains with Auto-IK.
We need to use the data from the new temporary constraint.
2020-04-15 12:36:14 +02:00
Henrik Dick
c1edbe7917 Fix mistake from last commit to solidify.
While review the behaviour was changed accidentally.
Now Solidify just crashes everytime.

This is the fix for that.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D7434
2020-04-15 12:07:58 +02:00
Yevgeny Makarov
bdf260a1b8 UI: Avoid manual right-alignment of text in splash screen
Can use existing layout features for right-alignment instead.

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

Reviewed by: William Reynish, Julian Eisel
2020-04-15 11:49:25 +02:00
Yevgeny Makarov
04828b7d99 UI: Round splash image corners according to theme preferences
Round the corners of the splash screen image according to the theme's
User Interface > Menu Back > Roundness preference.

Previously the rounding was added to the image itself, which was fiddly
to do. The rounded corners of the popup background would not match
the one of the image if the preference was changed.

The current splash image will likely be updated to not include rounded
corners in a separate commit.

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

Reviewed by: Julian Eisel (with some changes)
2020-04-15 11:49:25 +02:00
69419b5f00 Resources: Remove small splash screen image variant
After the previous commit by Harley Acheson, scaling can be handled at
runtime so we don't need to have two splash screen image variants
anymore.
Also removes the `splash_scale.sh` script used to create the down-scaled
variant.
Always nice to get rid of some binary files from the repository :)
2020-04-15 11:49:25 +02:00
ad3bcee081 UI: Automatically scale splash screen image
Previously, there had to be two splash images to deal with different
DPI settings and hiDPI screens. The larger version was simply downscaled
in an external program for the small one. When up-scaled, the images
would look rather badly.
We now handle scaling completely at runtime. The results should look
pretty much identical for most cases. When up-scaled it should look
better though.
New bundled splash images should have a width of 1000px or more (used to
be 1002px).

More details with screenshots and comparisons in D6999.

Reviewed By: William Reynish, Julian Eisel

Differential Revision: https://developer.blender.org/D6999
2020-04-15 11:49:25 +02:00
Henrik Dick
51e73e9956 Fix crash whith Simple Solidify and Bevel Convex.
After recent changes, simple solidify modifier would crash with Fill Rim
turned off and Bevel Convex emabled.

Also fixes that simple solidify would not set the bevel weight flag so the
next modifier could use the bevel weights.

Simple cleanup with do_rim is also included.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D7428
2020-04-15 11:09:20 +02:00
530008df1d Fix incorrect UI_SEP_CHAR checks
- Menu drawing function used first instance instead of last.
- Menu hash function checked for the character without first
  checking UI_BUT_HAS_SEP_CHAR was enabled.
2020-04-15 17:36:34 +10:00
e17bee5b7f Cleanup: missing-prototypes warning 2020-04-15 17:36:30 +10:00
44b9f6a888 Fix T74881: Plane-track corner drag fails with LMB select
Fix from 8a5a306a83 caused tweaking to fail in the clip editor,
as it wasn't using same convention of other selection operators that
returned the pass-through flag to allow tweaking too.
2020-04-15 15:21:46 +10:00
5e05db3419 Fix shader error sRGB gizmo drawing workaround
Issue in 21c658b718 with function being defined twice.
2020-04-15 14:49:01 +10:00
0d4eefd231 Fix T75712: Sequencer text strip doesn't scale to render size 2020-04-15 14:20:14 +10:00
1bb241437c Fix menu search using exec instead of invoke by default
Caused edit preferences not to open.
2020-04-15 13:36:04 +10:00
92113e2da7 Fix menu search omitting the outliner context menu
Use a regular context menu as a fallback for the outliner.

If there are no specific actions for the item under the cursor,
fall through to opening a regular menu.

This lets menu search find the context menu items which were previously
unavailable as menu search wont run operators.
2020-04-15 13:04:13 +10:00
af91bbc221 UI: expand names of collection menu 2020-04-15 13:04:13 +10:00
e74535df08 Cleanup: shadow warning 2020-04-15 13:04:13 +10:00
04f006ea9e Fix T75733: Curve extrusion does not include endpoints
This error only occurs when the end points are part of
a sequence of selected points.
2020-04-14 17:14:16 -03:00
47f46637be Sculpt: New Layer Brush
The Layer brush was in Blender before 2.81, when the sculpt API was
introduced. It had a huge amount of bugs and glitches which made it
almost unusable for anything but the most trivial cases. Also, it needed
some hacks in the code just to support the persistent base.

The brush was completely rewritten using the Sculpt API. It fulfills the
same use case as the old one, but it has:
- All previous artifacts fixed
- Simpler code
- Persistent base now works with multires thanks to the sculpt API
- Small cursor widget to preview the layer height
- More controllable and smoother strength and deformation
- More correct masking support
- More predictable invert support. When using persistent base, the brush invert mode resets to layer height 0, instead of jumping from +1 to -1. The brush can still be inverted in the brush direction property.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7147
2020-04-14 21:07:29 +02:00
7dd8c889f1 Sculpt: Sharpen Mesh Filter
This mesh filter sharpens and smooths the mesh based on its curvature,
resulting in pinching hard edges and polishing flat surfaces. It fixes
most of the artifacts of the voxel remesher and those produced when
sculpting hard surfaces and stylized models with creasing and flattening
brushes.

It needs and accumulate_displacement step before each filter iteration which
can't be multithreaded in an easy way (it would need something to sync the
threads when modifying the data of neighbors in a different node), but this
does not affect performance in a significant way.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7335
2020-04-14 21:00:14 +02:00
f881ff129f Fix Shift-Smooth mode using wrong parameters
When using the shift-smooth mode, sculpt_update_cache_invariants is
changing the brush datablock of the paint session if it finds a brush
named "Smooth" (which is a huge hack the brush management project should
try to solve). This is done after the PaintStroke data in the modal
operator is created, which holds a reference to the active brush in the
paint session that was active when the operator started. Because of
this, the StrokeCache was getting the correct smooth brush values but
the paint modal operator was applying the wrong ones from the previous
brush. This was causing the smooth brush behaves unpredictably depending
on the current active brush.

This patch updates the brush in PaintStroke on each modal callback, so
it always gets the values from the current active brush in the Paint
Session.

The way brush switching works and a way to make it more flexible needs
to be discussed in the future as part of the brush management project.

The default smooth brush parameters and curves will probably need to
be updated after this change, as previously they were set using an
incorrect behavior.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7354
2020-04-14 20:55:38 +02:00
f12589d335 Fix automasking using the wrong active face set
All tools should now use the API function to get the active face set
directly from the face under the cursor.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7362
2020-04-14 20:53:42 +02:00
bb9a282c7e Fix Randomize Face Sets Colors not working in Multires
The operator was disabled when it was added because Face Sets were not
supported in Multires.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7312
2020-04-14 20:52:10 +02:00
21c658b718 GPUShader: Implement workaround for gizmo drawing on sRGB framebuffer
This solution involves adding a uniform to each fragment shader that is
used by gizmo drawing and use the framebuffer state to set this uniform
accordingly.

This solution can also be carried to external shaders (addons).
A single line of code would then be enough to fix the issue.

The only trickery here is the dummy define:
`#define srgb_to_framebuffer_space(a)`
This is in order to avoid breaking other DRW shaders that use the same
fragment shader code but do not need the tranformation.

Related to T74139

Reviewed By: brecht, campbellbarton

Differential Revision: https://developer.blender.org/D7261
2020-04-14 20:44:56 +02:00
bf49bb354f Fix T75104: Update Face Sets visibility when entering Sculpt Mode
Geometry that was just added to sculpt mode has the SCULPT_FACE_SET_NONE
assigned, so it was hidden by default. By doing this when entering
sculpt mode a new visible face set is created for it, making it easier
to isolate it again if you want to do further tweaking with the sculpt
tools.

Also, this also fixes the issue that may happen when changing the mesh
visibility in edit mode. Now visibility changes done outside sculpt mode
are stored in the face sets when entering sculpt mode, so mesh
visibility should stay the same.

Reviewed By: jbakker

Maniphest Tasks: T75104

Differential Revision: https://developer.blender.org/D7249
2020-04-14 19:24:44 +02:00
7fbd9b67af Fix Windows build error introduced in Wintab commit revert 2020-04-14 17:14:56 +02:00
e90d8422d0 Revert "Windows: support high resolution tablet pen events for Wintab"
This reverts commit 1a3928f33c and 1a3928f3. This is not working stable
with some Wintab implementations, so reverting for now. This leaves only
the Windows Ink changes for 2.83.
2020-04-14 18:58:37 +02:00
65f674b570 Fix T75535: Compositor backdrop gizmo dragging interrupts with node
mouse over

Caused by rB5929dd7129f6.

Above commit would reset the gizmo highlight on node mouseover.
This would also assert in gizmo_rect_pivot_from_scale_part() and stop
the drag.

So now, only reset the gizmo when we are not in EVT_GIZMO_UPDATE,
allowing for starting the tweak outside a node and then travelling
'inside' while still preventing to use it over a node when starting a
tweak there.

Maniphest Tasks: T75535

Differential Revision: https://developer.blender.org/D7383
2020-04-14 18:32:30 +02:00
dc66fa5c9c Fix T75589: Image Sequences have no data on file load.
Issue was with setting of frame to load from an image sequence,
synchronization was not done properly at some point, leading to
generation of an invalid final filepath to be read.
2020-04-14 18:12:59 +02:00
d4ead6e639 Cleanup: Remove unused defines 2020-04-14 16:17:46 +02:00
00466e756e RNA: Fixed incorrect depsgraph tagging for Object.color and pass_index
These options do not influence the transform, but do (potentiall) influence
the shading.
2020-04-14 16:09:01 +02:00
7bfb7450a2 Fix showing check-boxes in menu-search 2020-04-14 23:50:00 +10:00
de47bf69da Cleanup: remove text editor 'select' option that did nothing 2020-04-14 23:33:57 +10:00
b800a05c55 Revert "Cleanup: remove unused text.selection_set select option"
This reverts commit 9af0cdcd93.

Removed this feature because of confusion
caused by incorrect description.
2020-04-14 23:33:57 +10:00
Vincent Blankfield
50dd876fbf Fix T75629: Disallow dragging collection instance into itself
Differential Revision: https://developer.blender.org/D7408
2020-04-14 15:12:26 +02:00
2ed2dd7b13 GPencil: Add missing 2.82 Random Layer color removed in refactor
Use a single color by object in grease pencil is not practical because is necessary to see all layers.

To tint by layer, the layer tint parameter is used and not the material color as is done in other modes.

This function has been backported from 2.82 because was removed in the 2.83 refactor.
2020-04-14 12:48:11 +02:00
Henrik Dick
cc9bee9162 Add Complex Solidify option for thickness per face
Add an option to solidify complex which will make faces which have thickness
controlled by vertex weights flat/even, and parallel to their original face.

For each face it uses the minimal weight assigned to its vertices to control
the thickness.

This will help users for example in architecture or basic CAD design by finally
making solidify work there at all if altering thickness is needed.

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

Reviewed and minor cleanups by Batien Montagne (@mont29).
2020-04-14 12:36:21 +02:00
Henrik Dick
35b1cc806f Improve Solidify/Bevel Modifier cooperation
Adds a slider to solidify which allows the user to add bevel weight on the outside
or remove bevel weight from the inside.

Also includes a very small improvment for working with subsurface modifier where
the rim edge in complex solidify will now also have a chance to get a crease if
there is only two adjacent edges.

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

Reviewing and minor cleanups: Bastien Montagne (@mont29).
2020-04-14 12:18:22 +02:00
b07e8a24f5 Cleanup: remove unnecessary branch when lib linking constraints
Differential Revision: https://developer.blender.org/D7386

Reviewers: mont29
2020-04-14 11:50:36 +02:00
6e272b9ba4 BLI_math: add min/max utils for chars. 2020-04-14 11:29:46 +02:00
Brecht Van Lommel
47084bac9f Fix T75542: toggling modifier visibility not working correct with undo speedup
The problem was that in direct_link_id_restore_recalc, recalc_undo_accumulated
should contain the changes from the target state to the current state. However
it had already been cleared at that point, to start accumulating changes up to
the next undo push.

Delaying the clear of this flag seems like the obvious solution, but it's hard
to find the right place for that (if there is one). Instead this splits up the
flag into two separate variables.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D7402
2020-04-14 11:07:56 +02:00
e6d9d5dcc1 UI: improve menu search with dimmed menu prefix
- Show dimmed text for the menu entries leading up to the menu item.
- Show icons between the menu text and menu item.
- Use unicode right pointing triangle instead of arrow.
2020-04-14 18:50:28 +10:00
571646ebc1 Cleanup: pass font drawing x/y offset arguments as int's
Internally these values are ints.
2020-04-14 18:41:23 +10:00
3bef5d15d8 UI: add spin to extrude menu
This tool wasn't accessible anywhere in the interface
(besides the interactive tool).

Add to extrude since it's a kind of extrusion.
2020-04-14 18:34:07 +10:00
0fa7e1efbe UI: correct menu used for dope-sheet 2020-04-14 18:30:27 +10:00
b2c2d7b7f1 Sculpt: Implement undo of Apply Base during sculpt session
The idea is to push both base mesh geometry and PBVH coordinates
so it is possible to undo everything without loosing data which was
not flushed from sculpt session to base mesh.

It is possible do memory optimization to avoid push custom data
layers which are not touched by operator, but before doing that
better to ensure this is a correct and working approach.

Differential Revision: https://developer.blender.org/D7381
2020-04-14 09:46:17 +02:00
9e0b44aae9 Cleanup: ed_util_imbuf sections 2020-04-14 10:49:31 +10:00
5f059c8751 Cleanup: spelling 2020-04-14 10:49:31 +10:00
9ce83acba4 Cleanup: remove redundant include, clang-format 2020-04-14 10:49:23 +10:00
ad317a5ffd Fix T75676: Inconsistent "Only selected" GP layers in Dope Sheet
The selection was not checking all modes.
2020-04-13 19:13:04 +02:00
Henrik Dick
5cf7283342 Fix T75032: New complex solidify algorithm handles poorly merging threshold of small geometry details.
* Implemented the algortihm that would merge vertices to the weighted
  center between them.
* Exposed the merge threshold to the user.

The new default tolerance is 0.0001 (versionning code ensures that
previous default value remains in use to avoid any change in existing
files).

Review and minor changes/cleanups from Bastien Montagne (@mont29).
2020-04-13 17:15:16 +02:00
c19f37764d UI: Fix wrong icon used for Unified Color toggle 2020-04-13 15:47:41 +02:00
2e75172c45 Fix T75677: Annotation in compositor/shading tabs loose AA after drawing stroke
The drawing of annotations in 2D was using a very old code created in 2.6x versions. Now it's using a standard shader as it's done while drawing.
2020-04-13 15:15:47 +02:00
2ec6eca518 Cleanup: unused parameter... 2020-04-13 10:07:12 +02:00
e63d5f40ee Fix T75667: Use of incorrect terminology in the brush_colors_flip operator
- The word 'Flip' is incorrect. 'Swap' or 'Switch' is correct.
  - In Blender, we use 'primary' & 'secondary' color swatches, not 'foreground' and 'background'
2020-04-13 07:49:21 +02:00
71a333f56e Fix T75592: Correctly calculate length of curve verts
Previous commit to fix T75405 needed a small change to increase the
length of the front section of the curve when only the front is built.
2020-04-12 18:17:59 -05:00
68ba6378b5 VSE: Add sample tool
This tool is set as default tool, so default action on click doesn't have pernament effect.

Reviewed By: campbellbarton

Differential Revision: D7064
2020-04-13 00:28:27 +02:00
c456671b53 Refactor sample operator
Move sample operator functions to `ed_util_imbuf.c` and change common functions,
so they can be used in image editor and sequencer.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D7315
2020-04-12 23:56:03 +02:00
0c9e47705d Fix T75421: Wipe clock and Iris transition not working.
Use enum items in RNA enum definition instead of hard-coded values.

Broken by 5dcb6fb22f Cleanup: unused enums

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7342
2020-04-12 23:00:55 +02:00
bbf1c83370 Fix T74875: Preview shows previously cached frame after Hard Cut
Add method to invalidate strip cache in range of non-overlapping strip.
Invalidate original strip in range of new strip created by cutting.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7313
2020-04-12 22:42:31 +02:00
5081556bb5 Fix T75415: Changing text strip "start" leads to flickering image
Cache must be invalidated before and after transformation,
so all frames are properly invalidated.

This also fixes wrong invalidated type, composite is enough here.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7341
2020-04-12 22:27:28 +02:00
5cabf1301a Fix T75382: VSE Strip Adjustments Not Immediately Visible
Cache of effects wasn't invalidated on correct level.

Add invalidation "rule" for invalidating downstream effects.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7343
2020-04-12 22:24:20 +02:00
Richard Antalik
77ca5ab6b0 Fix T74897: VSE animation doesn't work
`seq_free_animdata()` removes fcurve pointers belonging to strips from
`Scene` CoW datablock's `AnimData` during `BKE_scene_graph_update_for_newframe`.
This causes problems with updating animation.

This worked before rBbe2e41c397ba, because `AnimData` was freed by `BKE_animdata_free()`
before `seq_free_animdata()` was executed, so it had no data to operate on and returned
on precondition `if (scene->adt == NULL || scene->adt->action == NULL)`

Reviewed By: mont29, brecht

Maniphest Tasks: T74897

Differential Revision: https://developer.blender.org/D7264
2020-04-12 22:10:13 +02:00
5b79e0b80e Fix volume object not rendering correct frame right after loading 2020-04-12 15:44:28 +02:00
e2003d9212 UI: reorder adaptive sampling settings in order of importance 2020-04-12 15:44:28 +02:00
f16fcb5bd5 Fix volume object not loading frame sequences correct in some cases
Ensure we use the first frame as filepath so we can compute the number of
leading zeros. For file validation, always test the first frame rather than
the current scene frame.
2020-04-12 14:48:23 +02:00
0a747cd4e3 Cleanup: clang-format 2020-04-11 13:01:19 -06:00
aeb42cf8ab Cycles/Optix: Support building the optix kernels on demand.
CMake: `WITH_CYCLES_DEVICE_OPTIX` did not respect `WITH_CYCLES_CUDA_BINARIES` causing the optix kernel to be always build at build time.

Code: `device_optix.cpp` did not count on the optix kernel not existing in the default location.

For this to work, one should have before starting blender

1) working nvcc environment
2) Optix SDK installed and the OPTIX_ROOT_DIR environment variable pointing to it which is not set by default

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

Reviewed By: Brecht
2020-04-11 12:59:21 -06:00
ddfec08514 GPencil: Fix unreported missing update after removing stroke from python 2020-04-11 19:04:05 +02:00
85de07e64c Sanitize and cleanup a bit depsgraph relations building in some modifiers.
This commit mainly:
* Removes some uneeded dependencies to geometry of other objects (since
  we only use positions of those objects...).
* Ensures `DEG_add_modifier_to_transform_relation` is only called once
  per modifier (in one case at least it could be called twice).
* For modifiers using texture mask, only add dependencies to object used
  to generate texture coordinates when there is actually a texture set.

No behavior change expected from this commit...
2020-04-11 17:16:58 +02:00
5cc7036aa3 Factorize some common modifiers depsgraph relation update code.
Add a utility to deal with common 'object or posebone transform' case.
2020-04-11 17:16:58 +02:00
b0350d8310 Revert "GPUViewport: Use GPUBatch for viewport drawing"
This reverts commit 862ec82942. It causes crashes
on some systems, see T75584.
2020-04-11 16:42:01 +02:00
a8d139ca20 Fix for T75595: File Browser and Windows Unicode Paths
Fix for incorrect conversion to utf16 in BLI_file_attributes().

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

Reviewed by Brecht Van Lommel
2020-04-10 14:07:15 -07:00
Cody Winchester
4f9a56cbc4 Modifiers: Add Bone option for Texture Mask Object
This patch adds the option to use an armature bone in place of an object for texture mask coordinates.

This affects the 3 vertex weight modifiers, the displace modifier, the warp modifier, and the wave modifier.

With minor changes from Bastien Montagne (@mont29).

Differential Revision: https://developer.blender.org/D7348
2020-04-10 21:28:59 +02:00
d6cefef98f UI: Better support for linked data-blocks in search buttons
In RNA pointer search buttons (i.e. the ones with an eyedropper),
data-blocks were handled badly. It was not possible to select a linked
data-block that had the same name as a local one, which is especially
common with library overrides. Neither was there a hint to tell appart
linked data-blocks and which .blend file they come from.
These issues are addressed now, we show an "L" prefix and the .blend
file name in the search box (like in ID-templates).

Changes here are quite simple, since the heavy lifting was already done
through c20c203b82.

Addresses T73156.
2020-04-10 20:25:17 +02:00
d216a0b505 Fix T75489: Crash on deleting current workspace from the outliner
It should not be possible to delete the current workspace from the
outliner. Show an error message instead.
2020-04-10 17:30:43 +02:00
475d7d073a Fix T74800 Bevel modifier generates vertex group weight > 1.0.
Due to floating point approximations, the weights for interpolating
the mdeformvert layer could add up to a tiny bit more than 1.0.
This was not a problem in practice, but the mesh validation routine
used in regression tests was testing for this and therefore failing.
Just changed interpolation of mdeformverts to clamp max to 1.0f.
2020-04-10 11:03:27 -04:00
ab8e7ffc64 Fix T75378: Crash on clicking in the ghost icon of an appended proxy object 2020-04-10 11:21:55 -03:00
9a7f5f1bb4 Fix T67232: Multiples targetless IKs in a chain gives weird behaviour (known as FakeIK for FK posing)
The issue was that the deps graph relation builder assumed that all
bones that had a IK constraint on them would be evaluated.  However for
targetless IK bones, only the active bone would receive updates and the
others would be skipped (as those would be treated as if the IK
constraint was disabled).

I didn't see an easy way to solve this from the depsgraph side of
things.

Instead I came up with a solution that I feel is quite strait forward
and reflects what is actually supposed to happen under the hood.

Now all targetless IK constraints are treated as disabled and will not
be added to any relations in the depsgraph.

Instead, a temporary IK constraint will be created when the bone in
question is transformed.  This is basically activating "Auto IK" for the
bone while transforming.

Reviewed By: Sergey, Brecht

Differential Revision: http://developer.blender.org/D7378
2020-04-10 14:01:02 +02:00
9c5b054206 Fix T71546: VSE stereoscopic strips issues with mismatched dimensions
The issue is that the cachiing was adding the right view without the
proper pre-processed buffer.

D7389
2020-04-10 12:44:59 +02:00
0b86943641 Fix T74901: Smoke Simulation crashes on eevee and is not persistent on Cycles
Issue was introduced in 5260aaf3b1 (fix for T73921).
2020-04-10 12:10:23 +02:00
03dda57678 Fix T75141: Default template versioning error for grease pencil
The versioning was done only for template because the code was after a return and never was executed for default scene.
2020-04-10 10:54:46 +02:00
da48a8ef50 Fix T74815: Shapekeys animation is blocked after second append of the same object.
Logic to handle shepkeys datablocks in helper in 'make local' code that
checks which ID should be copied, and which can be directly made local,
was wrong.
2020-04-10 10:52:18 +02:00
d3cda49d14 Fix T74657: Grease Pencil Proportional Editing does not work for
'Individual Origins'

Note gpencil doesnt do anything fancy like meshes in
editmesh_islands_info_calc(), but it looks like there is actually no
harm in allowing proportional editing with individual origins & gpencil
editmode.

Maniphest Tasks: T74657

Differential Revision: https://developer.blender.org/D7351
2020-04-10 08:38:34 +02:00
337a7ed292 Pointclouds: fix point drawing
The radius component is only one float. This resulted in only a third of
intended points to draw and could lead to glitches.

Pointcloud drawing will still change a lot in the future, this is just
to be able to work on some simple tools.

Differential Revision: https://developer.blender.org/D7390
2020-04-10 08:34:07 +02:00
Nicholas Rishel
1a3928f33c Fix T75546: Solve possible endless loop in wintab initialisation
Some Wintab drivers report a zero length queue, this causes an unplanned never ending loop.

Differential Revision: https://developer.blender.org/D7392
Reviewed by: Ray Molenkamp
2020-04-09 16:43:09 -06:00
5ebbd8f672 Cleanup: comment bone cycling & simplify logic 2020-04-10 08:35:55 +10:00
d85e2beb67 Fix T75526: Color Management Look saved in 2.82a resets in 2.83
Missing versioning after `rB9f4b090eec39`.

Differential Revision: https://developer.blender.org/D7388
2020-04-09 17:56:36 -03:00
d7273f087d Fix T75405: Crash when increasing text object bevel depth
One fewer coordinate needs to be calculated when extrusion is zero to
avoid corrupting the end of the memory chunk.

Differential Revision: https://developer.blender.org/D7368
2020-04-09 15:29:49 -05:00
Bartosz Moniewski
054950def9 Shading: add Roughness input to Noise and Wave texture nodes
Currently in fractal_noise functions, each subsequent octave doubles the
frequency and reduces the amplitude by half. This patch introduces Roughness
input to Noise and Wave nodes. This multiplier determines how quickly the
amplitudes of the subsequent octaves decrease.

Value of 0.5 will be the default, generating identical noise we had before.
Values above 0.5 will increase influence of each octave resulting in more
"rough" noise, most interesting pattern changes happen there. Values below
0.5 will result in more "smooth" noise.

Differential Revision: https://developer.blender.org/D7065
2020-04-09 21:48:03 +02:00
Szymon Ulatowski
f3433fcd3b Collections: preserve exclude flag of child collections when unexcluding
Excluding a collection also changes the exclude setting on all child collections
so that it is possible to selectively enable some children without the parent
being enabled.

This change makes it so that if you unexclude the parent, the exclude setting
of children are restored again instead of being permanently lost.

Original patch by Szymon with modifications by Brecht.

Differential Revision: https://developer.blender.org/D7016
2020-04-09 21:46:22 +02:00
07bb7206c2 Cleanup: VSE rename i to view_id for stereo 3d code 2020-04-09 21:01:49 +02:00
78f56d5582 TaskScheduler: Minor Preparations for TBB
Tasks: move priority from task to task pool {rBf7c18df4f599fe39ffc914e645e504fcdbee8636}
Tasks: split task.c into task_pool.cc and task_iterator.c {rB4ada1d267749931ca934a74b14a82479bcaa92e0}

Differential Revision: https://developer.blender.org/D7385
2020-04-09 19:18:14 +02:00
Jeroen Bakker
862ec82942 GPUViewport: Use GPUBatch for viewport drawing
When drawing the viewport to the screen the draw calls were not batched.
This resulted in measurable slowdown on Windows Intel 10th gen
platforms.

This patch would cache the last draw calls per viewport. Our API does
support partial redrawing of the viewport, but that isn't used anywhere.

This patch does not include stereoscopy rendering. This still uses the
imm approach and would still be slow on certain hardware.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7357
2020-04-09 19:12:51 +02:00
bf68e1a547 Cleanup: Remove unused var
This was not removed in previous fix.
2020-04-09 16:25:46 +02:00
464752876f Fix T75490: Child Of - difference between 2.82 and 2.83
rB10162d68e385 introduced a difference in computing the matrix, as well
as a better way to compute the inverse matrix. This commit reverts the
former, while keeping the latter and some other improvements.
2020-04-09 15:04:48 +02:00
a7df9d6cdd Fix menu search referencing image menu
In this case it was called mask which wasn't correct since it's
used for image & UV's, so rename the menu instead.
2020-04-09 22:55:47 +10:00
98abcfdb9d Cleanup: unused variable 2020-04-09 22:55:36 +10:00
a6d8f6c0f3 Fluid: Fix unused variables
Unsed variables for fluid caching.
2020-04-09 12:35:22 +02:00
a8bd385a5d Fix T75491: ctest: usd_test fails in a debug configuration
There was a bug in the `connect_loose_objects()` function, which caused
some objects to be exported twice (once for real, and once
transform-only). This is now resolved.
2020-04-09 12:18:45 +02:00
17da3b5d82 USD: ensure test does not depend on BLI_assert()
The test failure in T75491 only showed up in debug builds because
`BLI_assert()` is a no-op in release builds. This is now replaced by a
proper GTests call to `ADD_FAILURE()`, ensuring that the test fails
regardless of build mode.
2020-04-09 12:14:51 +02:00
80255e67e3 Silence assert on ID usercount for deprecated IPO.
We do not really care about those, so just avoid the noise when loading
very old files...

Re T75389.
2020-04-09 11:21:02 +02:00
36746474fd Tracking: Forward compatibility code for distortion models
Allows to open newer files in older Blender after new distortion model
has been added.

It will behave as if this is a polynomial model with all 0 coefficients
which are then being refined and assigned explicitly after solving the
motion.
2020-04-09 10:59:31 +02:00
b5e277ed05 Cleanup: Fix typo error 2020-04-09 10:58:42 +02:00
ee5cec4a50 Fix T75122: Annotations: Only visible scene annotations in dopesheet
The loop of datablocks was using the scene datablock (3D View) only, but all others datablocks were ignored.

Now the loop consider any annotation datablock.
2020-04-09 10:56:59 +02:00
bd59781c66 Fix T75425: Bone selection cycling not working
Edit-mode bone selection now cycles on successive clicks.
This now cycles through multiple edit-objects & bones.
2020-04-09 18:46:47 +10:00
19352bca16 Cleanup: spelling 2020-04-05 22:22:21 +10:00
7df787b2c1 UI: English as Default Language
Set language setting for new profiles to English.

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

Reviewed by Brecht Van Lommel
2020-04-08 16:10:48 -07:00
1239cab11f Fix T75203: Crash when changing active keying set
When updating the active button, the search data wasn't updated, so it
kept using the old pointers. A check in `ui_rna_collection_search_cb()`
relied on this incorrect behavior so I had to fix that too. Note that
the previous commit was also needed for the second fix to work.

Caused by c46dcdf887.
2020-04-08 23:23:44 +02:00
74fa8787d8 Fix error in UI_butstore_ API
If the `uiButStore` data was freed after the buttons/blocks were updated
from previous instances (see `UI_block_update_from_old()`), e.g. by
delaying that to the "afterfuncs" (`ui_apply_but_funcs_after()`), the
data would get lost. As result, the button pointers that the API is
supposed to keep valid would point to freed memory.

This wasn't an issue so far since the API didn't happen to be used this
way. That changes with the next commit.
2020-04-08 23:22:33 +02:00
c13aa95eda Fix T75288: crash in Cycles image loading with multithreaded shader compilation 2020-04-08 22:01:04 +02:00
cc53c9e476 Fix T75290: Cycles crash with out of bounds memory access in volume mesh build 2020-04-08 21:58:17 +02:00
8360bfb75c Cleanup: clang-format 2020-04-08 21:58:17 +02:00
f405934fe3 Fix T75445: Filmic transform not working when using Turkish locale
This is a bug in OpenColorIO that we work around (see "Turkish I" problem),
a proper fix will be submitted upstream.
2020-04-08 20:50:50 +02:00
d41d4d0593 GPencil: Small changes to brush defaults 2020-04-08 19:03:17 +02:00
4a6f715421 Fix T73552: Mantaflow - liquid particles show up in organized unrealistic structure
Issue was being caused by a particle offset which was random but the same for every particle.
2020-04-08 18:29:26 +02:00
2328599e97 NewUndo: Fix (studio-reported) discrepency in proxies when undoing.
Took me an unreasonable amount of time to understand what was happening
here... Our beloved proxies, as usual, need some specific careful
handling.
2020-04-08 17:43:40 +02:00
b0f229dd27 Tracking: Fix missing distortion update on focal length change 2020-04-08 17:19:21 +02:00
020d1e23ae Fluid: Fix issue with mesh not being loaded
Fixed an issue that was likely introduced in a past cleanup.
2020-04-08 16:26:20 +02:00
34b28850bf Fix wrong material indicated in the error message when baking
The material displayed in the error message due to the lack of active
texture was that of the previous slot.
2020-04-08 09:44:43 -03:00
91d7f5d246 Fix T74572: adaptive sampling still not working correct with shader AOVs 2020-04-08 14:09:10 +02:00
fd487b1f4e Fix build error with WITH_X11_XINPUT=OFF after recent changes 2020-04-08 14:03:54 +02:00
ff2c67d7e8 Fluid: Disable subframes when using adaptive time-steps in the first frame
First frame should only produce inflow once and not compute the emission for the frame before the first frame. Problem became evident in T74062.
2020-04-08 13:42:40 +02:00
c2cb87f897 Fluid: Fix problem with inconsistent noise when using multiple adaptive time-steps
Problem was mentioned in T74062.
2020-04-08 13:27:12 +02:00
a1ddb63329 Fluid: Update Mantaflow source files
Update includes new grid helper functions and some cleanups.
2020-04-08 13:25:16 +02:00
7cafdc57e0 Fluid: Manta clang-format update
Do not use sort-includes in Manta source files for now when applying clang-format. Too many conflicts.
2020-04-08 13:20:18 +02:00
ea5a2efb57 Fix manual reference error after removal of use_international_fonts 2020-04-08 12:43:49 +02:00
Nicholas Rishel
ea3e0b3e8c Windows: support high resolution tablet pen events for Wintab
Together with Windows Ink support, this should fully resolve T70765.

Differential Revision: https://developer.blender.org/D6675
2020-04-08 12:25:40 +02:00
Nicholas Rishel
d571d615a5 Windows: support high resolution tablet pen events for Windows Ink
Rather than using the last state of the tablet, we now query the history of
pointer events so strokes can follow the pen even if Blender does not handle
events at the same rate.

Differential Revision: https://developer.blender.org/D6675
2020-04-08 12:25:40 +02:00
Nicholas Rishel
3d8c57f4da Cleanup: minor refactoring of pointer event handling
Ref D6675
2020-04-08 12:25:40 +02:00
Nicholas Rishel
4e4bf241c8 Cleanup: add utility functions for milliseconds conversion
Ref D6675
2020-04-08 12:25:40 +02:00
c43473e884 Cleanup: remove GHOST API to query tablet state from Window
It's not used by Blender anymore and it's unreliable since this state really
only makes sense associated with events in a particular order.

Ref D6675
2020-04-08 12:25:40 +02:00
Miguel Pozo
d478cc71dd Fix Windows Tablet API preference not being used
It was sometimes set before reading preferences, now it's passed to GHOST every
time preferences are read.

Differential Revision: https://developer.blender.org/D5641
2020-04-08 12:25:40 +02:00
a3c1605581 Cleanup: rename to BLI_path_cwd to BLI_path_abs_from_cwd
This is now more clearly a function that makes the path absolute
using the current working directory.
2020-04-08 16:46:16 +10:00
57468ae37e Cleanup: missed renaming BLI_cleanup_unc_16 in recent refactor
Missed from d14e768069
2020-04-08 16:29:46 +10:00
b0d565e5b6 Cleanup: reduce scope of variables in custom data copying 2020-04-08 16:27:59 +10:00
35861a49ee Fix T67098: Inset causes shape keys to reset exiting edit-mode
Edit-mesh interactive redo reset the meshes shape-key index.

Also copy the selection mode when copying meshes.
2020-04-08 16:26:54 +10:00
bd45ec0b06 Cleanup: disable clang-format for character table 2020-04-08 13:29:51 +10:00
1c58311440 Fix status bar message showing saved when saving failed
Resolves the following issues:

- For the first time you save a .blend file, there was no feedback.
- If the file fails to save (eg "No space left on device") the status
  bar message replaces the error with an invalid "Saved" message.

  While there is a popup, the user may cancel it with mouse motion
  and be left with the status bar message saying the file saved.

D7371 by @XDroid with edits.
2020-04-08 13:22:00 +10:00
056ebb56b1 Cleanup: clang-format 2020-04-08 10:34:39 +10:00
1ec2f8d1f2 Cleanup: spelling 2020-04-08 10:33:56 +10:00
161c13e12b Fix building without translations enabled 2020-04-08 10:24:33 +10:00
1ee3def5d3 UI: Splash Screen Language Selection
Quick Setup splash now includes language selection.

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

Reviewed by Brecht Van Lommel
2020-04-07 16:33:52 -07:00
9d0f452076 Fix missed depsgraph update after undo in some cases
Forgot to take into account legacy DEG_id_tag_update with zero flag.
2020-04-07 23:56:07 +02:00
a2243f1b51 Debugging: change Undo/Redo redraw timer to include dependency graph update
This is often the slowest part and was not counted before.
2020-04-07 23:43:55 +02:00
968619d036 UI: Language Selection Changes
Removal of 'Translation' checkbox. Enable translation options when selecting non-English languages.

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

Reviewed by Brecht Van Lommel
2020-04-07 13:25:49 -07:00
53981c7fb6 Cleanup: refactor adaptive sampling to more easily change some parameters
No functional changes yet, this is work towards making CPU and GPU results
match more closely.
2020-04-07 20:29:48 +02:00
7b4b07a7dd GPencil: Fix unreported problems with Chisel brush
With the new sampling, the arc points were not using the angle of the brush and the line was with the same thickness in all orientations.
2020-04-07 20:07:58 +02:00
6b58571813 UI: Don't collapse all panels for subpanels
The behavior for subpanels was incorrect, and the ideal behavior isn't even clear.

This disables the "collapse all" ctrl click feature for panels that have parents.

Differential Revision: https://developer.blender.org/D7355
2020-04-07 11:51:08 -05:00
c5ed2eb95e Undo: change depsgraph recalc flags handling to improve performance
These changes only have an effect when the experimental Undo Speedup preference
is enabled.

* For DEG_id_tag_update, accumulate recalc flags immediately before the undo
  push happens instead of afterwards. Otherwise the undo state does not
  contain enough flags, and the current state may contain too many flags.

  This also means we call DEG_id_tag_update after undo with the accumulated
  flags to ensure they are flushed to other datablocks.

* For undo, accumulate recalc flags in id->recalc and clear accumulated flags
  immediately. Not clearing would cause circular behavior where accumulated
  flags may never end up being cleared.

  This matches what happens after an undo push where these are also cleared,
  indicating that the undo state and current in-memory state match exactly.

* Don't change id->recalc of identical datablocks, it should not be needed.
  There is one exception for armatures where pointers across datablocks
  exist which otherwise would cause problems. There may be a better solution
  to this but it seems to work in agent 327 production files.

* This contains a change in undofile.c to avoid detecting all datablocks as
  changed for the first of the two undo steps, where we restore to the state
  of the last undo push before going to the one before.

  Without this the whole system is much less efficient. However this is unsafe
  in the sense that if an app handler or operators edits a datablock after an
  undo push, that change will not be undone.

  It can be argued that this is acceptable behavior, since a following undo push
  will include that change and this may already have unexpected side effects.

Ref T60695

Differential Revision: https://developer.blender.org/D7339
2020-04-07 17:14:19 +02:00
02598e629e Fix T73566: Mesh analysis, error showing intersecting faces 2020-04-08 00:43:47 +10:00
3a5c16f1c9 Fix T74720: bmesh.ops.delete default context argument does nothing 2020-04-07 23:23:17 +10:00
1de5cb6a31 Cleanup: use doxy sections 2020-04-07 23:23:17 +10:00
3a65397473 Fix T75471: Outliner: crash selecting modifier objects/targets that are in a excluded collection
There is no garuantee 'outliner_find_id()' can find those corresponding
TreeElements, safeguard against failure now.

note: not sure why this was no problem in Release builds? (could only
reproduce crashes in Debug builds...)

Maniphest Tasks: T75471

Differential Revision: https://developer.blender.org/D7365
2020-04-07 15:08:50 +02:00
5e0465e4ec Fix T75343: Wireframe overylay is not working properly with multiple modifiers
Since rBcf258b02f449, only wires and edges that are mapped to the
original mesh were drawn if the mesh was modified by modifiers.
Above commit was only meant for showing orig wires for paint mask
overlays [where final wireframe is not desired], so now only use
MR_EXTRACT_MAPPED when we are in a paint mode.

Maniphest Tasks: T75343

Differential Revision: https://developer.blender.org/D7333
2020-04-07 14:47:06 +02:00
4a83832120 Fix T74828: Fluid: Crash with Fire/Smoke Noise
Issue was that the noise simulation was trying to bake with a minimized domain size (adaptive domain initializes domain with size (1,1,1)). Similarly to the base resolution bake, there should be no noise baking happening at those domain sizes - a domain at this size is considered empty.
2020-04-07 14:31:33 +02:00
ea78f9922e Fluid: Fixed assertion error
Fix for new assertion statements that were introduced in bfdc42d990.
2020-04-07 14:31:33 +02:00
5892622d68 Revert "Fix memory leak in recent panel drag widget cache"
This reverts commit 58e20b432a.

Was calling discard twice, tsk.
Although for some reason it did quiet the leak.

Reverting because this is causing a crash.
2020-04-07 22:09:37 +10:00
ee43cf5722 Fix T66751: Symmetrizing armature does not symmetrize constraints.
The symmetrize operator now tries to make sure that the armature
constraints are correctly mirrored.

Before it would only mirror the subtargets for the constraints (and that
failed too in some cases).

Reviewed By: Sybren

Differential Revision: http://developer.blender.org/D6009
2020-04-07 13:54:22 +02:00
6feeede47f Fix Blender not rebuilding when changing linker script 2020-04-07 13:44:18 +02:00
58e20b432a Fix memory leak in recent panel drag widget cache
Memory leak from 60d873bd22.
2020-04-07 21:34:25 +10:00
aaaa0a43af Build: use -no-pie for portable builds on Linux
Otherwise file browsers do not recognize the Blender executable. This is
already done for official releases.

We leave it off for non-portable builds, since that's how Linux distribution
packages will typically build Blender and we can continue to follow the OS
default there. Using a file browser to launch executables from e.g. /usr/bin
would be rare as wel.

Differential Revision: https://developer.blender.org/D7363
2020-04-07 13:32:42 +02:00
e953ada0bb Cleanup: avoid memory allocation for unchanged datablocks in undo
Differential Revision: https://developer.blender.org/D7336
2020-04-07 13:19:52 +02:00
c786f95871 Cleanup: split partial undo code off into functions, tweak debug prints
Differential Revision: https://developer.blender.org/D7331
2020-04-07 13:19:52 +02:00
7bc99fdb32 Cleanup: simplify logic for partial undo in ID read
Differential Revision: https://developer.blender.org/D7330
2020-04-07 13:19:52 +02:00
826e4ba99c Cleanup: skip reading UI datablocks entirely for undo
Other types of datablocks pointing to UI datablocks is unsupported, so
there is no need to store them in fd->libmap. With the experimental undo
speedup enabled preserving such pointers was done. But it didn't work in
2.82 and such pointers are easily lost in cases other than undo.

Differential Revision: https://developer.blender.org/D7329
2020-04-07 13:19:52 +02:00
d2a07c7b78 Cleanup: delay creating datamap until it's actually needed
Differential Revision: https://developer.blender.org/D7328
2020-04-07 13:19:52 +02:00
44e5f7a8cf Cleanup: don't use global variable for test if IDs are identical
Differential Revision: https://developer.blender.org/D7327
2020-04-07 13:19:52 +02:00
c75aaf5329 Cleanup: split off library and linked datablock undo restore
Differential Revision: https://developer.blender.org/D7326
2020-04-07 13:19:52 +02:00
624b231ec4 Cleanup: early out on invalid ID data to simplify control flow
Differential Revision: https://developer.blender.org/D7325
2020-04-07 13:19:52 +02:00
0aac74f18f Cleanup: split off direct_link_id() function
Differential Revision: https://developer.blender.org/D7324
2020-04-07 13:19:52 +02:00
c4def7992b Fix T73598: Pose options - Auto IK. Bones move on release
The issue was that the code tried to use the bones transformation matrix
as a rotation matrix. This works fine as long as the scale is 1.

Now we simply make sure that we only get a pure rotation matrix when
extracting it for the bone's transformation matrix.
2020-04-07 13:15:43 +02:00
9fca9b9953 Fix crash using object.to_mesh() when in edit mode
The root of the issue was caused by mesh which was a result of to_mesh()
had the same edit_mesh pointer as the input object, causing double-free
error.

This fix makes it so result mesh does not have edit mesh pointer.
Motivation part behind this is to make the result of to_mesh() to be
somewhat independent from the input.

Differential Revision: https://developer.blender.org/D7361
2020-04-07 12:50:45 +02:00
49deda4ca2 GPUBatch: Correctly Free Panel Widget Batch
The GPU Batch for the panel drag widget wasn't freed anywhere. This
patch will free the GPUBatch.
2020-04-07 10:46:44 +02:00
cdbb61704d Fix T75128: Select Linked fails when the selection is a delimiter
Starting select linked failed when the selected vertex or edge
was it's self delimiting.

Support using these elements for linked select
as long as they're part of an isolated selection.
2020-04-07 17:43:27 +10:00
ffe599b4bd Fix T68159: Normals point target crashes when exiting edit-mode
When the modal operator passes events, free the internal state of
the operator as we can't be sure those events don't cause the mesh data
to be re-allocated or removed.

Longer term it might be best to make this into a tool since
the main purpose of this operator is to run other actions.
2020-04-07 16:28:29 +10:00
284d28acbc Cleanup: remove unused BM_total_loop_select function 2020-04-07 15:32:09 +10:00
17193f6c76 UI: rename 'smoothen' to 'smooth'
Other smooth operators use term 'smooth'.
2020-04-07 15:12:18 +10:00
a1eb5ec81c Cleanup: doxy sections, move utility function to editmesh_utils.c 2020-04-07 14:46:13 +10:00
7c4391e6aa Fix T60069: repeated extrusion uses wrong axis 2020-04-07 13:42:50 +10:00
d14e768069 Cleanup: BLI_path.h function renaming
Use BLI_path_ prefix, more consistent names:

  BLI_parent_dir              -> BLI_path_parent_dir
  BLI_parent_dir_until_exists -> BLI_path_parent_dir_until_exists
  BLI_ensure_filename         -> BLI_path_filename_ensure
  BLI_first_slash             -> BLI_path_slash_find
  BLI_last_slash              -> BLI_path_slash_rfind
  BLI_add_slash               -> BLI_path_slash_ensure
  BLI_del_slash               -> BLI_path_slash_rstrip
  BLI_path_native_slash       -> BLI_path_slash_native

Rename 'cleanup' to 'normalize', similar to Python's `os.path.normpath`.

  BLI_cleanup_path  -> BLI_path_normalize
  BLI_cleanup_dir   -> BLI_path_normalize_dir
  BLI_cleanup_unc   -> BLI_path_normalize_unc
  BLI_cleanup_unc16 -> BLI_path_normalize_unc16

Clarify naming for extracting, creating numbered paths:

  BLI_stringenc -> BLI_path_sequence_encode
  BLI_stringdec -> BLI_path_sequence_decode

Part of T74506 proposal.
2020-04-07 12:10:36 +10:00
d54757e389 Cleanup: clang-format 2020-04-07 11:57:36 +10:00
4e7c65035b UI: Use Consitent Menu Layout for Bone Names 2020-04-06 21:45:41 -04:00
e9b4d2ca68 UI: Use Consistent Operator Name
Was called "Subdivide Multi" in Bone Edit and "Subdivide" in Mesh Edit
2020-04-06 21:05:53 -04:00
10f0e003a9 Fix T74572: adaptive sampling not scaling AOVs correctly 2020-04-06 23:23:48 +02:00
e05552f7c4 Revert "Fix T74572: adaptive sampling not scaling render passes correctly"
This reverts commit 82a8da0ec3. It was completely
wrong. Fixes T75388.
2020-04-06 23:23:48 +02:00
29b87b5615 Fix T75357: USD export broken on windows
Path to the jsons was wrong so they were not copied
2020-04-06 14:38:52 -06:00
71a52bbe2a Fluid: Ensure correct velocities for noise bake
Make sure that noise uses the unaltered velocity grid. This is particularly important once external velocities get added to the velocity grid.
2020-04-06 17:48:32 +02:00
60d873bd22 GPU: Panel Drag Widget Drawing Performance
The 10g Intel/Win driver doesn't work well with our emulated
intermediate mode. This patch alters the drawing of the drag widget of
the panels to reduce unneeded drawing.

The previous method would draw 16 boxes per widget. This new way would
cache this drawing in a GPU batch and just move the matrix around.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7345
2020-04-06 16:51:48 +02:00
71b1ee940b Don't take into account time remapping when scrubbing with AV sync.
It would cause the playhead to be remapped to an other frame than the
one you clicked on.
2020-04-06 16:34:15 +02:00
Maxim Vasiliev
c544df997e Fix user counting when ungrouping a node group.
Existing code for ungrouping did not correctly handle user counters:

- counter for the group was not decremented
- counters for containing nodes were not incremented

The latter resulted in losing some nodes after orphan cleaning or several save/reload cycles.

The bug did not have destructive consequences until recently,
because it was compensated by another bug (fixed in rBe993667a46c2).

Maniphest Tasks: T74665, T74682

Differential Revision: https://developer.blender.org/D7332
2020-04-06 16:27:52 +02:00
Roman Kornev
95f51bb01d Keymap: sort exported key-maps
This makes the resulting key-maps easier to compare.
2020-04-06 23:37:54 +10:00
3d439aa29b Cleanup: keep parameter docs above the function body 2020-04-06 23:22:11 +10:00
5dde5dd44e Libmv: Use static scheduler for threading
For a real-world distortion the payload is quite uniformly
distributed across scanlines. Surely, in the corners more
iterations of minimizer is needed, but that happens in threads
without scheduling overhead.
2020-04-06 15:18:32 +02:00
7e93d4eea3 Tracking: Fix (un)distortion happen in single thread
Need to communicate available number of threads to the camera
intrinsics implementation, otherwise default value of 1 is used.

Must have been single-threaded for a very long time.
2020-04-06 15:18:32 +02:00
2903fb6929 Fix T75444: typo in tooltip 2020-04-06 15:13:16 +02:00
9ddbb03861 Fix T74111: Animation Playback Delayed With Time Remapping And AV-Sync
When setting the current playback time in BKE_sound_play_scene we didn't
account for the frame length. So the current frame/time would be wrong
when we asked the audio playback what time it was.

This would lead to playback being offset when using time remapping and
AV sync.

Reviewed By: Richard Antalik and Sybren A. Stüvel

Differential Revision: http://developer.blender.org/D7248
2020-04-06 13:57:03 +02:00
ded7af53b4 Fix T74889 Baking to current action doesn't work properly
Before this commit, baking an action would only insert keys that are
necessary (i.e. using `INSERTKEY_NEEDED`). When baking to the current
Action, if there are no constraints that influence the final animation,
there are no additional keys necessary. This makes it appear as if
nothing happened. However, when baking to a new Action every additional
frame is necessary and thus a key is added for every frame.

@mont29 and I agreed that this behaviour is confusing, so this commit
changes the behaviour such that baking to the current action and to a
new action result in the same baked animation (that is, keyed on every
frame).
2020-04-06 13:39:46 +02:00
c03e5e7830 Fix T75418: Outliner Blender File view has UNKNOWN category for armatures
Typo in rB57daecc2cf88.

Maniphest Tasks: T75418

Differential Revision: https://developer.blender.org/D7346
2020-04-06 13:27:23 +02:00
cc0819aee1 Fix (unreported) wrong hair vertex colors
This was already fixed in rB985f33719ce9 once.
But resurfaced after rB7070e4c15e6c [which just reverted a bit too much
;)].

Spotted while looking into T75263.

Differential Revision: https://developer.blender.org/D7308
2020-04-06 12:19:02 +02:00
ccaf6c7404 Tracking: Fix slow undistored display
TH distortion model was not cached properly, making it so frame is
undistorted on every redraw.
2020-04-06 12:16:28 +02:00
5d3c7d1218 usual PY API doc gen fix after adding a new member to Context... 2020-04-06 12:16:07 +02:00
f9c05f3fc0 Fix f-curve sequencer versioning logic
Screen loop was inside an existing screen loop,
in the body of a function used to initialize the toolbar region.
2020-04-06 20:07:05 +10:00
2fc30978bc Fix T75297: Apply base inflates meshes with Simple subdivision 2020-04-06 11:47:17 +02:00
2a2d0d463a i18n: Disable es_ES locale.
We already have generic `es` one, having more only makes sense if poeple
actually maintain them and they have different contents...
2020-04-06 11:23:29 +02:00
480ff89bf7 Fix T75311, T75310: Edit Weight Paint Overlay Render Artifacts
During recent refactoring of the edit weight overlay we moved a
assignment before it was valid. Making everything one frame off what
resulted in a flashing frame during TAA, not drawing the overlay until a
second action happened, making overlays too bright.

The reason whas that the painting overlay wasn't initialized in the
first sample, but the draw passes and groups were filled. Resulting in
rendering the overlay twice or not at all.

This change moves the assignment to where it is valid.
2020-04-06 10:28:31 +02:00
999134b7ca Cleanup: Add some comments removed in rB0d0036cb53f8 2020-04-06 09:58:57 +02:00
f1bf7bfa1b Cleanup: spelling 2020-04-06 16:02:29 +10:00
6526c3ced8 Fix displaying edit-mesh measurements with deform modifiers
Resolves regression from 2.7x
2020-04-06 15:26:27 +10:00
0ca5b7b69b Fix T74602: Sequencer slip operator ignores offset constraints
Limit offsets, so each strip contains at least 1 frame of content.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D7288
2020-04-06 02:09:20 +02:00
d0d20de183 VSE: Draw f-curves for opacity and volume values on the strips
Feature can be enabled or disabled in timeline view menu item "Show F-Curves".

Author a.monti

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D7205
2020-04-06 00:52:29 +02:00
0e7599bc15 VSE: don't allow strip preview when clicking on the scrubbing region
Don't set 'special preview' or Solo mode if scrubbing in scrubbing region.

Author: a.monti

Reviewed By: Severin

Differential Revision: https://developer.blender.org/D7234
2020-04-06 00:11:55 +02:00
0d0036cb53 Cleanup: Fix comment style and check if they are valid or make sense. 2020-04-05 23:55:51 +02:00
43cc2f3195 Cleanup: Use _fn as a suffix for callbacks in VSE code 2020-04-05 23:39:20 +02:00
9d4300b0c6 Volumes: add volume.grids.frame_filepath to get the current frame filepath
This can be used by external renderers that can load OpenVDB files.
2020-04-05 21:27:30 +02:00
bae1c243ce Build: hide USD symbols, make Blender symbols visible again
Following up to b555b8d.

Building Blender with hidden symbols but using libraries with visible symbols
was giving linker warnings, specifically for USD. So revert that for now, as
it was not needed for the bugfix.

Hide USD symbols (some of which are not in the USD namespace) to avoid potential
conflicts. May potentially help with AMD OpenCL issues in T74262.
2020-04-05 21:04:10 +02:00
f1573731bc UI: Support split property layout for pointer search buttons
Pointer search buttons created with `uiItemPointerR()` (which allows
also passing a collection property to search in) did not work with the
split property layout (i.e. `uiLayout.use_property_split`).
For example vertex group search buttons typically use this.

Note that decorators (`uiLayout.use_property_decorate`) are not
supported yet. Although if they are enabled, the decorator column is
still created to keep the layout alignment visually intact. Also re-uses
the existing hack to allow placing multiple items in the row before the
decorator column.

Needed for some in-progress changes to the modifier stack UI.
2020-04-05 14:49:28 +02:00
3e8a818419 Cleanup: use const for 'clnors' argument where possible 2020-04-05 17:12:10 +10:00
9fe0505db0 Cleanup: macro hygiene, parenthesize arguments 2020-04-05 13:53:32 +10:00
93806ba82b Cleanup: differentiate the evaluation mesh 2020-04-05 12:48:38 +10:00
505a19ed75 Cleanup: Split up Window-Manager VR file (and related changes)
Splits up wm_xr.c into multiple files in their own folder:
source/blender/windowmanager/xr. So this matches how the message bus and
gizmo code have their own folder and files.

This allows better structuring and should make the code scale better.
I rather do this early on than to wait until we end up with a single,
huge file.

Also improves a bit how data is prepared and updated for drawing.
2020-04-04 18:55:24 +02:00
e455536943 UI: 3D Viewport text edit menus
- Adds select menu
- Removes undo/redo controls
- Adds delete menu
- Refactor
- Combines font and text menu

The goal is to match other edit menus better and match the text editor.
2020-04-04 12:41:58 -04:00
a702b095a1 UI: Remove 'Simulation' from 'Fluid Simulation' modifier
This is conistent with other modifiers and is reduntent
with the 'Simulate' menu header.
2020-04-04 12:32:28 -04:00
fe98d8c0ea Cleanup: remove unused method 2020-04-04 14:13:53 +02:00
6fa904765a Cleanup: Rename Panel * variables from pa to panel 2020-04-03 22:20:25 -05:00
7c0e285948 Cleanup: Move Detail Operators and Dyntopo to their own files 2020-04-03 23:41:54 +02:00
17931f3b51 Cleanup: Move Mask Filter and Mask Expand to their own files 2020-04-03 21:46:08 +02:00
f2f30db98d Cleanup: Move Mesh Filter, Smooth and Automasking to their own files 2020-04-03 21:05:54 +02:00
d38023f2f3 fix (unreported): Weld Modifier: possible use of uninitialized variable 2020-04-03 15:09:05 -03:00
82774a9d24 Cleanup: Move all sculpt transform functionality to its own file 2020-04-03 19:42:55 +02:00
d138cbfb47 Code Quality: Replace for loops with LISTBASE_FOREACH
Note this only changes cases where the variable was declared inside
the for loop. To handle it outside as well is a different challenge.

Differential Revision: https://developer.blender.org/D7320
2020-04-03 19:27:46 +02:00
b0c1184875 Cleanup: Including "BLI_listbase.h" for LISTBASE_FOREACH macro
These headers are not needed right away, but will be in the upcoming
commit.
2020-04-03 19:27:42 +02:00
200cc531bd Cleanup: Missing clang format in previous commit 2020-04-03 19:23:05 +02:00
cfc8d73546 Cleanup: Move all Face Set functionality to its own file 2020-04-03 19:17:28 +02:00
63922c5056 Cleanup: Rename ExtensionRNA variables from ext to rna_ext
Makes it more clear that code using this is related to the RNA
integration of a type.
Part of T74432.

Also ran clang-format on affected files.
2020-04-03 18:25:52 +02:00
70b061b4fd Fluid: Refactored caching in main Mantaflow class
This refactor cleans up code for the Manta file IO. It also improves the cache 'Replay' option.
2020-04-03 17:37:37 +02:00
bfdc42d990 Fluid: Refactored MANTA class
Refactored the caching system so that return values are no longer ignored. The aim of this refactor was to make the caching more robust.
2020-04-03 17:37:25 +02:00
d1011c9e64 Cleanup: clarification of 'name' in BKE_idtype functions
The 'name' parameter of `BKE_idtype_idcode_from_name()`, and the `str`
parameter of `idtype_get_info_from_name()`, are expected to be the
'user visible name' of an `IDTypeInfo` struct. This is made clearer in
the code by renaming those parameters to `idtype_name` and mentioning
it in the documentation of the `BKE_idtype_idcode_from_name()`
function.

Differential Revision: https://developer.blender.org/D7317
2020-04-03 16:54:31 +02:00
3208454aa8 Cleanup: Animation, move AnimData API to anim_data.c/BKE_anim_data.h
The `BKE_animsys.h` and `anim_sys.c` files already had a an "AnimData
API" section. The code in that section has now been split off, and
placed into `BKE_anim_data.h` and `anim_data.c`.

All files that used to include `BKE_animsys.h` have been adjusted to
only include the animation headers they need (sometimes none).

No functional changes.
2020-04-03 16:46:48 +02:00
33ab613655 Cleanup: Fix build warning with MSVC
SubdivCCG was unknown when compiling gpuinit_exit.c
2020-04-03 08:29:09 -06:00
49289f31ff Fix T74495: Shrink/Fatten gives strange results with Individual Origins
The island `axismtx` is only necessary in some transform modes.

In the case of `Shrink/Fatten`, the calculated `axismtx` brings an
undesirable result.

This commit rearrange the struct `TransIslandData` in order to
calculate and reference only the arrays that will be used for each
transform mode.

Differential Revision: https://developer.blender.org/D7305
2020-04-03 11:13:42 -03:00
d8b0b8d3db New Undo: Fix crash in some complex production files.
There is no guarantee that depsgraph is ran between two undo steps, so
when re-using an existing data-block we should never wipe completly its
recalc flags, but instead complement them with new ones from accumulated
'storage' as needed.
2020-04-03 16:07:27 +02:00
ad85989a3f Cleanup: Rename bScreen variables from sc/scr to screen
Part of T74432.

Mostly a careful batch rename but had to do few smaller fixes.

Also ran clang-format on affected files.
2020-04-03 14:42:24 +02:00
cff49e625f Cleanup: add missing #includes to some headers
It should be possible to `#include` any header without having to worry
about its dependencies.

I didn't go and check all include files for this, just the ones that caused
me errors while I was refactoring the `anim_sys.c` file.

No functional changes.
2020-04-03 14:28:22 +02:00
905c0269f3 Cleanup: Rename ScrArea variables from sa to area
Follow up of b2ee1770d4 and 10c2254d41, part of T74432.
Now the area and region naming conventions should be less confusing.

Mostly a careful batch rename but had to do few smaller fixes.

Also ran clang-format on affected files.
2020-04-03 13:34:50 +02:00
Asad-ullah Khan
1a69384e76 Fix T74205: crash cancelling transfrom operation in sculpt mode
Differential Revision: https://developer.blender.org/D7018
2020-04-03 13:13:26 +02:00
80513d8574 Fix T75287: other Cycles render passes wrong when using Cryptomatte 2020-04-03 13:13:26 +02:00
82a8da0ec3 Fix T74572: adaptive sampling not scaling render passes correctly 2020-04-03 13:13:26 +02:00
10c2254d41 Cleanup: Continue renaming ARegion variables from ar to region
Continuation of b2ee1770d4, now non-single word variables are also
renamed.
Part of T74432.

Also ran clang-format on affected files.
2020-04-03 12:54:28 +02:00
7ec59cc7b7 Cleanup: split ED_mesh_mirror_*_table into multiple functions
Spatial & topology mirror table each used a single function
taking a char as an identifier.

Split these into begin/end/lookup functions.
2020-04-03 21:52:13 +11:00
b5253159b6 Cleanup: split BKE_anim.h and anim.c into smaller pieces
The files are now split up into the following sections:
- `BKE_anim_path.h` and `anim_path.c` for path/curve functions.
- `BKE_anim_visualization.h` and `anim_visualizationanim_path.c` for
  animation visualization (mostly motion paths).
- `BKE_duplilist.h` for DupliList function declarations. These were
  already implemented in `object_dupli.c`, so they were rather out of
  place being declared in `BKE_anim.h` in the first place.

No functional changes.
2020-04-03 12:13:51 +02:00
736f9f5a69 Fix accidentally reverted changes in VR merge due to merge error
dc2df8307f unintentionally reverted part of 07bdbeda84.
2020-04-03 11:42:27 +02:00
cecb25273e Cleanup: Font, added initialisation for two variables
My compiler (GCC 7.5.0) was warning about these variables potentially not
being initialised. Since the function is highly complex, instead of
analysing it I just trust my compiler and added initial values.

This should be no functional change.
2020-04-03 11:34:25 +02:00
fe7ea8a24c Fix T75250: setting greasepencil active layer not refreshing the dopesheet
This was only reported for the 'Change Active Layer' operator [which was
not setting the channel as selected in the dopesheet], but this is also
the case elsewhere [where BKE_gpencil_layer_active_set is used], namely:
- gp_layer_remove_exec
- gp_layer_copy_exec
- gp_merge_layer_exec
- gp_layer_change_exec
- gp_layer_active_exec
- gp_stroke_separate_exec

We could set GP_LAYER_SELECT "by hand" in
BKE_gpencil_layer_active_set(), but there is already
animchan_sync_gplayer() that does that. For this, we need the
NA_SELECTED notifier though.

Maniphest Tasks: T75250

Differential Revision: https://developer.blender.org/D7311
2020-04-03 10:37:21 +02:00
a2a70cfc41 Cleanup: typo in comment 2020-04-03 10:34:18 +02:00
9aad06db88 Fix T75315: typo in automasking UI text 2020-04-03 10:19:45 +02:00
973e1f9d9a Cleanup: use term 'attr' instead of 'attrib'
This was already the case in most parts of the GPU API.
Use full name for descriptive-comments.
2020-04-03 17:25:58 +11:00
05dcb007e1 Cleanup: use tern 'sync' instead of 'synchronization' for function names
This is a common, unambiguous abbreviation
already used throughout the code-base.
2020-04-03 16:46:34 +11:00
600a627f6e Cleanup: use abbreviated names for unsigned types in editors 2020-04-03 16:21:24 +11:00
04fe37f931 Cleanup: quiet shadow warnings with ghost & mantaflow 2020-04-03 16:15:57 +11:00
71e543c68b Cleanup: replace static list with argument for curve merging 2020-04-03 16:04:02 +11:00
b18608f3e9 Cleanup: bone cursor picking API
There was one function to access both pose/edit bones,
which returned a void pointer type.

Split these into 3 functions which return EditBone, bPoseChannel or Bone
types.

Internally the logic is still shared, this just makes it clearer to
callers which type is expected.

Also use more conventional prefix for picking API:

  - ED_armature_pick_(ebone/pchan/bone)
  - ED_armature_pick_(ebone/pchan/bone)_from_selectbuffer
2020-04-03 15:52:26 +11:00
09071e2799 Fix T75330: Select linked crashes without a bone near the cursor
Own error with recent improvements to select link.
2020-04-03 13:43:03 +11:00
eae40c6c76 Cleanup: improve & use doxy sections for armature_naming.c 2020-04-03 13:16:38 +11:00
d52326bab3 Cleanup: spelling 2020-04-03 12:38:04 +11:00
c154f265de Cleanup: move curve picking functions into 'editcurve_query.c' 2020-04-03 12:32:04 +11:00
6f4dbb661f Revert "Writefile: Cleanup Scene runtime data."
This reverts commit ee0d91df5d. This is
modifying scene data on write, which causes crashes. It can only do that
on a copy of the data.
2020-04-03 02:24:33 +02:00
c4ba0d1508 Fix Linux link error with pcre after recent changes, must use absolute path 2020-04-02 22:05:03 +02:00
75f6e6b39e Fix link error on Linux buildbot with libxml2
On macOS this is part of the collada folder, but for Linux xml2 is in its own
folder for precompiled libraries.
2020-04-02 18:54:58 +02:00
6eb409bb9c Fix warnings caused by own earlier commit
Caused by 34465a7fb0.
2020-04-02 18:46:12 +02:00
12628e0794 Fix Cycles AVX unit test still failing to build with old GCC 2020-04-02 18:19:49 +02:00
Pablo Dobarro
b8d9b5e331 Sculpt: Delay Viewport Updates
In Blender 2.81 we update and draw all nodes inside the view planes.
When navigating with a pen tablet after an operation that tags the whole
mesh to update (like undo or inverting the mask), this introduces some
lag as nodes are updating when they enter the view. The viewport is not
fully responsive again until all nodes have entered the view after the
operation.

This commit delays nodes updates until the view navigation stops, so the
viewport navigation is always fully responsive. This introduces some
artifacts while navigating,  so it can be disabled if you don't want to
see them.

I'm storing the update planes in the PBVH. This way I can add support
for some tools to update in real-time only the nodes inside this plane
while running the operator, like the mesh filter.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6269
2020-04-02 18:00:51 +02:00
34465a7fb0 VR: Refactor DirectX context management
All DirectX management happens on Ghost level now, higher level code can
just assume everything is OpenGL (except of the upside-down drawing that
still needs to be done for DirectX). This is similar to how the
metal-layer is hidden outside of Ghost.

The Ghost-XR graphics binding for DirectX is responsible for managing
the DirectX compatibility now.
2020-04-02 17:43:45 +02:00
868d4526a8 Fix more build errors/warnings after recent AVX changes
Thanks to Sergey and Ray for the help identifying the problem.
2020-04-02 17:30:56 +02:00
343a874831 add memory address to undo steps print.
Helps identifying who is what in debugger...
2020-04-02 17:22:44 +02:00
9672605938 Fix build error on Windows/Linux after recent AVX changes 2020-04-02 17:09:01 +02:00
5159ba6b33 Fix (harmless) PCRE not found warning when configuring CMake on Linux
Differential Revision: https://developer.blender.org/D7309
2020-04-02 17:09:01 +02:00
2aa938b0ae Cleanup: simplify Linux buildbot config, where default values already match
Ref D7309
2020-04-02 17:09:01 +02:00
1f745e2c72 Sculpt: Add global automasking options for all brushes
This adds the automasking options to the Sculpt Tool options in a way
that they affect all brushes. This is more convenient when working with
some of these options while switching brushes as they don't need to be
enabled/disabled per brush.
An automasking option is enabled if it is enabled in the brush or in the
sculpt options.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7304
2020-04-02 16:56:44 +02:00
e276558a50 Fix T74983: Material preview icons don't refresh
The root cause of the issue reported in T74983 is that an `IDNode` would
not be marked as user-modified. This marking happened while looping over
outgoing relations of one of its operation nodes. Since rBff60dd8b18ed
unused relations are removed, and as a result the `IDNode` would not be
marked.

The solution was to move the responsible code outside the loop; this is
probably a good idea anyway, as the code did not actually use the
looped-over relations at all, and was thus repeated unnecessarily.
2020-04-02 16:54:17 +02:00
b75a7c2f8f Fix T75302: GPencil fill does not work on python generated strokes 2020-04-02 16:48:00 +02:00
e6c732e0cb GPencil: Cleanup typo error for hardness
The variable cannot be names because it was already renamed.
2020-04-02 16:48:00 +02:00
7c88968c89 Scultp: Face Set boundary automasking
With this brush option it is possible to mask the boundary vertices of
all face sets. This is especially useful in the cloth brush, where face
sets can be used to simulate seams between different patches of cloth
and produce different patterns and effects.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7230
2020-04-02 16:42:20 +02:00
3dad6294da Sculpt: Store explicit value for multires sculpt level
Allows to know what level sculpting has been done after the value has
been changed in the MultiresModifierData.

No functional changes, just preparing code to have everything needed
for propagation undo.

Differential Revision: https://developer.blender.org/D7307
2020-04-02 16:32:33 +02:00
f868d51bdd Sculpt Undo: Allow Geometry undo step to be non-exclusive
Before this change it was not possible to have base geometry
and grid coordinates to be stored in the same undo step.

Differential Revision: https://developer.blender.org/D7298
2020-04-02 16:29:51 +02:00
009dde69cd Fix Face Sets painting and selection precision
This fixes the following issues:
- Previously, the face set from the active vertex was used directly. Vertices always return the most recently created face set, so in some cases there may be some face sets that were not possible to select as active. Now the active face set is set in the ray intersection, so it always matches the face under the cursor.
- When drawing face sets they were set per vertex, so it was not possible to paint one face at a time. Now face sets are painted per poly when using the brush on meshes, testing the distance to the center of each poly.
- The code for the active vertex on PBVH_GRIDS was not correct, so I also fixed that to test if everything was working correctly.
{F8441699}

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7303
2020-04-02 15:43:37 +02:00
6cc4c68dad Fix T75121: Memory leak in Surface Smooth
The brush was allocating new memory for storing the displacemnets at the
beginning of each stroke step and not freeing them.

Reviewed By: jbakker

Maniphest Tasks: T75121

Differential Revision: https://developer.blender.org/D7254
2020-04-02 15:36:10 +02:00
43f748a32f Fix mesh boundary automask curve falloff
As the main use case of this feature is to work with cloth, using this
curve makes more sense than a smoothstep to simulate cloth tension near
the edges.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7262
2020-04-02 15:35:12 +02:00
b26bebd59f Missed file in previous commit 2020-04-02 15:32:17 +02:00
88362565f6 Fix T72688: Vertex Group Weights in Edit Mode Occludes In Front Armatures
Due to legacy this overlay was implemented twice (Edit Mesh and Weight
Painting) with different results. This patch consolidates both drawing
and uses only the Weight Painting drawing.
2020-04-02 15:12:32 +02:00
f5e4f20dc1 Fix: Build error when building with python off 2020-04-02 07:08:51 -06:00
fa8a3c8f26 Revert "Fix T72688: Vertex Group Weights in Edit Mode Occludes In Front Armatures"
This reverts commit 782e6ea4ed.

Said fix introduced a crash the moment one goes to edit mode.
2020-04-02 15:07:56 +02:00
7bffdab93c CMake: Add alembic boost dependency
When building lite + alembic + boost cmake would turn
boost off because it deemed it not needed leading to
build errors.
2020-04-02 07:03:36 -06:00
53d029d6da Cleanup: Avoid complex template type for XR-Swapchain
I rather avoid types like
`std::vector<std::unique_ptr<GHOST_XrSwapchain>>`, which is easy to do
in this case.
2020-04-02 13:50:27 +02:00
782e6ea4ed Fix T72688: Vertex Group Weights in Edit Mode Occludes In Front Armatures
Due to legacy this overlay was implemented twice (Edit Mesh and Weight
Painting) with different results. This patch consolidates both drawing
and uses only the Weight Painting drawing.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7289
2020-04-02 11:49:39 +02:00
1c3ded12f4 Fluids: improve subframe handling
Reviewers: sebbas

Differential Revision: https://developer.blender.org/D7256
2020-04-02 10:34:05 +02:00
06cb321f33 Sculpt: Give a brief explanation of undo stack
Should make it a bit more clear overview of what is going on in this
module. While some of the details might still be missing, having some
sort of top-level overview is better than nothing.

Differential Revision: https://developer.blender.org/D7300
2020-04-02 09:39:38 +02:00
3ebebe62d7 Sculpt Undo: Fix multires undo for interleaved nodes
Made it so grids array is properly allocated when first node in the
undo list does not contain grid data.

Differential Revision: https://developer.blender.org/D7299
2020-04-02 09:38:26 +02:00
a9963669f9 Fix T75283: GPencil Stroke created by Merge points can't have fill material 2020-04-01 19:35:35 +02:00
c4374bc919 Fix T75271: GPencil Segment select mode doesn't work
The selection was workring with the evaluated data, but need work with the original data.
2020-04-01 18:00:49 +02:00
25b2b6724d Fix T74224: Add missing depsgraph relations for boid particles
Reviewers: brecht

Differential Revision: https://developer.blender.org/D7302
2020-04-01 16:21:34 +02:00
f047d47e24 Cycles: AVX implantation of Perlin noise.
This patch adds an AVX implementation of Perlin noise in Cycles.
An avxi type was also added as a utility based on the respective
type in Intel Embree.

Only 3D and 4D noise were implemented, there is no benefit for
utilizing AVX in 1D and 2D noise. The SSE trilinear interpolation
function was used in the AVX implementation because there is no
benefit from using AVX in interpolating the last three dimensions.

Differential Revision: https://developer.blender.org/D6680
2020-04-01 14:48:01 +02:00
5e176d67e1 Writefile: Cleanup Volume runtime data. 2020-04-01 12:39:06 +02:00
d66519f197 Writefile: Cleanup CacheFile runtime data. 2020-04-01 12:39:06 +02:00
d31f79a9bc Writefile: Cleanup MovieClip runtime data. 2020-04-01 12:39:06 +02:00
1f065df03e Writefile: Cleanup GPencil data.
Note: Not clearing the whole runtime data here, as this is not done in
matching read code, not sure why, needs further investigation...
2020-04-01 12:39:06 +02:00
ec351c7a65 Writefile: Cleanup Nodetree runtime data.
Note: As with collections, this does not affect embedded nodetrees from
material etc. We prpbably need to tackle those as well at some point...
2020-04-01 12:39:06 +02:00
e0dc4130fd Writefile: Cleanup Armature runtime data. 2020-04-01 12:39:06 +02:00
358f8b484f Writefile: Cleanup Collection runtime data. 2020-04-01 12:39:06 +02:00
e24553ca0f Writefile: Cleanup Soung runtime data. 2020-04-01 12:39:06 +02:00
8d63135da3 Writefile: Cleanup World runtime data. 2020-04-01 12:39:06 +02:00
254748c3e7 Writefile: Cleanup Lattice runtime data. 2020-04-01 12:39:06 +02:00
4f509db181 Writefile: Cleanup Text runtime data. 2020-04-01 12:39:06 +02:00
33a622cbf4 Writefile: Cleanup VFont runtime data. 2020-04-01 12:39:06 +02:00
e790aa1f19 Writefile: Cleanup material runtime data. 2020-04-01 12:39:06 +02:00
27b9f1f626 Writefile: Cleanup MBall runtime data. 2020-04-01 12:39:06 +02:00
ee0d91df5d Writefile: Cleanup Scene runtime data. 2020-04-01 12:39:06 +02:00
9532ce4605 Writefile: Cleanup Object runtime data. 2020-04-01 12:39:06 +02:00
80280acc93 Writefile: Cleanup Curve runtime data. 2020-04-01 12:39:06 +02:00
ca0dcd830c Fix T75222: Crash activating menu search 2020-04-01 20:59:50 +11:00
186ac84210 Cleanup: clang-format 2020-04-01 20:47:02 +11:00
60ff3a7daf Fix T66494: Alt+ clicking (assign to all selected) does not work for NLA
strips

This uses the new "selected_nla_strips" context member in
UI_context_copy_to_selected_list().

bonus: this also makes the "Copy To Selected" button operator [in the
button context menu] work for anything NLA Strip related.

Maniphest Tasks: T66494

Differential Revision: https://developer.blender.org/D7281
2020-04-01 10:24:16 +02:00
f8c4f5e308 Add a "selected_nla_strips" context member
Needed for upcomming fix for T66494.

ref T66494 / D7281
2020-04-01 10:22:34 +02:00
029a714fc7 Fix T75234: Saving UDIM tiled texture as OpenEXR saves only the first
tile

This happened when the UDIM tiled image needed to be colormanaged, so
- when you set up the image as sRGB, then save as EXR/HDR/...
- other way around as well: when you set up the images as Linear then
save as PNG/JPG/...

Reason being that for UDIM tiled images, `image_save_single` is called
multiple times [once for each tile] and everytime `image_save_post` will
fire the `IMA_SIGNAL_COLORMANAGE` signal which clears the cache if any of
the above two is the case. Without the cache, the next tiles cannot be
saved.

Now determine if the colorspace changed from
`image_save_single`/'image_save_post' and only fire
IMA_SIGNAL_COLORMANAGE once from BKE_image_save in the end.
(thx @brecht for suggesting this alternative to the original fix)

Maniphest Tasks: T75234

Differential Revision: https://developer.blender.org/D7296
2020-04-01 10:11:54 +02:00
59e001cbf6 GPencil: Cleanup typo error 2020-04-01 10:02:04 +02:00
Bastien Montagne
2ad0ae8dad Tweak write code to allow cleaning up runtime data before write.
This basically generalizes what was being done in `write_mesh`,
since we need to clean up ID tags anyway, it's easier to do it for all IDs.

Then ID write funcs themsleves can do whatever they want on the passed
struct, without risking interferring with regular Blender operations.

Note that Text write function is doing a suspicious change on one of its
flags, but this seems to be by-passed anyway by read code currently, so
think it's OK to not do that on orig data-block.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7294
2020-04-01 09:43:21 +02:00
7952274cf0 Sculpt Undo: Refactor Geometry undo nodes
Made it so there is a single UNDO node in the list which has
both original and modified mesh state.

Makes it easier to achieve "interleaved" undo nodes stored in
the undo step (as opposite of either storing geometry or other
data).

Should be no functional changes, just preparing for an upcoming
work to support undo of operation like Apply Base.

Differential Revision: https://developer.blender.org/D7290
2020-04-01 09:39:58 +02:00
60d3a801db Subdiv: Split evaluation begin+refine into separate steps
Actually, begin will do the entire initialization.

Refine will only refine if there is a topology refiner associated
with the Subdiv descriptor.

Allows to refine Subdiv to new coarse positions without touching
displacement evaluation. Will be needed to update SubdivCCG during
sculpt undo.
2020-04-01 09:32:46 +02:00
29eb891658 Fix curve shortest path picking with right-click select 2020-04-01 17:33:24 +11:00
9bcc83a5d6 Fix problem extruding curve segments with selected handles
Issue introduced in 38685b5a39
2020-04-01 17:08:41 +11:00
8d116e9956 Cleanup: use doxy sections 2020-04-01 16:19:32 +11:00
b157abebe5 UI: avoid term 'Region', use 'Edges & Faces' instead
Change to recent renaming of "Edge Collapse" as it has multiple uses,
as it collapses edge-rings, but isn't limited to collapsing single edges,
it can be used to collapse faces with arbitrary topology.

The name "Collapse Regions" is too vague, users might not think to use
this to collapse edge-rings.

Use a more verbose name "Collapse Edges & Faces", referencing edge-rings
in the tool-tip.
2020-04-01 14:18:21 +11:00
b7868c0b89 Grease Pencil: Fix typo in labels and comments.
Hardeness -> Hardness

Only changed the labels/tooltips, will leave the internal change to @antoniov.
2020-04-01 03:52:58 +02:00
6a1f0c1eaa Cleanup: use doxy sections for 'idprop' API 2020-04-01 11:30:08 +11:00
2d39e46f84 Cleanup: use doxy sections for wm_draw.c 2020-04-01 11:30:08 +11:00
9b0d72aa3d Cleanup: use sections for object_remesh.c
Add missing sections.
2020-04-01 11:29:45 +11:00
18fc4155fd Fix customdata interpolation being done multiple times in Weld Modifier 2020-03-31 20:57:33 -03:00
bcd3c3cb57 UI: rename "Edge Collapse" to "Collapse Regions"
This is useful for collapsing regions of faces & edges,
similar to a 'Merge -> Collapse' which can operate on multiple regions,
merging UV's so they don't need to be manually corrected.

The name & description didn't mention this.
2020-04-01 10:50:21 +11:00
91604279c9 Fix missing break statement in recent face-set support 2020-04-01 10:50:21 +11:00
f9f0f44be8 Cleanup: quiet discarded-qualifiers, unused warnings 2020-04-01 10:50:21 +11:00
e819f67500 Cleanup: Organize Weld Modifier in alphabetical order 2020-03-31 20:39:37 -03:00
74b5e5f6e1 Fix T74588: Weld Modifier: Vertex colors and UVs get incorrect values 2020-03-31 20:27:54 -03:00
da3cb514e5 Multires: Initial Face Sets support
This implements the Sculpt Mode API functions needed for Face Sets and
visibility management for PBVH_GRIDS. No major changes were needed in
the operators and the sculpt mode code. This implementation stores the
face sets in the base mesh, so faces created in higher subdivision
levels can't be modified individually. Also, we are not checking for
multiple face sets per vertex (that can be added in the future), so
relax tools don't work yet. The rest of the features (paint, undo,
visibility operators..) work as expected.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7168
2020-04-01 01:07:47 +02:00
0062813c73 make.bat: Improve messaging when not detecting MSVC
Inspired by @mrwhite in D7295
2020-03-31 13:14:16 -06:00
5b88ab25bd Fix T75219: Move to New Layer not working
This was an old design problem.
2020-03-31 18:54:50 +02:00
6c036a65c9 Add Voxel Mode to the Remesh modifier
This adds the Voxel Mode to the current remesh modifier. It works
exactly the same way as the voxel remesh operator and uses the same
properties to control the remeshing. We can exand this with more options
in the future (fix poles, reprojection...)

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7292
2020-03-31 18:27:37 +02:00
38685b5a39 Edit Curve: Improve Curve extrude
The original code has two logics, extrude the end points or duplicate points (making new splines).
Now all the logic has been redone by extruding contiguous selected segments.

Fix T47169

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D6982
2020-03-31 12:39:53 -03:00
1c1a14dcdf Voxel Remesh: Edit Voxel Size operator
This operator lets the user control the voxel/detail size of the voxel remesher directly from the 3D view in a similar way the Brush radius and strength are controlled.  The shorcut from sculpt mode is Shift + R (similar to Shift + F for brush strength).
It shows a grid that represents the real voxel size of the object. The grid and the text are automatically aligned to the view to avoid rendering all voxels with thousands of lines.

It also has a slow mode when pressing shift that works like the slow mode of the brush radius control.

This operator controls the value changes sensitivity automatically to avoid jumping to extremelly high resolutions and run out of memory.
This way, adjusments done in lower voxel sizes are more precise. Pressing Ctrl disables this functionality and allows changing the voxel size directly in a linear way.

Reviewed By: jbakker, #user_interface, billreynish

Differential Revision: https://developer.blender.org/D6449
2020-03-31 17:31:13 +02:00
f149d5e4b2 Fix VR session toggle not changing reliably on session start/end
The text and icon were supposed to change but didn't reliably, which was
a race condition I think. It depended on how fast the OpenXR runtime
would transition the session state.
This also makes sure the correct notifier is sent on session exit.
2020-03-31 16:49:38 +02:00
afe707cc3a Fix missing XR space destruction
I think destructing the XrSession would destruct this anyway, but rather
have this done explicitly, consistently and in a controlled manner.
2020-03-31 16:49:38 +02:00
b0bd9b4c70 Fix T75244: Screw Modifier Crash
Draw batch extraction wrongly assumed that when mapped extraction
happened that all original data could be found. This is not the case as
mapped extraction is also enabled when part of the data is present.

This fix does additional nullptr checks.
2020-03-31 16:05:19 +02:00
39684e4554 Cleanup: remove duplicate function 2020-03-31 22:37:25 +11:00
17a409e223 Cleanup: use '_recursive' suffix instead of '_rec'
This convention isn't very clear and wasn't used much.
Use the more verbose term instead.
2020-03-31 22:23:33 +11:00
b74e388617 Fix T75210: Frame range does not go down to 0 in the physics tab for mantaflow when clicking the left arrow
Added nore flexibility to cache frame range and ensured validity of frame range.
2020-03-31 12:18:15 +02:00
155f917403 Fix T73513: Facing Overlay Intervene With Selection
Do not draw the facing overlay during selection.
2020-03-31 11:47:09 +02:00
d8217ec6d0 UI: improve names for mesh split operations 2020-03-31 19:45:26 +11:00
039d619c76 Fix T74898: Multiresolution Ghost After Orbiting
EEVEE and Workbench both had the same issue that they continue with the
last sample when leaving navigating. This is ok for regular meshes as
they are all the same. For multiresolution it ain't as a low res version
of the mesh is used during navigation.

This patch also resets the AA samples when the user leaves navigation.
2020-03-31 10:29:34 +02:00
24f8c8491d UI: group edit-mesh Separate with Split & Merge
This was already the case for curve & armature.
2020-03-31 18:21:21 +11:00
c1722a3a8c Keymap: 'M' for edit-mesh merge menu, 'Alt-M' for split menu
As the 'M' key is free, it's convenient to use for the merge menu,
especially since this contains "Merge by Distance",
a frequently used action.

Use 'Alt-M' for a new split menu, following our convention of Alt being
used for opposite functionality.

Also move merge/split menu's into the "Mesh" menu as neither operate
solely on a single mesh element type.
2020-03-31 18:21:21 +11:00
61f9bbbdea Edit Mesh: support splitting vertices
The edge split operator can now split faces & edges
from selected vertices.

This has the same functionality as manually ripping all
faces and edges away from a vertex.
2020-03-31 18:20:06 +11:00
07add4b485 Cleanup: use sections for armature-select 2020-03-31 15:24:06 +11:00
0f5c94bbd1 Armature: add Select Linked (Ctrl-L)
This matches select linked for other modes (curve, mesh)
2020-03-31 15:11:11 +11:00
b555b8dedc Build: hide most symbols on macOS on Linux to avoid conflicts
This means symbols from Blender itself and most external libraries. We can't
just hide all because that breaks some libraries. The better solution would
be to rebuild all library dependencies with hidden visibility.

Fixes T75223: Luxrender add-on failing to load on macOS
2020-03-31 00:07:55 +02:00
899bfdc412 Audaspace: Update From Upstream (For API Docs)
No functional changes:

- Cleanup Spelling, Line Length
- Use proper class method styling for py docs
- Fix Broken Links

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

Fixes T75191
2020-03-30 17:47:40 -04:00
22677d8e1d Fix undo incorrectly detecting mesh as always changed after edits
Mesh writes a modified copy, which meant recalc_undo_accumulated was never
cleared on the actual datablock. Also clear mesh->runtime on write to avoid
detecting changes, since it's cleared on read anyway.

Differential Revision: https://developer.blender.org/D7274
2020-03-30 20:09:15 +02:00
f4982b555c Fix undo misdetecting identical future chunk in some cases
Clear is_identical_future before adding a next undo step, to avoid wrong
values for cases where we undo and then add a step with different changes
than what was previously the next step.

Ref D7274
2020-03-30 20:09:20 +02:00
2e60226f23 Fix undo debug logging not printing all types of undo pushes
Ref D7274
2020-03-30 20:09:15 +02:00
91b334b2f2 Fix T74547 EEVEE: Image texture crash with use after free
Same fix than for the other mapping types.
2020-03-30 19:57:24 +02:00
248873603f GPencil: Remove is_edit_mode from cache data
This value is not used by new engine.
2020-03-30 18:56:46 +02:00
4c40468856 GPencil: Remove GP_DATA_PYTHON_UPDATED used by old engine 2020-03-30 18:54:41 +02:00
2c9e27f209 Fix T75144 Grease Pencil: Python generated strokes flicker and crash
This was caused by a flag not being reset in time, causing discard of
batches already queued to be drawn.
2020-03-30 18:38:15 +02:00
100896e080 GPencil: Rename Overlay blend mode to Hard Light
Differential Revision: https://developer.blender.org/D7280
2020-03-30 18:23:36 +02:00
6428da84ed Fix T74663 GPencil: Fills are Flickering on Nvidia
This was caused by an unitialized variable.
2020-03-30 17:57:31 +02:00
af1e3b0270 GPencil: Fix overlay blend mode creating inverted colors 2020-03-30 17:57:31 +02:00
9371c051b1 EEVEE: Bloom: Fix inverted source and base buffer
This does not change the ouput much.
2020-03-30 17:57:31 +02:00
6f15bc3b52 Fluid: Removed Empty Space option for liquid domains
The option only makes sense for gas domains where there is some density.
2020-03-30 17:34:16 +02:00
1280f3c0ae Fluid: Optimization for mesh file loading
Improved loading times for mesh files by reading bigger chunks of data from the disk at once.
2020-03-30 17:32:38 +02:00
a2d19c1f78 NormalOverlay: Center Dot Normal Drawing With Modifiers
When using generative modifiers too many center dots were rendered in
the normal overlay. This patch only renders the normals of original
center dots.

Known issue: decoding the `norAndFlag` has issues on Intel GPU.
2020-03-30 14:39:16 +02:00
57d8bde088 Normal Overlay: Hide Normals Of Generated Loops
The loop normals were always drawn. We used to only draw the normals if
it was mapped to an original loop of the mesh. Due to recent changes we
can not find the correct loop and decide if we need to draw them.

Note still need to check the face dots normals. This is more complicated
as facedot normals needs to be encoded in a different way
2020-03-30 14:06:54 +02:00
a6a9a12e8f Fix T75142: No autokeying with pose mode X-Mirror
This was caused by the removal of some `BONE_TRANSFORM_MIRROR` flag
handling in rBde530a95dc7b482dc22c933b9b8b2a98c79b5663. I simply
restored those lines that caused this issue.
2020-03-30 13:26:26 +02:00
ef7229d69a Cleanup: reduce code indentation in autokeyframe_pose()
This makes the code a bit simpler to follow, by replacing
`if (x) { all the code here }` with `if (!x) { continue; }` and un-indenting
the remaining code, and by returning early.

No functional changes.
2020-03-30 13:26:26 +02:00
cf258b02f4 Fix T75053: Paint Overlay Show Modified Wires and Edges
The paint mask overlay showed the wires and edges of the final mesh.
This change will only draw wires and edges that are mapped to the
original mesh.

This change enables mapping data in regular Mesh extraction. This
can also be used for better drawing of the normal overlay.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7277
2020-03-30 13:13:42 +02:00
d6e0d27816 Fix help message misc argument grouping
Correct reference to non-existent argument.
2020-03-30 21:47:07 +11:00
3351a2655d Subdiv: Extend some comments 2020-03-30 12:26:45 +02:00
513885a991 Fix armature edit-mode selected linked
Selecting linked would only select a single arbitrary chain.

Now select linked follows all child-chains of the bone.

Also add support for following all links, similar to how this would work
if it were a mesh with connected edges instead of only child chains.

Leave this off by default to match pose mode.
2020-03-30 19:18:28 +11:00
15cb567c8e Armature: remove merge function, use dissolve instead
This was crashing, when looking into a fix I noticed that it gave
hap-hazard results dissolving past forks in the parent/child hierarchy
arbitrarily following one chain.

This functionality is almost identical to "dissolve" which delimits
forks in the chain predictably.

So remove this in favor of dissolve (available from the delete menu).
2020-03-30 19:18:09 +11:00
6462ea2a8d UI: center align icon-only pull-down menus
Resolve issue noted in D5482, texture slots '+' icon for example
was noticeably off-center.
2020-03-30 14:45:05 +11:00
7b347b225a Cleanup: remove print left in recent fix for T66655 2020-03-30 14:34:32 +11:00
ec3da20896 UI: use operator name for extrude repeat
Match names between the redo popup and the menu item.
2020-03-30 11:41:44 +11:00
9ccaf9899e Extrude Repeat: support storing the offset vector
Without this, adjusting properties always re-initialized
from the view-vector.
2020-03-30 11:41:35 +11:00
e252d2c990 Fix extrude repeat leaving selection history unselected 2020-03-30 10:39:10 +11:00
6b24f7d87c UI: move extrude repeat out of the vertex menu
This works for all selection modes,
include last below a separator since it's a specialized function.

Note that the previous commit was raising an exception as operator
properties don't support 'or'.
2020-03-30 10:29:32 +11:00
086bfffe74 Theme: adjust lamp alpha to visually match 2.82 2020-03-30 10:12:08 +11:00
6c48a36962 DRW: match edge opacity to 2.82
Edges were hard to see in some cases in edit-mesh vertex/face modes.

Since 804e90b42d alpha is handled differently,
update edge alpha to visually match 2.82.
2020-03-30 10:12:08 +11:00
a103d09df4 UI: Move Array Extrude Below Verticies 2020-03-29 17:36:34 -04:00
7d59f84708 Fluid: Optimization for liquid / secondary particle file loading
Improved loading times for particles files by reading bigger chunks of data from the disk at once.
2020-03-29 21:31:20 +02:00
b023c91118 Fluid: Use dynamic mode whenever active rigid bodies are in the scene
Required for collisions with moving rigid bodies. Otherwise the static optimization mode will be kept and the obstacles would be calculated only once at the beginning.
2020-03-29 21:31:20 +02:00
bf3b0db785 Overlay: Edit Mesh: Add offset for thicker edges
Edges with sharpness, seam and bevel are thicker and thus needs more offset
to not appear aliased.

Based on D5448 by @oficsu
2020-03-29 20:49:07 +02:00
0b57ecc665 Overlay: Edit Mesh: Make offset depth dependent (w.r.t depth precision)
The previous offset was done in view space. It is now done in NDC space
to avoid differences when adjusting the near/far plane distances.
2020-03-29 20:46:42 +02:00
a022cb8f62 UI: Add missing operators to menus in the 3D Viewport Mesh Edit mode
Differential Revision: https://developer.blender.org/D7263
2020-03-29 14:09:39 -04:00
bd74f5f7ab Fix T73945: Don't grey out "Calculate to Frames" in some cases
The button seems to behave more as I'd expect without these
additional checks. Previously, the button was often grayed out when
it was actually working.

Reviewers: ISS

Differential Revision: https://developer.blender.org/D7252
2020-03-29 15:09:42 +02:00
Wayde Moss
5b8b6b4c1e RNA: expose the pin flag for AnimData and ActionGroup 2020-03-29 23:05:30 +11:00
Henrik Dick
d8e2cc9f4d Fix missing Surface Deform strength versioning 2020-03-29 22:52:06 +11:00
Yevgeny Makarov
a3d5b949d2 UI: Fix text padding for labels without an icon 2020-03-29 22:47:59 +11:00
c6143da27c Cleanup: remove DNA_view2d_types.h from DNA_sound_types.h 2020-03-29 20:32:45 +11:00
Henrik Dick
fc37318fe7 Screw Modifier: support 1-2 steps
The Screw Modifier had a lower limit for the steps value, which not only
was inconsistent between render and viewport steps, but also was capped
to 2 in UI and also in the code internally.
2020-03-29 20:25:14 +11:00
Cody Winchester
e8dd6128b5 Fix warp modifier using pose matrix without object matrix applied
Error in recent patch D6820
2020-03-29 18:58:37 +11:00
b9faf53182 Fix T72075: Incorrect Grid Fill error message 2020-03-29 18:36:00 +11:00
424fed3cc7 Cleanup: remove unicode character printing
Was added when utf8 was originally introduced - for testing,
but is no longer needed.
2020-03-29 17:11:46 +11:00
aec9e0e1b6 Cleanup: spelling, comments 2020-03-29 17:11:41 +11:00
d5163e06c3 Cleanup: strict-prototypes warning 2020-03-29 16:37:57 +11:00
ac02c702e5 Fix T75156: Cast modifier crash in edit-mode
Add NULL checks to other deform modifiers too.
2020-03-29 16:09:09 +11:00
a24f52c51c Fix T75088: Add tooltips for custom properties 2020-03-28 16:40:49 -04:00
a882debee0 Fix T75161: Random UV doesn´t work with fats drawing
Also fixed T75162
2020-03-28 15:08:13 +01:00
7dbf7255c2 GPencil: Fix error when stroke has 0 points
It's possible create a stroke with 0 points using python
2020-03-28 12:33:32 +01:00
bdec24b40d Cleanup: Removing unused parameter. 2020-03-28 09:14:07 +01:00
10bd3fb4cb Fix T74604: A.N.T Landscape Erode function reports error
Although indicated, the `rna_Object_active_vertex_group_set`
function was missing.
2020-03-27 22:14:47 -03:00
79b391f3a0 Fix missing NULL terminator for new brush option 2020-03-28 02:08:06 +01:00
Asher
e0030d53bc Fix key detection issues introduced by D7229
Removing the GHOST_kKeyUnknown check from processKeyEvent() produces
epeated unknown key events whenever a modifier key is held down, due
to the way ghost uses GHOST_kKeyUnknown as a filter value for modifier
key events.

Differential Revision: https://developer.blender.org/D7257
2020-03-27 20:59:20 -03:00
1f949121cd Fix T74969: Crash in gpencil edit mode
Result of poor shader pre-processing on Intel HD 4000 drivers
2020-03-27 20:12:05 -03:00
90aa771b30 Cleanup: compiler warnings 2020-03-27 23:21:16 +01:00
d85026db15 Overlay: Outline: Fix unreported feedback loop when smooth wire is disabled 2020-03-27 20:11:43 +01:00
a7110618ff Cleanup: GPUShader: Remove unused shaders 2020-03-27 20:00:27 +01:00
Ankit
0c0170f77a Fix error in macOS system file detection in recent changes
Differential Revision: https://developer.blender.org/D7250
2020-03-27 18:56:58 +01:00
9120191fe2 Sculpt: Pose Brush Face Sets origin mode
This commit introduces a new mode for calculating the positions and
weights of the IK segments in the Pose Brush based on the Face Sets.

The first segment of the chain will always include all face sets inside
the brush radius and it will propagate until the boundary of the last
face sets added in the flood fill. Then consecutive connected face sets
are added to the chain until the chain length limit is reached or all
face sets of the mesh are already part of the chain.

This feature enables complete control over the pose brush origins in
case that is needed. Also, with this mode, the user can have a library
of base meshes with face sets already configured to get to the initial
pose as fast as possible.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7235
2020-03-27 18:15:42 +01:00
4c0cca78eb Rename Edge Automasking to Mesh Boundary Automasking
This makes more clear what this automasking operation does and helps to differenciate it from the future face sets boundary automasking.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7185
2020-03-27 18:05:10 +01:00
015c084bda Sculpt: Weight normal and area sampling towards the brush center
Previously, all vertices inside the brush radius were taken into account
equally when calculating the sculpt normal and area. This was causing
artifacts and unpredictable results with large brushes or meshes with
curvatures, as the strongest deformation point of all brushes is usually
in the center. By weighting the vertex normal and position towards the
center when sampling, all brushes should now behave in a more
predictable way in non-uniform surfaces.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6989
2020-03-27 17:55:00 +01:00
7eacda5a2b Fix T74637: Reset face set data when disabling dyntopo
Last time I checked Face Sets were preserved in a more or less
predictable way when modifying the mesh with dyntopo. As it looks that
in some problems this may cause bugs and you can't see or use face sets
when modifying the topology of the mesh whith dyntopo active, it is
probably better to reset them when going from dyntopo to mesh. This way
you know that you are always going to get a predictable face sets state.

Reviewed By: jbakker

Maniphest Tasks: T74637

Differential Revision: https://developer.blender.org/D7099
2020-03-27 17:52:00 +01:00
0db055338a GPencil: Small tweaks to Fill material panel 2020-03-27 16:38:22 +01:00
671d811323 Install_deps: Do not wipe out WITH_PYTHON CMake options.
This is annoying when one want to use system python and hence disables
the `WITH_PYTHON_INSTALL` options...
2020-03-27 15:46:47 +01:00
Mateusz Grzeliński
0a02c288aa install_deps: Enable PIC in Python static library.
Update for D3078, I think it should be fixed

Benefits:
- after installing python 3.7 with `./build_files/build_environment/install_deps.sh`, user will be able to run `make bpy` without linking error:
  - https://blender.stackexchange.com/questions/102933/a-working-guidance-for-building-blender-as-bpy-python-module
  - https://stackoverflow.com/questions/36779834/compiling-blender-bpy-recompile-with-fpic

To prevent errors like `/opt/lib/python-3.7.4/bin/python3.7: error while loading shared libraries: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory`, add python .so lib to ldconfig

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D7177
2020-03-27 15:23:58 +01:00
Daniel Santana
2632ba6703 Fix Optix build error after recent changes
Differential Revision: https://developer.blender.org/D7253
2020-03-27 14:26:26 +01:00
31bd8e6bf3 Fix T74642: Take gravity field weight into account
Reviewers: sebbas

Differential Revision: https://developer.blender.org/D7227
2020-03-27 12:41:14 +01:00
7fd71c1694 GPencil: More cleanups missing in previous commit 2020-03-27 12:39:18 +01:00
70f56167d0 UI: Add missing Annotation tool to Paint modes 2020-03-27 12:36:24 +01:00
8a62fa9855 GPencil: Cleanup of unused code a arguments 2020-03-27 12:36:24 +01:00
25e8550739 CPencil: Cleanup unused fill code
This is now replaced by draw engine and annotations don't use fill.
2020-03-27 12:36:24 +01:00
5ce41e6f57 Fix T75111: Crash when using subframes for animated fluid collider
This is not dependent on having an armature as mentioned in T75111.
The collider simply has to be animated.

Reviewers: sebbas

Differential Revision: https://developer.blender.org/D7251
2020-03-27 12:33:33 +01:00
Cody Winchester
6e505a45a1 Surface Deform modifier: add vertex group and strength control.
This commit aims to add functionality to the surface deform modifier that
gives more control and allows it to work better with the modifier stack.
* Maintains compatibility with older files. The default settings keep it
  so that the whole object is bound and vertex coordinates get overwritten
  as the modifier currently does.
* Turns the deformations from an absolute vertex coordinate overwrite into
  an additive offset from the vertex location before the modifier to the
  resulting bound deformation. This gives the ability to control the
  strength of the deformation and mix the deformation of the modifier
  with the modifier stack that comes before it.
* Also adds in a vertex group with the invert option. This is applied after
  the bind deformation is added. So the whole object is still bound to target,
  and the vertex group filters afterwards what parts get affected.
  I experimented with a version to only binds the geometry weighted to the
  vertex group, but that would break compatibility with old files.
  I may bring it in later as a separate option/mode for the surface deform.

With several fixes from @mont29.

Reviewed By: mont29

Differencial Revision: https://developer.blender.org/D6894
2020-03-27 12:25:37 +01:00
1bb7d42cf6 Cleanup: Silence uninitialized variable warning 2020-03-27 11:12:27 +00:00
da91329291 GPencil: Cleanup unused parameter 2020-03-27 11:43:36 +01:00
b498edb189 Fix T75118: Remove Texture Opacity parameter for Fill materials
This parameter was used in previous version and must be removed from UI panel.
2020-03-27 11:33:09 +01:00
e7af825ded Multires: Fix unwanted assignment of sculpt session pointers
Might have happened when Apply Base is used in sculpt mode.

In practice this probably was fine, since the operator tags object
for update, so the pointers will be restored back to what they should
be.
2020-03-27 11:29:41 +01:00
Cody Winchester
bd86edf116 Solidify modifier: add option to assign shell & rim geometry to selected vertex groups.
This commit gives the solidify modifier the ability to assign the newly created shell
and rim geometries to selected vertex groups. This expands the procedural control over
the modifier stack by letting users apply modifiers to the shell geometry without affecting
the original geometry.

This will be especially helpful for NPR users that use solidify to create backface
culling lines on their characters giving them the ability to add displace noise
and other effects.

Differential Revision: https://developer.blender.org/D6903
2020-03-27 11:12:57 +01:00
Cody Winchester
ba1f7acc3f Warp modifier: add bone from and bone to options when using armature objects
This commit adds the option to use armature bones for the From and To targets
when using armature objects.

The changes are based on the UV Warp modifier.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D6820
2020-03-27 10:42:40 +01:00
3441862c96 Cleanup: Silence warnings 2020-03-27 10:29:33 +01:00
96b3463e25 Cleanup: Remove debug print
Leftover from rB3b59c111821b.
2020-03-27 10:23:34 +01:00
ff62481f65 Fix T69060: File Output Node does not work with Time Remapping
Problem is that the RenderEngines will change the RenderData cfra when
rendering (when time remapping is used -- at least workbench/eevee/
gpencil do a combination of BKE_scene_frame_get() plus
RE_GetCameraWindow() which alters the RenderData cfra).

Later on in the pipeline, the Compositor will use this RenderData cfra
to determine the output file name for the FileOutput node. (In contrast
to this, the 'regular' Output will use the Scene's RenderData -- not the
Render's -- cfra [which hasnt been altered])

It is not entirely clear why RE_GetCameraWindow was setting the cfra on
the Render, but it appears to be legacy OGL rendering related and is not
needed anymore.
Removing this will keep the cfra as needed for the Compositor FileOutput
node.
2020-03-27 10:10:54 +01:00
d0b0a0a894 Fix T74927: Slow playback using Auto Normalization
Caused by rBedb3b7a323a1.

Using evaluate_fcurve_only_curve actually causes quite a bit of slowdown
[6x] compared to bezier forward differencing [which was used prior to
rBedb3b7a323a1]. But full fcurve evaluation is desired with Dynamic
Interpolation Effects [Back/Elastic] since their min/max will not be
captured with forward differencing.

So now gain back speed [using bezier forward differencing] and only do
the full fcurve evaluation for dynamic interpolation effects.

Maniphest Tasks: T74927

Differential Revision: https://developer.blender.org/D7196
2020-03-27 09:58:21 +01:00
6eb1004d50 Fix T58439: Info Editor does not show operator reports immediately when
operator cancelled.

Lots of operators return OPERATOR_CANCELLED when no data really changed.
Reports from those operators do not show immediately in the Info Editor
[they only do if the operator returns OPERATOR_FINISHED].

Now also notify the Info Editor in case of OPERATOR_CANCELLED.

Maniphest Tasks: T58439

Differential Revision: https://developer.blender.org/D7238
2020-03-27 09:41:33 +01:00
3b59c11182 Fix T66655: Add-on tool keymap not working after restart
- Use addon keyconfig for registered tools so reloading the keymap
  doesn't clear them.

- Ensure there is a default keymap, needed for addon keymaps
  to be available in the user keyconfig.
2020-03-27 17:38:13 +11:00
95247b4b14 UI: Use Title Case 2020-03-26 21:34:27 -04:00
03ac301102 UI: Spelling Inconsistencies 2020-03-26 21:20:31 -04:00
e1ee4dff8d Cleanup: redundant mask includes 2020-03-27 11:47:04 +11:00
c8b85d32c5 Cleanup: quiet unused function warning 2020-03-27 11:28:46 +11:00
ed86f3edb6 Cleanup: rename WM_modalkeymap API names, matching WM_keymap
Rename:
- WM_modalkeymap_add to WM_modalkeymap_ensure
- WM_modalkeymap_get to WM_modalkeymap_find
2020-03-27 11:28:46 +11:00
5c74b0964b Cleanup: add iterator macros to clang-format
Also rename START to BEGIN (matching BEGIN/END for most iterator macros).
2020-03-27 11:28:20 +11:00
2f149ebbe9 Cleanup: uppercase macros for sculpt iterators, add to clang-format
Also use sculpt prefix for SCULPT_CLAY_STABILIZER_LEN.
2020-03-27 11:27:10 +11:00
Adrian Newton
f1fb3eb975 UI: use pixel unit for generated image dimensions
Differential Revision: https://developer.blender.org/D7171
2020-03-27 00:49:15 +01:00
Adrian Newton
d663c9d8da UI: fix inconsistent modifier menu order for fluid and multiple strokes
Differential Revision: https://developer.blender.org/D7172
2020-03-27 00:45:49 +01:00
Robert Guetzkow
fcd6fac0a7 Fix T74996: material custom properties not displayed for Cycles
Differential Revision: https://developer.blender.org/D7223
2020-03-27 00:44:18 +01:00
Stephan Seitz
02518be634 Cleanup: suppress warning about float-to-int conversion
Differential Revision: https://developer.blender.org/D7212
2020-03-27 00:43:17 +01:00
5cf6689019 Fluid: Removed obstacle levelset optimization
Currently results in unstable particle behavior and incorrect meshing.
2020-03-27 00:16:34 +01:00
b7666f27d3 UI: Address Issues with recent fluid ui changes
See rB337e86148688aa608d007381ee9ca78879050754
2020-03-26 18:49:54 -04:00
Aaron Carlisle
a921a4daad Mantaflow: remove reminents of high res smoke
It appears this slipped through the code review

Reviewed By: sebbas

Differential Revision: https://developer.blender.org/D6760
2020-03-26 16:29:08 -04:00
56e0249489 GPU: Add workaround for faulty default attrib values on some drivers
On some drivers, the default values is not respected correctly.

To workaround this we create a small VBO that contains only 1 vec4 worth of
data and just bind it using glBindVertexBuffer to ensure 0 stride.

This fixes T75069 Instances not rendered correctly by workbench.
2020-03-26 21:10:44 +01:00
afb1a64ccb Fix T60682: adds macOS alias redirection for directories
This adds support for macOS aliases in addition to symlinks. It also adds
support for hidden, readonly and system file attributes.

Contributed by Ankit (ankitm) with modifications by me.

Differential Revision: https://developer.blender.org/D6679
2020-03-26 19:57:30 +01:00
Chris Clyne
d1972e50cb Add option to Copy the active view layer, and add an empty view layer
Modify the view layer add operator (and underlying `BKE_view_layer_add`)
to allow for copying the current view layer, as well as adding a new one
but with all LayerCollections disabled by default (this is important for
heavy scenes where currently adding view layers can take a long time due
to enabling every collection by default).

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D6862
2020-03-26 19:36:51 +01:00
839f0cfa41 Overlay: Fix crash caused by NULL passes 2020-03-26 19:16:57 +01:00
86c61ce64f Cycles: Restore cycles_cubin_cc to working order
Reviewed by: brecht pmoursnv
Differential Revision: https://developer.blender.org/D7136
2020-03-26 11:41:44 -06:00
58ea0d93f1 Cycles/Optix: Add CYCLES_OPTIX_TEST override
This works similarly to the CYCLES_OPENCL_TEST
environment variable to allow testing on unsupported
hardware.

Note: like the OPENCL test override, this is
for *testing* only and bug reports on unsupported
hardware will *not* be accepted at this point in
time.
2020-03-26 11:30:17 -06:00
48ea173a7d Sculpt: Create Face Set by Edit Mode Selection
This implements a new mode in the Face Sets Create operator to create a
new face sets from the faces selection in edit mode. This can be used
when the user considers that the edit mode tools are more convenient for
a more precise control or a certain type of selection, like creating a
face set from a face loop.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7211
2020-03-26 16:24:21 +01:00
99530ef4ed Sculpt: Face Sets Init operator
This operator initializes all face sets in the sculpt at once using
different mesh properties. It can create face sets by mesh connectivity,
material slots, face normals, UV seams, creases, sharp edges, bevel
weights and face maps.

For properties that are already in the faces, this is implemented as a
loop. Properties that depend on edge attributes use a similar operation
to sculpt flood fill, but using face adjacency instead of edge vertex
connectivity.

As Multires also stores the face sets in the base mesh, this should work
in the face sets Multires implementation without any changes.

This is implemented as a separate operator as this resets the visibility
and creates all face sets at once, while the create face set operator
creates a single face sets, leaving the rest of the face sets in the
mesh as they are.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7209
2020-03-26 16:20:24 +01:00
Pablo Dobarro
a218be3080 Sculpt: Surface Smooth Brush and Mesh Filter
This implements the Surface Smooth Brush as a mode inside the Smooth tool,
which uses the HC algorithm from "Improved Laplacian Smoothing of Noisy Surface Meshes".
Comparted to the regular smooth brush with laplacian smooth, this brush removes
the surface while preserving the volume of the object.
The smooth result can be controlled by tweaing the original shape preservation,
displacement and iteration count.
The same surface smooth operation is also available as a mesh filter.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7057
2020-03-26 16:13:47 +01:00
a0437c3f73 Fix T75087 Workbench: DoF: Divide By Zero when antialiasing is disabled 2020-03-26 16:03:48 +01:00
f5ac118fb3 Sculpt: Use uchar to store the sculpt mask in the GPU
Using a float to store and render the mask seems like a waste of memory
without any noticeable difference in the viewport for its use case.
After this commit, the mask and the face sets combined should take the
same amount of GPU memory than only the mask in previous versions.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7148
2020-03-26 16:02:30 +01:00
e000dcb849 Overlay: Wireframe: New method to avoid zfighting with geometry
This new method is only enabled if Overlay Smooth Wire is enabled.

This method gives really nice results but has some downside:
- Require a depth copy or loose the ability to write wire depth to the
  depth buffer and have correct depth ordering of wires. This patch use the former, with its associated cost.
- Require some depth sampling and prevent early depth test (i.e: has
  some performance impact).
- Has some relatively minor instability with geometry that are perpendicular
  to the view and intersecting with other geometry.

Pros:
- Compared to a fullpass approach this is surely going to have less
  performance impact and much higher quality.
- Removes the additional vertex offset. (see T74961)
- Fixes all half edges z-fighting.

{F8428014}

{F8428015}

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7233
2020-03-26 15:55:16 +01:00
458f50ba73 Fix T74780: Face sets operators not aware of SCULPT_FACE_SET_NONE
SCULPT_FACE_SET_NONE default value is 0 and it is rendered hidden, so
the invert sign operation to show it was not working. Now the show all
function sets this face set to ID 1 before setting its sign.

I also refactored this check in gpu_buffers.

Not related to the reported issue, but the mesh in attached contains non
manifold geometry with hidden loose vertices, so the visibility state
was not syncing correctly to those vertices. Now the toggle operators
checks the current visibility only on the face sets, so no manifold
vertices are ignored (as they are in the rest of operations in sculpt
mode).

Reviewed By: jbakker

Maniphest Tasks: T74780

Differential Revision: https://developer.blender.org/D7188
2020-03-26 15:50:25 +01:00
83947ea253 Fix T74761: Reimplement vertex to face sets visibility sync
This fixes multiple issues:
- Adds tag to update shading when changing vertex visibiliyt. This makes the mesh visibility update when the operator ends.
- Sync vertex to face sets no longer requires the pmap, so it does not crash. (Maybe we can initialize the pmap on undo to avoid these problems in the future).
- Sync vertex to face sets now works in a coherent way with the rest of visibility operations. Hide Box and Hide mask now sync the visibility changes to the face sets, so the all the operations are now getting a correct visibility state.

Reviewed By: brecht

Maniphest Tasks: T74761

Differential Revision: https://developer.blender.org/D7187
2020-03-26 15:44:50 +01:00
c286fa309e Fix T74899: Add Draw Face Sets brush to versioning defaults
Brushes are created automatically when the tools is enabled, but this
way it gets correct defaults and it is accesible from scripts.

Reviewed By: jbakker

Maniphest Tasks: T74899

Differential Revision: https://developer.blender.org/D7199
2020-03-26 15:41:10 +01:00
32bb848838 Fix T74692: Do not draw nodes with the default face set
The default face set color is white, so we can skip drawing the default
face set. This allows to enable again the optimization of not drawing
overlays in nodes where the mask is empty.

This will still slow down the viewport when a new face set is created
for the whole mesh or when inverting the mask, like in previous
versions.

I also renamed the function to make more clear that now it is checking
for both mask and face sets.

Reviewed By: brecht

Maniphest Tasks: T74692

Differential Revision: https://developer.blender.org/D7207
2020-03-26 15:39:41 +01:00
c32cf06e42 Fix T74808: Division by 0 in Cloth brush solver with overlapping vertices
This checks that the distance of the current positions of two connected
vertices is not 0 before calculating the correction vectors for those
vertices.

Reviewed By: jbakker

Maniphest Tasks: T74808

Differential Revision: https://developer.blender.org/D7184
2020-03-26 15:38:17 +01:00
4ff3d5aded Fix T75089: Missing pmap when using Face Sets in the mesh filter
When using Face Sets to mask the mesh filter the pmap needs to be
initialized to check the face sets of each vertex, otherwise it will
crash because it is null.

Probably now we should just initalize the pmap when building the PBVH as
almost all tools need it, so we can avoid these crashes in the future.

Reviewed By: jbakker

Maniphest Tasks: T75089

Differential Revision: https://developer.blender.org/D7236
2020-03-26 15:36:35 +01:00
Jeroen Bakker
7ed3ebbc6e Fix T67888: Incorrect Wireframe After Applying SubSurf/MultiRes
Show control edges stores the control edges in the mesh which is
picked up by the draw manager. When applyng a subsurf (or multires) we
don't want that data present in the base mesh. Any rebuilding of the mesh
would overwrite the data anyway.

This patch introduces a new flag for applying modifiers
that can be checked to ignore storing display specific data in
the base mesh.

Reviewed By: Brecht van Lommel

Differential Revision: https://developer.blender.org/D7163
2020-03-26 15:34:53 +01:00
Jeroen Bakker
2e8fb95e7c SubDiv: Incorrect normals loose edges
The normals of loose edges can be non uniform as they aren't normalized.
Checked with what happens with edit loose edges and synchronized the
implementation.

Reviewed By: Brecht van Lommel

Differential Revision: https://developer.blender.org/D7127
2020-03-26 14:35:27 +01:00
0545a84729 Fix Crash In Paint Overlay
The previous implementation tested the normal behavior and ignored some
edge cases. This patch will also test for NULL in all cases
2020-03-26 14:16:17 +01:00
Jeroen Bakker
1ca1744c29 Fix T70807: Weight Paint Overlay XRay
Weight paint overlay was not working when XRay was turned on.

The Weight Paint overlay is rendered directly into the default
framebuffer with a depth equal test. This test fails as the depth won't match.
This patch will update the depth buffer in these cases.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D7176
2020-03-26 13:35:06 +01:00
1b1c683f74 Fix missing text input on Windows with certain keyboard layouts
Events for keys specific to certain keyboard layouts unknown to Blender
were ignored. Now pass them along as unknown key events for which we
can still handle text input, like we already do for Linux and macOS.

Differential Revision: https://developer.blender.org/D7229
2020-03-26 09:22:47 -03:00
622e1591da GPencil: Fix unreported fade object when no Gpencil object is selected
Only must fade if the active object is a GPencil.
2020-03-26 13:17:22 +01:00
a093112696 CMake: Fix compilation with Xcode generation on Xcode 11.4
Need to give correct SDKROOT.
2020-03-26 13:07:52 +01:00
bd2b1a67a7 Fix T74939: Random Walk subsurface appearance in OptiX does not match other engines
Random Walk subsurface scattering did look different with OptiX because transmittance is
calculated based on the hit distance, but the OptiX implementation of `scene_intersect_local`
would return the distance in world space, while the Cycles BVH version returns it in object
space. This fixes the problem by simply skipping the object->world transforms in all the
places using the result of `scene_intersect_local` with OptiX.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7232
2020-03-26 13:00:09 +01:00
08b9b95147 Fix T75047: Number input advanced mode is not working in JP keyboard
Check for special ascii values for number input first so that we can
quickly decide if we should go into advanced mode.

Reviewed By: Bastien
2020-03-26 12:45:09 +01:00
90e8f94558 Fix T75094: Gpencil Selection mode crash in Vertex Paint when build modifier is used 2020-03-26 12:34:02 +01:00
671b6d41c4 CMake: Fix Blender.app creation/modification time
It was failing on first run of CMake since the Blender.app is not yet
created.
2020-03-26 11:35:51 +01:00
ef2bde11d2 CMake: Fix spelling for OpenImageDenoise package
The spelling should match exactly between how package is called in
find_package and in FIND_PACKAGE_HANDLE_STANDARD_ARGS.
2020-03-26 11:35:51 +01:00
a22471f1d1 CMake: Fix macOS SDK detection with latest Xcode and macOS
Happens on macOS 10.15.4 and Xcode 11.4.

The reason of failure is caused by following factors:

- xcodebuild reports full semantic macOS SDK version 10.15.4
- The actual SDK file path will only include major and minor part
  of the version (10.15, MacOSX10.15.sdk)
- Previous CMake code of ours expected direct match between SDK
  version and file path.

The solution is to make our detection code a bit more flexible and
additionally check for major.minor macOS SDK version in the path.
2020-03-26 11:35:51 +01:00
f9590c8eaa CMake: Remove support of Xcode prior to 8.2
The specific goal of this change is to get rid of separate code paths
for older and newer Xcode versions.

The version 8.2 is picked since it's the latest version which runs on
macOS 10.11 (which is our current deployment target). If that turns
out too new for some reason the alternative would be to require Xcode
version 5.
2020-03-26 11:35:51 +01:00
c547d431eb Fix T75093: GPencil eraser selection in draw mode erase previous selected points
The selection in Draw mode works as a quick eraser and must erase only the points selected in that operation and not any previous selected point.

Now, before erase, unselect any previous selected point.

Note: It's planned to split select & erase operators for Draw mode.
2020-03-26 10:19:16 +01:00
e8dd96516c Keymap: disallow modal key-maps in add-ons keyconfig
Disable functionality reported in T60766 & only partially worked.

This could be used if the key-map was added after Blender started
as a way to customize modal key-maps, however it didn't work with
the add-on enabled on startup.

Add-on key-maps are intended to extend existing key-maps
so they can call the add-on, not as a way to change modal key-maps
for Blender's built-in functionality.

Disable this since it's not needed as add-ons
can't yet define modal key-maps.
2020-03-26 19:11:50 +11:00
03b2fc1a61 CMake: Cleanup, remove unneeded version requirement
The main CMakeLists already requires CMake 3.5, so there is no point of
requiring "newer" CMake on macOS.

This was a code from a while back where CMake 3 was not required on all
platforms.
2020-03-26 09:02:10 +01:00
fd262d3196 CMake: Fix detection of Xcode version
Legacy code did not take into account the fact that major version can
be two digits. This was causing "Xcode 11.4" to be detected as "11.".
2020-03-26 08:59:08 +01:00
09b8cdb25e Subsurf: Enable Optimal Display by default
Affects both Subdivision Surface and Multires modifiers.
2020-03-26 08:42:29 +01:00
b2f04fce2d Fix T75062: Frame Flashes During 3D Viewport Animation Playback
This issue became visible after fixing other TAA issues recently.
The sample count of the first frame wasn't reset resulting that the
incorrect resolve took place. This issue was already there beforehand,
it is just much clearer during the recent changes.

Now the `taa_sample will be reset when performing an animation playback
in the 3d viewport.
2020-03-26 08:22:52 +01:00
bae9553848 Test: update bl_run_operators blacklist, add volume object 2020-03-26 15:42:52 +11:00
Matt Rossman
eca52402bc Fix T75081: RNA path For FFMPEGSettings missing 2020-03-26 15:38:46 +11:00
b2b6099666 Cleanup: redundant cast, unused arguments 2020-03-26 15:37:33 +11:00
e990e55eba Fix crash with missing NULL check accessing grease pencil paint 2020-03-26 15:32:40 +11:00
a9394aa48e Fix crashes accessing inactive screen properties 2020-03-26 15:32:40 +11:00
38b211b581 Fix crash accessing length unit settings 2020-03-26 15:32:40 +11:00
0a34e5b300 Fix crash accessing the tool with no active space 2020-03-26 15:32:40 +11:00
33da997193 Fix crashes from various missing checks in operator poll functions
Issues exposed by 'bl_run_operators.py' utility.
2020-03-26 15:32:40 +11:00
52cff88f72 Fix crash when make proxy failed to assign a proxy 2020-03-26 15:32:40 +11:00
a8e749f624 Fix crash setting the brush with the current brush was unset 2020-03-26 15:32:40 +11:00
ffd26b420c Fix crash closing a window in background mode 2020-03-26 15:32:40 +11:00
7354f07ead Cleanup: use doxy sections & add missing sections 2020-03-26 15:32:40 +11:00
ba8d819c9b Fix T74417: Freestyle render removes image texture users
This simplifies freestyle render pipeline integration so we don't have to do
much manual ID user management at all. The complexity here was legacy from
Blender Internal.

Based on fix provided by Sybren A. Stüvl.
2020-03-26 01:29:20 +01:00
366cb3a059 Fix T74711: tiling brush option in image editor not working anymore
This makes it work again at least for the non-UDIM case. For UDIM it's not
great still but I'll consider that a known limitation. A proper solution is
probably to find the closest tile at the start of the stroke and then only
paint in that one tile for the rest of the stroke.
2020-03-26 00:02:06 +01:00
99e693d126 UI: rename image source Tiled to UDIM Tiles for easier discovery 2020-03-25 23:29:46 +01:00
d554cf8dd9 Fix T75090: crash with old NVIDIA drivers after overlay refactor
Work around GLSL compiler bug with backslash in preprocessor macros.
2020-03-25 23:14:50 +01:00
6681a33a6f GPencil: Fix unreported Threshold parameter visible in wrong context
The threshold only must be vsisible in Segment mode.
2020-03-25 18:46:45 +01:00
acd84ab105 GPencil: Fix unreported missing parameter for Cutter tool 2020-03-25 18:46:45 +01:00
d751491489 Fix error after recent change when WITH_INTERNATIONAL=OFF
Always need to install font files now.
2020-03-25 18:44:35 +01:00
59aaba739d Cleanup: typo in print 2020-03-25 16:52:04 +01:00
68e341e9d5 UI: remove non-unicode font and simplify default font loading code
There is no need to have another font embedded in the Blender executable, we
can assume the bundled font exists. In the future we may provide a fallback
if the font specified by the user in the preferences is missing a character,
but that can use our bundled international font.

Differential Revision: https://developer.blender.org/D6854
2020-03-25 16:39:58 +01:00
9070999c21 UI: always use international font
This means Blender can display more text correctly without having to enable
user interface translation. Previously the quality of the font was lower,
but that has been fixed now.

The font files have now been ungzipped, which results in faster file loading
as Freetype can read only the parts of the file that it needs. Blender download
size should not increase since the release package is compressed.

This includes improvements for Cyrillic characters from the latest DejaVu
Sans fonts from D6960, contributed by Harley Acheson. Fixes T74097.

Differential Revision: https://developer.blender.org/D6854
2020-03-25 16:39:37 +01:00
f48d15a861 Cycles: limit number of processes compiling OpenCL kernel based on memory
The numbers here can probably be tweaked to be better, but it's hard to
predict and this should at least avoid excessive memory swapping.

Fixes T57064.
2020-03-25 16:39:37 +01:00
e5f7b31dd4 Fix VR viewer offset on session start with no positional tracking
The current viewer pose position as determined by the OpenXR runtime
would be applied as offset. This offset should however only be set when
toggling the positional tracking while the session already runs.
2020-03-25 16:09:39 +01:00
04ab677761 Fluid: Small fix for secondary particles
Small tweak to ensure index will not run out of bounds during secondary particle computation.
2020-03-25 16:08:05 +01:00
035a3760af Alpha hash support for hair in EEvee
This patch adds support for alpha hash for hair rendering in EEvee.  Here's a comparison of with alpha hashing:

{F7588610}

And no alpha hashing:

{F7588615}

Note that this needs "soft shadows" enabled, otherwise shadows will be noisy; here's a render with soft shadows disabled:

{F7588621}

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D5221
2020-03-25 15:45:24 +01:00
b4c05a9c89 Cleanup: use doxy sections 2020-03-25 21:24:59 +11:00
567212c343 Fix T74846: UV gizmo swaps X/Y 2020-03-25 19:42:41 +11:00
1587eb16d8 Cleanup: use const to for some mask arguments 2020-03-25 19:32:44 +11:00
4c57f07a0f Cleanup: move mask queries into own file
Similar functions to lookup nearest mask points were in mask_add.c
& mask_edit.c
2020-03-25 19:06:17 +11:00
2bc791437e Cleanup: use 'r_' prefix for output arguments
Also pass some args as 'const'.
2020-03-25 17:58:58 +11:00
c3764fe1e8 Cleanup: update doxy sections 2020-03-25 16:36:01 +11:00
188ccfb0dd Fix T74662: Prefetching causes random crashes
Caused by 18b693bdbd, due to lack of thread safety.
Beteween calling BKE_sequencer_cache_get_num_items and BKE_sequencer_cache_iterate
New items could be inserted in the cache.

BKE_sequencer_cache_iterate() now use 2 callbcack functions for initial setup
during which buffers with correct length can be initialized and finally iterating.

Additionally drawing of unselected items was fixed again introduced in 18b693bdbd.

T74662 is reporting quite different symptoms, than I get on my machine, so I am not
entirely sure this is complete fix.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7220
2020-03-25 00:23:06 +01:00
e1c7549ac9 Fix T75019: Frame Offset does not apply to scopes
Don't check for `sseq->mainb == SEQ_DRAW_IMG_IMBUF`.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7228
2020-03-25 00:09:14 +01:00
8e8fdf875d Windows/Cleanup: Remove VS2015 support from make.bat
VS2015 has not been supported for a while now but make.bat
still had some support for it.
2020-03-24 14:48:23 -06:00
Valentin
27f29cdfba Fix T74038 : Scrolling doesn't work in menu if there is no active item
Fix T74038, the logic didn't handle the case where there was not any button with focus.

Reviewed By: Julian Eisel

Maniphest Tasks: T74038

Differential Revision: https://developer.blender.org/D7208
2020-03-24 21:40:36 +01:00
394a1373a0 Cycles: use OpenCL C 2.0 if available, to improve performance for AMD
Tested with AMD Radeon Pro WX 9100, where it brings performance back to 2.80
level, and combined with recent changes is about 2-15% faster than 2.80 in
our benchmark scenes.

This somehow appears to specifically address the issue where adding more shader
nodes leads to slower runtime. I found no additional speedup by applying this
to change to 2.80 or removing the new shader node code.

Ref T71479

Patch by Jeroen Bakker.

Differential Revision: https://developer.blender.org/D6252
2020-03-24 20:09:36 +01:00
bb26c1359e Add invert mapping option to proximity weight edit modifier, and some cleanup. 2020-03-24 18:28:55 +01:00
Cody Winchester
26ef4fa85e Modifiers: Vertex Weight Edit add invert curve falloff option
This commit adds the option to invert the resulting weights of the
falloff curve.

There is a workflow used by some to convert a texture mask into
vertex weights by using a custom curve and inverting the points.
This allows the same effect with a single click, and gives the modifier
more procedural functionality.

With minor UI tweaks by @mont29.

Differential Revision: https://developer.blender.org/D6899
2020-03-24 18:28:55 +01:00
f3ea8cd608 Overlay: Wireframe: Make facing ratio offset depends on gl_Position.w
This makes the offset dependent of the actual near and far clip distances.
2020-03-24 17:54:30 +01:00
5801a016d4 Cycles: slightly improve OpenCL performance by reordering SVM enum values
Ref T71479
2020-03-24 16:49:46 +01:00
2bec6f1f06 Cycles: work around OpenCL performance regression after AOVs and vector rotate
We appear to be hitting some limit where adding any amount of code causes a
significant performance regression, no matter what it does. To work around
that a new node level was added.

Ref T71479
2020-03-24 16:49:46 +01:00
f8a4fb43fb Cleanup: remove unused Cycles kernel feature flags, replace by node levels 2020-03-24 16:49:46 +01:00
266d243d8d Cleanup: Silence warnings
```
...\gpu_texture.c(466,7): warning C4555: result of expression not used
...\gpu_texture.c(559,7): warning C4555: result of expression not used
...\gpu_texture.c:1205:72: warning: pointer targets in passing argument 4 of ‘glGetTexLevelParameteriv’ differ in signedness [-Wpointer-sign]
```
2020-03-24 12:33:31 -03:00
d5c177bc90 Cleanup: use switch statement instead of if/else on enum value... 2020-03-24 16:26:15 +01:00
a40f2c30ff GPencil: Cleanup previous commit 2020-03-24 16:19:11 +01:00
7ac5c5b08c GPencil: Add blank frame when add layer in Dopesheet
When use the dopesheet add layer operator a new blank frame is created. It's very strange to create a layer and don't see anything in dopesheet.

If the layer is added in properties, the frame is not created.

Reviewed by: @pepeland @mendio
2020-03-24 16:16:47 +01:00
d626ced6f1 GPU: Estimate a better value for the memory used
This commit adds a `mipmaps` member to the `GPUTexture` struct and also
computes to the memory used by these mipmaps and the memory used for
textures that are created from an external bindcode.

So it solves the following inconsistencies:
- The memory value for mipmaps was not being computed.
- As `GPU_texture_from_bindcode` didn't call
 `gpu_texture_memory_footprint_add`, it brought inconsistencies to the
 value of the used memory, especially when the texture is freed.

Differential Revision: https://developer.blender.org/D3554
2020-03-24 12:13:26 -03:00
28c3d952db Fix T74782: WorkBench TAA Artifacts During Painting/Drawing
When the TAA is finished the screen can still be redrawn by other
operations without the TAA resets.
If that happened the TAA did add a blank sample to the result as the
scene wasn't drawn, but the was processed.

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D7226
2020-03-24 16:04:09 +01:00
b67b414a85 GPencil: Replace Tint mode "Both" to "Stroke and Fill" 2020-03-24 16:01:59 +01:00
b759857825 Revert "Fix T74782: WorkBench TAA Artifacts During Painting/Drawing"
This reverts commit 58ac113b76.
2020-03-24 14:02:16 +01:00
Michael Soluyanov
88adfc7e54 Fix missing grid theme option for Movie Clip Editor
The theme color is used in code, but not exposed in RNA and therefore
there's no button in the theme editor for it.

Reviewed by: Julian Eisel
Differential Revision: https://developer.blender.org/D7219
2020-03-24 13:49:22 +01:00
28827b62f7 Fix T64573: RNA_path_from_ID_to_property fails for pointcaches
Give pointcaches a proper path function which e.g. also resolves
ALT+click (assign to all selected) not working for anything relating to
pointcaches.

This also cleans up the usage of the 'eModifierTypeFlag_UsesPointCache'
flag (removed from the boolean modifier, added to the softbody modifier).

Maniphest Tasks: T64573

Differential Revision: https://developer.blender.org/D7115
2020-03-24 10:52:38 +01:00
02f7a6b2bd Fix T74744: Studio Lights editor not updating in realtime when tweaking
the settings

Caused by rBc476c36e4008.

This hooks into the existing FIXME (workaround for a missing update
tagging), reactivates the NS_VIEW3D_GPU notifier (introduced in
rB2ad3d8f158d2 -- but not going anywhere atm.) to check changes to rv3d
rflag which indicated UserStudioLight has changed. To not have updates
all the time, the rflag also needs to be cleared again (see original
rB2ad3d8f158d2).

Maniphest Tasks: T74744

Differential Revision: https://developer.blender.org/D7194
2020-03-24 09:58:25 +01:00
ed44bb902d Fix T74872: Clipping Region not updating
Caused by rBc476c36e4008.

This hooks into the existing FIXME (workaround for a missing update
tagging), needs to also check the clip_state (to detect
changes in DRW_STATE_CLIP_PLANES).

Maniphest Tasks: T74872

Differential Revision: https://developer.blender.org/D7193
2020-03-24 09:54:28 +01:00
a6dd22d431 Fix T74957: Matcap flip not updating
Caused by rBc476c36e4008.

This hooks into the existing FIXME (workaround for a missing update
tagging from operators), needs to also check the shading.flag (to detect
changes in V3D_SHADING_MATCAP_FLIP_X).

Differential Revision: https://developer.blender.org/D7192
2020-03-24 09:50:09 +01:00
579447bd89 Fix T74096: Paint Masking overlay can`t be hidden
Caused by rB9516921c05bd.

Dont really see a reason to draw overlays here if overlays are disabled.
Looks like this only affects Face/Vertex mask selection drawing [which
should indeed be hidden when overlays are disabled] next to two
exceptions:

- OVERLAY_paint_vertex_cache_populate draws weights as well [D7176 /
T70807 might be related here, but to me it looks like drawing weights
here is actually not needed at all]

- OVERLAY_paint_texture_cache_populate calls
DRW_cache_mesh_surface_texpaint_get [not sure about this one, this is
also called from workbench_cache_texpaint_populate, looks like this is
not needed when overlays are hidden]

Maniphest Tasks: T74096

Differential Revision: https://developer.blender.org/D7179
2020-03-24 09:44:42 +01:00
Habib Gahbiche
6e4eb2be28 RNA: expose comparison tolerance for Mesh.unit_test_compare 2020-03-24 19:41:46 +11:00
cd02495479 Fix T75036: Assert when copying pose bones 2020-03-24 17:54:06 +11:00
3d3a91103b Doc: remove MeshTessFace reference 2020-03-24 16:26:07 +11:00
Henrik Dick
bb19d96bc5 Fix solidify complex degenerate cases with duplicate faces
The removal of duplicate faces that are created during the handling of
degenerate cases was implemented already but didn't work.
This patch should fix some crashes with the solidify complex mode
related to that.

See D7221 for details.
2020-03-24 16:17:22 +11:00
15b0c76480 UI: add Blender -> System menu
Include technical operators here so they're available
when using menu-search.
2020-03-24 14:11:31 +11:00
c46dcdf887 UI: add menu search functionality to operator search menu
This has some advantages over operator search:

- Some operators need options set to be usefully accessed.
- Shows key bindings to access menus
  (for actions that don't have key bindings themselves).
- Non operator actions such as check-boxes are also shown.
- Menu items can control execution context, using invoke or execute
  where appropriate so we can control how the operator runs.

Part of the design task T74157.

This can be tested using the 'Experimental' preferences section
or selected in the key-map editor.
2020-03-24 13:41:18 +11:00
94b8166a8b Cleanup: clang-format 2020-03-24 10:42:29 +11:00
d0d251b53b Cleanup: spelling 2020-03-24 10:36:42 +11:00
9c280630c9 Fix invalid comma use 2020-03-24 10:17:52 +11:00
cda81d5a4d Fluid: Enforce minimum thickness to planar flow / effector objects
Planar object now have a thickness by default. This should make it more intuitive for users as there is no need to specify an object thickness.
2020-03-23 23:50:39 +01:00
e9629e3cfd Fluid: Use different phi for levelset generation
Phi that is used for mesh should be the one that matches particles best.
2020-03-23 23:50:39 +01:00
1b5b6a5da8 Fix T73505 EEVEE: Group output node sockets default value not working
This just cleanup the code and apply the expand to group output nodes.
2020-03-23 23:50:32 +01:00
765c82e92d Fix possible endless loop in Auto Merge & Split 2020-03-23 17:40:08 -03:00
b701af328a Revert "COW: Edit Mesh: Do not copy the looptris pointer"
The looptri is repeated in the linked Meshes but the pointer
is only referenced in the evaluated ones.

This reverts commit 64982e213f.
2020-03-23 14:18:36 -03:00
ed386507e1 Fix T74984: Crash opening specific production files
More detailed symptoms: there was no curve cache created for an object
which was used by draw manager.

A bit tricky situation, which involves collection instances and their
proxies.

The root of the problem in the dependency graph was that instanced
collections visibility was not updated when object is requested with
different visibility. So what was happening is that one of the objects
was pulled as an indirect dependency of something invisible, so it
built instanced collections as if the instancer is invisible. After
that the same object was built as visible. Before this fix this was
only update object flags, the instanced collections still believed they
are invisible. Since there is no path via relations which would connect
visible object with instanced objects the visibility flush which is
happening during graph finalization did not "fix" the visibility flags.

This change makes it so instanced collections are updating their
visibility when their instancer's visibility is changing to truth.
This is similar to how collections will accumulate their visibility
when same collection is used from multiple ones with different
visibility.

However, this alone wasn't enough to get crash fixed. This marked
collections as visible, but the geometry component of the curve object
was still considering self as invisible.

This is something tricky, since the code which is responsible for this
issue was added as an optimization in afb4da6650. This looks like like
an oversight in that commit since it's rather weird that ID node's
flag would depend on construction order (in "normal" object builder the
ID node's directly_visible flag is initialized to object's visibility).
So it seems logical to get this part of code in sync between "regular"
and "accumulative" object builder.

And last but not least the naming is_directly_visible is old and does
not really represent what it actually mans now: a more correct name
would be "will be used by the draw manager".

Differential Revision: https://developer.blender.org/D7217
2020-03-23 17:19:44 +01:00
58ac113b76 Fix T74782: WorkBench TAA Artifacts During Painting/Drawing
When the TAA is finished the screen can still be redrawn by other
operations without the TAA needs to be reset.
If that happened the TAA did add a blank sample to the result.

This patch will add an early exit in the case TAA was finished. Note
that there are still some cases still not working. The overlay engine
can in certain circumstances draw directly into the default_fb what can
lead to render artifacts.
2020-03-23 17:10:01 +01:00
24b27ea231 Bump subversion for previous theme additions 2020-03-23 16:43:54 +01:00
Michael Soluyanov
c95b522856 UI: Theme options for checkerboard pattern colors and size
This patch adds ability to set up colors and size of background
(transparency) checkerboard pattern in viewport and 2d editors. No new
backgrounds, only changing colors in existing ones.

This is not the background of the viewport, it is a transparency
checkerboard that is turned on only in render mode, when the
transparency mode is on. And also in 2D-editors, (image, sequencer,
etc).

Reviewed By: Pablo Vazquez, Julian Eisel

Differential Revision: https://developer.blender.org/D6791
2020-03-23 16:35:29 +01:00
88a86c025c Deps: TBB changed their repository URL
As a result the MD5sum of the downloaded package also changed.
2020-03-23 16:04:52 +01:00
Henrik Dick
241248223a Change solidify's material offset in complex mode to conform with simple mode
this patch will change the behaviour of the material offset in complex mode to fit simple mode output.
Previously in complex mode this would offset the material of the enire shell,
because when you read the tooltip it says material for new generated geometry.
In complex mode everything is new generated geometry though.
In simple mode on the other hand, this would give you a way to only change the inside faces
material. There may be cases in large modifier stacks where material offset like it is implemented
currently in complex mode may be useful, but it is much more useful in the way it is implemented
by simple mode.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D7215
2020-03-23 15:39:48 +01:00
Henrik Dick
ee4645207f Fix T74195: Solidify Complex Dissolve Crash.
I also added a few more comments to the code as I gone along.

Maniphest Tasks: T74195

Differential Revision: https://developer.blender.org/D7214
2020-03-23 15:22:31 +01:00
f9855800e0 Depsgraph: Driver Relations, skip finding possible relation with one driver
The `build_driver_relations()` function in the depsgraph relations builder
adds relations between drivers that potentially write to the same memory
location. This of course is only useful when there are two or more drivers.
2020-03-23 14:54:07 +01:00
7192a1bca3 Fix T73593: Drivers on hide_viewport and hide_render are unreliable
My previous fix (rB4c30dc343165) worked, except for an off-by-one error.
2020-03-23 14:54:07 +01:00
0b116a84c9 Fix T74923: Weight Painting Overlay Invisible for In Front Objects
For In Front Objects we need to use the in front depth buffer.

This patch will use the in front depth buffer and also makes sure that
it is filled with the center pixel depth.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D7216
2020-03-23 14:03:39 +01:00
6a5bd812b5 Fix T74586: Image Editor Uses Invalid Display Channels
When using the image editor the display channels attribute can become
invalid when selecting another image/buffer. This patch will check what
display channels are valid and when an invalid channel is selected it
will fall back to the color channel.

To de-duplicate the code it also introduces a
`ED_space_image_get_display_channel_mask` function that will determine
the valid bitflags for the display channel of a given `ImBuf`.
2020-03-23 13:56:42 +01:00
64982e213f COW: Edit Mesh: Do not copy the looptris pointer
No functional changes.

Differential Revision: https://developer.blender.org/D7173
2020-03-23 09:30:26 -03:00
bceb91ffd2 Sound: Fix asymmetrical mutex lock/unlock logic
Started to happen after recent fix for T72632.

Was caused by runtime fields backup doing an early exit in the case the
given ID was never expanded by the Copy-on-Write mechanism, but it was
not done int the backup restore function (since it was not possible to
know "locally").

Now both init() and restore() will do an early exit when the ID had
nothing to be backed up.
2020-03-23 09:55:15 +01:00
0710fb724b Fix T72632: Blender crashes using Jack with AV Sync enabled (repeatable) 2020-03-23 09:34:26 +01:00
46c0da6e69 Fix T74964: Stereo Viewport Rendering Not Working
On some platforms the stereo viewport rendering was not working. The
issue was that the fragment shader and vertex shaded didn't match. Some
platforms will remove the non-matching in/out parameters and blender
needs to provide only the optimal set of parameters. Other platform
still want to receive data for the parameters that aren't used.

This fix uses the correct vertex shader that matches the fragment shader
making both platforms render the same result.
2020-03-23 09:10:37 +01:00
0c571db4ad Fix T73988: Mantaflow fluid simulation - Particles for Spray, Foam and Bubbles are one frame ahead of Mesh
Fixes an issue with secondary particles being out of sync with the main simulation. Cleaned up the secondary particle code in general too (making sure that all solver attributes - timestep, framelength, etc. - are set correctly).
2020-03-22 21:46:43 +01:00
95b6090afc Fix T75018: Dirty vertex colours missing tooltip 2020-03-22 21:40:31 +01:00
ad7bb8e42c Cleanup: spelling, correct Mesh.mface docs 2020-03-22 12:17:25 +11:00
1e4f6b231c Cleanup: use static declaration 2020-03-22 11:51:15 +11:00
9e8afa8817 Fix OpenXR SDK failing to compile with no JsonCpp installed
Force the SDK to use its own, bundled JsonCpp sources.
2020-03-21 21:58:17 +01:00
1e8dfe79c6 GPencil: Fade to Viewport color
Actually, the fade objects always fade to Black color, but this is not a good solution.

This patch fade the object to the viewport color.

Differential Revision: https://developer.blender.org/D7206
2020-03-21 20:29:17 +01:00
c589fdc8db Fix install_deps.sh ignoring --skip-xr-openxr 2020-03-21 19:03:56 +01:00
44c6b6615b OpenCL: Bring back CYCLES_OPENCL_TEST override
Back in 2.79 you could either use the debug panel or an
environment variable to override using OpenCL for unsupported
hardware. Which was rather useful for developers when testing
on NVidia just to be sure the CL kernels at-least build properly.

This broke in rB949ab753bb2

This diff restores testing though the CYCLES_OPENCL_TEST
environment variable.

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

Reviewers: brecht
2020-03-21 11:55:45 -06:00
3033b2a044 Fix T73372: cryptomatte not filling last pass for odd number of levels
Make logic consistent with the render pass creation in Python.
2020-03-21 15:04:12 +01:00
ada28d3c65 Fix T67712: cryptomatte sockets created in wrong order in some cases
Simplify the logic and always create node outputs in the order specified
by the render engine, I can't see a reason why built-in passes must be
first.
2020-03-21 15:04:02 +01:00
c0544eedc6 Fix crash with empty volume object and points drawing 2020-03-21 14:43:47 +01:00
0dbbb2eabf Cleanup: compiler warnings 2020-03-21 14:40:51 +01:00
d924e31b42 GPencil: New Hardeness mode for Opacity modifier
Add  new option to change the stroke hardeness. This option works at stroke level, not at point level.

Also replaced the "Both" name mode by "Stroke and Fill".

Differential Revision: https://developer.blender.org/D7195
2020-03-21 09:48:18 +01:00
a22cd6b6a9 UI: Weight Paint: add a menu for locking and unlocking vertex groups.
This is a follow up on rBa1e50cfe6b4dbc360b6118c63a0dc7445023c37b
2020-03-20 20:07:42 -04:00
9607e54985 Fix T74959: Need to be explicit about UTF8 encoding in py.
Because some OSs are still using old 8bits specific encodings... Angry
eye @windows...
2020-03-20 20:52:52 +01:00
3d9d132ccd GPencil: Fix unreported slow transform with proportional edition
Now a hash is used to avoid double update of the same stroke. The old method was not correct with proportional edition.
2020-03-20 20:03:23 +01:00
a696053545 Python API: add bl_use_stereo_viewport for RenderEngine
To indicate if the render engine supports rendering a stereo 3D viewport.
This is not currently supported for Cycles.

Fixes T62582
2020-03-20 16:09:49 +01:00
6777956005 Fix T68370, T74973: Cycles cryptomatte not working when other passes are enabled
Solution found by Blazej Floch.
2020-03-20 15:59:24 +01:00
db65a6e0fb Fix T74345: missing albedo for Cycles principled hair BSDF 2020-03-20 15:23:39 +01:00
0127e8522a Fix Python error in Cycles baking panel 2020-03-20 14:25:16 +01:00
36b55bee42 Fix T74649: Outliner: Cannot set/clear parent with 'Keep Transforms'
Parenting in the outliner via drang and drop would always happen without
the 'Keep Transforms' option. Since this is often desired, this adds the
ability to hold Alt for doing this to the drop action.

Adding the hint to hold Alt to the operator name is not nice, but since
the operator name is used for the UI, there doesnt seem to be a nicer
way of doing this.

If modifier keys are needed back for other actions, spawning a menu
instead could be an alternative for the future.

Maniphest Tasks: T74649

Differential Revision: https://developer.blender.org/D7120
2020-03-20 13:24:05 +01:00
27553a2e4e Multires: Fix assert when removing modifier in edit mode
It is not guaranteed that with Multires modifier existing there
will be CD_MDISPS and CD_GRID_PAINT_MASK custom data layers.

Fixes assert in the following scenario:

- With default cube, go to edit mode
- Add Multires modifier
- Remove the Multires modifier
2020-03-20 12:28:29 +01:00
d931aacef6 Cleanup: Use IDTypeInfo data for id_swap functions.
Part of T74960.
2020-03-20 11:55:34 +01:00
6cbf342cbb Cleanup: Move BKE_libblock_get_alloc_info to using IDTypeInfo.
Part of T74960.
2020-03-20 11:21:02 +01:00
db4d264e70 fix API doc generation after new volume entry in context... 2020-03-20 10:48:30 +01:00
3bab9b4868 Fix T74154: Mantaflow crash: Baking data for domain type fluid on a plane.
Added sanity check to prevent bakes from being triggered when there is no fluid object present.
2020-03-20 10:42:54 +01:00
b8574c7e56 Fix T74885: Stamped lens metadata is wrong when camera lens is animated
The Lens metadata stamped on rendered images was wrong when the camera lens
is animated. This was caused by the render pipeline passing the original
camera to the metadata system, and not the evaluated camera.
2020-03-20 10:15:59 +01:00
86cc29d0cf Multires: Disallow changing mode and quality after subdivision
Avoids possible final object shape destruction since those options
defines how displacement is applied and propagated.
2020-03-20 09:50:00 +01:00
Jeroen Bakker
8ba9efb7d8 Fix T74811: GreasePencil Stereo Rendering
When using grease pencil in a stereo rendering the grease pencil objects are
only visible in the left eye. In the viewport it renders both.

Issue is related that `DRW_render_gpencil` only renders a single view. But
`DRW_render_to_image` renders all views. This patch puts this in a loop to
render both eyes.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D7154
2020-03-20 07:47:04 +01:00
4fc45c7a2b Fix T74643: Outline Overlay Shows Hidden Faces
When in editmode faces can be hidden, but in object mode these faces are
still visible. The flag if a face was hidden in edit mode is stored in
object mode, but should not be used.

The edge detection gpu batch did detect hidden faces and didn't add them
to the draw batch. The edge detection gpu batch is used for workbench
shadows, custom bone shapes and object outlines.

This patch adds all faces to the edge detection batch.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D7157
2020-03-20 07:43:31 +01:00
cb560c01b6 Cleanup: clang-format, comment indentation 2020-03-20 12:23:04 +11:00
85dc8d7477 Cleanup: sort file, struct lists 2020-03-20 12:19:44 +11:00
35e3abb912 Cleanup: remove old header conventions recently re-introduced 2020-03-20 12:19:09 +11:00
d2c3544c5c Cleanup: remove debug print accidentally included in own previous commit.
Thanks to @brecht for the heads up!
2020-03-19 22:12:36 +01:00
Adrian Newton
45dbe0be69 UI: use consistent names in theme preferences and editors menu
Differential Revision: https://developer.blender.org/D7087
2020-03-19 21:55:18 +01:00
Luya Tshimbalanga
f974bf2cba Fix invalid Linux appdata.xml syntax
Differential Revision: https://developer.blender.org/D7149
2020-03-19 21:55:17 +01:00
a1322d7c95 Cleanup: fix typos in comments
Contributed by luzpaz.

Differential Revision: https://developer.blender.org/D7133
2020-03-19 21:55:17 +01:00
Adrian Newton
83f171b626 UI: remove unnecessary Shadow from Shadow Samples label in Eevee volumetrics
Differential Revision: https://developer.blender.org/D7161
2020-03-19 21:55:17 +01:00
Yevgeny Makarov
c8b611b67f Fix UI alignment in generator f-curve modifier.
Differential Revision: https://developer.blender.org/D7167
2020-03-19 21:55:17 +01:00
Stephan
da019efde9 Cleanup: silence warnign in volume grid code
Differential Revision: https://developer.blender.org/D7175
2020-03-19 21:55:17 +01:00
817c38f715 PyAPI Docs: Update aud example
Fixes T74641
2020-03-19 16:21:17 -04:00
4b74b35322 Fix Cycles crash in Windows debug mode with volumes 2020-03-19 20:02:33 +01:00
12b621059a Cleanup/refactor: remove BKE_idcode, in favour of BKE_idtype.
Mpving utils from idcode to idtype proved to be somewhat painful for
some reasons, but now all looks good.

Had to add a fake/empty shell for the special snowflake too,
`ID_LINK_PLACEHOLDER/INDEX_ID_NULL`...
2020-03-19 19:39:23 +01:00
0b7854323d Fix typos in names fo new mesh and texture IDTypeInfo. 2020-03-19 19:39:23 +01:00
e1b2ded7b2 Fix build WITH_CXX_GUARDEDALLOC 2020-03-19 14:42:04 -03:00
3be7d74cba Fix T70126: Can't snap between objects with Rigid Body
`DEG_FOREACH_COMPONENT_IGNORE_TRANSFORM_SOLVERS` was `0`
2020-03-19 13:19:15 -03:00
689606887f Cleanup: add extern C 2020-03-19 16:54:09 +01:00
89b0465136 Fix T74908: volume object step size can not be set back to zero 2020-03-19 16:00:40 +01:00
2be14e0ec4 Fix typo in make.bat help for build directory 2020-03-19 15:31:21 +01:00
2982c9ba0a ColorManagement: Incorrect Memory Read for RGB images
When RGB images or BW images are converted to a GPU texture and color
space conversion was needed the images were read incorrectly.

This patch checks the correct amount of channels in the image and uses
that as the correct pixel stride.
2020-03-19 15:26:53 +01:00
9ace7e2439 Fix T74925: Texture Paint Stencil Mask crash
Use first texture if we dont have an ImageUser.

Maniphest Tasks: T74925

Differential Revision: https://developer.blender.org/D7181
2020-03-19 15:18:09 +01:00
42012493a8 Fix T74916: Industry compat keymap: GP Tweak tool acts like the Cursor tool 2020-03-19 14:43:50 +01:00
91c1759956 Fluid: Cleaned up some parts of the fluid modifier UI
Especially when expanding the UI panel horizontally, there were some problems with empty space.
2020-03-19 13:15:39 +01:00
cc516b82ef Fix T74915: Gpencil Tweak tool does not add point to selection holding Shift 2020-03-19 12:11:48 +01:00
885caa4535 Multires: Support "Subdivide" for Simple subdivision type
Is done by considering all base edges infinitely sharp.

In the future can become a different operator option to allow to mix
Catmull-Clark and simple subdivisions. For now just sticking to what
old good Blender versions were doing.

Fixes T74869: Simple subdivision type is not working as it should
2020-03-19 11:59:45 +01:00
e793a47efb Multires: Optimize memory usage further
Avoid storing any loose edges for the propagation process.
Also avoid any edge which crease is zero.
2020-03-19 11:59:45 +01:00
ccb731f2dd Multires: Reduce memory footprint after previous fix
The idea is following: only store information about edges which are

1. Communicated to the OpenSubdiv topology.

   This rules out all loose edges, as they are not needed for the
   propagation process.

2. Correspond to edge from the base mesh.

   This avoids storing edges which are generated between inner face.
   Those are not to have any sharpness to allow smooth propagation.

There is still possible to have memory peak in some obscure case when
mesh contains a lot of loose edges. It can be optimized further by
utilizing knowledge of the non-loose tags.
2020-03-19 11:59:45 +01:00
317a9cf835 Multires: Subdiv, properly support base edge crease
The title says it all actually. The test case is to get default cube,
set some edges to non-zero crease, add multires modifier and hit the
"Subdivide" button few times.

The memory footprint might be optimized by not storing information
about inner generated edges.
2020-03-19 11:59:45 +01:00
6e39445f80 GPencil: Cleanup - Split BKE_gpencil.h geometry functions into BKE_gpencil_geom.h
This split prepare the code for future geometry functions.
2020-03-19 11:38:22 +01:00
e839a25651 RNA: add MetaElem.select & use_scale_stiffness 2020-03-19 21:16:57 +11:00
7e9575f7a1 Fix T74701: Text on Curve Scaling Issue
Both scaling the text itself, as well as scaling the curve wasnt
updating, now added relations for this.

Maniphest Tasks: T74701

Differential Revision: https://developer.blender.org/D7140
2020-03-19 10:43:10 +01:00
b49dbb635a Subdiv: Make Blender crease to OSD sharpness reusable
Makes it so conversion is centralized in a single place.

We might consider removing any conversion, passing value as-is which
will be easier for I/O scripts to match crease. The downside of that
would be loose of control range in certain qualities and values of
crease.

There shouldn't be any functional changes in this commit.
2020-03-19 10:33:51 +01:00
53674fb255 Multires: Add missing context initialization
Might have caused access to uninitialized memory when foreach()
would have failed for some reason.
2020-03-19 10:08:48 +01:00
9dfc480ad1 Multires: Cleanup, typo in type name 2020-03-19 10:01:56 +01:00
ffb95baebe Multires: Store modifier pointer for subdivide
Allows to access its settings during the subdivision process.
2020-03-19 10:01:56 +01:00
2d1cce8331 Cleanup: make format after SortedIncludes change 2020-03-19 09:33:58 +01:00
008aaaa378 Code quality: Enable SortedIncludes
Code quality: Enable SortedIncludes in .clang-format

This patch does not include a `make format`, which will follow suit.

Differential Revision: D6811
2020-03-19 09:33:43 +01:00
Dalai Felinto
473316e246 Cleanup: make format (and adding . to end of comment) 2020-03-19 09:29:47 +01:00
Jeroen Bakker
fd48ff1296 Fix T73931: Stereo Viewport Color Management
Stereoscopic viewport didn't support Color Manangement due recent
changes in the color management pipeline. In order to solve the issue we
will migrate the strereo rendering into the GPUViewport. This will share
some textures and reduce required GPU memory.

Reviewed By: fclem, dfelinto

Differential Revision: https://developer.blender.org/D6922
2020-03-19 08:26:48 +01:00
Jeroen Bakker
fe045b2b77 WindowManager: Remove Stereo Offscreen
Stereo offscreen rendering has been replaced with stereo viewport
rendering. When an offscreen buffer is used it is only used for mono
rendering.

This patch will remove the second offscreen buffer.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D7153
2020-03-19 08:03:40 +01:00
d68d1da1f3 UI: scale sequence handle by pixelsize 2020-03-19 12:28:59 +11:00
f4a60fd85c Cleanup: rename variables which aren't specific to macOS 2020-03-19 12:28:50 +11:00
326ce2d625 Cleanup: declare & assign variables on the same line
Use less vertical space.
2020-03-19 12:28:50 +11:00
07c4c86049 Theme: update blender light theme
Also correct gizmo_view_align color.
2020-03-19 12:18:41 +11:00
b62e1146e1 UI: add view aligned gizmo color
Was hard coded to white making white backgrounds impractical.

D7162 by @billreynish with edits.
2020-03-19 12:09:53 +11:00
014e569258 Cleanup: use '\' for doxygen commands 2020-03-19 12:09:07 +11:00
ed4c47632f Cleanup: spelling 2020-03-19 12:09:07 +11:00
5bf09bbcdf Cleanup: shadow warning 2020-03-19 12:09:02 +11:00
f3e7c1e8c8 Fix building on Linux as '__time64_t' isn't portable 2020-03-19 11:56:02 +11:00
Robert Guetzkow
f70241deba Fix (unreported): Crash on accessing active sequence in select groupped operator
This patch moves the NULL check of `actseq` to the correct position, which should happen
before the `channel` is assigned. Otherwise an attempt to call the `sequencer_select_grouped_exec`,
when there is no active sequence and `use_active_channel` set to true, results in a crash.

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D7170
2020-03-19 00:49:46 +01:00
271231f58e VSE: Strip drawing improvements
This patch include changes:
- Thicker and clearer selection indication
- Slimmer handles
- More transparent muted strips
- Trim frame number is drawn inside the strip
- Strip text is drawn in upper part of strip
- Color strips now have specific color, with chosen color drawn under strip text
- Transition strip will use color of input strips showing direction of transition
- Selecting effect strip will highlight input strips
- Selecting multicam strips will highlight target channel
- Missing media state is now indicated by a red line drawn on the top part of the strip
- A checkerboard pattern is now drawn on the outsides of the meta range
- Hold still regions are now always drawn if existent, with a darker shade of the strip’s background color

Author: Alessio Monti di Sopra <a.monti>

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D6883
2020-03-19 00:24:09 +01:00
348d2fa09e VSE: Disk cache
This patch implements dumping images from cache to HDD.
The main goal of this system is to provide a means to achieve consistent playback speed mainly for strips that are not possible to preview in real time.

How to use:
Disk cache has own settings in user preferences for path to storage, size limit and compression level.
To use disk cache, you need to check `Use Disk Cache` box, set `Disk Cache Directory`, `Disk Cache Limit` and save or open existing .blend file.
By default sequencer output will be cached only. Manual setting is possible in cache panel.

Uses:
 - Replacement or alternative for proxies. Disk cache will work with any strip type, supports float images as well.
 - Storage for strip thumbnails.
 - Less RAM needs to be allocated for preview cache

How it works:
Disk cache is extension of RAM cache. Every image, that is stored or deleted in RAM will be stored or deleted on HDD as well. Images can be compressed to save space and for use on slower drives. Compressed images are slower to write and read though.
Images are stored in bulk of 100 rendered frames per one file. This is to overcome slow file access time for large amount of files. Drawback is, that if one frame needs to be redrawn, all 100 frames are deleted.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D5524
2020-03-19 00:07:30 +01:00
c8b4b4c0fa Fluid: Fixed issue with intial velocities in liquid domains
The fix for T74762 (bf9c4af9bb) introduced this issue. Initial velocities were not applied to liquids anymore.
2020-03-19 00:04:13 +01:00
99be00fdb1 Cleanup: Prepare XR code for sorted headers 2020-03-18 20:53:02 +01:00
1935cd4027 Fix T74837: GPencil: Mirror over first selected marker crashes
'mirror_gpf_marker()' needs a NULL bGPDframe for initialization [but
still requires a scene to get the marker].

Maniphest Tasks: T74837

Differential Revision: https://developer.blender.org/D7166
2020-03-18 20:46:22 +01:00
a12ae67cf7 UI: Update the Clay Thumb Sculpt icon
The previous icon was identical with the Thumb icon.

New icon designed by Damian Winnichenko
2020-03-18 20:38:28 +01:00
c102dfd43d Cleanup: Prepare for sorted headers on windows
To prepare for D6811 small changes were needed.
we can no longer undefine near/far since the windows
headers use those extensively.

some of the imbuf files need to include the windows
headers explicitly to make sure it builds.
2020-03-18 13:26:38 -06:00
6bfe7c7a02 Fix (harmless) use of uninitialized variables in Cycles 2020-03-18 19:51:54 +01:00
9a116c7c2d Cleanup: 64 bit file IO on windows.
Unlike Linux where fseek/tell will be either 32 or 64 bit
depending on the target platform, it will always be 32 bit
on windows.

We had some macro magic in BLI_winstuff.h that substituted
them for 64 bit versions, but that is upsetting the system
headers if they get included after BLI_winstuff.h which
is problematic for D6811.

This diff adds proper functions in blenlib and updates
all calls that were using the BLI_winstuff.h header to
gain 64 bit file IO.

note: Anything that was using the 32 bit versions (ie not
including BLI_winstuff.h) will still be using the 32 bit
versions, which is perhaps a good code quality Friday project.

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

Reviewers: brecht dfelinto
2020-03-18 12:13:03 -06:00
ac74a843d2 Fix NULL-pointer dereference after error during VR session start 2020-03-18 18:24:11 +01:00
1a502097c7 Cleanup: Fix build warnings on windows.
Two headers define the _USE_MATH_DEFINES symbol now, if both
are included warnings are generated.

Added some guards, all good again.
2020-03-18 11:23:56 -06:00
c9c08dc7c8 Fix compilation error after recent change 2020-03-18 18:16:18 +01:00
805c4ab6bc UI: Make sure theme UI names are correctly capitalized
Also removed redundant use of 'color' in some instances.
2020-03-18 18:02:35 +01:00
efb53f5181 Fix T74524: tooltip for smoke dissolve time is backwards 2020-03-18 17:54:17 +01:00
b88ca3e6d1 Cleanup: Resolve HKEY conflict
Both the MS headers and blender headers define the HKEY
which gives all kind of inclusion order issues.

This diff renames all *KEY constants to EVT_*KEY to resolve
this conflict.

Reviewed By: brecht , dfelinto

Differential Revision: http://developer.blender.org/D7164
2020-03-18 10:38:37 -06:00
9e382dd2a3 Fix T74542, T74386: schulpt changes not saving (dyntopo or mutires)
Caused by rB2d423479bdea.
Correct check for stroke being painted.

thx also to brecht checking.
2020-03-18 16:41:41 +01:00
237ef0dcc7 Fix T74842: Remove Vertex Paint hotkeys
There were some conflicts with these keys.
2020-03-18 15:49:58 +01:00
7bde3f63dd GPencil: Fix typo error 2020-03-18 15:33:03 +01:00
19df67cd75 Fix build errors with WITH_HEADLESS or WITH_GHOST_SDL
Disable WITH_XR_OPENXR entirely for these cases. For headless XR
features don't make much sense, for SDL support is not implemented.
2020-03-18 15:19:41 +01:00
82fc81816e Fix openXR building with install_deps in some compilers. 2020-03-18 15:11:03 +01:00
efdc93fcc6 Fix T74876: Crash when snapping to faces
The crash occurs after operators change the amount of editmesh looptris.
The looptris of the evaluated object's editmesh are not updated.
2020-03-18 09:58:24 -03:00
52c0742560 GPencil: Remove Panel Grease Pencil and move Use Lights to Visibility
It was too much to have a panel for that.
2020-03-18 13:48:30 +01:00
d8897bed99 Fix headless and Python module build after recent alert icon changes 2020-03-18 13:31:49 +01:00
0af739ae8a GPencil: Remove duplicated Mode parameter from Color Subpanel in Vertex Paint
This parameter is now at Brush level, so it was duplicated in the Color panel.
2020-03-18 13:16:40 +01:00
e843d4e438 Cleanup: Rename variables 2020-03-18 09:10:39 -03:00
b81b127928 GPencil: Remove background to Dopesheet buttons
This was missing in previous commit.
2020-03-18 13:06:09 +01:00
dd416681fb Fix BPY enum property definiton failing if items contain spaces
Mistake in 03a4d3c33f, turns out this actually is called from BPY
(which I didn't think it was). So only error out during makesrna, not at
runtime.
2020-03-18 12:53:36 +01:00
406026abba Cleanup: spelling 2020-03-18 22:28:54 +11:00
c3651adf89 Tests: add OpenVDB volume tests 2020-03-18 11:23:05 +01:00
7537cad576 Volumes: add render settings for volume datablock
* Space: volume density and step size in object or world space
* Step Size: override automatic step size
* Clipping: values below this are ignored for tighter volume bounds

The last two are Cycles only currently.

Ref T73201
2020-03-18 11:23:05 +01:00
Brecht Van Lommel
1162ba206d Cycles: change volume step size controls, auto adjust based on voxel size
By default it will now set the step size to the voxel size for smoke and
volume objects, and 1/10th the bounding box for procedural volume shaders.

New settings are:
* Scene render/preview step rate: to globally adjust detail and performance
* Material step rate: multiplied with auto detected per-object step size
* World step size: distance to steo for world shader

Differential Revision: https://developer.blender.org/D1777
2020-03-18 11:23:05 +01:00
9d20f170c7 Cycles: support for rendering of new Hair object prototype
Ref T68981
2020-03-18 11:23:05 +01:00
994eb1ec17 Cycles: support rendering new Volume object type
Voxels are loaded directly from the OpenVDB grid. Rendering still only supports
dense grid, so memory usage is not great for sparse volumes, this is to be
addressed in the future.

Ref T73201
2020-03-18 11:23:05 +01:00
006025ead0 Cycles: support for different 3D transform per volume grid
This is not yet fully supported by automatic volume bounds but works fine in
most cases that will have mostly matching bounds.

Ref T73201
2020-03-18 11:23:05 +01:00
fd53b72871 Objects: Eevee and workbench rendering of new Volume, Hair, PointCloud
Only the volume drawing part is really finished and exposed to the user. Hair
plugs into the existing hair rendering code and is fairly straightforward. The
pointcloud drawing is a hack using overlays rather than Eevee and workbench.

The most tricky part for volume rendering is the case where each volume grid
has a different transform, which requires an additional matrix in the shader
and non-trivial logic in Eevee volume drawing. In the common case were all the
transforms match we don't use the additional per-grid matrix in the shader.

Ref T73201, T68981

Differential Revision: https://developer.blender.org/D6955
2020-03-18 11:23:05 +01:00
b0a1cf2c9a Objects: add Volume object type, and prototypes for Hair and PointCloud
Only the volume object is exposed in the user interface. It is based on OpenVDB
internally. Drawing and rendering code will follow in another commit.
https://wiki.blender.org/wiki/Source/Objects/Volume
https://wiki.blender.org/wiki/Reference/Release_Notes/2.83/Volumes

Hair and PointCloud object types are hidden behind a WITH_NEW_OBJECT_TYPES
build option. These are unfinished, and included only to make it easier to
cooperate on development in the future and avoid tricky merges.
https://wiki.blender.org/wiki/Source/Objects/New_Object_Types

Ref T73201, T68981

Differential Revision: https://developer.blender.org/D6945
2020-03-18 11:23:05 +01:00
8dcfd392e4 UI: add new icons for Volume, Hair and PointCloud 2020-03-18 11:23:05 +01:00
12720d8b9b GPencil: Cleanup int comparisons 2020-03-18 11:12:11 +01:00
35019443c0 GPencil: Invert Dopesheet icons to same order than properties panel 2020-03-18 10:19:54 +01:00
084bf7daee Weight Paint: Implement a new Lock-Relative mode.
This check box alters how weights are displayed and painted,
similar to Multi Paint, but in a different way. Specifically,
weights are presented as if all locked vertex groups were
deleted, and the remaining deform groups normalized.

The new feature is intended for use when balancing weights within
a group of bones while all others are locked. Enabling the option
presents weight as if the locked bones didn't exist, and their
weight was proportionally redistributed to the editable bones.

Conversely, the Multi-Paint feature allows balancing a group of
bones as a whole against all unselected bones, while ignoring
weight distribution within the selected group.

This mode also allows temporarily viewing non-normalized weights
as if they were normalized, without actually changing the values.

Differential Revision: https://developer.blender.org/D3837
2020-03-18 11:55:44 +03:00
82c51d0edb Modifier: skip calling MOD_deform_mesh_eval_get
This is only needed in certain cases.

When testing performance improvements to the modifier stack
it's useful to bypass this function.
2020-03-18 14:21:40 +11:00
7ba403dc94 Fix typo causing compile error with WITH_XR_OPENXR disabled 2020-03-17 22:23:02 +01:00
dc2df8307f VR: Initial Virtual Reality support - Milestone 1, Scene Inspection
NOTE: While most of the milestone 1 goals are there, a few smaller features and
improvements are still to be done.

Big picture of this milestone: Initial, OpenXR-based virtual reality support
for users and foundation for advanced use cases.
Maniphest Task: https://developer.blender.org/T71347
The tasks contains more information about this milestone.

To be clear: This is not a feature rich VR implementation, it's focused on the
initial scene inspection use case. We intentionally focused on that, further
features like controller support are part of the next milestone.

- How to use?
Instructions on how to use this are here:
https://wiki.blender.org/wiki/User:Severin/GSoC-2019/How_to_Test
These will be updated and moved to a more official place (likely the manual) soon.

Currently Windows Mixed Reality and Oculus devices are usable. Valve/HTC
headsets don't support the OpenXR standard yet and hence, do not work with this
implementation.

---------------

This is the C-side implementation of the features added for initial VR
support as per milestone 1. A "VR Scene Inspection" Add-on will be
committed separately, to expose the VR functionality in the UI. It also
adds some further features for milestone 1, namely a landmarking system
(stored view locations in the VR space)

Main additions/features:
* Support for rendering viewports to an HMD, with good performance.
* Option to sync the VR view perspective with a fully interactive,
  regular 3D View (VR-Mirror).
* Option to disable positional tracking. Keeps the current position (calculated
  based on the VR eye center pose) when enabled while a VR session is running.
* Some regular viewport settings for the VR view
* RNA/Python-API to query and set VR session state information.
* WM-XR: Layer tying Ghost-XR to the Blender specific APIs/data
* wmSurface API: drawable, non-window container (manages Ghost-OpenGL and GPU
  context)
* DNA/RNA for management of VR session settings
* `--debug-xr` and `--debug-xr-time` commandline options
* Utility batch & config file for using the Oculus runtime on Windows.
* Most VR data is runtime only. The exception is user settings which are saved
  to files (`XrSessionSettings`).
* VR support can be disabled through the `WITH_XR_OPENXR` compiler flag.

For architecture and code documentation, see
https://wiki.blender.org/wiki/Source/Interface/XR.

---------------

A few thank you's:
* A huge shoutout to Ray Molenkamp for his help during the project - it would
  have not been that successful without him!
* Sebastian Koenig and Simeon Conzendorf for testing and feedback!
* The reviewers, especially Brecht Van Lommel!
* Dalai Felinto for pushing and managing me to get this done ;)
* The OpenXR working group for providing an open standard. I think we're the
  first bigger application to adopt OpenXR. Congratulations to them and
  ourselves :)

This project started as a Google Summer of Code 2019 project - "Core Support of
Virtual Reality Headsets through OpenXR" (see
https://wiki.blender.org/wiki/User:Severin/GSoC-2019/).
Some further information, including ideas for further improvements can be found
in the final GSoC report:
https://wiki.blender.org/wiki/User:Severin/GSoC-2019/Final_Report

Differential Revisions: D6193, D7098

Reviewed by: Brecht Van Lommel, Jeroen Bakker
2020-03-17 21:42:44 +01:00
406bfd4304 Ghost: Ghost-XR API to abstract away and access OpenXR functionality
Extends Ghost to include an abstraction for OpenXR, which I refer to as
Ghost-XR. Such an API is the base for the following commit, which introduces VR
support to Blender.

Main features:
* Simple and high-level interface for Blender specific code to call.
* Extensible for muliple graphics backends, currently OpenGL and a DirectX
  compatibility layer are supported.
* Carefully designed error handling strategy allowing Blender to handle errors
  gracefully and with useful error messages.
* OpenXR extension and API-layer management.
* OpenXR session management.
* Basic OpenXR event management.
* Debug utilities for Ghost-XR and OpenXR

For more information on this API, check
https://wiki.blender.org/wiki/Source/Interface/XR.

Reviewed by: Brecht Van Lommel

Differential Revision: https://developer.blender.org/D6188
2020-03-17 21:39:59 +01:00
c9a8de1d70 Fluid: Correct Tooltip 2020-03-17 16:32:56 -04:00
3af51cacbf Online Manual Reference: Update 2020-03-17 16:28:58 -04:00
a7c660fe61 Cleanup: Fix warnings about function signature of register pass
RE_engine_register_pass is sometimes in the headers with type
as an integer parameter, sometimes as eNodeSocketDatatype.

This caused warnings, the root cause was makesrna was not able
to generate the proper type for enums and defaulted to int.

makesrna has been extended with the RNA_def_property_enum_native_type
that allows telling makesrna the native type of an enum, if set it
will be used otherwise it will still fall back to int.

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

Reviewed By: brecht
2020-03-17 13:45:35 -06:00
e09f0caff3 GPencil: Fix crash joining objects
The weights array can be NULL.
2020-03-17 19:02:10 +01:00
blender
ba3d49225c make deps: Fixes to make OpenXR to work on CentOS Linux
- Harvest to a proper location.
- Disable STD's filesystem which is experimental and caused
  linking errors when OpenXR is usedi n Blender.
2020-03-17 18:35:29 +01:00
f1eb86c458 GPencil: Rename old color operators to material
The color was used in old version when palettes were used, but now all are materials
2020-03-17 18:29:34 +01:00
bf9c4af9bb Fix T74762: Mantaflow: Non emmiting flow source affects simulation 2020-03-17 18:21:01 +01:00
07d5b8b023 Fix T74322: Wrong object bundles with scaled camera
Camera scale was not handled correctly when drawing 3d bundles for
reconstructed objects (caused by normalization of the matrix).
2020-03-17 17:48:55 +01:00
6a0ddb4bb1 Cleanup: Remove unused function
Was introduced earlier today and did not turn out to be very useful
and clear.
2020-03-17 17:40:54 +01:00
f958560a99 Multires: Properly support virtual modifiers for Apply Base
The initial code from earlier from today didn't really work reliable
since it is not possible to apply virtual modifiers but not the real
multires one (in a situation like mesh with shapekeys and multires).

New code uses less memory and has better performance for the case
when there are actual modifiers leading the multires. The case when
there is only multires will not be as performant as possible at this
moment.
2020-03-17 17:40:54 +01:00
1504cb26b0 Cleanup: process colorspace conversion with a 1D pixel array
No need to assume it's 2D or 3D.
2020-03-17 17:33:08 +01:00
2518f60109 GPencil: Fix Parent layer not working
The parenting was using the old logic, but with new engine the draw is done using eval data.

Fixed the depsgraph relationship missing with bones to get an update when the bone is transformed.

Also fixed Snap cursor to Selected
2020-03-17 17:28:49 +01:00
964375e36a Cleanup: blenkernel proper header inclusion for BKE_ocean.h
BKE_ocean.h uses the bool type without including stdbool.h
counting on someone else including that before it.

With D6811 enabling automatic sorting of the includes
this can no longer be counted on. This changes includes
stdbool.h in BKE_ocean.h so it can build without being
depended on others including the right headers before it.
2020-03-17 10:12:47 -06:00
Robert Guetzkow
d374237d43 Fix T74838: fix dereferencing of NULL in sculpt_no_multires_poll when no active object exists
Fix crash when the operator search is used while no active object exists. The cause of the issue is an attempt to dereference `ob` when it is `NULL`. Therefore this patch checks the return value of `SCULPT_mode_poll()` first, to ensure that `ob` isn't `NULL`.

Reviewed By: pablodp606

Maniphest Tasks: T74838

Differential Revision: https://developer.blender.org/D7156
2020-03-17 16:46:55 +01:00
24e44143a1 Multires: Fix Apply Base when there are deform modifiers
Their effect was applied twice after hitting Apply Base since the
operator was also applying deformation caused by those modifiers.
2020-03-17 16:41:43 +01:00
628d799c85 Multires: Add utility to create deformed base mesh
The new function will use original object as a starting point
and apply all enabled deformation modifiers prior to the multires.
2020-03-17 16:41:43 +01:00
c76d390c92 Mesh: Fix applying deform modifier up to index
The code would have break the first (deform only) modifiers
once the index is reached, but it will not prevent second
loop (over remaining modifiers) from run.

This was applying deform modifier twice in some conditions:
having single deform modifier and calculating deformed mesh
up to the first modifier (index=0).
2020-03-17 16:41:43 +01:00
bf5151b2d2 Mesh: Add utility to calculate deform modifier up to index
Intention is to be used to create mesh at the state which is an input
to the multires modifier.
2020-03-17 16:41:43 +01:00
a45c34ae8e Multires: Cleanup, argument naming and order
Use full argument name.

Also order arguments in the generosity order: from depsgraph
(which has everything) to object (which contains multires)
specific multires modifier.
2020-03-17 16:41:43 +01:00
17abae45f1 Multires: Cleanup, remove redundant argument
Scene can be queried from the dependency graph.
2020-03-17 16:41:43 +01:00
20456b52b4 Fluid: Fixes for new abort bake faster feature
In addition to previous commit that made it possible to abort bakes faster.
2020-03-17 16:12:46 +01:00
b852db57ba Add experimental global undo speedup.
The feature is hidden behind an experimental option, you'll have to
enable it in the preferences to try it.

This feature is not yet considered fully stable, crashes may happen, as
well as .blend file corruptions (very unlikely, but still possible).

In a nutshell, the ideas behind this code are to:
* Detect unchanged IDs across an undo step.
* Reuse as much as possible existing IDs memory, even when its content
  did change.
* Re-use existing depsgraphs instead of building new ones from scratch.
* Store accumulated recalc flags, to avoid needless re-compute of things
  that did not change, when the ID itself is detected as modified.

See T60695 and D6580 for more technical details.
2020-03-17 15:02:05 +01:00
Mateusz Grzeliński
9ce3890950 Cleanup: rename function
This function was missed in rBec471a9b1c1.

Differential Revision: https://developer.blender.org/D7155
2020-03-17 14:46:50 +01:00
8cb463f4ff OverlayEngine: crash when using hidden faces
Unreported Crash. When hidden faces are active (retopology) the depth
test could fail as the default framebuffers aren't set. This patch will
check if we are rendering a depth only and skip the clearing of the
buffer.
2020-03-17 13:56:25 +01:00
3c1433b6f3 Revert "Cleanup: use doxy sections"
This reverts commit 626b2bd071.

Sergey prefers not to use doxy sections for this code.

Revert pending a decision on T74845
2020-03-17 23:53:36 +11:00
b2851dbe78 Fluid: Abort baking jobs faster
With this change baking jobs will be aborted faster. The user will not have to wait for the current frame to finish baking. The bake job will exit early and discard the incomplete frame.
2020-03-17 13:49:57 +01:00
54c8770692 Fix error using CUDA in plug-ins on Linux/macOS, hide our CUDA symbols
Better solution will be to hide all symbols by default, but this works for now.
2020-03-17 12:23:36 +01:00
0b7841679e Multires: Cleanup, naming, make it more consistent
The coarse mesh is an input to generic Subdiv, and exact meaning is
ambiguous.

The input to Multires is a base mesh, which owns CD_MDISPS.
2020-03-17 12:23:02 +01:00
b02a25b7e1 Add accumulated recalc flags to IDs.
Those accumulated flags get cleared every time an undo step is written
to memfile.

Preliminary work for undo-speedup.

Part of T60695/D6580.
2020-03-17 12:10:52 +01:00
055863d9c1 Cleanup: minor changes. 2020-03-17 12:10:52 +01:00
20d7c04305 Fluid: Re-dded Empty Space option in the UI
This option existed already and was just hidden in the UI. With the new fluids system though, it will only be used for rendering - and not to optimize the cache.
2020-03-17 11:57:04 +01:00
7f3e84deb5 Fluid: Updated manta pp files
Includes only a rename. The name PyInit_Main was a bit confusing as it just belongs to Manta.
2020-03-17 11:57:04 +01:00
2ba3e6a02e Depsgraph: Adds helpers to extract/restore despgraphs in a given Main.
Extract will steal all depsgraphs currently stored in given bmain, and
restore will put them back in place, using scene and viewlayers as keys.

Preliminary work for undo-speedup.

Part of T60695/D6580.
2020-03-17 11:24:37 +01:00
90ce708ef0 BKE_lib_id: Add helper to swap full ID content and use proper naming.
Preliminary work for undo-speedup.

Part of T60695/D6580.
2020-03-17 11:13:14 +01:00
b87997f59b Cleanup: rename 'centre' to 'center' in View3D 2020-03-17 11:34:11 +11:00
ab430cfdfe Cleanup: sort DNA renaming 2020-03-17 11:29:54 +11:00
67307e72ea Cleanup: use more descriptive variable name for the data-mask
Make it explicit this data mask is added to the default mask.
2020-03-17 11:04:50 +11:00
47af235ba9 Revert "UI: Add 7 new community themes"
This reverts commit d89e5fcaef.

This was meant to be committed to the add-ons repo.
2020-03-17 10:41:40 +11:00
120a38ccbe Nodes: Display bl_icon of custom nodes in node header
This is D1578 by Philipp Oeser with small modifications.
2020-03-16 18:25:23 +01:00
e42f61dda8 Fix incorrect Face Sets when using mask extract
Mask extract modifies the topology when adding the boundary loop, so
previous face sets may not be correct in the new mesh. Remove the face
sets datalayer and let sculpt mode rebuild it when entering sculpt mode
in the new object.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7129
2020-03-16 17:53:03 +01:00
bab0fd1308 Fix visual artifacts with partially hidden meshes and mask extract
The previous behaivour didn't make sense as sculpt mode was still active
when switching to the new object, so it was rendering inconrrectly.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7130
2020-03-16 17:45:22 +01:00
e4077ea69d Fix T74626: Wrong Face Sets overlay rendering in smooth shading
The face set color variable needs to be declared inside of the loop in
order to reset it per iteration.

Reviewed By: jbakker

Maniphest Tasks: T74626

Differential Revision: https://developer.blender.org/D7096
2020-03-16 17:43:54 +01:00
7941ea02f8 Update viewport rotation origin when changing Face Set visibility
Small UX fix. When hidding everything but the active face set with H,
the last stroke lotation center can be in a part of the model that is
hidden, so viewport navigation becomes confusing until you start a new
stroke on the visible face set. Now the viewport navigation rotation
center is updated to the active vertex when using a visibility operation
that uses it, so it always rotates using the visible face set as the
origin.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7137
2020-03-16 17:42:52 +01:00
ba26adee0c Fix T61234 Mirroring Grease Pencil keyframes in the Dopesheet fails
`ANIM_animdata_update()` did not sort grease pencil frames. A
pre-existing comment stated this wouldn't be necessary as
`posttrans_gpd_clean()` already does this. However, this is only
applicable when the change is performed via the transform system. The
mirror operator doesn't call `posttrans_gpd_clean()`, invalidating the
assumption in the comment.

I moved the sorting code into `BKE_gpencil_layer_frames_sort()`, which
is now called from both `ANIM_animdata_update()` and
`posttrans_gpd_clean()`.
2020-03-16 16:23:12 +01:00
f0856b1fda Cycles: Fix bad escape character used for dot 2020-03-16 16:17:13 +01:00
215e474a99 Fix T74776: Cycles crash with missing image texture after recent changes 2020-03-16 16:02:06 +01:00
20f6700c88 UI: Show decorators for lights when using Cycles
This matches Eevee, and also the rest of Blender.
2020-03-16 14:32:09 +01:00
d89e5fcaef UI: Add 7 new community themes
This commit adds 7 themes submitted by the community on Devtalk. These themes both serve specific purposes, provide a greater variety in look & feel, and serve as welcoming homes for users coming on board from other packages. This is the initial commit, but these themes can be continuously updated over time to fix issues and keep them up to date with changes.

Thanks to all contributors, and in particular the makes of the picked themes: Pierre Schiller, Edward Agwi, Vojtěch Lacina, Michail Soluyanov, Jason van Gumster, Mr Wax Police & Jonathan Lampel.

An overview is here: https://developer.blender.org/T74360
2020-03-16 14:25:47 +01:00
37e7e1e77c Cleanup: Typo in comment 2020-03-16 12:43:05 +01:00
a69c364746 UI: fix backdrop and alignment in anim channels
This patch fixes various problems of alignment and element backdrops for
the animation channels drawing, mainly in the Graph editor but also for
grease pencil and mask layers in the Dope Sheet.

Reviewed By: billreynish, sybren

Differential Revision: https://developer.blender.org/D5204
2020-03-16 12:18:33 +01:00
5a664c6e98 Fix another implicit cast of boot to int
Use proper comparison to nullptr.

It is important to use nullptr since NULL is actually an integer,
which leads to another type of warnings.
2020-03-16 12:15:16 +01:00
35a29befb3 Fluid: Updated Manta pp files
Includes additional minmax check for Windows
2020-03-16 11:52:18 +01:00
7df435325b Fix implicit cast from bool to int in path tests 2020-03-16 10:53:46 +01:00
01377fd229 Workbench: Crash When Rendering With Stereo 2020-03-16 10:42:03 +01:00
868573451f Cleanup: use unsigned char for UI_view2d_text_cache_add
Avoids casts when used with other UI code
where the color is often unsigned.
2020-03-16 11:53:08 +11:00
f06a6e92bc Cleanup: misleading memset use
This call to memset relied on PassList having a single,
zero sized struct member.

Pass the passes array instead for readability.
2020-03-16 09:43:07 +11:00
Yevgeny Makarov
ac1dcdbf06 UI: Add an Outline to the Popover Arrows
Reviewed By: billreynish, fclem

Differential Revision: https://developer.blender.org/D5873
2020-03-15 23:19:01 +01:00
7a19a99675 Workbench: Fix default view not reset after drawing
This fix jitter of overlay and GPencil. But I'm not sure this should
be the responsibility of the subsequent draw engines or the responsibility
of the current engine to reset the view.
2020-03-15 22:50:07 +01:00
cebff2ff30 Fix a syntax error in test spec for BLI_delaunay_2d_test.
Test specs are read from strings, and there was a comma instead
of a decimal point, and then an extra decimal point in the Quad0 test.
This test has been flaky on Windows buildbot. Perhaps this is why.
2020-03-15 17:14:04 -04:00
7a7b392b54 GPencil: Reduce factor to 5 in previous commit
10 decimals is too high
2020-03-15 19:40:21 +01:00
22925d0dd3 GPencil: Remove Keep parameter from Select Vertex Color
Also changed range of threshold from 0 to 10
2020-03-15 19:22:33 +01:00
8022fc3220 Fix Blender building after recent 'cleanup'.
Caused by rB4be4c0667155. Please ensure at least affected code does
still build...
2020-03-15 16:11:35 +01:00
e53e17b8d6 Fix outliner edit-mode check 2020-03-15 22:04:08 +11:00
b435bd2f31 Fix potential draw manager assignment to negative index
While there is an assert here, the run-time code would perform the assignment.
2020-03-15 22:03:59 +11:00
59f5194265 Fix potential NULL pointer de-reference creating liquid geometry 2020-03-15 22:03:49 +11:00
b8feef59c8 Cleanup: add parens for clarity 2020-03-15 21:53:57 +11:00
5029b97d02 Cleanup: add NULL check for RNA filename argument
Currently some of the code supports a NULL filename,
add the NULL check so RNAProcessItem's with a NULL filename
don't crash in the future.
2020-03-15 21:53:20 +11:00
ecfb89280e Cleanup: use 'r_' prefix for return args 2020-03-15 21:51:22 +11:00
37419bb3f6 Cleanup: avoid setting float values by bit-pattern
Replace memset with copy_vn_fl, note that the exact values are slightly
different in this case. The value being set was close to FLT_MAX.
2020-03-15 21:51:02 +11:00
4be4c06671 Cleanup: redundant checks
In some cases moved the checks into asserts,
to ensure changes in the future don't cause
the checks to become necessary again.
2020-03-15 21:48:35 +11:00
80edc0e972 Cleanup: redundant assignments 2020-03-15 21:46:18 +11:00
aa60b9338a Cleanup: use 'const' style argument 2020-03-15 21:42:06 +11:00
b037816980 Cleanup: shadow warning, clang-format 2020-03-15 21:42:06 +11:00
4031d8bcb7 UI: Fix capitalization in the macOS app menu 2020-03-15 11:16:08 +01:00
a210b8297f UI: Larger Alert Icons
Adding a set of larger icons for use in informational dialogs.

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

Reviewed by Campbell Barton
2020-03-14 11:05:09 -07:00
a816a067ed GPencil: Change Select Vertex Color to similar selection
Now, instead to use the Brush color as selection patron, now it uses any previous selected color.
2020-03-14 16:26:56 +01:00
b7160f2f0a IC keymap: Fixes for GP
- Remove Shift for drawing poly-lines, just as in the default keymap
  - Use consistent hotkeys for size and strength radial controls
  - Fix some bugs/missing items from the GP merge
2020-03-14 14:00:28 +01:00
94bad2f30d GPencil: Fix missing context wheel color in Tint tool 2020-03-14 11:58:22 +01:00
cc53900baf GPencil: Add option to keep selected in Select Vertex Color 2020-03-14 11:07:35 +01:00
428e65256e GPencil: Use Linear color instead of sRGB for Select Vertex Color
The brush color is sRGB but the Vertex Color is linear.
2020-03-14 10:46:28 +01:00
b8211a4d7c GPencil: Add Select Vertex Color to menu
This option was missing
2020-03-14 10:45:23 +01:00
466171d0ef GPencil: Rename operator select_color to select_vertex_color 2020-03-14 10:33:33 +01:00
d50d410a70 GPencil: Rename operator color_select to select_material
The old name was related to the old palettes.
2020-03-14 10:30:59 +01:00
bb89cc51ec Fix T67446: UV Editor: support island select mode for box/circle/lasso
selections

Previously this was only supported in single click selections, doing an
island selection with box/circle/lasso would just select individual
vertices instead. Now selects islands properly.

This also unifys some logic between box/circle/lasso:
- use early selection test from lasso [makes things faster] in box/
circle
- circle wasnt checking visible face
2020-03-14 08:16:08 +01:00
f0b0524c5f Cleanup: spelling 2020-03-14 15:43:21 +11:00
117ccb56ad Cleanup: remove unused ARegion from bGPdata_Runtime 2020-03-14 15:39:59 +11:00
4b38eac4da CMake: use spaces instead of tabs for icon updating script 2020-03-14 15:39:59 +11:00
60e3f690cb Cleanup: sort file lists & struct declatations 2020-03-14 15:39:59 +11:00
626b2bd071 Cleanup: use doxy sections 2020-03-14 15:39:53 +11:00
acab745078 UI: Toolbar icons
- Add icons for Sculpt Cloth, Clay Thumb and Draw Face Sets, as well as GP Tint, Replace and Transform Fill tools
  - Tweak icons for Sculpt Rotate, Pinch, Multiplane Scrape, Inflate, Blob, Draw Sharp, based on feedback on Devtalk
2020-03-14 01:31:28 +01:00
5260aaf3b1 Fix T73921: Eevee volume render test memory leak in Mantaflow
Fixed memory leak that showed up after the original issue (crash) had been fixed in 93ac4709eb. The fix ensures that light cache bakes free up GPU smoke textures and the smoke domain list correctly.

This commit also removes the workaround (f3a33a9298) that disabled light cache bakes for fluid objects.
2020-03-14 00:30:55 +01:00
7d56c425f8 GPencil: Don'r Replace color if vertex color is empty
The replace tools only must work over previously vertex painted.
2020-03-13 21:54:54 +01:00
dc99c3532a Cleanup: USD, move some common code to an abstract superclass
The `check_is_animated()` function will be used by the upcoming Alembic
exporter as well. There is nothing USD-specific in the function.

No functional changes.
2020-03-13 18:17:51 +01:00
ebf3c87912 Fix T74699: File browser closing while loading crash.
Owner of filelisting job was changed, without proper update of all
access/usages of that owner to reach the job, leading to failure of
timer removal from the WM, and attempt to double-free the job...

Caused by rB2c4dfbb00246ff.
2020-03-13 17:34:21 +01:00
5ad16e6a11 Cleanup: BKE_mesh_nomain_to_mesh: Add assert that source mesh is indeed not in Main. 2020-03-13 17:17:26 +01:00
4e26afe0ae Cleanup: Comments of wmJobs callbacks. 2020-03-13 17:17:26 +01:00
110a35ef5a Fix T74397: Crash after undoing quadriflow remesh on duplicate with armature deform
The issue was that we were creating temporary mesh copies and storing
them in bmain and then later using BKE_mesh_nomain_to_mesh which would
add them to bmain once more (duplicates).

This would lead to crashes later as the custom data of the mesh could be
trashed quite easily.
2020-03-13 16:29:30 +01:00
de30fda04e Fix T74686: Loading btx file in multires modifier is not working
Was happening when object does not have CD_MDISPS allocated yet.
Need to make sure totdisp and level is specified on CD_MDISPS data
prior to loading (as the load expects them to be properly set).
2020-03-13 16:15:31 +01:00
67704cb8aa Multires: Fix loosing sculpt data when using external BTX file 2020-03-13 16:15:31 +01:00
6bcb6a0ea6 Fix stereoscopy reference image drawing in the viewport
Note: Without D6922 stereo is too broken to even test this patch.
With D6922 + this patch the fullscreen modes work (anaglyph/interlace not yet).
2020-03-13 16:07:19 +01:00
be76a37c91 GPencil: Fix UI typo 2020-03-13 15:50:26 +01:00
5593efec01 Fix stereoscopy drawing for camera background
Part of the fix was to get gputexture to use an array to accomodate each
eye. This takes care of viewports showing individual Left or Right
views.

For the combined view the fix was in overlay_image.c:camera_background_images_stereo_setup.

Note 1: Referece images are still not supporting stereo.

Note 2: For painting, and getting image bindcode I'm hardcording a
single-view experience.

Note 3: Without D6922 stereo is too broken to even test this patch.
With D6922 + this patch the fullscreen modes work (anaglyph/interlace
not yet).

Differential Revision: D7143
2020-03-13 15:40:20 +01:00
93ac4709eb Fluid: Potential fix for Eevee tests crashing with Mantaflow
Belongs to T73921. This commit fixes the crashes with light baking (disabled in f3a33a9298). There is still a memory leak to be fixed though.
2020-03-13 15:34:07 +01:00
525bd62557 Potential fix for T74609: File Selector Crashes Showing Thumbnails.
Existing code was definitively giving possibility to access freed
memory, although probably not on a super-common basis...
2020-03-13 14:37:28 +01:00
bc0a0cdf17 Multires: Fix Subdivide, Reshape and Apply Base
This change fixes artifacts produced by these operations.

On a technical aspect this is done by porting all of the operations
to the new subdivision surface implementation which ensures that
tangent space used to evaluate modifier and those operations is
exactly the same (before modifier will use new code and the operations
will still use an old one).

The next step is to get sculpting on a non-top level to work, and
that actually requires fixes in the undo system.
2020-03-13 14:14:56 +01:00
b0a1af4eb1 Multires: Increase default quality to 4
Makes it work better "out of the box" for irregular topology like
Suzanne mesh.

There might be some performance impact on non-regular meshes, but
those are not very common usecase for multires and for those its
always possible to lower the quality if needed.
2020-03-13 14:13:37 +01:00
f36d98bb1d Subdiv: Fix loose geometry callbacks in certain conditions
Loose vertices and vertices of loose edges callback was not working
correct if some of other callbacks were set to NULL.

Was caused by missing bitmask set in the callbacks which were set
to NULL.
2020-03-13 14:07:44 +01:00
8622372256 OpenSubdiv: Make non-full geometry less strict for sharpness
Allow to mark individual vertices as infinitely sharp even if there is
no full topology and no access to edges: infinite sharp vertices do not
need connectivity information.
2020-03-13 14:07:44 +01:00
48e0af52e6 GPencil: Fix typo error 2020-03-13 13:08:45 +01:00
4326d162ba GPencil: Enable Lights ON to default object in 2D template 2020-03-13 13:06:02 +01:00
Bogdan Nagirniak
9075ec8269 Python: add foreach_get and foreach_set methods to pyrna_prop_array
This allows fast access to various arrays in the Python API.
Most notably, `image.pixels` can be accessed much more efficiently now.

**Benchmark**

Below are the results of a benchmark that compares different ways to
set/get all pixel values. I do the tests on 2048x2048 rgba images.
The benchmark tests the following dimensions:
- Byte vs. float per color channel
- Python list vs. numpy array containing floats
- `foreach_set` (new) vs. `image.pixels = ...` (old)

```
Pixel amount: 2048 * 2048 = 4.194.304
Byte buffer size:  16.8 mb
Float buffer size: 67.1 mb

Set pixel colors:
    byte  - new - list:    271 ms
    byte  - new - buffer:   29 ms
    byte  - old - list:    350 ms
    byte  - old - buffer: 2900 ms

    float - new - list:    249 ms
    float - new - buffer:    8 ms
    float - old - list:    330 ms
    float - old - buffer: 2880 ms

Get pixel colors:
    byte - list:   128 ms
    byte - buffer:   9 ms
    float - list:  125 ms
    float - buffer:  8 ms
```

**Observations**

The best set and get speed can be achieved with buffers and a float image,
at the cost of higher memory consumption. Furthermore, using buffers when
using `pixels = ...` is incredibly slow, because it is not optimized.
Optimizing this is possible, but might not be trivial (there were multiple
attempts afaik).

Float images are faster due to overhead introduced by the api for byte images.
If I profiled it correctly, a lot of time is spend in the `[0, 1] -> {0, ..., 255}`
conversion. The functions doing that conversion is `unit_float_to_uchar_clamp`.
While I have an idea on how it can be optimized, I do not know if it can be done
without changing its functionality slightly. Performance wise the best solution
would be to not do this conversion at all and accept byte input from the api
user directly, but that seems to be a more involved task as well.

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

Reviewers: JacquesLucke, mont29
2020-03-13 12:59:36 +01:00
db4298c6be GPencil: Avoid segment fault when use Simplify modifier
The number of points of the evaluated stroke can be less than original or the original can use less points that evaluated.
2020-03-13 12:57:59 +01:00
cb19bb7f57 Cleanup: USD, removed unused export job data
The code was copied from the Alembic exporter, and some of the options are
no longer used.

Not updating the Alembic exporter itself, as this will be done in a much
larger rewrite.
2020-03-13 12:34:03 +01:00
cf9b3310c0 GPencil: Fix Noise modifier versioning
The versioning was setting the factor for all modes without checking flags.

Also cleanup some unused code.
2020-03-13 12:24:49 +01:00
91ca3c3c0b Fix T74696: Segment fault in Noise modifier using Vertex Groups 2020-03-13 12:07:36 +01:00
1ca582c651 Fix IDTypeInfo not having enough bits for ID filter flag 2020-03-13 12:06:29 +01:00
3652870483 GPencil: Cleanup unneeded check 2020-03-13 11:16:02 +01:00
de9c7bae7b GPencil: Join Tint and Vertex Color modifier
Both are doing almost the same and can be merged. This reduce complexity for user and less code to maintain.

Reviewed By: mendio, pepeland, fclem

Differential Revision: https://developer.blender.org/D7134
2020-03-13 10:28:59 +01:00
df032580c1 Fix info showing multi-line reports reversed (upside-down)
Also, only show the icon once per report.
2020-03-13 20:14:33 +11:00
Jeroen Bakker
54743dbf09 DeformMod: Performance by reusing buffers
The Deform modifiers was reallocating buffers that only fit the vertices
of the inner loop. This patch first counts the maximum needed buffer and
allocates one.

When using the daily dweebs animation file the playback performance went
from 0.66 fps to 0.93 fps.

Reviewed By: sybren

Differential Revision: https://developer.blender.org/D7132
2020-03-13 09:28:58 +01:00
1f0b21e713 Cleanup: pass const args (mostly Scene & RenderData) 2020-03-13 17:27:11 +11:00
fa823f0af8 Fix boundary edges detection ignoring Face Set visibility
If one of the faces connected to a vertex is hidden in the face sets, we
can assume that the vertex is part of a boundary edge, so it should be
cosidered like that in all automasking and edge detection functions.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7126
2020-03-12 20:47:31 +01:00
69eaa19340 Fix flood fill operation not taking into account hidden vertices
The idea of the visibility system is that tools should behave like
hidden vertices do not exist, so the flood fill operation should ignore
hidden vertices for all operators.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7125
2020-03-12 20:45:06 +01:00
b0271c6e40 Use golden ratio conjugate for Face Sets hue generation
The face set ID is sequential, so implementing this was straightforward.
Suggested by Jeroen Bakker

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7123
2020-03-12 20:43:38 +01:00
53c03d4679 Fix Face Set operators not modifying sigle poly Face Sets
The face_set_set function which sets a face sets given a vertex index
can ignore all modifications to hidden face sets, so we can skip all
vertex visibility checks outside that function. This makes the code
faster, simpler and fixes multiple bugs.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7122
2020-03-12 20:38:57 +01:00
9dcd6ba3eb Fix T74646: Pick a random face set to be rendered white when randomizing the colors
The previous solution was also working fine as the white face set has no
meaning, but now it is a little bit more random. Also, bigger face sets
have more chance of getting the white color.

Reviewed By: jbakker

Maniphest Tasks: T74646

Differential Revision: https://developer.blender.org/D7111
2020-03-12 20:37:49 +01:00
88fd2b1dd5 Fix T74648: Do not relax with 0 neighbors or no vertex normal
The mesh provided in the report has 0 area faces and overlapping
vertices, causing the relax code to fail when calculating the plane to
constraint the vertex movement. Now it works fine both in the brush and
in the mesh filter.

Reviewed By: jbakker

Maniphest Tasks: T74648

Differential Revision: https://developer.blender.org/D7109
2020-03-12 20:36:49 +01:00
088b92b92c Fix mesh shrinking when using the relax mesh filter.
If the relax mesh filter was used on a non manifold mesh with open
boundaries, all the vertices were relaxed and the mesh was shrinking.
This was an unintended behavior that was making the filter unusable with
these meshes.

The mesh filter is now initializing an automasking buffer using the same
boundary automasking function from the brush code. Now edges are
preserved and the relax filter works as it should.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7097
2020-03-12 20:35:52 +01:00
472534d16e Fix memory leak in recent Cycles image texture refactor 2020-03-12 20:30:49 +01:00
2050baa139 GPencil: Move Vertex Paint mode to topbar
It's more easy to find in the topbar
2020-03-12 20:29:04 +01:00
c1290a1d1f GPencil: Fix color management in Vertex Paint tools
The brush is using sRGB and need to be Linear
2020-03-12 19:39:10 +01:00
649fdc7938 Fix T73049: Drag & drop on overlapping panels behaves incorrectly
Reviewers: brecht, Severin

Differential Revision: https://developer.blender.org/D7024
2020-03-12 19:36:13 +01:00
11e4827738 Fix T74670: crash during copy paste of objects.
Embedded data should always be considered as outside of Main database
here.

Note that it's a bit of an edge case to decide whether those should
always have their `LIB_TAG_NOMAIN` set too, or not? For now, let's keep
things as they are here.
2020-03-12 18:08:11 +01:00
4669dfe2cc Expose 'is embedded data' ID flag to RNA.
Relevant currently for root node trees and master collections.
2020-03-12 18:08:11 +01:00
38ba022858 Fix T66505: Dope Sheet shows empty Grease Pencil/Annotation layers
The behaviour of GP layers is the same as annotation layers: they show
in the dope sheet regardless of whether they have frames or not. This is
easily resolved by adding some extra filtering.
2020-03-12 17:33:48 +01:00
741888ce08 Cleanup: simplified Grease Pencil animdata filter
Part of the function was following an "if-ok: do-this" pattern, and then
mid-function switched to a "if-bad: skip" pattern. The function now just
uses the latter.

No functional changes.
2020-03-12 17:33:48 +01:00
26bea849cf Cleanup: add device_texture for images, distinct from other global memory
There was too much image texture specific stuff in device_memory, and too
much code duplication between devices.
2020-03-12 17:28:55 +01:00
75be60a667 Fix build error with recent OpenImageIO versions 2020-03-12 17:19:57 +01:00
f130c5ddb6 EEVEE: Update Preview file with new lightcache 2020-03-12 17:03:58 +01:00
5c427f4b17 GPencil: Fix unreliable comparison 2020-03-12 16:34:05 +01:00
63ee3db961 Fix T73228: UI shows settings of wrong marker when movie clip is offset 2020-03-12 15:53:52 +01:00
5929dd7129 Fix T73212: Gizmo's are still interactive when behind nodes 2020-03-13 01:29:06 +11:00
85ea7dfc54 Cleanup: move gizmo handling into a function 2020-03-13 01:29:06 +11:00
fe5933a972 Fix T71961: Soft body behavior is incorrect when CTRL + F12 animation is rendered.
The softbody modifier was missing the transform depsgraph relation and
thus the object matrix would not get updated during animation render.
2020-03-12 15:29:50 +01:00
37a07f812b Cleanup: remove unused node tree user counting functions 2020-03-12 13:23:02 +01:00
16ed7aebf2 Bug report preset update (last worked version)
I updated the "Worked" field in the online form but forgot to do it for
the oeprator from within Blender.
2020-03-12 11:14:53 +01:00
6c707aad6a Fix T74605 Key Indicator for motion paths not updating for objects
This fixes a functional change in 4db2a08281,
which was marked as 'should have non-functional changes only'.
2020-03-12 11:08:45 +01:00
4ba6a00afc GPencil: Change Build modifier UI layout for Influence Filters
The layer filter was not following the standard layout
2020-03-12 10:39:41 +01:00
8363e10ccc Fix T74659: Seaching for operator crashes Blender
The poll function was not checking the paint pointer.
2020-03-12 10:17:48 +01:00
21f016f010 DrawManager: Pack Draw State Bits
Some draw state bits are mutual exclusive. This patch will free some
draw state bits by packing the mutual exclusive bits in a mask.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D7088
2020-03-12 09:35:27 +01:00
456595fd39 Fix T74392: HDRI preview spheres appear in render passes and reflections
Do not render HDRI Previews when a renderpass is active

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D7005
2020-03-12 09:27:28 +01:00
0c0895e3e6 Fix move-3D gizmo in use 2D spaces
This fixes node corner-pin and sun-beam gizmo's cursor offsets.
2020-03-12 19:17:39 +11:00
d4d9ded09b Cleanup: text view API
- Use typed enum for line_data callback.
- Pass in 'const' arguments where possible.
- Use 'r_' prefix for return arguments.
- Remove unused return value from line_get callback.
- Remove redundant casts.
2020-03-12 16:18:38 +11:00
Phil Stopford
6ce709dceb Ocean: add new spectra modes to the ocean modifier
This extends the ocean modifier to add new spectra
(Pierson-Moskowitz, Jonswap, TMA).

These models are very different to the Phillips spectrum.
They are intended for more established,
large area, oceans and/or shallow water situations.
2020-03-12 15:48:20 +11:00
1aebcdbb3a Cleanup: spelling, clang-format 2020-03-12 12:34:54 +11:00
74855969e7 Cleanup: use term suppress instead of repress
Also check MSVC instead of WIN32, for setting MSVC flags.
2020-03-12 12:13:41 +11:00
8751af6d19 EEVEE: Bump minimum probe level to make rough reflection more precise 2020-03-12 01:33:56 +01:00
27e0998a8a EEVEE: Hair: Fix wrong color when using color attribute without actual data 2020-03-12 00:43:09 +01:00
72461c09b4 Windows: Clean-up warnings originating from bullet
Bullet currently generates the majority of the warnings
on windows all of them are silly. This patch disables
all warns from bullet for now.

We should revisit this if/when we update bullet
to a newer version.

Reviewed By: sergey brecht

Differential Revision: https://developer.blender.org/D7118
2020-03-11 14:11:19 -06:00
372dcacbe4 Windows: Cleanup warning about non returning dtor
`google::LogMessageFatal::~LogMessageFatal` calls `abort`
which MSVC correctly identifies as 'not returning'
and warns about a potential memory leak.

Given this is intended behaviour and glog is not overly
concerned with shutting down the process nicely, we
can safely ignore this warning.
2020-03-11 14:07:47 -06:00
e6d0a438ab Fix T73626: crash scrubbing timeline with Cycles viewport and smoke/fire 2020-03-11 20:45:39 +01:00
6cf4861c3a Cleanup: refactor image loading to use abstract ImageLoader base class
Rather than passing around void pointers, various Blender image sources now
subclass this. OIIO is also just another type of image loader.

Also fixes T67718: Cycles viewport render crash editing point density settings
2020-03-11 20:45:39 +01:00
d8aa613d94 Cleanup: add ImageHandle to centralize image ownership logic 2020-03-11 20:35:38 +01:00
ec3eeee46b Cycles: add internal default volume shader, to be used for new volume object
This is mostly straightforward, but required some refactoring to ensure that
the default volume material does not always turn on the volume feature for GPU
rendering.
2020-03-11 20:35:38 +01:00
5a169ae2f3 Cleanup: remove foreach include from header, conflicts with OpenVDB 2020-03-11 20:35:38 +01:00
21821601f2 Fix Optix build error on Linux with some compilers 2020-03-11 20:35:38 +01:00
cbb854a98f Cleanup: Fix build warning on windows.
printf is called for a size_t (64 bit on x64) type
but the formatter is `%lu` (32 bit) leading to a
warning with MSVC.

`%zu` is the appropriate formatter.
2020-03-11 13:26:09 -06:00
33c6b269d1 EEVEE: Fix test crashing
Probe counting now needs to have proper gl capabilities initialised to run
correctly.
2020-03-11 18:52:16 +01:00
12e64e5ec1 Cleanup: Fix unused debug var warning. 2020-03-11 18:50:48 +01:00
366d951b0c GPencil: Change default hardeness for Airbrush 2020-03-11 18:02:05 +01:00
e9220d5cd0 Depsgraph: Fix crash deleting Viewer image from Outliner
Was happening when having compositor open with Viewer node attached
directly to Render Layers output.

There were two things involved here:

1. The code which was storing CoW-ed versions of IDs was checking all
   IDs for whether they are expanded or not. This was causing access
   of freed memory for deleted IDs which do not need CoW (such as IM).

   Simple fix: store ID type as a scalar and use early check before
   doing more elaborate check based on accessing fields of id_cow.

2. The code which was ensuring view layer pointer is doing CoW for
   scene. This isn't an issue on its own, but scene might have an
   embedded ID such as compositor which was actually traversed by the
   ID remap routines. This was causing remapping procedure to go into
   non-updated copy of compositor, accessing freed Viewer image ID.

   Solved by not recursing into embedded IDs for datablocks as those
   are supposed to have own copy-on-write operations which takes care
   of re-mapping.

Reported my Bastien, and also pair-coded with him.
2020-03-11 17:38:42 +01:00
Giovanni Remigi
19b46b2fca Fix Cycles crash in BVH8 build due to out of bounds memory access
Differential Revision: https://developer.blender.org/D7114
2020-03-11 17:35:11 +01:00
200695dd89 Windows: Clean-up linker warnings regarding MSVCRT.lib
For debug builds we link the against the release mode libs
for C based libraries, which are technically linked against
a different CRT, which the linker will implicitly try to link.

Which results in a linker warning about mixing the debug/release CRT.

This patch prevents the implicit linking of the release
CRT in debug configurations for sub projects that had issues
with it.
2020-03-11 10:33:12 -06:00
a9c0ad53e2 Cleanup: Typo in comments. 2020-03-11 17:29:20 +01:00
a54e17e52d LibQuery: Add option to NOT process embedded IDs.
Request from depsgraph department, which does basically consider those
embedded IDs as any other data-block (unlike any BKE ID management code).
2020-03-11 17:26:58 +01:00
7dd0be9554 EEVEE: Replace octahedron reflection probe by cubemap array
We implement cubemap array support for EEVEE's lightcache reflection probes.
This removes stretched texels and bottom hemisphere seams artifacts caused
by the octahedral projection previously used.

This introduce versioning code for the lightcache which will discard any
lightcache version that is not compatible.

Differential Revision: https://developer.blender.org/D7066
2020-03-11 17:12:16 +01:00
c476c36e40 Workbench Simplification Refactor
This patch is (almost) a complete rewrite of workbench engine.
The features remain unchanged but the code quality is greatly improved.
Hair shading is brighter but also more correct.

This also introduce the concept of `DRWShaderLibrary` to make a simple
include system inside the GLSL files.

Differential Revision: https://developer.blender.org/D7060
2020-03-11 17:12:16 +01:00
f01bc597a8 Cleanup: stop encoding image data type in slot index
This is legacy code from when we had a fixed number of textures.
2020-03-11 17:07:17 +01:00
9910803574 Fix Cycles link error with debug + asan after RTTI changes 2020-03-11 17:05:15 +01:00
9ef7759bf0 Fix (unreported) bad user refcounting of viewer image ID.
This is typical case where you do not want to use actual ID refcounting,
but only the shallow 'user real' (aka 'user one') system...
2020-03-11 16:51:53 +01:00
e1698e3750 Windows: Clean-up warning while building blendthumb
Casting a 64 bit pointer to a 32 bit DWORD gave 2 warnings.
Solved by storing the actual DWORD in the registry table.

Would have preferred to use a union, but C++ doesn't let you
initialize anything other than the first field, and C99 style
initializers are not supported until C++20, so this solution
will have to do until then.
2020-03-11 09:27:35 -06:00
6a632f11c8 GPencil: Add missing Layer buttons in Dopesheet header and remove unneeded options
Update Dopesheet header to include missing buttons, remove Scene Active only buttton and also removed duplicated search box.

The removed options come from old 2.7x version and they are not required now.

Reviewed By: mendio, pepeland

Differential Revision: https://developer.blender.org/D7107
2020-03-11 16:10:47 +01:00
b198cef89f Fix T74516: Armature Crash on Select Similar Group
Select Similar Group and Select Similar Shape had this issue since they
were added. Basically it assumes there is pose data which in some cases
it does not.
2020-03-11 15:32:21 +01:00
Brecht Van Lommel
b9f6d033be Eevee: internal support for arbitrary number of volume grids
This has no user visible impact yet since smoke volumes only support a fixed
set of attributes, but will become important with the new volume object.

For GPU shader compilation, volume grids are now handled separately from
image textures. They are somewhere between a vertex attribute and an image
texture, basically an attribute that is stored as a texture.

Differential Revision: https://developer.blender.org/D6952
2020-03-11 14:59:05 +01:00
e1e772a802 Cleanup: add comment explaining reason for volume texture swizzling 2020-03-11 14:52:55 +01:00
c4beb518de Cycles: disable RTTI only for OSL files, other libraries like OpenVDB need it
This is a bit weak since it's not entirely clear where the boundary is, but
tested to build and pass tests on all platforms.
2020-03-11 14:42:46 +01:00
Brecht Van Lommel
c8acb6dd6c Smoke: put density/color in separate textures, fixes for workbench shader
This is more in line with standard grids and means we don't have to make
many special exceptions in the upcoming change for arbitrary number of volume
grids support in Eevee.

The workbench shader was also changed to fix bugs where squared density was
used, and the smoke color would affect the density so that black smoke would
be invisible. This can change the look of smoke in workbench significantly.

When using the color grid when smoke has a constant color, the color grid
will no longer be premultiplied by the density. If the color is constant
we want to be able not to store a grid at all. This breaks one test for
Cycles and Eevee, but the setup in that test using a color without density
does not make sense. It suffers from artifacts since the unpremultiplied
color grid by itself will not have smooth boundaries.

Differential Revision: https://developer.blender.org/D6951
2020-03-11 14:42:46 +01:00
f3a33a9298 Fix/workaround Eevee tests crashing with Mantaflow
Skip light cache baking until T73921 is fixed. This should be fixed properly
but being able to run the tests at all is important now.
2020-03-11 14:42:46 +01:00
4bee1e1c8c Fix broken logic in lib_query that could lead to NULL id_owner pointer.
Issue revealed by own recent cleanup in rB8820ab4, and moticed by
@brecht, thanks.

Note that am not 100% sure whether we should allow call on lib_query
without a proper valid owner_id, for embedded data-blocks. But this can
be investifated later, so far things have been working like that.
2020-03-11 14:37:38 +01:00
836b99ce49 Fix T74296: Free depsgraph when view layer is removed
Reviewers: sergey

Differential Revision: https://developer.blender.org/D7110
2020-03-11 14:18:22 +01:00
6eeaecdd67 Cloth: Copy point cache settings when copying cloth modifier
This fixes the issue mentioned in the comment in T74515.

Reviewers: mont29

Differential Revision: https://developer.blender.org/D7104
2020-03-11 13:43:58 +01:00
5cb2861420 Fix Cycles incorrect result when compressing some 8 bit log colorspace images
Don't clamp and do premultiply after color space conversion.
2020-03-11 12:59:29 +01:00
68c0d77b0c Cleanup: rename 'private' to 'embedded' for sub-data IDs.
'Private' can be a rather confusing term, especially when considering
its meaning in programming languages.

So now root node trees and master collections are 'embedded' IDs
instead.
2020-03-11 12:53:10 +01:00
8820ab41bd Cleanup in ID remapping code re owner_id vs. self_id.
The former is always a real, in-Main data-block, while the later, when
different, should be one of those embedded 'private' IDs (like root node
ree or master collection).
2020-03-11 12:53:10 +01:00
8b2072868d Cleanup: spelling 2020-03-11 21:39:56 +11:00
796683db8e Cycles: add view layer setting to exclude volumes, like hair and surfaces 2020-03-11 11:25:57 +01:00
b70a13fb66 UI: show more digits for adaptive sampling noise threshold 2020-03-11 10:54:28 +01:00
476c0eab4a Fix T74315: Cloth brush breaks orbit around selection
Reviewers: pablodp606

Differential Revision: https://developer.blender.org/D7095
2020-03-11 10:30:52 +01:00
e1b70e9f9c Fix T74635: GPencil RMB-menu brush settings not working in Sculpt and Weight Paint modes 2020-03-11 10:14:42 +01:00
f2c64517b5 Fix T74607: Modifier key click events ignore mouse wheel
Alt-Wheel would sent Alt-Click event, prompting to switch tools.
2020-03-11 20:09:37 +11:00
d195deef5c Cleanup: clang-format 2020-03-11 19:23:52 +11:00
Greg Neumiller
d0618570eb UI: edit modifier messages to clarify where auto-smooth is set 2020-03-11 19:19:29 +11:00
1c9829f351 GHOST: tests now build again
GLX gears work as expected, multitest_c only creates windows
but misses font drawing still.
2020-03-11 15:17:27 +11:00
15983243a4 Cleanup: remove bitmap font drawing ifdef from MultiTest.c 2020-03-11 15:01:14 +11:00
4184f890fd GPU: minor changes to support standalone GHOST builds
- Move gpuPush/Pop from GPU_draw.h into GPU_state.h
  as this is for pushing/popping state.
- Add 'GPU_STANDALONE' define, to bypass use of user-preferences
  for theme colors and pixelsize, as well as pbvh init/free functions.

Needed to get GHOST tests working again.
2020-03-11 14:52:57 +11:00
f9cca12886 Fix T74596: Gpencil invert button was not working for Sculpt brushes
The button was not checked, only the pen position or the control key.
2020-03-10 20:12:11 +01:00
9c5a120ba2 GPencil: Use high precision float buffer for final rendering
This avoid color drifting due to R11G11B10 buffers.
2020-03-10 18:17:42 +01:00
fa09b900c2 Fix T74625 GPencil: Airbrush doesn't paint anything 2020-03-10 18:11:25 +01:00
0f1f751785 Fix T74525: Fluid caches overwrite each other by default
Reviewers: sebbas

Differential Revision: https://developer.blender.org/D7093
2020-03-10 17:33:05 +01:00
a6d7280b8e Fix T74200: Alembic import crashes Blender
I've added a very minimal mesh validation before the Alembic mesh is actually
converted to a Blender mesh. This prevents a specific crash with an example
file attached to T74200.
2020-03-10 17:16:12 +01:00
7c027f9480 Cycles: Fixed Shadow and Mist passes with adaptive sampling.
This also fixes a side-effect where turning on UV pass but leaving
Shadow pass turned off destroyed the Combined pass.
2020-03-10 16:50:51 +01:00
be20bf2fc0 Fix T74617: Gpencil Sculpt Strength brush gets wonky results
Changed how the strength is calculñated and reduce the factor to get a smoother result.
2020-03-10 16:45:51 +01:00
1619a5d8e9 Fix rendering artifacts when changing Face Sets visibility
All sculpt operators and brushes need to use ID_RECALC_SHADING even when
PBVH rendering is not used.
2020-03-10 16:32:09 +01:00
dc8bb3f3a0 Cleanup: Clarify places to look for subversion bump 2020-03-10 16:17:49 +01:00
b37482bc3d Fix T74613: Assign the default face set color in the versioning code
A default face set color was not being set in previously saved meshes,
so it will always render the default face set with a random color until
the colors were recalculated.

Bump subversion to 283.8

Reviewed By: dfelinto

Maniphest Tasks: T74613

Differential Revision: https://developer.blender.org/D7094
2020-03-10 15:55:50 +01:00
e06888cf89 Cleanup: Add comment explaining DPI influence on RNA pixel-properties
Good to be explicit about the fact that we may still use the pixel
property sub-type when DPI will be applied.
See comments in https://developer.blender.org/D7077.
2020-03-10 15:19:22 +01:00
d55231e5a1 UI: Clarify 3D View Grid Size Tooltip
The 3D view grid size property is a multiplier, not the size of the grid itself.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7085
2020-03-10 08:44:30 -05:00
a52f6d7a31 Fix T66269: Menu for Extrapolation Mode is disabled in Graph Editor
The Extrapolation Mode menu in the graph editor channel list was
incorrectly using the operator for the Action/Dopesheet editor. The
operator was even missing in the generic dopesheet hotkeys, so
{key Shift E} was listed as hotkey but didn't work. This is now all
fixed.
2020-03-10 14:18:19 +01:00
a801487ef5 Fix T65076: Missing EasingType implementation on the Dopesheet
EasingType was implemented rBdaccaa713b6e for the GraphEditor (but never
made it to the Dopesheet). If you can select Easing Mode in the
DopeSheet, then you should also be able to select the associated Easing
Type.

Thanks @lichtwerk for the initial implementation.

Maniphest Tasks: T65076

Differential Revision: https://developer.blender.org/D6094
2020-03-10 14:02:40 +01:00
ca717f0489 Fix T74425: Cannot texture paint an images sequence anymore
Caused by the introduction of UDIM (rBc30d6571bb47).

We need to make sure the tiles ImageUser is set up correctly [especially
the framenr], otherwise BKE_image_acquire_ibuf() and friends will fail
to find the correct ImBuf.

Also instead of initializing a minimal BKE_imageuser_default, now use
an appropriate ImageUser if avaliable and pass this around (instead of
just the tile_number). 2D painting can reuse the Image Editor ImageUser,
for 3D painting we still rely on a default ImageUser in most places, but
at least set the framenr correctly].

This also fixes crashes when doing image operations such as inverting or
resizing on images in a sequence in the Image Editor.

This also fixes color sampling (S) from the 3DView going wrong for image
sequences (would fallback to OpenGL sampling because an ImBuf could not
be found).

Maniphest Tasks: T74425

Differential Revision: https://developer.blender.org/D7022
2020-03-10 13:47:33 +01:00
212660f467 Fix T73369: corner pin & sun-beam nodes gizmos are too big
Note that dragging isn't working well,
however this was an issue in previous releases.
2020-03-10 23:30:59 +11:00
85cdf9a1b9 Fix T74612: file browser thumbnails not showing and using CPU continuously
This started happening after changing filter ID to 64 bit in rB2841b2be3949,
however there was a pre-existing error here in the comparison to detect updates
to filter flags.
2020-03-10 13:11:32 +01:00
Lucas Veber
915998111b Modifiers: Corrective Smooth modifier, new Scale parameter
When scaling the root bone of a rig to apply a global scale, the
corrective smooth modifier results in wrong deformation due to incorrect
scaling. The delta calculations are not taking into account any scale
value.

To fix it, a scale property is added to the modifier, allowing to set
manually the scale value for the deltas by simply multiplying the
vectors by this value. There is a similar implementation in Maya's Delta
Mush deformer. This property can be for example driven by the scale of
the root bone of the rig, to dynamically update when the animator scale
this bone.

Reviewed By: brecht, sybren

Differential Revision: https://developer.blender.org/D6622
2020-03-10 12:49:08 +01:00
982b498c22 OVERLAY: Viewport Background Color visible in Material Preview Mode
When user used a custom background color, this color was also visible in
material preview mode, when the world opacity was less than 1. This
patch will draw the theme color as it was used to.
2020-03-10 11:36:39 +01:00
dc3ff1db3f Fix T74585: Crash when scrolling viewport shading pop-up
Was dereferencing NULL pointer. Mistake from d5572eacc5.
2020-03-10 11:21:00 +01:00
9f48852ba4 Buildbot: Enable version character for development builds
Allows to have 2.82a as a beta version on buildbot.
2020-03-10 10:23:28 +01:00
1aa7c4c28a GPencil: Cleanup float indicator 2020-03-10 08:58:25 +01:00
Stefan Werner
811569dc11 Cycles: Using OpenCL popcount() in PMJ sampler. 2020-03-10 08:53:30 +01:00
7b8ac04d86 Fix T74601: Cut Particles to Shape fails for transformed object 2020-03-10 16:55:41 +11:00
5aa54207e1 Fix sequencer Slip tool skipping offset=0 case
The slip tool wasn't being applied when the offset was zero.

This caused modal operation to skip applying this offset while dragging.
2020-03-10 16:09:57 +11:00
5184328991 Cleanup: replace term 'terrible' from sequence slip
Joke from branch name, makes comments unclear.
2020-03-10 15:53:18 +11:00
94a5b7a2e2 Fix vertex slide deselecting faces
Regression from 9a5df92c1b
2020-03-10 15:15:52 +11:00
163e6b348f Cleanup: GPencil: Remove uneeded cast 2020-03-10 05:01:13 +01:00
71712d828d GPencil: Fix RNA range for uv_rotation 2020-03-10 04:47:37 +01:00
c971e812d5 Fix T74536: Grease pencil immediately crashes on macOS
It seems like OSX drivers are using standard attributes for passing
gl_VertexID and gl_InstanceID to the vertex shader, and count them in the
limit of MAX_VERTEX_ATTRIBS.

This patch make sure to never use more than 13 attributes by packing some
attributes together.
2020-03-10 04:47:37 +01:00
bf1b323b15 DRW: Fix wrong test condition
Fixes the warning: address of array 'cmd->draw.batch->inst' will
always evaluate to 'true'
2020-03-10 04:47:37 +01:00
ec9b836d3b Fix T74579: Filename with '\' causes assert when browsing files 2020-03-10 12:29:37 +11:00
fbe81db29a Fix IC keymap after recent GP merge
Just a simple fix here for now to keep the keymap working. Will revisit these areas to make them fit in properly with the keymap.
2020-03-09 23:23:06 +01:00
9c5522f7c8 Cleanup: compiler warnings 2020-03-09 21:58:55 +01:00
0133d66ada Fix error in grease pencil vertex paint levels operator 2020-03-09 21:58:55 +01:00
Pablo Dobarro
4652f23fa3 Fix T74354: Avoid division by 0 when calculating hardness
I could not reproduce the issue, but it looks like it was produced by
this division by 0. In any case, the code here was wrong.

Reviewed By: jbakker

Maniphest Tasks: T74354

Differential Revision: https://developer.blender.org/D6987
2020-03-09 21:19:55 +01:00
84b94f9e7b Sculpt: Edge Automasking
This automasking option protects the open boundary edges of the mesh from the brush deformation. This is needed to sculpt cloths and it works nicely with the cloth brush.
It has a Propagation Steps property that controls the falloff of the mask from the edge.

Limitations:
- The automask is recalculated at the beginning of each stroke, creating a little bit of lag in high poly meshes, but it is not necessary. This can be fixed in the future by caching the edge distances, increasing a little bit the complexity of the code.
- The boundary vertex detection in meshes is not ideal and it fails with triangulated geometry, but it is the same as in the smooth brush. After fixing this, we should refactor the smooth brush to use the API and let the automasking option manually control the affected vertices.
- It does not work in Multires (it needs to be implemented in the API). The smooth brush in Multires is also not making boundary vertices.
- The falloff has a visible line artifact on grid patterns. We can smooth the final automasking factors several iterations, but it will make the initialization much slower. This can also be added in the future if we decided to cache the distances.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6705
2020-03-09 21:16:02 +01:00
Yevgeny Makarov
04e9ba7169 UI: add menus for preferences editor
This only applies to the case where preferences are opened as an editor in
a workspace, not with Edit > Preferences in a new window.

Differential Revision: https://developer.blender.org/D7001
2020-03-09 20:18:11 +01:00
Adrian Newton
2d8d30e17b UI: make workbench viewport samples label consistent with Cycles and Eevee
Differential Revision: https://developer.blender.org/D7082
2020-03-09 20:18:11 +01:00
Adrian Newton
848a4f002d UI: add "Samples" text to audio mixing buffer size preference for clarity
Differential Revision: https://developer.blender.org/D7076
2020-03-09 20:18:11 +01:00
18e3615a68 Face Sets: Use white color for a default Face Set to enable the overlay
This introduces a variable to store a face set ID which is going to be
rendered white. When initializing a mesh or randomizing the colors, this
variable gets updated to always render a white face set. This way the
face set overlay can be enabled without adding colors to the mesh if
face sets are not in use. After creating the first face set, new colors
are generated randomly like usual.

The face set stored as default does not have any special meaning for
tools or brushes, it just affects the rendering color.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7035
2020-03-09 20:11:18 +01:00
0dfb4ac1ff Face Sets: Add relax support to Mesh Filter and Draw Face Sets
This enables a relax operation that works only on face sets boundaries,
which smooths the jagged edges that are produced when painting or
expanding face sets by sliding the topology without affecting the shape
of the mesh. This has many uses in hard surface sculpting for things
like sculpting panels or smoothing surfaces. It can also help when
working with remeshed topology as it makes the face sets looks better
and more organized if needed.

The operation is implemented as an Shift smooth in the Draw Face sets
tool, similar to the Slide/Relax tool.

The same operation is also available in the mesh filter to smooth all
the face sets boundaries uniformly or to smooth the face set under the
cursor with the Use Face Sets option.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7034
2020-03-09 20:04:05 +01:00
e702c9a700 Fix Cloth Brush not working with automasking
The cloth brush was not using the automasking values when calculating
the mask value on each vertex.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7083
2020-03-09 19:43:00 +01:00
0030e6a2fc Fix T74500: Rebuild the Face Sets datalayer after slicing the geometry
Was crashing SculptSession data will not longer be valid if the total
number of polys is modified when rendering the mesh again.
This deletes all face sets in the mesh when slicing the mask. I'll try
to add code to generate a new face set in with faces that are created
when filling the holes, but for now this avoids the crash.

Reviewed By: brecht

Maniphest Tasks: T74500

Differential Revision: https://developer.blender.org/D7049
2020-03-09 19:39:57 +01:00
503d5c0c65 Fix T74499: Add visibility checks to Face Sets creation operations
Create face sets by visibility needs to check if all face sets of a
vertex are visible to set the new face set. I renamed the functions to
make this more cleare in the API.

I also added a visibility check when creating by mask to avoid modifying
hidden areas.

Reviewed By: brecht

Maniphest Tasks: T74499

Differential Revision: https://developer.blender.org/D7048
2020-03-09 19:33:22 +01:00
c65b9fb825 Sculpt: Remove hardcoded hardness from Clay brush
Hardness is now a property implemented for all brushes, so this is no
longer needed.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7078
2020-03-09 19:29:18 +01:00
6eb76f6430 Fix T74492: Reset Face Set data when cancelling the expand operator
The operator was resetting the mask data when cancelling instead of the
face set data, so it was crashing because mask data was not available
when starting the operator in expand face set mode.

Reviewed By: brecht

Maniphest Tasks: T74492

Differential Revision: https://developer.blender.org/D7043
2020-03-09 19:25:38 +01:00
a540d16ee8 Cleanup: Move Face Sets random color generation to its own function
This way we can change the color generation easily if we want to improve
it in the future. I also added more values to randomize a little bit the
saturation and value of the colors, as previously it was too easy to get
similar colors when creating new faces, forcing you to use the randomize
colors more than necessary.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7042
2020-03-09 19:14:18 +01:00
1131e33026 Fix T74438: Vertex-only meshes disappear in wireframe mode
The problem happens because, in wireframe mode, `bool use_wire` is
always `true`, so the function that draws all edges is the called.

The solution is set `use_wire` as `false` when the mesh has no edges.

This matches the behavior of blender 2.79.

Reviewed By: fclem, brecht

Differential Revision: https://developer.blender.org/D7041
2020-03-09 15:09:26 -03:00
Adrian Newton
a468368540 UI: use pixel units for tile sizes and node auto-offset margin
Differential Revision: https://developer.blender.org/D7077
2020-03-09 18:49:42 +01:00
be2e41c397 Cleanup: Move BKE_animdata_free() call out of each IDType free data.
This has been long standing TODO...

Note that remaining usages of BKE_xxx_delete should all be carefully
checked for and utilmately nuked in favor of `BKE_id_delete()`, think we
still have quiet a few bugs hidden in those (code seems to usually
assume those functions do a full ID deletion, which is not the case).
2020-03-09 18:43:11 +01:00
6472a721f0 Cleanup: Remove unused switch/case from BKE_lib_id.
Only covers direct usages of new callbacks from IDTypeInfo.

We still have a lot of those switch/case, many can probably go away
with minimal refactor now, but that will be for later.
2020-03-09 18:43:11 +01:00
b080de79db Alembic: constraint for transform animation is using world matrix again
In rB7c5a44c71f13 I changed the way transform matrices are loaded from
Alembic. Instead of having the Alembic importer convert matrices from
local (in the Alembic file) to World (to pass to the constraint handling
the animation of transforms), I set the constraint space to
`CONSTRAINT_SPACE_LOCAL`.

This worked thanks to rB7728bfd4c45c. However, that commit was reverted,
which meant that for parentless objects `CONSTRAINT_SPACE_LOCAL` no
longer means "local space".

The situation is resolved by setting the constraint to world space
again, and computing the world matrix in the Alembic importer.
2020-03-09 18:27:18 +01:00
e672cf11c3 Cleanup: palette: Move to IDTypeInfo and remove unused BKE API. 2020-03-09 18:09:23 +01:00
3e9dbe7f62 Cleanup: GreasePencil: Move to IDTypeInfo and remove unused BKE API. 2020-03-09 18:09:23 +01:00
c010290e75 Cleanup: Ipo: Move to IDTypeInfo and remove unused BKE API. 2020-03-09 18:09:23 +01:00
214cc3c245 Fix failing assert because of invalid region coordinates
Steps to reproduce were:
* Disable tool settings region in 3D View (View > Tool Settings)
* Split the 3D View and drag all the way down

The removed code doesn't seem to be needed anymore. Tested this on hiDPI
too, seems fine.

These kind of fixes are always tricky, so I wouldn't be surprised if
there are any issues caused by this.
2020-03-09 18:02:08 +01:00
32fc22db56 Fix T72253: Mantaflow adaptive domain cuts off
The issue of T72253 was that the density threshold (RNA adapt_threshold) was considering cells as empty cells too early and thus also shrinking the domain too early. The fix for this is to use smaller threshold values for the adaptive domain. This fix gives more flexibility in the UI to do just that.
2020-03-09 17:42:38 +01:00
Yevgeny Makarov
07bdbeda84 UI: avoid blurring of view navigation widgets at some UI scales
Differential Revision: https://developer.blender.org/D6734
2020-03-09 17:11:24 +01:00
Ulysse Martin
aca222c3da Fix unnecessary grease pencil drawing when there are no grease pencil objects
Differential Revision: https://developer.blender.org/D6551
2020-03-09 17:11:24 +01:00
Yevgeny Makarov
bada2dcafd UI: improve layout of keymap preferences, more consistent with other areas
Differential Revision: https://developer.blender.org/D6592
2020-03-09 17:11:24 +01:00
Kai Jægersen
6f4612a7cc Python API: allow overriding context.workspace for workspace operators
Differential Revision: https://developer.blender.org/D6867
2020-03-09 17:11:24 +01:00
Yevgeny Makarov
da101eddef UI: input preferences layout tweaks for keymap search and zoom settings
Differential Revision: https://developer.blender.org/D6979
2020-03-09 17:11:24 +01:00
Johan Walles
8bc8713beb Cleanup: avoid (harmless) race condition reported by Helgrind
Differential Revision: https://developer.blender.org/D7058
2020-03-09 17:11:24 +01:00
Adrian Newton
58e6306b15 UI: reorder viewport/render toggle in particles for consistency with modifiers
Differential Revision: https://developer.blender.org/D7069
2020-03-09 17:11:24 +01:00
Adrian Newton
5543572cd2 Cleanup: remove unnecessary space at end of label
Differential Revision: https://developer.blender.org/D7070
2020-03-09 17:11:24 +01:00
Adrian Newton
1276380fd2 UI: add space before px unit in Eevee properties for consistency
Differential Revision: https://developer.blender.org/D7072
2020-03-09 17:11:24 +01:00
Eitan
3923738c8f UI: rename View Frame to Go to Current Frame in video sequencer
For consistency with other editors.

Differential Revision: https://developer.blender.org/D7025
2020-03-09 17:11:24 +01:00
324e24ee38 Fix layout.prop invert_checkbox not working combined with icons
Contributed by Valentin (Poulpator).

Differential Revision: https://developer.blender.org/D7027
2020-03-09 17:11:24 +01:00
81c18c2507 Fix part of T73921: hang with Eevee light baking and Mantaflow
Now it crashes instead.
2020-03-09 17:11:24 +01:00
29b405a327 Overlay: Add antialiasing to particle sprites 2020-03-09 17:09:32 +01:00
3912a2a227 Fix T74438: Overlay: Loose verts and particle not draw in some conditions
This was caused by a missing output variable for lineOutput.
This triggered some undefined behavior.
2020-03-09 17:09:32 +01:00
4d0d43ce8e Cleanup: FreestyleLineStyle: Move to IDTypeInfo and remove unused BKE API. 2020-03-09 16:56:53 +01:00
dab1d14a51 Cleanup: Mask: Move to IDTypeInfo and remove unused BKE API. 2020-03-09 16:56:53 +01:00
6965bcc0c9 Cleanup: MovieClip: Move to IDTypeInfo and remove unused BKE API. 2020-03-09 16:56:53 +01:00
d43fbbb307 Cleanup: Silence warnings 2020-03-09 16:34:55 +01:00
29f3af9527 GPencil: Refactor of Draw Engine, Vertex Paint and all internal functions
This commit is a full refactor of the grease pencil modules including Draw Engine, Modifiers, VFX, depsgraph update, improvements in operators and conversion of Sculpt and Weight paint tools to real brushes.

Also, a huge code cleanup has been done at all levels.

Thanks to @fclem for his work and yo @pepeland and @mendio for the testing and help in the development.

Differential Revision: https://developer.blender.org/D6293
2020-03-09 16:27:24 +01:00
dcb9312687 Depsgraph: fix crash caused by removing too many NO-OP nodes
Unused no-op operation nodes are not bound to a callback function, and
have no outgoing relations. Incoming relations of such nodes are removed
since ff60dd8b18. However, this was done
too broadly, causing too many relations to be lost and indirectly linked
objects to be unevaluated.

This commit introduces a `DEPSOP_FLAG_FAKE_USER` flag for operation
nodes, which indicates they are not to be removed, even when they appear
to be unused.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7074
2020-03-09 16:05:33 +01:00
93f6369573 Fix T74533: Crash when entering sculpt mode
Apparently this happened when the object is in a flat view and has
customdata `CD_SCULPT_FACE_SETS`

Differential Revision: https://developer.blender.org/D7073
2020-03-09 12:00:11 -03:00
598ab525da Cleanup: Replace ABS/SQUARE/CUBE with function calls
While it might be handy to have type-less functionality which is
similar to how C++ math is implemented it can not be easily achieved
with just preprocessor in a way which does not have side-effects on
wrong usage.

There macros where often used on a non-trivial expression, and there
was at least one usage where it was causing an actual side effect/bug
on Windows (see change around square_f(sh[index++]) in studiolight.c).

For such cases it is handy to have a function which is guaranteed to
have zero side-effects. The motivation behind actually removing the
macros is that there is already a way to do similar calculation. Also,
not having such macros is a way to guarantee that its usage is not
changed in a way which have side-effects and that it's not used as an
inspiration for cases where it should not be used.

Differential Revision: https://developer.blender.org/D7051
2020-03-09 14:47:59 +01:00
ee5d7bc16b Cleanup: clang-format 2020-03-09 10:11:31 -03:00
a922a097ef Transform Snap Object: Remove depsgraph when creating context
Currently, this change does not bring functional changes.
But it is necessary to extend the use of the snap system for gizmos,
since, after a Undo, the `depsgraph` pointed by the `snap_context`
has its memory invalidated.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D7013
2020-03-09 10:02:11 -03:00
3a10c61a7d Cleanup: ParticleSettings: Move to IDTypeInfo and remove unused BKE API. 2020-03-09 12:49:04 +01:00
b9d1026ce0 Cleanup: PaintCurve: Move to IDTypeInfo and remove unused BKE API. 2020-03-09 12:49:04 +01:00
b57d3afb76 Cleanup: CacheFile: Move to IDTypeInfo and remove unused BKE API. 2020-03-09 12:49:04 +01:00
613148ce5b Cleanup: WorkSpace: Move to IDTypeInfo and remove unused BKE API. 2020-03-09 12:49:04 +01:00
0de5156a24 Cleanup: WindowManager: Move to IDTypeInfo and remove unused WM API.
Getting rid of one static 'registered' callback in BKE, yeah!
2020-03-09 12:49:04 +01:00
f881162f81 Revert "Constraints: remove special meaning of Local Space for parentless Objects."
This reverts commit 7728bfd4c4.

Although this brings back an inconsistency in the behaviour of
constraints on objects and bones, people were relying on the old
behaviour, and the new behaviour broke their files.

It is still desired to remove this inconsistency, but it will happen
more gradually.
2020-03-09 10:44:55 +01:00
Stefan Werner
bc6bbe5fac Fix T74537: Fixed out of bounds memory access in Cycles' PMJ sampler. 2020-03-08 21:31:47 +01:00
668b64380a Cleanup: Sound: Move to IDTypeInfo and remove unused BKE API. 2020-03-08 20:45:00 +01:00
014f78b5b5 Cleanup: Speaker: Move to IDTypeInfo and remove unused BKE API. 2020-03-08 20:10:07 +01:00
0d05fd9b4c Install_deps: fix wrong XR_OPENXR_ROOT_DIR parameter for CMake.
Should be `XR_OPENXR_SDK_ROOT_DIR`.`
2020-03-08 17:14:58 +01:00
7f404f1c74 Fix T74395: Box interpolation does not support repeat extrapolation
Reviewers: fclem

Differential Revision: https://developer.blender.org/D7009
2020-03-08 14:43:06 +01:00
bc2343d5c3 Cleanup: comments in main()
Clarify references to functions.
2020-03-08 13:48:52 +11:00
52dc1ddaa0 Revert "Outliner: Allow deleting entire selection"
This reverts commit 62f238a65e.

This prevents undo steps from being stored.
2020-03-08 13:48:21 +11:00
62f238a65e Outliner: Allow deleting entire selection
This allows deleting both collections and objects in the outliner
selection at the same time. This only works using the keyboard shortcuts
(X or Delete).

While this works, a more robust solution should be implemented later to
allow deleting the whole selection from the context menu as well.
2020-03-07 14:46:22 -07:00
5539b68009 Fluid: Optimization for smoke simulation (multigrid)
The solver will now automatically detect static scenes (no moving obstacles) and use a slightly faster pressure solve in those cases.
2020-03-07 19:57:06 +01:00
9867a82072 Cleanup: Outliner: Remove unused parameter
Searching back in the outliner did not require the unused SpaceOutliner
parameter.
2020-03-07 11:26:02 -07:00
6b49a9db52 Fix T74513: Wrong naming in some Face Set comments and operators
Missing changes from one of the renamings of the initial face sets
patch.

Reviewed By: brecht

Maniphest Tasks: T74513

Differential Revision: https://developer.blender.org/D7054
2020-03-07 16:42:28 +01:00
db1d711458 Fix T74501: Wrong initial iteration when using mask expand
The initial iteration for all symmetry areas is always 0. We were using
1 for the main stroke, so it was 1 step behind.

This was broken for expanding masks and face sets, but with face sets it
is more noticeable.

Reviewed By: brecht

Maniphest Tasks: T74501

Differential Revision: https://developer.blender.org/D7050
2020-03-07 16:41:41 +01:00
7760cec5dc Fix T74498: Do not iterate over hidden vertices when using the transform tool
By using PBVH_ITER_UNIQUE hidden vertices are skipped, like in the rest of
the brushes and tools.

Reviewed By: brecht

Maniphest Tasks: T74498

Differential Revision: https://developer.blender.org/D7047
2020-03-07 16:40:19 +01:00
946d39f688 UI: move Cycles adaptive sampling settings to own subpanel 2020-03-07 12:40:06 +01:00
8a5a306a83 Fix key release event activating click-drag
A handled release event could still trigger a click-drag afterwards.
2020-03-07 18:21:01 +11:00
2534dffaa5 WM: include repeat value in WM_event_print 2020-03-07 16:26:22 +11:00
ef5c6361a5 Cleanup: replace BLI_make_file_string with BLI_join_dirfile for the file-selector
In these cases the file selectors directory is already expanded.
2020-03-07 13:52:41 +11:00
0964865568 Cleanup: replace BLI_make_file_string with BLI_join_dirfile where possible
Use 'BLI_join_dirfile' for joining paths that don't need to expand '//'.
2020-03-07 13:26:23 +11:00
8fb1ea857f Include file system encoding in 'System Info' operator
Help troubleshooting file system encoding issues.
2020-03-07 11:53:14 +11:00
dcdcc23488 Fix T74504: Cycles wrong progress bar with CPU adaptive sampling 2020-03-06 23:46:58 +01:00
b31b44c223 Fix error in Cycles Optix adaptive sampling after recent cleanup 2020-03-06 23:46:58 +01:00
afe6df1487 Cleanup: VFont: Move to IDTypeInfo and remove unused BKE API
This was particularly strange because we had a _free_data() function.
But still the one I replaced was of course the _free() one.

And we should rename the _free_data_ function later to avoid confusions.
2020-03-06 20:07:02 +01:00
558f449f8c Cleanup: Text: Move to IDTypeInfo and remove unused BKE API. 2020-03-06 20:07:02 +01:00
7177862313 API Docs: Point to manual for Operator Cheat Sheet 2020-03-06 12:50:19 -05:00
13595c912c UI: Remove Windows 3D Object Folder Reference
Remove Windows special folder FOLDERID_Objects3D. Requires newer SDK.

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

Reviewed by Brecht Van Lommel
2020-03-06 09:33:13 -08:00
85424397b1 Cleanup: tweak Freestyle #includes in preparation for clang-format sorting 2020-03-06 17:26:32 +01:00
96e2bd8493 Cleanup: Fix forward declaration of headers 2020-03-06 17:26:32 +01:00
b2ee1770d4 Cleanup: Rename ARegion variables from ar to region
The old convention was easy to confuse with ScrArea.
Part of https://developer.blender.org/T74432.

This is mostly a batch rename with some manual fixing. Only single word
variable names are changed, no prefixed/suffixed names.

Brecht van Lommel and Campbell Barton both gave me a green light for
this convention change.

Also ran clan clang format on affected files.
2020-03-06 17:19:23 +01:00
b825a95ec3 Cleanup: Image: Move to IDTypeInfo and remove unused BKE API. 2020-03-06 17:13:27 +01:00
f4936de918 Cleanup: Texture: Move to IDTypeInfo and remove unused BKE API. 2020-03-06 17:13:27 +01:00
a7fb567c18 Cleanup: Material: Move to IDTypeInfo and remove unused BKE API. 2020-03-06 17:13:27 +01:00
ae6a5629a5 Fix build error on windows
```
Error	C4013	'_VA_ELEM1' undefined; assuming extern returning int
```
2020-03-06 12:49:24 -03:00
68b6d0302a Cleanup: Action: Move to IDTypeInfo, and remove unused BKE API. 2020-03-06 16:43:09 +01:00
57daecc2cf Cleanup: Armature: Move to IDTypeInfo, and remove unused BKE API. 2020-03-06 16:43:09 +01:00
14d03af7ae Bring back code accidentally removed by previous commit
Probably got lost when resolving merge conflicts.
2020-03-06 16:41:57 +01:00
d5572eacc5 Cleanup: Reduce context usage in UI functions
Part of https://developer.blender.org/T74429.

There's a chance that this causes some issues becaue in some cases we
change from getting the window from context to getting it from somewhere
else.
2020-03-06 16:27:13 +01:00
b242cc6792 Cleanup: Lattice: Move to IDTypeInfo and remove unused BKE API. 2020-03-06 16:23:23 +01:00
da7fcd3e52 Cleanup: MetaBall: Move to IDTypeInfo and remove unused BKE API. 2020-03-06 16:23:23 +01:00
8c21668ee1 Cleanup: Curve: Move to IDTypeInfo and remove unused BKE API. 2020-03-06 16:23:23 +01:00
bf6cf49133 Cleanup: Mesh: Move to IDTypeInfo and remove unused BKE API. 2020-03-06 16:23:23 +01:00
eb522af4fe Cleanup: move Alembic, AVI, Collada, and USD to source/blender/io
This moves the `alembic`, `avi`, `collada`, and `usd` modules into a common
`io` directory.

This also cleans up some `#include "../../{somedir}/{somefile}.h"` by
adding `../../io/{somedir}` to `CMakeLists.txt` and then just using
`#include "{somefile}.h"`.

No functional changes.
2020-03-06 16:19:45 +01:00
ff60dd8b18 Depsgraph: remove unused no-op nodes after building
This is the companion of D7031. That patch adds a new DIMENSIONS node to
the depsgraph for each object that has geometry. However, this node is
only necessary when there are drivers using an object's dimensions as
variable. Since this is rare, it's easiest to remove these nodes after
they turn out to be unnecessary. This is what (almost) happens in this
patch.

Removing nodes from the depsgraph is hard, and there are no functions to
do this yet. Instead, this patch recursively removes all the incoming
relations from unused no-op nodes (i.e. no-op operation nodes without
outgoing connections). Actually removing the nodes will be left as a
future improvement.

I've tested this on a Spring file [1]. Here are there results of blender
--debug-depsgraph-time spring_02_055_A.eevee.blend and letting it run
for a while to stabilise the reported FPS:

    master: 11.7 FPS
    Just D7031: 11.7 FPS
    Just D7033: 11.8 FPS
    Both D7031 + D7033: 12.3 FPS

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

Differential Revision: https://developer.blender.org/D7033
2020-03-06 16:19:45 +01:00
f2f8c5b2bd Cleanup: Move Multiplane Scrape brush to its own file 2020-03-06 16:00:33 +01:00
40ac8250b2 Fix narrowing from int to short when removing material slot 2020-03-06 15:56:09 +01:00
926f52edf0 Sculpt: Cleanup, remove macro re-definition 2020-03-06 15:52:36 +01:00
a16e4652e3 Fix integer overflow in BLI_mempool_as_arrayN()
`(size_t)(int * int)` will actually cast overflown integer to size_t,
which isn't what was intended here. Correct thing would be to cast
in the following manner `(size_t)int * int`.

In this particular case can as well use function which is designed to
allocate an array of memory without overflow.
2020-03-06 15:35:52 +01:00
c60366c01f Cycles: cleanup warning 2020-03-06 15:27:50 +01:00
17f08cff6a Cleanup: Collection: Move to IDTypeInfo, and remove unused BKE API.
Note: we still need BKE_collection_free since we call it from scene.c.
2020-03-06 15:27:50 +01:00
69d4aec55f Cleanup: Use the SCULPT_ prefix in all sculpt_intern functions 2020-03-06 15:24:15 +01:00
b201a67faa Cleanup: bScreen: Move to IDTypeInfo and remove unused BKE API. 2020-03-06 15:20:04 +01:00
a5bbdd6998 Cleanup: use ELEM macro for path slash checks 2020-03-07 01:02:37 +11:00
b4f1edd98b Fluid: Revert bc2ce31d79 (changes to open boundaries)
Changes from that commit turned out to be unstable.
2020-03-06 15:01:30 +01:00
a9ac87be36 Fix T73842: UI: add cloth collision settings to Hair Dynamics panel
Since hair collisions were integrated with the cloth solver
(rBd42a7bbd6ea5), there are a couple of relevant settings which were not
exposed to the User:
- Collision Quality
- Minimum Distance (this was reported in T73842, default of 0.015m was
still limiting in certain scenarios - this can now be made smaller)
- Impulse clamping
- Collision collection

This will add a 'Collisions' panel to Hair Dynamics with those settings

Note: in contrast to 'real' cloth, self-collisions are not supported for
hair

Maniphest Tasks: T73842

Differential Revision: https://developer.blender.org/D7032
2020-03-06 14:59:02 +01:00
f9c7442479 Cleanup: bNodeTree: Move to IDTypeInfo and remove unused BKE API. 2020-03-06 14:58:23 +01:00
165daee7cb Improve modifier error message with sculpt mode
Make it obvious that this relates to being in sculpt mode.

ref T74489

Maniphest Tasks: T74489

Differential Revision: https://developer.blender.org/D7044
2020-03-06 14:52:25 +01:00
c8ac760c59 Cleanup: tweak Cycles #includes in preparation for clang-format sorting 2020-03-06 14:44:42 +01:00
4102d67d32 Cleanup: avoid use of BLI_cleanup_dir
Some cases don't need to add the trailing slash.
Use BLI_cleanup_path in this case.
2020-03-07 00:39:28 +11:00
2d5773d11a Documentation: added bpy.msgbus description and examples
The `bpy.msgbus` namespace was not included in the documentation generation.
I've added it, and ported Campbell's examples from P563.
2020-03-06 14:29:03 +01:00
07c5ca7f2c Cleanup: Message bus, removed incorrect return type from docstring
The docstring was likely copy-pasted, and the return type was not adjusted.
Since the `bpy.msgbus.subscribe_rna()` returns nothing, I just removed the
return type documentation.
2020-03-06 14:29:03 +01:00
b839a5d076 Cleanup: remove BLI_cleanup_file
In practice, references to files rarely have trailing slashes
(by accident). Remove this function in favor of BLI_cleanup_path.
2020-03-07 00:19:01 +11:00
0b16b63d87 Cleanup: spelling 2020-03-07 00:19:01 +11:00
8bb0ac27dc Fix using wrong property name for preserve face sets when remeshing
Spotted by Roel Koster in the initial face set commit.
2020-03-06 14:17:30 +01:00
50d5050e9c Nodes: fix writing socket default values to file
Previously, `writedata` was used to store `bNodeSocket->default_value`.
There are a couple of issues with that:
* Breaks if someone tries to load the file on a big endian system (afaik).
* There is a `/* do not use for structs */` comment on `writedata`.
* Depends on `MEM_allocN_len` which should be avoided in my opinion.
* Now it is more apparent, that this should be handled by callbacks as well.

The part in `readfile.c` should work just fine still. I could also do a case
distinction there, but the code would be the same for every case for now.
Just `sock->default_value = newdataadr(fd, sock->default_value);`.

This might change, if we want to store more complex socket type specific data
that does not fit into a single struct.

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

Reviewers: brecht
2020-03-06 13:31:15 +01:00
63bb2007d8 CodeCleanup: Added View3DShading enums
Added the core enums that workbench draw engine uses.
2020-03-06 13:00:06 +01:00
f0808b53ab Cleanup: Brush: Move to IDTypeInfo, and remove unused BKE API. 2020-03-06 12:54:04 +01:00
15c834ebbf Cleanup: ShapeKey: Move to IDTypeInfo and remove unused BKE API. 2020-03-06 12:52:52 +01:00
c08151c6fa Nodes: Support storing socket link limits in bNodeSocketType
Currently the link limit of sockets is stored in bNodeSocket->limit.
This allows for a lot of flexibility, but is also very redundant.
In every case I've had to deal with so far, it would have "more correct"
to set the link limit per socket type and not per socket. I did not enforce
this constraint yet, because the link limit is exposed in the Python API,
which I did not want to break here.

In the future it might even make sense to only support only three kinds of link limits:
a) no links, b) at most one link, c) an arbitrary number links links. The other link
limits usually don't work well with tools (e.g. which link should be removed when a new
one is connected?) and is not used in practice. However, that is for another day.

Eventually, I would like to get rid of bNodeSocket->limit completely and replace it
either with fixed link limits or a callback in bNodeSocketType.

This patch consists of three parts:

**1. Support defining link limit in socket type**
This introduces a new `nodeSocketLinkLimit` function that serves as an indirection to
hide where the link limit of a socket is defined.

**2. Define link limits for builtin sockets on socket type**
Data sockets: one input, many outputs
Virtual sockets: one input, one output
Undefined sockets: many inputs, many outputs (to avoid that links are removed when the type of the socket is not known)

**3. Remove `bNodeSocketTemplate->limit`**
This wasn't used anymore after the second commit. Removing it simplifies socket definitions
in hundreds of places and removes a lot of redundancy.

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

Reviewers: brecht
2020-03-06 12:33:04 +01:00
98d562af52 CodeCleanup: move include statements before extern "C"
Mistake on recent changes that would fail when used in CPP.
2020-03-06 12:32:53 +01:00
24a37b3c03 Fix memory leak in the colorio fallback implementation.
We would previously not store the transforms that were added to the
group transform node. This would lead to pointer to allocated memory
being lost and not freed.
2020-03-06 12:29:12 +01:00
e65f5c07b0 Fluid: Added missing UI options for effector objects
UI was missing some of the new functionality introduced in a5c4a44df6.
2020-03-06 12:26:47 +01:00
79558a581d CodeCleanup: Use eDrawType
This patch will make use of the eDrawType where it was used as a
variable or parameter name. The eObjectDrawType was renamed to eDrawType
as it is also used by `View3DShading.type`.
2020-03-06 12:23:46 +01:00
e96b103536 Cleanup: move camera, lights, world to IDTypeInfo 2020-03-06 12:19:11 +01:00
297261eb90 CodeCleanup: Added enums to opengl render functions
Motivation the functions get 3 different kind of flag parameters (ImBuf,
DrawType, OffscreenRendering) the naming of the flags were not clear,
leading to mistakes and unnecessary time spend debugging.
2020-03-06 12:11:55 +01:00
9fa29fe765 Cleanup: remove MLOOPUV_EDGESEL
This was not set anywhere, code relies on MLOOPUV_VERTSEL everywhere.

BMLoopUV.select_edge was never returning True and wasnt updating uv
select state when set manually.

Afaict, there were no official Addons using this from python.

Resolves T65836

Maniphest Tasks: T65836

Differential Revision: https://developer.blender.org/D6772
2020-03-06 11:59:28 +01:00
Julian Eisel
c72317943b Attempt to fix build errors on macOS
Mistake in 5be0e3430d
2020-03-06 11:43:13 +01:00
7d61132807 Animation: improved error handling when adding/deleting keyframes
There are two ways in which adding/deleting keyframes can fail, but only
one of those was handled. The other would be shown as a successful
add/delete of -2 keyframes.
2020-03-06 11:36:59 +01:00
d8491cb7c6 Cleanup: Animation, renamed and clarified 'success' variable
The `ANIM_apply_keyingset()` returns a value that indicates the number of
changed channels (if nonnegative) or an error state (negative). In the
places where the return value was actually used, this value was stored in
a badly named variable.
2020-03-06 11:36:59 +01:00
17e1fef85a Cleanup: Library: Move to IDTypeInfo, and remove unused BKE API. 2020-03-06 11:27:54 +01:00
c25f6e998b Cleanup: Object: remove unused BKE API. 2020-03-06 11:27:54 +01:00
af5d2e38f7 Cleanup: Scene: New IDTypeInfo, and remove unused API from BKE. 2020-03-06 11:27:54 +01:00
7d9a5b7b10 Fix T73254: Drivers with the object.dimension variable are not updated
This fixes an issue where drivers using `object.dimension` only add a dependency on `GEOMETRY` to the depsgraph, whereas they should also depend on `TRANSFORM`.

This patch adds a new no-op operation that depends on the geometry and transform components to the Parameters component.

An alternative implementation would be to have `RNANodeQuery::construct_node_identifier` return multiple node identifiers. However, this would spread throughout the depsgraph code and unnecessarily force many other functions to either return or handle multiple nodes where in 99.999% of the time a single node would suffice.

The new `DIMENSIONS` node is added for each object. An upcoming patch will go over all no-op operation nodes and remove them from the depsgraph. Since this is a more dangerous operation, it'll be reviewed separately.

Differential Revision: https://developer.blender.org/D7031
2020-03-06 11:05:22 +01:00
abd33a3c0c Fluid: Cleanup naming for emmission bounding box
Since the bounding boxes are now also being used for effector objects, there needs to be a better name for them. Instead of calling them EmissionMap, which caters only to emission objects, they will now be called FluidObjectBB.
2020-03-06 11:04:26 +01:00
2e7cfb86fe Keymap: ignore repeat events for transform actions
Resolves T54297
2020-03-06 21:02:11 +11:00
e6aa349c68 CodeCleanup: eevee_materials Use Struct Assignments 2020-03-06 10:28:02 +01:00
0b9c1c2b86 Cleanup: typo in function name
contect -> context
2020-03-06 09:47:27 +01:00
5be0e3430d GHOST/Keymap: support for detecting repeat events
- Keymap items now have 'repeat' boolean which can be set
  to make keymap items respond to key repeat events or not.
- Support for X11 & WIN32 (not macOS currently).

This allows for the possibility to perform actions while a key is held
and finish the action upon release.

Thanks to @Severin for review and WIN32 support.
2020-03-06 17:31:28 +11:00
73ef27f156 Cleanup: keyframing return arguments
- Use 'int' for counters instead of short.
- Use 'bool' instead of a counter when only a change is being detected.
- Use typed enum for keying set flags.
- Include in comments when a negate error code may be returned.
2020-03-06 17:05:18 +11:00
e97aed1e73 Cleanup: remove unused 'eInsertKeyFlags' from delete API call
There is no need for an insertion flag in a delete function.
2020-03-06 15:07:57 +11:00
b15c658801 Cleanup: keyframe API naming, high level keyframe API
- Split 'verify_fcurve' into two functions:

  ED_action_fcurve_ensure which adds the f-curve if needed.
  ED_action_fcurve_find which returns NULL when not found.

  Callers of ED_action_fcurve_find had unused 'group'
  argument which has been removed.

- Rename verify_adt_action to ED_id_action_ensure

  It had an argument to add data which was always true,
  remove this instead of splitting in into a separate function.
2020-03-06 14:16:38 +11:00
07d13be678 Cleanup: rename 'verify' to 'ensure' for BKE_image_viewer functions 2020-03-06 13:06:21 +11:00
54ab8c6abd Cleanup: rename 'verify' to 'ensure' for argument name 2020-03-06 13:00:01 +11:00
bba4a09b2f Cleanup: use 'BKE_' prefix for BKE_deform API calls
- Use 'BKE_object_defgroup' prefix for object functions.

- Rename 'defvert_verify_index' to 'defvert_ensure_index'
  since this adds the group if it isn't found.
2020-03-06 12:56:44 +11:00
1af83aa2dd Cleanup: use 'r_' prefix for return arguments
Also avoid a redundant strlen call.
2020-03-06 12:49:21 +11:00
088636bc38 Cleanup: use BLI_strnlen instead of strlen 2020-03-06 12:43:58 +11:00
5229448c43 Cleanup: clang-format 2020-03-06 12:39:00 +11:00
c19d2f2507 Cleanup: use MEM_recallocN_id 2020-03-06 12:00:37 +11:00
8574d68aa0 Cleanup: spelling 2020-03-06 11:52:32 +11:00
6c623b0e8c Cleanup: add decimal values for event types, order by value 2020-03-06 11:52:31 +11:00
da30e9a104 Cleanup: quiet switch warnings 2020-03-06 11:52:31 +11:00
310285b0c2 Cleanup: redundant-decls warning 2020-03-06 11:14:21 +11:00
eed1beff88 UI: Using Consistent Font Icon in File Browser
Use only one font icon in File Browser for all platforms. Correct mistake to allow this icon to be used.

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

Reviewed by Brecht Van Lommel
2020-03-05 13:23:28 -08:00
38d6533f21 Sculpt Face Sets
Face Sets are the new system to control the visibility state of the mesh in sculpt and paint modes. They are designed to work in modes where brushes are the primary way of interaction and they provide much more control when working with meshes with complex shapes and overlapping surfaces.

This initial commit includes:
- Sculpt Face Sets data structures and PBVH rendering.
- Face Set overlay and opacity controls.
- Sculpt Undo support.
- Remesher reprojection support. The visibility state of the mesh is also preserved when remeshing.
- Automasking and Mesh filter support.
- Mask expand operator mode to expand Face Sets (Shift + W) and flood fill areas by connectivity (press Ctrl while expanding).
- Sculpt Mode Face Sets and Visibility API.
- Sculpt Face Sets creation and visibility management operators.
- Operator to randomize the Face Sets colors.
- Draw Face Sets brush tool to create and edit the Face Sets. Drawing on the mesh creates a new Face Set. Pressing Ctrl before drawing modifies the Face Set under the brush at the beginning of the stroke.
- Updated keymap and menu to work with Face Sets from Sculpt Mode (H to toggle visibility, Alt + H to show all, Shit + H to hide).
- Pie menu on the W key with Face common Sets operations.

Know limitations:
- Multires support. The Face Sets and Visibility API needs to be implemented for Multires.

Reviewed By: jbakker, #user_interface, Severin

Differential Revision: https://developer.blender.org/D6070
2020-03-05 21:07:20 +01:00
e56471bcd3 UI: File Browser Favorites
Adding more Windows special folder locations, used when browsing or bookmarking.

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

Reviewed by Brecht Van Lommel
2020-03-05 11:49:56 -08:00
Yevgeny Makarov
84c9a99cca UI: Mac File Browser System List Changes
Nicer icons for File Browser System and Favorites lists on Mac.

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

Reviewed by Brecht Van Lommel
2020-03-05 10:40:02 -08:00
Julian Eisel
3b1ef223ba Ghost: Support drawing OpenGL framebuffers into a DirectX 11 buffer
Adds a minimal DirectX 11 Ghost context, plus some shared DirectX-OpenGL
resource interface using the NV_DX_interop2 WGL extension. From what I
know, this should be available on modern GPUs. If not, it should fail
gracefully.
There should be no user visible changes at this point.

Needed for DirectX-only OpenXR platforms (e.g. Windows Mixed Reality). I
heard there are other use-cases as well though.

It's known that this currently fails on some AMD systems, but that seems
to be fixable.

Most of this comes from the 2019 GSoC project, "Core Support of Virtual
Reality Headsets through OpenXR"
(https://wiki.blender.org/wiki/User:Severin/GSoC-2019/).

Reviewed by: Jeroen Bakker, Ray Molenkam, Brecht van Lommel

Differential Revision: https://developer.blender.org/D6190
2020-03-05 18:29:29 +01:00
4a3377fcf6 Fluid: Optimization in mesh generating loop
No need to have three separate loops for vertices, normals and speed vectors. Since all of them loop over the vertex count, a single loop can be used.
2020-03-05 17:51:21 +01:00
a874cfb858 Cleanup: Move std::deque to depsgraph_type.h
Since `std::deque` is used in a few areas of the Depsgraph, and an
upcoming patch adds one more, it's time it's considered as "commonly
used type".

No functional changes.
2020-03-05 17:32:01 +01:00
c43725e189 Add an session-wise uuid integer to IDs.
"session-wise" here mean while editing a same .blend file. So creating
or opening a new one will reset the uuid counter. This should avoid any
overflow in practice.

Only IDs added to Main database get an uuid, runtime-only ones are not
affected.

This is intended to provide undo with a way to find IDs across several
'memory realms' (undo speedup project).

No behavior change is expected from this commit itself.

Part of T60695.

Differential Revision: https://developer.blender.org/D7007
2020-03-05 16:30:12 +01:00
88db9a17ce Fix T74393: Cycles crashes when both OSL and Optix Denoising are enabled
Enabling viewport denoising causes Cycles to use a multi-device, which always returned NULL when
asked for OSL memory and would subsequently crash. This fixes that by returning the correct OSL
memory pointer from the CPU device in the special viewport denoising multi-device.
2020-03-05 16:28:31 +01:00
fe7528ee91 Fix T74332: selection sync replacing parent selection
Selecting certain child datablocks also selects the parent (e.g.
selecting a pose bone selects the armature). The base was selected, but
the outliner tree element was left unselected. The subsequent selection
sync would then deselect the parent base because it was not flagged as
selected in the outliner.

This led to issues like T74332 where selecting a pose bone in the
outliner did not show drivers in the driver editor unless the armature
was explicitly added to the selection afterwards.

The solution is to also flag the outliner elements as selected when
selecting parent bases.

Differential Revision: https://developer.blender.org/D7029
2020-03-05 07:40:29 -07:00
60c208e2d6 Fluid: Fix initial velocities for new static emission mode
For now, disabling static mode whenever initial velocities are being used.
2020-03-05 14:58:15 +01:00
950a35e353 Fluid: More optimizations in smoke / liquid scripts
Reduced extrapolation distances, no need to extrapolate that far.
2020-03-05 14:22:51 +01:00
cd0a6ff5c4 Fluid: Diffusion settings now optional
For optimization purposes these settings need to be enabled explicitly from now on.
2020-03-05 12:36:00 +01:00
4d3da4e1d0 EEVEE: Render Passes Blending
Changed the blending mode to full blending. I found the issue when
during development of a material pass containing alpha values.
2020-03-05 12:25:35 +01:00
Stefan Werner
51e898324d Adaptive Sampling for Cycles.
This feature takes some inspiration from
"RenderMan: An Advanced Path Tracing Architecture for Movie Rendering" and
"A Hierarchical Automatic Stopping Condition for Monte Carlo Global Illumination"

The basic principle is as follows:
While samples are being added to a pixel, the adaptive sampler writes half
of the samples to a separate buffer. This gives it two separate estimates
of the same pixel, and by comparing their difference it estimates convergence.
Once convergence drops below a given threshold, the pixel is considered done.

When a pixel has not converged yet and needs more samples than the minimum,
its immediate neighbors are also set to take more samples. This is done in order
to more reliably detect sharp features such as caustics. A 3x3 box filter that
is run periodically over the tile buffer is used for that purpose.

After a tile has finished rendering, the values of all passes are scaled as if
they were rendered with the full number of samples. This way, any code operating
on these buffers, for example the denoiser, does not need to be changed for
per-pixel sample counts.

Reviewed By: brecht, #cycles

Differential Revision: https://developer.blender.org/D4686
2020-03-05 12:21:38 +01:00
4ccbbd3080 Fix T74446: Liquid Inflow Does Not Work
Somehow this was forgotton in the optimization patch a5c4a44df6.
2020-03-05 11:41:09 +01:00
c328049535 Initial step for IDTypeInfo refactor 'cleanup' project.
Introduce new IDTypeInfo structure.

Each ID type will have its own, with some minimal basic common info,
and ID management callbacks.

This patch only does it for Object type, for demo/testing purpose.
Moving all existing IDs is a goal of next "cleanup Friday".

Note that BKE_idcode features should then be merged back into BKE_idtype -
but this will have to be done later, once all ID types have been properly
converted to the new system.

Another later TODO might be to try and add callbacks for file read/write,
and lib_query ID usages looper.

This is part of T73719.

Thanks to @brecht for initial idea, and reviewing the patch.

Differential Revision: https://developer.blender.org/D6966
2020-03-05 10:58:58 +01:00
6665ce8951 Cleanup: Clarified comment
No functional changes.
2020-03-05 10:46:52 +01:00
e5f98c79b0 Fix T74431: EEVEE AO Render Pass
Missing code-path in recent refactoring.
2020-03-05 08:58:00 +01:00
a0ea0153c2 Addons: Allow a user manual url prefix in doc_url
This was raised in T74017, the issue being that we point to `/dev` 
version of the manual for the addons when we want to point to a specific 
version instead.

Instead of manually updating the URL every release we can do this.

The `bl_info` for addons will need to be updated in the format of 
`'doc_url': 
{BLENDER_MANUAL_URL}/addons/import_export/scene_gltf2.html",`

Differential Revision: https://developer.blender.org/D6995
2020-03-04 23:24:13 -05:00
Aaron Carlisle
ae223ff52b Addons: deprecate 'wiki_url'
When running with debug enabled ('-d' argument),
warnings are printed for add-ons which are not yet updated.

Reminder to name things based on what they do,
not the technologies they use :)
2020-03-05 11:45:22 +11:00
3da2dc8213 Fix RNA runtime warning from recent commit 2020-03-04 17:43:17 -05:00
337e861486 UI: Fluid: Fix wrong uses of enabled 2020-03-04 17:41:42 -05:00
6ab14d971c UI: Fluid: Viewport Display
Cleanup the order of properties and hide sub setting as they were 
confusing before.
2020-03-04 17:41:42 -05:00
bd0f5fa71f UI: Fluid Group Liquid/Gas Panels
Part of T73617

Differential Revision: https://developer.blender.org/D6994
2020-03-04 17:41:42 -05:00
55b465f976 UI: Fluid: Use updated preset UI
Part of T73617
2020-03-04 17:41:41 -05:00
1d18a2a5ec Fix Unreported: Error adding fluid presets 2020-03-04 17:41:41 -05:00
1da8ed2a97 Cleanup: redundant casts 2020-03-05 08:38:41 +11:00
2fb4de1f8c Cleanup: material API naming
- Use 'BKE_object_material_*', 'BKE_id_material_*' prefix
  for functions that operate on Object and ID types.
- Use '_len' suffix for length (matching BLI naming).
- Use '_p' suffix for functions that return a pointer to values
  where the value would typically be returned.

Functions renamed:

- BKE_object_material_resize      was BKE_material_resize_object
- BKE_object_material_remap       was BKE_material_remap_object
- BKE_object_material_remap_calc  was BKE_material_remap_object_calc

- BKE_object_material_array_p     was BKE_object_material_array
- BKE_object_material_len_p       was BKE_object_material_num
- BKE_id_material_array_p         was BKE_id_material_array
- BKE_id_material_len_p           was BKE_id_material_num

- BKE_id_material_resize          was BKE_material_resize_id
- BKE_id_material_append          was BKE_material_append_id
- BKE_id_material_pop             was BKE_material_pop_id
- BKE_id_material_clear           was BKE_material_clear_id
2020-03-05 08:21:31 +11:00
5b0f1e7649 Cleanup: formatting, strip trailing space 2020-03-05 08:05:21 +11:00
a297a6c444 Cleanup: replace unnecessary MEM_callocN calls
Use MEM_mallocN when memory is immediately copied over.
2020-03-05 07:59:34 +11:00
a5c4a44df6 Fluid: Bounding boxes for effector objects
This commit adds bounding box support for emission objects - similarly to flow objects. Before, each effector object had to iterate over the entire domain. Bake times of scenes with multiple obstacles improved significantly with this optimization.

Other improvements that were implemented alongside the bbox feature:
- Option for subframe sampling for effector objects
- Option to enable / disable effectors (can be animated)
- Optimization for static objects. If a flow or effector object does not move and the adaptive domain is not in use, the bake time will be optimized further by reusing the flow / effector grids from the previous frame (no recalculation).
2020-03-04 18:46:48 +01:00
3c74d45c9e Fluid: Added sanity grid initializations in smoke / liquid scripts
Just a sanity check.
2020-03-04 18:46:48 +01:00
8f1876b4f0 Fluid: Fix issue with fire emission
Fixes weird behavior at inflow regions. Issue was introduced with d6d44ccc77.
2020-03-04 18:46:48 +01:00
bf8a73b4a7 Fluid: Naming cleanup for flags grid
Use flags instead of obstacle to avoid confusion with obstacle levelset grid.
2020-03-04 18:46:48 +01:00
6958ec3f7f Fluid: Added an option to delete fluid inside obstacles
Simple checkbox that - if enabled - will tell the solver to clear density or liquid particles in obstacle cells.
2020-03-04 18:46:48 +01:00
b32fd73b24 Fluid: Optimization for extrapolation functions in smoke / liquid scripts
Too much extrapolation can become expensive. Reducing it here since extrapolating levelsets into a couple of cells should be sufficient.
2020-03-04 18:46:48 +01:00
2a4f350940 Fix T74434: Video Sequencer: Alt+ clicking (assign to all selected) does
not work for unlocking

Special case for when we do this on "lock":
- locked sequences are not in "selected_editable_sequences"
- use "selected_sequences" in that case

Maniphest Tasks: T74434

Differential Revision: https://developer.blender.org/D7023
2020-03-04 17:35:39 +01:00
765f2a1bca Fix T71578: knife tool draws some points incorrectly
D6417 by @fbessou
2020-03-04 16:48:37 +01:00
Julian Eisel
a22573e243 Build System: Add OpenXR-SDK dependency and WITH_XR_OPENXR build option
The OpenXR-SDK contains utilities for using the OpenXR standard
(https://www.khronos.org/openxr/). Namely C-headers and a so called
"loader" to manage runtime linking to OpenXR platforms ("runtimes")
installed on the user's system.

The WITH_XR_OPENXR build option is disabled by default for now, as there
is no code using it yet. On macOS it will remain disabled for now, it's
untested and there's no OpenXR runtime in sight for it.

Some points on the OpenXR-SDK dependency:
* The repository is located at
  https://github.com/KhronosGroup/OpenXR-SDK (Apache 2).
* Notes on updating the dependency:
  https://wiki.blender.org/wiki/Source/OpenXR_SDK_Dependency
* It contains a bunch of generated files, for which the sources are in a
  separate repository
  (https://github.com/KhronosGroup/OpenXR-SDK-Source).
* We could use that other repo by default, but I'd rather go with the
  simpler solution and allow people to opt in if they want advanced dev
  features.
* We currently use the OpenXR loader lib from it and the headers.
* To use the injected OpenXR API-layers from the SDK (e.g. API
  validation layers), the SDK needs to be compiled from this other
  repository.

The extra "XR_" prefix in the build option is to avoid mix-ups of OpenXR
with OpenEXR.

Most of this comes from the 2019 GSoC project, "Core Support of Virtual
Reality Headsets through OpenXR"
(https://wiki.blender.org/wiki/User:Severin/GSoC-2019/).

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

Reviewed by: Campbell Barton, Sergey Sharybin, Bastien Montagne, Ray
Molenkamp
2020-03-04 16:45:07 +01:00
e7f1de5e11 Cleanup: use MEM_recallocN_id utility function 2020-03-04 23:51:32 +11:00
f4463cd865 RNA: ensure missing calls to RNA_enum_item_end crash in debug mode
Would have prevented T74227 from slipping through
since it didn't crash on some systems.
2020-03-04 23:48:45 +11:00
d83c0969f6 Fix T74426: Crash in the IK Pose Brush preview with null preview chain
After switching tools, the active vertex can be the same and the cursor
won't update the previews, so the pose_ik_chain_preview will be null.
This often happens in low poly meshes where chances of hovering the same
vertex are high.

Reviewed By: sergey

Maniphest Tasks: T74426

Differential Revision: https://developer.blender.org/D7021
2020-03-04 12:24:02 +01:00
6706ae5712 Cleanup: spelling 2020-03-04 21:46:16 +11:00
4bfa256ea4 Refactor ID make local to use a single flag parameter.
Instead of using anonymous booleans flags, also allows to keep the same
behavior in all cases, without needing special handling from calling
code for our beloved oddballs object proxies...
2020-03-04 11:43:31 +01:00
4e597a5cff Cleanup: ID make local: remove id_in_bmain argument.
This info is now stored in ID tags themselves, so no need to pass an
extra anonymous boolean parameter around, yay!
2020-03-04 11:43:30 +01:00
76d8e8693f Cleanup: Rename 'make local' functions to new scheme.
Also removed some only used locally from the header, `BKE_lib_id.h`
is already way too big, no need to overload it with unused things.
2020-03-04 11:43:30 +01:00
Asad-ullah Khan
e4eede8318 UI: rename View Selected" to "Frame Selected"
Addresses T74331
2020-03-04 21:38:23 +11:00
9c62a8c8e5 Fix T73797: Selection/Editing after Make Single User for Object Data
fails

Exposed by rB50d5c03e2d14.

This was only a problem when _only_ 'Object Data' was made local.
If also e.g. 'Object' or 'Materials' was checked, these were already
making sure realations were updated [DEG_relations_tag_update(bmain)].

Now also call DEG_relations_tag_update(bmain) for the 'Object Data'
case.

I assume the underlying issue is that there is some ID_NEW_REMAP
happening in 'single_obdata_users()' -- including that for 'me-
>texcomesh', which might be responsible for the glitches in selection/
editing? Also not entirely sure why this wasnt a problem prior to
rB50d5c03e2d14.(I assume this was somewhat hidden by the fact this was
always called with a default action being nothing, the user would always
need to access the redo panel. So this might have been hidden by an Undo
step involved?)

Maniphest Tasks: T73797

Differential Revision: https://developer.blender.org/D7020
2020-03-04 11:27:56 +01:00
a9dc1f6d00 Cleanup: avoid the term old when storing/restoring context variables 2020-03-04 21:13:32 +11:00
fb330dd110 Cleanup: remove unused BLI_strncat_utf8
Behaves differently to strncat,
BLI_strncpy_utf8_rlen can be used for a similar purpose.
2020-03-04 15:24:06 +11:00
8931c4b18d Fix possible buffer overflow from incorrect 'strncat' use
The size argument is the maximum number of bytes to copy,
not the destination buffer size.

Replace with utility function that joins strings.
2020-03-04 15:17:04 +11:00
0baae18375 BLI_string_utils: add BLI_string_join_array_by_sep_char
Utility to join strings into a fixed size buffer.
2020-03-04 15:14:02 +11:00
38ed95fe8d Cleanup: replace CLAMP macros with functions 2020-03-04 11:31:51 +11:00
89b10b8d42 BLI_math: inline clamp functions
These are used in some per-pixel operations such as image sampling and
color conversion, where replacing existing macro use could add overhead.
2020-03-04 11:23:00 +11:00
a37dceb139 Cleanup: replace commented code with define check
Avoids duplicated comments,
also quiet warning accessing non-existing variable.
2020-03-04 11:05:08 +11:00
a5c984a57d Cleanup: cmake indentation 2020-03-04 11:02:35 +11:00
d09c5bdc28 CMake: make OpenVDB depend on OpenEXR
OpenVDB uses 'half' type & fails to link without it.
2020-03-04 10:39:53 +11:00
Tiago Chaves
14c9f64def BLI_math: add clamp_v# and clamp_v#_v#v# utility functions 2020-03-04 10:25:44 +11:00
31aefdeec5 Fix T72028: Crash switching to vertex paint
This would happen when done from editmode, on a mesh with any modifier,
after adding/removing geometry in editmode.

Similar to rBba0870713b9b (which did this for weightpaint and sculpt
already), ensure an evaluated depsgraph, otherwise
'runtime.mesh_deform_eval' would not be up to date causing problems
later.

Maniphest Tasks: T72028

Differential Revision: https://developer.blender.org/D7011
2020-03-03 19:38:40 +01:00
059f3c1a7e Modifiers: Wave add invert vgroup option
Adds the invert vgroup option to the Wave modifier.

Differential Revision: https://developer.blender.org/D6893
2020-03-03 18:41:50 +01:00
Brecht Van Lommel
2841b2be39 IDs: change FILTER_ID_* to 64 bit to make space for new ID types
And change file browser to boolean from bitflag enum, which is only 32 bit.

Differential Revision: https://developer.blender.org/D7004
2020-03-03 17:34:21 +01:00
Brecht Van Lommel
19785b96c4 IDs: modify wm.previews_clear operator to make space for new ID types
Use a regular enum, to avoid running out of bits.

Differential Revision: https://developer.blender.org/D7003
2020-03-03 17:22:30 +01:00
Brecht Van Lommel
0c603cffd1 RNA: support 64 bit boolean bitflags in DNA
This does not affect the RNA access API, since how the boolean is read from
DNA abstracted away in the API.

Differential Revision: https://developer.blender.org/D7002
2020-03-03 17:21:47 +01:00
78383f7a9f Fix: USD Build error on windows
USD is being included before the blender headers.

USD includes TBB, which includes the windows headers
which define rad2 as a constant conflicting with a field
with that exact name in the MetaElem dna struct.

Added `-DWIN32_LEAN_AND_MEAN` to keep the windows headers
from defining rad2.
2020-03-03 09:04:31 -07:00
daca00f187 Fix Snake Hook rake on rotated objects
It was missing this local space conversion before calculating the rake
angle.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D7008
2020-03-03 16:16:34 +01:00
b39273c071 Fix hardness not resetting when using reset brush
Just add it to the list or properties to reset from DNA_brush_defaults

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6992
2020-03-03 16:12:25 +01:00
4b2b5fe4b8 USD: Added support for exporting metaballs
Metaballs are exported as evaluated polygonal mesh.

USDExporterContext::depsgraph was made non-const to allow calling
`BKE_mesh_new_from_object()`. The alternative was to make the depsgraph
parameter of that function const, but that would be too intrusive as
that would require even more functions to accept a const depsgraph
pointer.
2020-03-03 15:34:58 +01:00
453be9cc8a Cleanup: USD, marked overridden function with override
No functional changes.
2020-03-03 15:34:58 +01:00
c60e5211d7 Cleanup: USD, removed unused code
Removed an unused forward declaration.

No functional changes.
2020-03-03 15:34:58 +01:00
594945eb01 Fix T71871: Quadriflow remesh operator don't stack operations
Made an explicit call to the exec function be a blocking call and a call
from invoke (or otherwise) be nonblocking.

Reviewed By: Bastien

Differential Revision: http://developer.blender.org/D7006
2020-03-03 15:30:29 +01:00
1ba4aa37c9 Remove the "use mesh curvature" option from quadriflow
It sometimes caused the solver to get into an seemingly unrecoverable
state and crash. Therefore I will disable this feature for now.
2020-03-03 15:30:29 +01:00
ed29ff944a Fix delaunay triangulation, bad indices for output faces.
If there were merged vertices, sometimes the output faces
had wrong vertex indices. Added a test for this, and fixed.
2020-03-03 08:41:26 -05:00
40343a76c5 Revert "Fix T74110: EEVEE Shadow Pass"
This reverts commit 403bb357ae.
The old implementation matches cycles closer. See T74378
2020-03-03 12:35:50 +01:00
ce2dc6ef2b Cleanup: formatting, spelling 2020-03-03 22:23:10 +11:00
582205c134 Subdiv: Fix/Workaround for surface partial derivatives
Both partial derivatives were evaluated to 0 for a special vertex on
Suzanne model: this is happening on a vertex where two adjacent faces
with 2 common edges are connected (in the nose of Suzanne).

This was breaking multires in this point since tangent matrix is all
zeroes, and hence no displacement can be applied in that vertex.
2020-03-03 12:01:46 +01:00
b454a12233 Separate operators (mesh/curve/armature/gpencil): take user preferences
into account for duplicating actions

Previously actions remained linked after duplication, now this is based
on the User Preferences (PreferencesEdit.use_duplicate_action).

note: default is ON here, so this changes default behavior of separate
operators.

First intuition was to respect _all_ preferences here (e.g. also
duplicating materials if chosen in the User Preferences) but after
consideration this is probably not what the User would expect from such
'modeling' opertions (e.g. separate by loose parts resulting in possibly
many duplicate materials)

Fixes T71038

Maniphest Tasks: T71038

Differential Revision: https://developer.blender.org/D6120
2020-03-03 10:01:20 +01:00
ee7034949f Fix bone envelopes displaying wrong when armature is scaled
Object Scale was not taken into account.

This lead to reports like T74247 where the user scaled the envelope
distance and radii to the supposedly right values inthe viewport, but
these were actually 'wrong' under the hood. Assigning weights from bone
envelopes seemed like it would fail, but this code would actually take
the armature scaling into account when checking envelope distance and
weight.

ref T74247

Maniphest Tasks: T74247

Differential Revision: https://developer.blender.org/D6964
2020-03-03 09:48:04 +01:00
d6fd092495 Fix T74375: grid levels theme preference reset to default 2020-03-03 09:29:19 +01:00
73bd0ef12d Fix dope sheet (Mask mode) keyframe editing not image/clip views
Every key-frame edit was updating all grease pencil & mask data-blocks.

Change the logic to only update edited data-blocks.
2020-03-03 16:53:32 +11:00
8447f45f09 Fix T74292: Dope sheet (Mask mode) keyframe editing misses update 2020-03-03 15:50:11 +11:00
7a875922e7 Cleanup: Use a utility function to obtain the bvh_cache 2020-03-03 00:40:15 -03:00
29716abcd1 Missed in the last commit 2020-03-03 00:20:25 -03:00
3e1aa6cbf3 Transform Snap: Clear 'SnapObjectData' after changes in the geometry
Differential Revision: https://developer.blender.org/D6927
2020-03-03 00:08:16 -03:00
a976fe42ef Revert "Transform Snap: Clear 'SnapObjectData' after changes in the geometry"
This reverts commit fe7c4fb4a2.

It does not work because `mesh_eval_cage` and `mesh_eval_final` always is `NULL` in this case.
2020-03-02 22:12:46 -03:00
c549a9dd46 Fix error parsing XDG path values
Own error in recent changes to parsing.
2020-03-03 11:14:39 +11:00
fe7c4fb4a2 Transform Snap: Clear 'SnapObjectData' after changes in the geometry
Differential Revision: https://developer.blender.org/D6927
2020-03-02 20:59:11 -03:00
5a77748e47 Fix T74377: Weld Modifier destroys vertex groups
Differential Revision: https://developer.blender.org/D6997
2020-03-02 18:44:58 -03:00
98c74c6a6e Fix: Excessive (re)builds of subprojects
Recent refactor external dependencies handling (D6642)
improperly linked all library dependencies with public
linkage rather than interface linkage. Causing excessive
(re)builds of subprojects when not needed.

This patch restores the interface linkage.

Reviewed By: brecht sergey

Differential Revision: https://developer.blender.org/D6983
2020-03-02 12:42:01 -07:00
Stefan Werner
409074aae5 Cycles: add Progressive Multi-Jitter sampling pattern
This sampling pattern is particularly suited to adaptive sampling, and will
be used for that upcoming feature.

Based on "Progressive Multi-Jittered Sample Sequences" by Per Christensen,
Andrew Kensler and Charlie Kilpatrick.

Ref D4686
2020-03-02 16:35:52 +01:00
Valentin
7b8db971d4 Cleanup: Use generics properties for arrow keys navigation (walk-select)
This patch refactors arrow keys navigation to move properties and enum
to generic ED_select_utils.h and property to
WM_operator_properties_select_walk_direction()

No functional change

Reviewed By: Julian Eisel

Differential Revision: https://developer.blender.org/D4771
2020-03-02 16:07:34 +01:00
51bce18b6f Cleanup: make blf header work in C++ 2020-03-02 15:34:17 +01:00
f48b46860b Cleanup: make remaining gpu headers work in C++ 2020-03-02 15:29:09 +01:00
360443a483 Fix T74278: Light, Image Object, and Compositor Backdrop Viewer Node
gizmos are too big

Caused by rB9cac5fa681c5 which fixed the handles for the camera border
gizmo (being much too small)-- which in turn was broken by
rB98e4fbc7cc9e.

Camera border gizmo sets up its matrix_space a bit differently [this is
why we are getting very small values in gizmo_calc_rect_view_scale --
needs more investigation], but instead of breaking it for Light, Image
and Compositor Backdrop, lets just compensate by scaling the Camera
Border Gizmo for now.

Maniphest Tasks: T74278

Differential Revision: https://developer.blender.org/D6991
2020-03-02 15:21:07 +01:00
d8198b27df Cleanup: make remaining imbuf headers work in C++ 2020-03-02 15:20:13 +01:00
680b70f093 Cleanup: make remaining editor include headers work in C++ 2020-03-02 15:09:10 +01:00
5de56f9596 Cleanup: make remaining blenkernel headers work in C++ 2020-03-02 15:07:49 +01:00
cf93b65a65 Cleanup: make remaining blenlib headers work in C++
Differential Revision: https://developer.blender.org/D6988

Reviewers: brecht
2020-03-02 15:05:15 +01:00
Ish Bosamiya
5afa4b1dc8 Fix T65568: sewing and self collision issue
As explained in T65568 by @LucaRood, the self collision system should exclude triangles that are connected by sewing springs.

Differential Revision: https://developer.blender.org/D6911
2020-03-02 11:02:26 -03:00
1648a79036 Fix T74295: Cloth + Internal springs crashes on a non-polygonal geometry
Added check to see if the mesh has any polygons at all.
If there are no polygons, the bvh tree data will consist of null
pointers, so skip internal springs if this is the case.
2020-03-02 15:02:24 +01:00
9c4523b1fd Fix crash when compiling renderpass shader on some AMD drivers
Differential Revision: https://developer.blender.org/D6959
2020-03-02 10:33:45 -03:00
847c091ae8 Shading: Add invert option to Vector Rotate Node
Checkbox to invert rotation angle, suggested by @simonthommes

Differential Revision: https://developer.blender.org/D6932
2020-03-02 12:49:19 +00:00
493c99078a Fix T74362: Material Preview Assert
When using Material Previews not all uniform blocks were filled. This
patch will add the renderpass_block when drawing the background.

Note that I wasn't able to reproduce the issue on my system, but
according the the backtrace it most likely solves the issue. I let the
reporter test.
2020-03-02 13:47:52 +01:00
6fa4581d92 Fix T74334: VSE can't import multiple movie files
Add `directory` RNA property to add operators.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6986
2020-03-02 13:16:01 +01:00
bd25df3d68 Fix T74335: Text.use_module "Online Manual" leads to TextCurve pages. 2020-03-02 12:05:07 +01:00
c930cd7450 Clay Thumb: Remove hardcoded hardness value
Clay Thumb was using a custom hardness implementation and value to make
it functional. Hardness is now a property of brushes and it is
implemented for all brushes, so this is no longer needed.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6981
2020-03-02 11:54:54 +01:00
94937984b0 Cleanup: Correct forward declaration 2020-03-02 10:17:38 +01:00
e0ffb911a2 Fix T74299: PyGPUOffscreen Color Management
Color management currently happens after the python handlers. This means
that all common drawing operations needs to happen in SRS. The
PyGPUOffscreen requested that the color management was applied, that
resulted into applying colormanagement twice.

This patch makes sure that PyGPUOffscreen.draw_view3d renders in SRS.
There are more code paths that needs to be checked that the correct
space is being requested.
2020-03-02 09:24:06 +01:00
f78ca97cfc Bevel: Z-Up Custom Profile Orientation
When beveling architectural objects like baseboards or crown mouldings that
may consist of multiple	islands, it's useful if	the orientation	is at least
conistent.

This changes the arbitrary decision of how the orientation should start	at a
chain beginning to use the highest side of the profile in the Z direction.

Reviewed By: howardt

Differential Revision: https://developer.blender.org/D6946
2020-03-01 22:21:51 -06:00
e9e4f6af9e Fix T74320: Sound strip waveforms drawing allows negative volume values
While animating sound strips volume within the graph editor, it is possible to set keyframes to negative values.
The drawing code of waveforms wasn't clamping these values to zero and was instead drawing an "inverted" curve

Author: a.monti

Reviewed By: iss

Differential Revision: https://developer.blender.org/D6971
2020-03-02 02:49:35 +01:00
eaf0528749 Fix .arcconfig not working with latest arcanist version 2020-03-01 22:35:31 +01:00
3db948cffe Fix: Build error on windows.
Use of undefined GSQueue type was causing build errors.
2020-03-01 13:59:51 -07:00
Pablo Dobarro
ff0124418f Sculpt: Hardness brush property
The hardness property moves the brush falloff towards the edges, making
the brush sharper.

This should be the intended way to control the brush falloff instead of
tweaking the falloff curve manually, as it can be mapped to pressure to
make the falloff variable during the stroke.
It is also a good idea to show in the UI that the custom curves is an
advance features and it should almost never be modified when sculpting/
painting unless you want to create some advanced effects. By modifying
the curves freely it is really easy to break the brushes and make them
produce artifacts. This needs to be done in a later after merging the
pending projects to reorganize all the brush properties accordingly.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6902
2020-03-01 20:05:58 +01:00
fc7fdc5c4e Cleanup: Move pose brush to its own file
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6973
2020-03-01 19:54:31 +01:00
Pablo Dobarro
233158b555 Fix T74307: Add missing brushes to versioning_defaults
At least a brush under each tool needs to exist by default in the blend
file to reset its properties. If it does not exist, the user needs to
reset it manually.

Reviewed By: brecht

Maniphest Tasks: T74307

Differential Revision: https://developer.blender.org/D6972
2020-03-01 19:37:49 +01:00
Pablo Dobarro
3c9956a3ac Fix T73707: Missing mesh normals update on sculpt undo
When sculpting on multi user data normals needs to be recalculated to
avoid artifacts. I refactored that line to make it more readable.

Reviewed By: brecht

Maniphest Tasks: T73707

Differential Revision: https://developer.blender.org/D6957
2020-03-01 19:35:50 +01:00
Pablo Dobarro
a489d77c5b Fix T74074: Strokes with timer events don't get pressure values
When processing a timer event WM_event_tablet_data returns 0 instead of
the last valid pressure value from the tablet. This always stores the
last pressure value and uses it in case a timer event is being
processed.

Reviewed By: brecht

Maniphest Tasks: T74074

Differential Revision: https://developer.blender.org/D6950
2020-03-01 19:32:01 +01:00
Pablo Dobarro
c04c5ac4f6 Fix T73947: Support radial symmetry in Multiplane Scrape
This includes the following changes:
- Use always the angle stored in the StrokeCache when deforming
- Interpolate between the previous and the new sampled angles
- Calculate the cursor matrix only on the 0 radial symmetry iteration

Reviewed By: brecht

Maniphest Tasks: T73947

Differential Revision: https://developer.blender.org/D6901
2020-03-01 19:29:10 +01:00
f2557d137a Fix problem with Delaunay triangulalation re output mapping.
The array giving original vertex indices should not contain
entries for newly created vertices. Added a test to check this.
2020-03-01 12:25:44 -05:00
Peter Fog
38058833f1 UI: harmonize strip colors in video sequencer
Now only the hue is different between different strip types, with the
saturation the same for all.

Differential Revision: https://developer.blender.org/D6775
2020-03-01 16:20:44 +01:00
Phillip Thomas
6a6ccb26ec Build: show draco library under extern folder in Visual Studio
And other code tweaks to make this library more consistent with others.

Differential Revision: https://developer.blender.org/D6864
2020-03-01 16:19:37 +01:00
24ef1cf07e Fix show large cursor preference not being fully removed and causing warnings 2020-03-01 16:15:25 +01:00
Yevgeny Makarov
821ecbe805 UI: make Save Custom Studio Light pop-ups less wide
Differential Revision: https://developer.blender.org/D6977
2020-03-01 16:09:57 +01:00
Yevgeny Makarov
0373e300ea UI: use dedicated icons for topbar and statusbar in theme preferences
Differential Revision: https://developer.blender.org/D6978
2020-03-01 16:09:26 +01:00
22a8a3b214 Apply patch D6620, Adde tests for Deform modifiers.
This test is authored by Himanshi Kalra (calra).
It requires a new modifers.blend in the svn tests.
2020-02-29 14:07:14 -05:00
cb8b424c6b Made BLI_delaunay_2d_cdt_calc better at tiny feature elimination.
The 'random' unit tests and some examples from the new boolean code
triggered asserts and crashes. This fixes those.
There is a new flag in the input that optionally disables a pass
over input to snap segment edges to other segments.
2020-02-29 13:26:27 -05:00
a52eb7489f Cleanup: Move transform_constraints declarations to its own header 2020-02-28 21:25:47 -03:00
85f980c517 UI: Remove Support for Large Cursors
Removing the 'Large Cursors' option as it is no longer applicable or useful on any platform.

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

Reviewed by Brecht Van Lommel
2020-02-28 08:45:17 -08:00
4a373afa5f Sculpt: Cloth brush
This brush has a simple physics solver that helps when sculpting cloth.

- The mass and the damping properties of the simulation are properties of the brush.
- It has two additional radius control to limit the influence and falloff of the simulation.
- Masked vertices are pinned in the simulation, and it applies the sculpt gravity directly in the solver.
- The Cloth Brush has 7 deformation modes with 2 falloff types (radial and plane).

The brush can create the constraints only on the required PBVH nodes, so the simulation is isolated on high poly meshes. As long
as the brush size is not too big it should be possible to keep it real time.

Known issues:
- The way constraints are created is extremely basic and it creates repeated constraints. Maybe there is another way to create fewer constraints while keeping the simulation quality decent. This part can also be multithreaded. (As it is it works ok, but it could be better)

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6715
2020-02-28 17:03:20 +01:00
793135e190 Fix wrong coordinates being read when using the sculpt API
The coordinates should be read from the PBVH when using deform modifiers.
This is needed for the cloth brush to work with subdivisions, as it reads the
vertex coordinates using this function when building and updating the
constraints.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6967
2020-02-28 16:53:34 +01:00
bc2ce31d79 Fluid: Improved behavior at open boundaries
Use greater boundary width for smoke simulations
2020-02-28 16:20:13 +01:00
21bdeb5cc0 Fluid: Updated Manta pp files
Updates include:
- std::move() cleanup in rcmatrix.h
- Enabled parallelization for fluid guiding (fairly noticeable speed improvement).
- More flexible flags setter function with control over boundary width.
2020-02-28 16:20:13 +01:00
af54bbd61c Cycles: Rework tile scheduling for denoising
This fixes denoising being delayed until after all rendering has finished. Instead, tile-based
denoising is now part of the "RENDER" task again, so that it is all in one task and does not
cause issues with dedicated task pools where tasks are serialized.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D6940
2020-02-28 16:12:29 +01:00
03e04d4db7 Cleanup: clang-format 2020-02-28 16:04:15 +01:00
Yevgeny Makarov
fe3ce61528 Fix T65351: visual glitches when scrolling in popovers 2020-02-28 16:03:53 +01:00
0cea9353fd Fix CUDA out of memory error with OptiX viewport denoising on small GPUs
This makes the memory allocation for the denoiser state use the memory allocator in Cycles, which
will evict textures to host memory when there is not enough space on the device. This means the
allocation for the denoiser state won't just fail if there is no more space and instead more space is
made for it to work. Also simplifies code somewhat.
2020-02-28 15:58:17 +01:00
Yevgeny Makarov
27fa33c143 Fix T72404: particle brush size radial control mismatch on high DPI display 2020-02-28 15:55:51 +01:00
498397f7bd Fix (unreported) Separate bones creates empty armature
Fix for fix (rB8bf7ca9fe31c).
The fix was not actually working [neither for multi-armature-editing as
intended nor for single armatures] and it broke single-armature bone
separation completely.

More or less indentation issue, move relevant code out of bone loop, do
after all bones have been checked, guess this was intended anyways.

Differential Revision: https://developer.blender.org/D6949
2020-02-28 15:26:57 +01:00
4c83e6bac0 Fix T71611: Outliner - Show only Visible/Hidden Objects not working when hiding Collections
Use BASE_VISIBLE_VIEWLAYER (rather than BASE_VISIBLE_DEPSGRAPH -- which
is not including the 'Hide in Viewport')

Note: the is one case where this still 'fails':
- 'Show only Hidden' plus excluding the parent collection (would be nice
to show those -- but contents of excluded excluded collections dont get
show in any case... this would be more work and for another report...)

Maniphest Tasks: T71611

Differential Revision: https://developer.blender.org/D6953
2020-02-28 15:20:59 +01:00
94dcfe7a77 Preview Render: Disable Unneeded Render Passes 2020-02-28 14:46:40 +01:00
e8ab0137f8 File Browser: Add Ctrl+F shortcut to activate filter textbox
Reviewers: Severin, brecht

Differential Revision: https://developer.blender.org/D6941
2020-02-28 14:34:56 +01:00
e0f41d32c9 Code Cleanup: UNDEF not existing define 2020-02-28 14:31:46 +01:00
bcac081ad5 OpenSubdiv: Allow less topology callbacks assigned
Useful for cases when topology does not need to have any
crease or UV layers. Now instead of assigning callbacks
which returns zero data is possible to simply assign the
callback itself to NULL.
2020-02-28 14:30:49 +01:00
95d0e04ed1 BLI: fix utf8 character counting when there is an incomplete utf8 char
D6923 by Kim Geonwoo
2020-02-28 14:26:07 +01:00
Pawel Franitza
2269759fdf UI: add theme option for grid levels to display in node editor background
Differential Revision: https://developer.blender.org/D6916
2020-02-28 14:11:48 +01:00
Yevgeny Makarov
e287122af6 UI: improve label text colors in save and security popups
This adds a utility functions to draw a label highlighted or in red.

Differential Revision: https://developer.blender.org/D6934
2020-02-28 13:57:32 +01:00
Brecht Van Lommel
318112379d 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.

This previously caused a bug in T74283, that should be fixed now.

Differential Revision: https://developer.blender.org/D6695
2020-02-28 13:49:35 +01:00
c60be37f3e Nodes: Use destructor callbacks for bNodeSocketType and bNodeType
Reviewers: brecht

Differential Revision: https://developer.blender.org/D6963
2020-02-28 13:28:16 +01:00
da1140f75e Revert "Objects: make evaluated data runtime storage usable for types other than mesh"
This reverts commit f2b95b9eae.

Fix T74283: modifier display lost when moving object in edit mode.

The cause is not immediately obvious so better to revert and look at this
carefully.
2020-02-28 13:01:02 +01:00
7a8a074a30 Multires: Move current reshaping/propagation logic to legacy file
It will eventually rewritten.
This commit prepares some clean space to start this process.

So far no functional changes.
2020-02-28 12:42:27 +01:00
Tobias Langen
8e8b4ec3a3 Fix T73587: Wrong sub-panel animation on double-click
Under the special circumstance of double clicking and then opening a
panel with sub-panels again, the parent panel's offset in y-direction
was added twice to the child panels: once inside "get_panel_real_ofsy"
and once within "align_sub_panels".
This introduced a visible glitch.

Reviewed by: Julian Eisel

Differential Revision: https://developer.blender.org/D6942
2020-02-28 12:39:11 +01:00
1eb73d1596 Multires: Fix CCG->MDISPS conversion happens twice
Was happening when leaving sculpt mode, introducing unnecessary lag
to the operation.
2020-02-28 12:24:26 +01:00
944da82eaf Multires: Cleanup, use early return 2020-02-28 12:24:26 +01:00
feead324fd Multires: Cleanup, naming 2020-02-28 12:24:26 +01:00
Julian Eisel
d9c25f0192 UI: Move menu shadow theme options next to each other
For some reason they were separated, even though they are closely
related.
2020-02-28 11:36:25 +01:00
9a855f94fc Cleanup: Spelling 2020-02-28 10:12:08 +01:00
4c4d36c25e Subdiv: Correct corner passed to foreach_loop callback
Was affecting quad faces. where 0 was always passed for inner
loops and a wrong one for boundary ones.

In the current code this change shouldn't cause any difference
since the corner index is ignored in the actual callback, but
it is required to have his fixed for an upcoming changes.
2020-02-28 10:12:08 +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
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
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
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
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
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
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
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
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
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
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
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
a2febb8d91 CMake: Suppress strict warnings for extern on macOS
Silences a lot of noise from Mantaflow.
2020-02-20 11:06:40 +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
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
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
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
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
02f44049a8 Fix make deps OSL build on some systems with Qt libraries 2020-02-19 11:41:38 +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
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
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
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
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
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
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
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
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
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
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
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
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
9fef5a2db4 Fix T71971: Inset with depth and relative offset fails 2020-02-14 20:38:39 +11: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
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
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
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
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
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
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
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
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
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
de09db6b4d Fix missed include update in recent BKE_library renaming. 2020-02-10 14:21:34 +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
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
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
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
379ee3e527 PY API doc generation: Add option for multi-tasking sphinx. 2020-02-10 12:38:03 +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
795c4a3462 GPencil: Fix unreported missing annotation popover menu
This was introduced when annotations was splited.
2020-02-10 11:56:00 +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
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
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
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
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
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
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
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
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
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
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
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
5df494d75c bmesh_intersect_edges: Don't detect faces if an edge already exists
For optimization.
2020-01-27 18:31:15 -03: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
9291558b63 bmesh_intersect_edges: Fix asserts 2020-01-27 17:29:32 -03: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
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
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
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
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
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
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
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
c2e62c1292 Cleanup/deps: Clean up remnants of old python packaging method 2020-01-18 12:00:42 -07:00
2272f380bd Merge remote-tracking branch 'origin/blender-v2.82-release' 2020-01-18 11:59:18 -07:00
3e11c4e63b Fix: T71159 missing python3.dll
File got forgotten during the last repack of python.
2020-01-18 11:58:38 -07: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
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
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
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
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
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
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
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
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
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
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
461261c18d Fix T69207: Surface objects showed curves ADD menu (Shift+A) in editmode 2020-01-02 15:50:58 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
84c1e57dfe Fix T72507: Depth of bones missing for navigation
Regression introduced in rBb11272a0
2019-12-17 10:34:49 -03:00
bda4a284d2 Fluid: Fix particle settings type 2019-12-17 11:39:23 +01:00
4b62d98984 Fluid: Fix python script after refactor
Missing part in 2564e2a2ad.
2019-12-17 11:13:00 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
4fd99c9495 Cleanup: spelling, clang-format 2019-11-27 14:54:53 +11:00
b9e10273e0 Cleanup: warnings 2019-11-27 14:50:37 +11:00
7af5604389 Fix T69530: Do Not Refresh Bookmarks While Moving File Browser
Improve laggy performance while moving File Browser by not refreshing fsMenu lists in its init.

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

Reviewed by Bastien Montagne
2019-11-26 15:53:07 -08:00
b213d82c19 Cleanup/CMake: Remove dormant windows codesign code
This was added years ago to prepare for code-signing the executable
but was never used, buildbots use a different mechanism now to sign
so no need to keep this around.
2019-11-26 15:13:22 -07:00
Julian Eisel
b16018f637 Fix preview Template-ID broken in vertical layouts
Old code worked pure "by luck". I fixed an error in rB5bcb0c993503 that
made this "luck" go away. Special handling is needed for the preview
layout.
2019-11-26 19:47:13 +01:00
2bbdf586d5 Gpencil: Fix unreported memory leak duplicating Brush
When the brush is duplicated, the grease pencil settings doesn't need to be recreated.
2019-11-26 19:05:07 +01:00
Robert Guetzkow
98dfb4dd1c Allow deletion of directories in the file browser
This diff allows to delete directories in the file browser. The commit https://developer.blender.org/rB8825250f5a85c0c16e74ed144dd2b4a7d752042f did not include this feature.

Reviewed By: Severin

Differential Revision: https://developer.blender.org/D6083
2019-11-26 18:54:24 +01:00
bf9c2e6fde Anim: added BKE_object_moves_in_time(object) function
This function exposes the already-existing static `object_moves_in_time()`
function, and optionally recursively checks the parent object for
animatedness as well.

I also added checking `AnimData::overrides` to
`BKE_animdata_id_is_animated()`. This ensures that, apart from the optional
recursion to the parent object, the function has the same functionality.
2019-11-26 17:59:27 +01:00
b21648ab36 Anim: made object param of BKE_animdata_id_is_animated() const
No functional changes.
2019-11-26 17:56:59 +01:00
f18ad385df Alembic export: don't assume transform is always animated
Instead of always writing the transform on every frame, it's now checked
whether the object is animated at all. This could be made stricter to
reduce false positives, for example by checking FCurves and drivers to
see whether translation/rotation/scale is animated. However, this
approach is already better than the `return true` we had before.

This commit adds the BKE_animdata_id_is_animated(id) function, which
returns true if the ID datablock has non-empty animation data. This is
determined by checking the the active action's fcurves, the drivers, and
NLA tracks.
2019-11-26 16:26:52 +01:00
a018a7fb0d Removed BKE_object_is_animated()
The function isn't used anywhere, and it's deceptively returning false
negatives. For example, `modifier_dependsOnTime()` will return `false`
for hook modifiers, even when the hook target is animated. Querying the
depsgraph for dependency on the time source would be a better approach.
2019-11-26 16:26:52 +01:00
75808620ce Made ob param of modifiers_getVirtualModifierList const
The `modifiers_getVirtualModifierList()` function previously took a non-
const `Object *ob` parameter, preventing it from being called from more
restrictive functions. Since the function doesn't modify the passed
object, it could easily be made const.

No functional changes.
2019-11-26 16:26:52 +01:00
354bc1297e Clarified comment about modifiers_getVirtualModifierList()
The old comment was outdated and incorrect.

No functional changes.
2019-11-26 16:26:52 +01:00
b214e06b02 Clip Editor: Remove Image label from selector
Unfortunately, it didn't turn out to be as great as I've hoped to it
will.

The issue is: the label eats too much space, making selector buttons
and image name to be barely readable. Initial idea of making the panel
somewhat wider didn't work either: due to the sizing policy of label
it takes a lot of panel width to make image name readable.
2019-11-26 16:14:04 +01:00
9467c0dcf9 Fix T71924: Baking quaternion keyframes gives discontinuous values 2019-11-27 02:00:14 +11:00
2dac0c9179 PyAPI: add Quaternion.make_compatible 2019-11-27 02:00:14 +11:00
d29cf49e9a Fix quaternion compatibility function
Use closest quaternion instead of only checking w sign flipping,
which didn't catch all cases.

T
2019-11-27 02:00:14 +11:00
97dff0ca76 Clip Editor: Fix uninitialized plane track grabbing points
Was happening when there was an image assigned to the track.

Another pair programming session with Clement.
2019-11-26 15:55:28 +01:00
630cb1bb1d Clip Editor: Fix visualization of plane track image
Pair programming with Clement.
2019-11-26 15:55:28 +01:00
a01ba66cf6 Clip Editor: Allow opening and creating images from Plane Track panel
Differential Revision: https://developer.blender.org/D6170
2019-11-26 15:55:28 +01:00
939e4030b1 Fix T64655: Quad view toggle conflicts on macOS
Cmd-Alt-Q is a system shortcut on macOS, use Ctrl-Alt-Q.
2019-11-27 00:43:33 +11:00
fcbec6e97e BLI_task: Add pooled threaded index range iterator, Take II.
This code allows to push a set of different operations all based on
iterations over a range of indices, and then process them all at once
over multiple threads.

This commit also adds unit tests for both old un-pooled, and new pooled
task_parallel_range family of functions, as well as some basic
performances tests.

This is mainly interesting for relatively low amount of individual
tasks, as expected.

E.g. performance tests on a 32 threads machine, for a set of 10
different tasks, shows following improvements when using pooled version
instead of ten sequential calls to BLI_task_parallel_range():

| Num Items | Sequential | Pooled  | Speed-up |
| --------- | ---------- | ------- | -------- |
|       10K |     365 us |  138 us |   2.5  x |
|      100K |     877 us |  530 us |   1.66 x |
|     1000K |    5521 us | 4625 us |   1.25 x |

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

Note: Compared to previous commit yesterday, this reworks atomic handling in
parallel iter code, and fixes a dummy double-free bug.

Now we should only use the two critical values for synchronization from
atomic calls results, which is the proper way to do things.

Reading a value after an atomic operation does not guarantee you will
get the latest value in all cases (especially on Windows release builds
it seems).
2019-11-26 14:30:41 +01:00
9ecc30250a Fix T71909: Any keyframed GPLayer property is not updated when render animation
By error, the original datablock was used while rendering. Actually, only while the user is drawing the original data must be used because when we tested, the time the system uses to copy the datablock created a very bad "lag" feeling while drawing. Maybe the lag was half second only, but it ruined the pencil feeling.

I talked some time ago with Sergey about that and we decided use this approach.

Now, only the original datablock is used while the user is "moving" the pen, but not in any other situation.

Thanks @sergey for help me with this bug and sorry for thinking it was a depsgraph issue.
2019-11-26 14:05:00 +01:00
14da2b18fc Fix T71860: No versioning for drivers in Mapping node.
The new Mapping node was missing versioning code for drivers.
This patch refactors existing code and add versioning for drivers.

Reviewed By: Sergey Sharybin, Bastien Montagne

Differential Revision: https://developer.blender.org/D6302
2019-11-26 13:45:40 +02:00
2d7effc27d Fix segfault when polling MESH_OT_paint_mask_extract
`CTX_data_active_object(C)` returns `NULL` when there is no active object,
and this was not tested for in the code.
2019-11-26 12:12:29 +01:00
fa1a946d4f Fix memory leak, closing a window didn't free gestures
Exposed by test file in T71718
2019-11-26 20:58:26 +11:00
1fbca07634 Buildbot: Increaser codesign timelimit
It was possible that it would exceed when signing all the DLLs if the machine
is busy with some background tasks or when internet is slow.
2019-11-26 10:08:33 +01:00
75e85f1c9f Fix T71806: BMElem.copy_from(other) failed
Don't modify the Python reference when copying custom-data.
2019-11-26 16:28:58 +11:00
7782936977 BMesh: support copying & freeing layers by type 2019-11-26 16:19:56 +11:00
0a3f0e64c9 fix: T71718 Collada: importer does not release intermediate fcurves when importing matrix animations 2019-11-25 21:19:25 +01:00
bd5e3941de Bevel Modifier: Reset default width to 0.1 from 1.0 2019-11-25 14:06:41 -05:00
3f87ac3684 Revert "BLI_task: Add pooled threaded index range iterator."
This reverts commit f9028a3be1.

This is giving weird heisenbug crash on only Windows release builds...
Reverting until we understand to issue.
2019-11-25 19:54:40 +01:00
52f0d685ba Revert "Cleanup: Unused variable in release build mode"
This reverts commit e0cada9519.
2019-11-25 19:54:40 +01:00
Julian Eisel
5bcb0c9935 UI: Allow label for Template-ID (respecting property split layout)
Adds a `text` parameter to `bpy.types.uiLayout.template_ID()` which
causes a label to be added, as usual. Adding the label also makes the
template respect the `bpy.types.uiLayout.use_property_split` option.

Also fixes wrong layout being used in the template-ID, although I think
that didn't cause issues in practice.

Sergey requested this for usage in the Movie Clip Editor.
2019-11-25 19:50:34 +01:00
03cdfc2ff6 Fix potential access to deleted memory in OptiX kernel loading code
Calling "OptiXDevice::load_kernels" multiple times would call "optixPipelineDestroy" on a pipeline
pointer that may have already been deleted previously (since the PIP_SHADER_EVAL pipeline is only
created conditionally).
This change also avoids a CUDA kernel reload every time this is called. The CUDA kernels are
precompiled and don't change, so there is no need to reload them every time.
2019-11-25 18:36:55 +01:00
b374b24f1b UI: Widget Text Cursor Color
Adds a theme setting to specify color of widget text insertion cursor (caret).

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

Reviewed by Campbell Barton
2019-11-25 08:36:05 -08:00
78071d0cdf Fix T71892: Typo error - Distorsion to Distortion 2019-11-25 16:12:36 +01:00
e0cada9519 Cleanup: Unused variable in release build mode
Thanks Bastien for code review!
2019-11-25 15:22:21 +01:00
62ba16d7c4 Fix for the Python console not setting the cursor 2019-11-25 22:51:20 +11:00
dc9b05df22 Fix API docs build after recent changes in BMesh operators.
Note: not sure what 'type' to give for that new
`BMO_OP_SLOT_SUBTYPE_PTR_STRUCT`, name sounds generic so used
`bpy_struct` for now... :/
2019-11-25 12:33:51 +01:00
f9028a3be1 BLI_task: Add pooled threaded index range iterator.
This code allows to push a set of different operations all based on
iterations over a range of indices, and then process them all at once
over multiple threads.

This commit also adds unit tests for both old un-pooled, and new pooled
`task_parallel_range` family of functions, as well as some basic
performances tests.

This is mainly interesting for relatively low amount of individual
tasks, as expected.

E.g. performance tests on a 32 threads machine, for a set of 10
different tasks, shows following improvements when using pooled version
instead of ten sequential calls to `BLI_task_parallel_range()`:

    | Num Items | Sequential | Pooled  | Speed-up |
    | --------- | ---------- | ------- | -------- |
    |       10K |     365 us |  138 us |   2.5  x |
    |      100K |     877 us |  530 us |   1.66 x |
    |     1000K |    5521 us | 4625 us |   1.25 x |

Differential Revision: https://developer.blender.org/D6189
2019-11-25 11:58:09 +01:00
Julian Eisel
85cf56ecbc UI: Reduce width of UI-List scrollbars
When scrollbars were redesigned, the size of UI-List scrollbars wasn't
updated. Those were still huge.
This makes their size consistent with other scrollbars and frankly,
non-rediculous.
2019-11-25 11:48:59 +01:00
693d891703 Cleanup: used BKE_mesh_ prefix
Missed in recent BKE_remesh renaming.
2019-11-25 15:49:25 +11:00
bb0708a483 CMake: support building without Python
Resolve linking issues, warnings.
2019-11-25 15:45:49 +11:00
b2d940250c Cleanup: remove unused CMake WITH_MOD_CLOTH_ELTOPO option 2019-11-25 14:52:44 +11:00
00ca7a03da Fix WITH_INPUT_IME breakage in last commit 2019-11-25 13:46:48 +11:00
b92ac3e2cb UI: scale widget cursor by pixel size 2019-11-25 12:20:51 +11:00
249f4423ee Cleanup: doxygen comments
Also correct some outdated symbol references,
add missing 'name' commands.
2019-11-25 01:51:11 +11:00
ace5677ef0 Cleanup: spelling, repeated words 2019-11-25 00:55:11 +11:00
f67a685ad9 Cleanup: move console scrollback initialization into versioning 2019-11-24 23:03:07 +11:00
660f0c6a0e Preferences: disable changing 'U' on blend file versioning
Would have prevented T71612
2019-11-24 23:03:01 +11:00
8cb55f8d16 Fix T71612: Viewport rotate doesn't work
Error in version patching.
2019-11-24 22:49:26 +11:00
9af0cdcd93 Cleanup: remove unused text.selection_set select option
This was meant to set the selection end instead of the cursor
however it hasn't been working for years and seems quite obscure.
2019-11-24 22:05:59 +11:00
aa6fcabad1 Cleanup: text editor variable names 2019-11-24 22:03:57 +11:00
3106ca8f63 Text Editor: smooth scrolling
Add smooth scrolling support for vertical scrolling.

This is only active while scrolling so we don't need to support
pixel-level offsets for operators, interactions.
2019-11-24 20:19:24 +11:00
44f18ce0a6 Windows: Disable tbbmalloc for debug builds.
TBBMalloc seems to have a race condition somewhere on shutdown
that seems to show up in debug builds only, ideally we find the
issue and send a patch upstream but due to its racy nature it
has eluded capture so far. This patch disables TBBMalloc for
debug builds so that developers that actually need to get some
work done can work without being bothered by this misbehaviour.
2019-11-23 09:21:34 -07:00
373e936e3e Fixed rest of bevel regression tests.
The calculation of pro_super_r rounded to a non-exact float,
so put in rounding code for the special cases.
2019-11-22 13:14:37 -05:00
71ddcf1a08 Paint: Smoother curve preset
This implements a 5th-order equation smoothstep, which produces a flat
surface at the brush center. Some users find that our current grab brush
is too sharp, so now we have both options.
This also improves the behavior of the new clay brushes.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6265
2019-11-22 18:21:44 +01:00
2ff1919b45 Fix make BUILD_CMAKE_ARGS not combining with targets like ninja and lite
Previously make BUILD_CMAKE_ARGS="" on Linux and macOS would override any cmake
arguments that come from the targets. Now they are concatenated.
2019-11-22 17:38:15 +01:00
59aef0ad5d Fix T71255: Particle hair not showing in viewport with OptiX after scaling
The OptiX intersection program for curves uses "optixGetObjectRayDirection"
to get the ray direction in object space (which was inverse transformed
with the current transformation matrix). OptiX does no additional operations
on it, so if there is a scaling transform, the direction is not normalized.
But the curve intersection routine expects that. In addition, the distances
used in "optixGetRayTmax()" and "optixReportIntersection()" are in world
space, so need to adjust them accordingly.
2019-11-22 17:30:22 +01:00
aadbb794cd Fix T71741: Crash showing the object relations menu 2019-11-23 03:04:57 +11:00
Julian Eisel
b037ba2665 UI: Changes to Graph Editor selection and transform
When introducing "drag-all-selected" support all over Blender, we
figured this wouldn't work well with the Graph Editor
selection/transform behavior.
Hence, William and I worked on the following changes, although we used
this chance to improve the behavior in general too.
For more info see T70634.

* Handles now always move with the key, regardless if they are selected
  or not.
* Selecting the key doesn't select the handles anymore, their selection
  is separate.
* Multiple keys and handles can now be dragged.
* Dragging a handle moves all selected handles **on the same side**.
* Tweak-dragging any handle can never affect any keyframe location,
  only handles.
* G/R/S should behave as before.
* Changing the handle type with a key selected always applies the change
  to both handles.
* Box selection with Ctrl+Drag now allows deselecting handles (used to
  act on entire triple only).
* Box selection //Include Handles// option now only acts on visible
  handles, wasn't the case with Only Selected Keyframes Handles enabled.
* Box selection //Include Handles// is now enabled by default in all
  bundled keymaps.

The changes have been tested for some days by the animators here in the
Blender Animation Studio. Some changes are based on their feedback.

Also, this improves/adds comments for related code.

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

Reviewed by: Sybren Stüvel, William Reynish
2019-11-22 16:54:43 +01:00
177dfc6384 Fix T71273: Bad encoding of utf-8 for Text objects
`BLI_strncpy_wchar_from_utf8` internally assumes `wchar_t` is 32 bits
which is not the case on windows.

The solution is to replace `wchar_t` with `char32_t`.

Thanks to @robbott for compatibility on macOS.

Differential Revision: https://developer.blender.org/D6198
2019-11-22 12:27:34 -03:00
1304cee920 Fix some of the bevel regression tests.
The code changes for custom bevels did not recalculated profiles
in certain non-custom-profile cases after projection plane moves.
2019-11-22 09:30:10 -05:00
27127bf533 Depsgraph: Ignore action time dependency if it's not needed
It is possible to have action which is not nullptr but which have no
f-curves in it (for example, animate cube's location, then delete all
f-curves).

Such situation should not add time dependency as it could slow down
scene evaluation on frame change.
2019-11-22 14:02:59 +01:00
2a38b857f7 LibOverride: Make diffing several times faster.
Diffing on undo steps is a critical performance point of override
system, although not required for override itself, it gives user
immediate feedback ove what is overridden.

Profiling showed that rna path text search over overrides operations was
by far the most costly thing here, so now using a runtime temp ghash
mapping for this search instead.

Seems to give at least 5 times speedup on big production rig.
2019-11-22 12:26:36 +01:00
cfb7f508ce Fix T69332: 'Reset to Default Value' on a custom string property crashes
Thx @campbellbarton for the heads up!

Maniphest Tasks: T69332

Differential Revision: https://developer.blender.org/D6284
2019-11-22 12:13:10 +01:00
e98d27fd8d Keymap: use tab key for indent or auto-complete
Only indent when there aren't characters before the cursor.

This resolves the conflict with Ctrl-Space for view maximize.

D6239 by @wbrbr for text editor, based console support on this.
2019-11-22 20:53:40 +11:00
e93aa9c0fc Fix T71621: VSE crashes when playing last frame of audio
Porting bug fix from audaspace upstream.
2019-11-22 10:34:01 +01:00
3d015c71cc Gizmo: show extrude gizmos with dark '+' instead of negative space 2019-11-22 17:23:24 +11:00
66297cc26b Gizmo: support drawing contrasting shapes a generic backdrop
Previously the only way to draw polygon shapes from buttons
was to use a polygon that included the circular outline
with negative space for the un-filled areas.

This didn't always have visibility, especially when the gizmo was
overlaying colors that didn't contrast much.

Support drawing a generic backdrop with a polygon shape over it.
2019-11-22 17:18:52 +11:00
35f2e4a35c Cleanup: BKE_suggestions -> BKE_text_suggestions
The term suggestions on it's own is too ambiguous, use BKE_text prefix.
2019-11-22 13:32:57 +11:00
3403645575 Missed header guard update last commit 2019-11-22 13:32:57 +11:00
2ecb664520 Cleanup: rename mirror -> mesh_mirror
The term mirror on it's own is too ambiguous, use BKE_mesh prefix.
2019-11-22 13:15:04 +11:00
e3204db747 Cleanup: warnings, set but unused vars 2019-11-22 13:10:01 +11:00
f903835370 Fix Windows Build
I forgot to change the old BLI_task functions for the new BKE_pbvh
functions in Topology Slide/Relax.
2019-11-21 20:22:03 +01:00
a482d940bc Sculpt: Invert Scrape to Fill
After adding normal radius, the main use of the Scrape brush is to create flat surfaces with sharp edges. In that case, it does not make sense to have our current "Peaks" version of the brush as its inverted version.
The correct inverted version of Scrape for this use case is the Fill brush. This way you can use this tool to crease both concave and convex sharp edges and to fix the artifacts one version produces with its inverted version.
I think we should merge these two tools into one, but for now, this solution keeps compatibility with the old behavior.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6022
2019-11-21 19:06:42 +01:00
a47f694b86 Sculpt: Topology Slide/Relax
This commit implements the Topology Slide/Relax brush and the Relax mesh filter.
These tools are designed to move the topology on top of the mesh without affecting the volume.
The Topology Slide/Relax brush slides the topology of the mesh in the direction of the stroke. When pressing shift, it has an alternative smooth mode similar to the Relax Brush in the sculpt branch. It should be way more stable and produce fewer artifacts.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6059
2019-11-21 18:58:48 +01:00
186bd1759f Pose brush: Smooth Iterations Brush Property
The smooth iterations of the pose factor were hardcoded to 4. This works fine in most situations when you are posing a low poly mesh, which is the main use case of this tool. I added the smooth iterations as a brush property in case you need to pose a high poly mesh directly without producing artifacts.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6157
2019-11-21 18:41:58 +01:00
470fe59f7e Sculpt: Mask Slice
This operator is similar to Mask Extract, but it deletes the masked points on the original mesh and fills the holes. This can be useful for quickly trimming or splitting an object.
This is not meant to be the main trimming tool of sculpt mode. I plan to have a set of trimming tools based on geometry booleans (trim box, lasso, line, bisect...) but in some cases doing a mask selection is more convenient.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6160
2019-11-21 18:27:30 +01:00
c3279be222 Sculpt: Multiplane Scrape Brush
The Multiplane Scrape brush creates sharp edges with a given fixed angle by trimming the mesh with two planes in local space at the same time.  When working with stylized or hard surface models, this brush produces way better results and is more predictable than any other crease/flatten brush based on curves and alphas.
It is also the first brush we have than can produce hard surface concave creases.
The Multiplane Scrape Brush also has a dynamic mode where it samples the surface to fit the angle and scrape planes during a stroke. With this mode enabled you can sculpt multiple times over the same edge without creating artifacts.
It can also create creases that change between concave and convex during the same stroke.

The behavior of this brush will improve after merging patches like D5993 and its behavior in concave creases can still be improved, so I will keep tweaking its parameters and default values once we have all brush properties available.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6174
2019-11-21 18:16:42 +01:00
c23dbcf37d Bones: implement a new Aligned Inherit Scale mode.
Implement one more way of inheriting scale from the parent
bone, as an addition to the choices introduced in D5588.

This new mode inherits parent scale as if the parent and child
were not rotated relative to each other, always applying parent
X scale to child X scale and so forth. It is quite natural for
connected bone chains with coherent roll, like limbs or tentacles,
falling roughly between Average and Fix Shear in how closely
the parent scaling is followed.

Currently this can be achieved by using Inherit Scale: None plus
a Copy Scale with Offset from parent on the child; however, this
is cumbersome, and loses the distinction between true local and
inherited scale in the child's Local space.

This new mode also matches how the Before/After Original mix
modes work in the Copy Transforms constraint.

On the technical side this mode requires adding a right side
scale matrix multiplication into the Local<->Pose conversion,
in addition to the existing two left side matrices used for
location and orientation.

Differential Revision: https://developer.blender.org/D6099
2019-11-21 20:10:07 +03:00
6c9be3b27c Sculpt: Enable symmetrize operator with Dyntopo disabled
After refactoring the mirror modifier and supporting geometry modifications with PBVH_FACES this operator can be easily implemented without Dyntopo.
i
The symmetrize button and options are still in the Dyntopo pannel. There are patches like doing multiple modifications in the Sculpt mode UI, so we need to find a way to organize this better.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6180
2019-11-21 18:07:04 +01:00
316107d4cd Sculpt: New Clay Brush
The previous Clay brush was similar to flatten. Now it has a different plane calculation and falloff, based on the position of the vertices before deforming them, so it feels more like adding clay to the model.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6228
2019-11-21 18:04:46 +01:00
c7ade50dee Clay Strips: Input pressure curve and new defaults
By squaring the pen pressure and disabling BRUSH_SPACE_ATTEN the brush
feels like it has a bigger strength range, wich makes it easier to
control when applying less pressure in order to smooth sculpted
surfaces.

Each brush should have a custom input pressure curve by default to get
an optimal behaviour and make all brushes consistent, but that is going
to take some time to get it right.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6214
2019-11-21 18:02:33 +01:00
15f82278d5 Sculpt/Paint: Dash Ratio and Dash Samples
Dash Ratio and Dash Samples are brush properties to modify the strength of the brush during a stroke. This is useful to create dashed lines in texture paint or stitches in sculpt mode.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D5949
2019-11-21 17:55:36 +01:00
2ec9aa3b71 Cleanup: spelling
One of the corrections from last cleanup was wrong.
2019-11-21 23:30:51 +11:00
cee9478985 Fix T68499: weight paint gradient is broken with generative modifiers
Caused by rBac442da4a14d.

Above commit tweaked the logic to not only early out, but also set the
WPGradient_vertStore screen coord to FLT_MAX in case this original index
was visited before [gradientVertInit__mapFunc].
For generative modifiers though, we might get here multiple times for the
same orig index, resulting in a valid orig index being made invalid for
gradientVertUpdate__mapFunc [which would early out in case of FLT_MAX].

Restored original logic, so that setting FLT_MAX only really happens
when it should: when ED_view3d_project_float_object fails...

Maniphest Tasks: T68499

Differential Revision: https://developer.blender.org/D6282
2019-11-21 13:20:04 +01:00
1fbb86654a Cleanup: spelling 2019-11-21 23:15:11 +11:00
7c18fcbe03 Cleanup: clang-format
Also remove unused vars.
2019-11-21 23:15:02 +11:00
355905cb02 Fix T67873: View Selected in Graph Editor (Only Selected Curve
Keyframes) takes hidden keys into account when calculating zoom

Note that with the 'View Only Selected Curve Keyframes' option enabled,
it is also possible to select [box/circle/lasso] hidden/non-visible
keyframes. Think this should never happen, but that is for a later
commit (along some deduplication of animdata filtering code)

Reviewed By: Severin, Sybren

Maniphest Tasks: T67873

Differential Revision: https://developer.blender.org/D6237
2019-11-21 13:08:33 +01:00
c637290a6e Cleanup: remove unused value2d gizmo 2019-11-21 23:00:04 +11:00
616c2d7531 Missed last commit 2019-11-21 23:00:04 +11:00
f4a4ec8425 Tool System: make smooth & randomize modal operators
Previously these used a gizmo to redo the operator however this
complicated having on-screen gizmos to access tools (see T66304).

Replace this with a generic way to make an operator that only has an
execute function into a modal operator.

This is used for smooth and randomize tools.

Unlike operator gestures, this handles storing and resetting the data.

Currently this only handles edit-mode data, however it's can be
extended to other kinds of data.
2019-11-21 22:45:15 +11:00
20620afc33 Object: edit-mode data support for object vertex coordinate access
Allows to access/transform/restore edit-mode
coordinates in a generic way.
2019-11-21 22:45:15 +11:00
d98d4fce93 Fix T62631: Cloth vertex mass capped to a very low number on scaled scenes.
Removed the weight limit and made the setting more clear in what it actually does.
IE, it controlls the weight of the vertices of the cloth mesh

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D5450
2019-11-21 12:31:40 +01:00
f1518d0f28 Fix T71412: Add transform component to deforming modifier
Dynamically bound mesh deform modifiers failed to update the viewport on
object transformation of deformer. The TODO by Sergey, which suggested
adding the transform component to the depsgraph, was already there, and
worked to fix T71412.
2019-11-21 12:24:07 +01:00
8bc57e5b91 Add curve decimate in the graph editor
Added a animation curve decimate operator in the graph editor

Reviewed By: Sybren

Differential Revision: http://developer.blender.org/D4841
2019-11-21 11:58:35 +01:00
122ba774e0 Fix T71621: VSE crashes when playing last frame of audio
Due to some floating point errors the last frame of a VSE audio strip can
cause integer overflow and crash Blender. This overflow was caused by a
cast from `int64_t` to `int` without prior check. The crash is fixed by
keeping the variable as `int64_t` for as long as possible.
2019-11-21 10:01:12 +01:00
ba1e9ae473 Bevel: Custom Profile and CurveProfile Widget
Custom profiles in bevel allows the profile curve to be controlled by
manually placed control points. Orientation is regularized along
groups of edges, and the 'pipe case' is updated. This commit includes
many updates to comments and changed variable names as well.

A 'cutoff' vertex mesh method is added to bevel in addition to the
existing grid fill option for replacing vertices.

The UI of the bevel modifier and tool are updated and unified.

Also, a 'CurveProfile' widget is added to BKE for defining the profile
in the interface, which may be useful in other situations.

Many thanks to Howard, my mentor for this GSoC project.

Reviewers: howardt, campbellbarton

Differential Revision: https://developer.blender.org/D5516
2019-11-20 16:25:28 -05:00
8c6ce74239 UI: Text Editor Visual Changes
Various small changes to Text Editor, mostly to do with scaling, alignment, and theme support.

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

Reviewed by Campbell Barton
2019-11-20 12:59:19 -08:00
0418e28944 New splash screen for master branch!
This way we can tell master from previous releases apart.

Splash by Gleb Alexandrov, Aidy Burrows and the Blender community
2019-11-20 14:58:10 +01:00
66bec8c25d Alembic: clean up exporter metadata code
The Alembic file metadata object was created in one place, a bit of
metadata was added, then it was passed along with other properties which
were then injected as metadata in another function. This is now cleaned up.

No functional changes.
2019-11-20 10:26:59 +01:00
dfdbb237bb Alembic: Upgrade from 1.7.8 to 1.7.12
Alembic 1.7.12 introduces a 'DCC FPS' hint, allowing Blender to write
the scene frame rate to the Alembic file. This will make it possible for
importers and converters to properly deal with situations where 'frame
number' is the only reference to time.

Writing this new DCC FPS hint will be done in a separate commit. Here
only the Alembic library is upgraded from 1.7.8 to 1.7.12.
2019-11-20 10:19:00 +01:00
2defd81b5e Cleanup: comments 2019-11-20 18:12:50 +11:00
43eb34ec81 Fix T71680: _PyObject_LookupAttr memory leak 2019-11-20 17:53:22 +11:00
9d8af29267 Cleanup: remove WITH_RAYOPTIMIZATION
This is redundant as WITH_CPU_SSE adds these flags
when they're supported.
2019-11-20 14:54:50 +11:00
858bd1d4d0 Fix assert running remesh with OpenVDB disabled 2019-11-20 14:54:50 +11:00
Dalai Felinto
3b16578fb4 Outliner: Fixup for previous commit on tooltip/crash fix
The issue was actually in Python extras (where it shows the ENUM option).

I got a bit distracted by the "(undocumented operator)" message.
It made me miss the missing ENUM once the crash was gone.
2019-11-20 00:42:30 -03:00
Dalai Felinto
bc66810064 Outliner: Fix crash for tooltips on ID operations
This was introduced on 9ca2cbdcea.
2019-11-20 00:29:28 -03:00
Dalai Felinto
9ca2cbdcea Outliner: Don't show id operations (make single user) when not supported
For the make single user operation to work we expect a parent of the
datablock to be around. However this is often not the case when not
accessing the data from Scenes or Viewlayer display modes.

For now we simply not show them in the other cases. They can be added
later though, by testing the outliner tree parent compatibility with the
expected parent id.

Fix T71673
Differential Revision: https://developer.blender.org/D6276
2019-11-19 14:28:59 -03:00
83e8765562 Subdiv: Tweak threading settings
Ensure that all threads on a multi-core system are used.

The issue was that BLI_task module was trying to be smart and
used heuristic to find optimal number of iterations per thread.
This heuristic assumes that tasks are light-weight, which is
not a case for subdivision surface.

On a higher subdivision level with a file from T70826 the
evaluation time goes down from 0.25 to 0.17 seconds per modifier
evaluation.

When D6189 is finalized we can being some extra performance
improvement.
2019-11-19 16:58:58 +01:00
6fea251e01 Use mutex for lock in image.c
Usage of spinlock during heavy IO gave reduced performance
see D6267 for details.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D6267
2019-11-19 07:37:16 -07:00
Dalai Felinto
12915aad65 Fix T69798: Pinning empty image objects
We have no dedicated image context tab, so for now making sure we don't
end up passing its ID as the pinned one.

If we ever get one, we then will need a different solution here, like
changing the ID that owns the data to be the object, instead of the
empty image datablock.

Differential Revision: https://developer.blender.org/D6273
2019-11-19 10:26:31 -03:00
08588d06e8 Fix T71554: 'Hide Unselected' not working for certain selections
rBc6cbcf83d015 caused to early out e.g when not all faces were selected
(but surrounding faces were, so implicitly all vertices were selected).
Now take (mixed also) selection mode into account.

Maniphest Tasks: T71554

Differential Revision: https://developer.blender.org/D6254
2019-11-19 09:51:06 +01:00
04272613a7 Python API: assume that a crashed Python operator returned FINISHED.
The CANCELLED return value from an operator is intended for
signaling that the operator aborted execution without changing
anything, and an Undo stack entry should not be created.

When a Python operator crashes, it is not safe to assume that
it did nothing, so it should interpret it as FINISHED instead.
Otherwise, the undo system behavior after an operator failure
feels broken.

Differential Revision: https://developer.blender.org/D6241
2019-11-18 22:03:40 +03:00
Alessio Monti di Sopra
64c27b9690 WM: remove view operators from the undo stack 2019-11-19 00:56:07 +11:00
Matias Mendiola
d66bc3807f GPencil: Layers and Materials Specials menu updates
Rename and separate Layers and Materials Specials menu from other buttons for better consistency

Reviewed By: antoniov

Differential Revision: https://developer.blender.org/D6271
2019-11-18 14:33:25 +01:00
71d65e881f Merge branch 'blender-v2.81-release' 2019-11-18 23:58:02 +11:00
c2a251d655 Build deps: Actually tweak EOL style
Seems that `git am` will force native EOL.
2019-11-18 13:55:55 +01:00
115a5bf65a Correct error in last commit 2019-11-18 23:53:34 +11:00
14882c4bed Build deps: Fix compilaiton of OpenCollada
Was caused by "wrong" EOL characters used in the patch: the file is
actuallyu saved using CRLF EOL style.

The patch was using CRLF as well for until recent change in the C
runtime.
2019-11-18 13:52:49 +01:00
995b98aee2 Merge branch 'blender-v2.81-release' 2019-11-18 23:36:16 +11:00
1cb07530a9 Fix T71564: Undo stroke lags after entering sculpt mode
Regression since 2.80, see: T71434
2019-11-18 23:35:25 +11:00
d124545013 Fix wrong name for QuadriFlow undo step 2019-11-18 22:43:30 +11:00
8d4460b6c4 GHOST: Only spam about X11 errors when using --debug-ghost
This commit adds a new command line argument --debug-ghost and
makes it so X11 errors happening during context initialization
are only printed when this new flag is sued.

There is no need to flood users with errors when their GPU is
not supporting latest OpenGL version. Or, at a very minimum,
the error must be more meaning full.

Differential Revision: https://developer.blender.org/D6057
2019-11-18 09:28:17 +01:00
dc8be23234 Merge branch 'blender-v2.81-release' 2019-11-18 16:39:16 +11:00
11549098ea Merge branch 'blender-v2.81-release' 2019-11-18 16:39:10 +11:00
dfc232f892 Merge branch 'blender-v2.81-release' 2019-11-18 16:39:01 +11:00
99640d0622 Fix building on NetBSD 2019-11-18 16:27:06 +11:00
047d2b0559 CMake: GLEW_INCLUDE_PATH wasn't set for system glew 2019-11-18 16:26:32 +11:00
321afe0cd6 Fix building on 32bit systems 2019-11-18 16:25:59 +11:00
6d9d24e3d4 msvc: Use debug versions of tbb malloc for debug builds
Using the release versions gave unpredictable results when
the msvc debugger was attached for some developers.
2019-11-17 14:26:29 -07:00
67fa8d2307 Fix: Build error with msvc
std::min requires the algorithm header
2019-11-17 09:09:58 -07:00
fb1cbbaf46 Fix T71322: Crash in Audaspace with some video file
Getting upstream audaspace fixes for audio files with more than 8
channels.
2019-11-17 09:02:18 +01:00
e385bdb228 Fix a bug in the T34039 hack in case when a modifier key is not mapped.
In order to recover from a transient Focus Out - Focus In disruption
in the middle of a shortcut, which can be caused by certain window
managers, Blender has code that checks which modifier keys are pressed
after Focus In and restores the modifier state based on that.

If one of the Ctrl, Shift, Alt, Super keys is not mapped anywhere
in the active keyboard layout, XKeysymToKeycode returns the invalid
zero keycode, and reading the key state produces garbage, which can
cause an invalid modifier state. Check the return value to avoid this.
2019-11-16 11:56:38 +03:00
e5b788bad8 Fix T68191: Make-instances-real doesn't select the new instances
2.79 also did this [select the new instances] which was useful.
2.79 also kept the instancer selected [this patch deselects]

Reviewed By: mont29

Maniphest Tasks: T68191

Differential Revision: https://developer.blender.org/D6233
2019-11-15 21:45:52 +01:00
17cb32c7bc Merge branch 'blender-v2.81-release' 2019-11-16 03:34:19 +11:00
eba4a4bd73 Fix active bone flip not activating the wpaint vertex group 2019-11-16 03:32:23 +11:00
554321c6fb Merge branch 'blender-v2.81-release' 2019-11-16 02:49:45 +11:00
b266b1034f Cleanup: quiet warnings 2019-11-16 02:49:15 +11:00
d61f2cac18 Merge branch 'blender-v2.81-release' 2019-11-16 02:42:33 +11:00
69b587eb3e Merge branch 'blender-v2.81-release' 2019-11-16 02:42:27 +11:00
eb23c7660b Merge branch 'blender-v2.81-release' 2019-11-16 02:42:19 +11:00
4cf24c10e2 Merge branch 'blender-v2.81-release' 2019-11-16 02:42:07 +11:00
0384cc6f78 API Docs: don't show functions in 'bpy.app.handlers'
This shows the function and it's memory location,
it's not useful for docs so remove it.
2019-11-16 02:41:17 +11:00
4ca87085e0 API Docs: only document built-in types
Some types were documented in bpy.types aren't accessible there.

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

This also fixes a bug creating references to non built-in types.
2019-11-16 02:39:51 +11:00
f64064e4b1 Docs: correct indent for to_swing_twist docstring 2019-11-16 02:39:51 +11:00
Dalai Felinto
ef71668ac5 Merge remote-tracking branch 'origin/blender-v2.81-release' 2019-11-15 12:10:55 -03:00
Julian Eisel
97f3626533 Merge branch 'blender-v2.81-release' 2019-11-15 16:34:46 +01:00
Julian Eisel
f641c60530 Fix T70991: Maximized file browser hides file name bar on Windows
`WS_CHILD` is a different kind of child window that what we define as
child window. See http://forums.codeguru.com/showthread.php?491604.

Setting this style flag seems to mess things up a bit in our
configuration. The name bar is actually being overlapped by the Windows
task bar then. Not totally sure why this happens, but I think it's
because windows with the `WS_CHILD` style are positioned relative to the
parent, not the desktop (screen without taskbar). So it uses the full
space available when maximized, which isn't clipped by the taskbar
anymore.
2019-11-15 16:34:09 +01:00
Dalai Felinto
49db3f6bf1 Fix: Filebrowser saving dialog size when maximized
Reviewed By: Severin

Differential Revision: https://developer.blender.org/D6260
2019-11-15 12:10:16 -03:00
f8354d492d Fix crash when freeing Blender after GTests
This only frees brush_rng and random_tex_array when they were actually
previously allocated.

In a unit test (see D6246) I want to be able to partially start Blender
so that I can load a blend file. To prevent memory leaks, I also want to
be able to release memory, which currently requires calling
`BKE_blender_free()`. This unconditionally calls `RE_texture_rng_exit()`
and `BKE_brush_system_exit()`, which now crash on freeing `NULL`. This
patch fixes that.

Allocation (`BKE_brush_system_init()`) and freeing
(`BKE_brush_system_exit()`) are done asymmetrically. The allocation
functions are called from `main()` in the creator module, but the
freeing is done by `BKE_blender_free()` the Window Manager. Ideally we
symmetrise this and initialise Blender from outside the window manager
(so that the initialisation can be done without WM and Python too), but
for now I'm happy when things don't crash.

Reviewed by: sergey via pair programming
2019-11-15 15:13:18 +01:00
b6973ed760 Keymap: pressing leader key (Alt) again closes tool prompt
Provides a convenient way to close
if the tool prompt is opened by accident.
2019-11-15 14:36:16 +11:00
8863fc65ca Cleanup: unused argument, variable warnings 2019-11-15 14:36:16 +11:00
Julian Eisel
96ce32dca6 Fix T71590: Closing file browser reopens previously closed render view
The render view window was never closed actually, just moved behind the
main window. It's properly closed now.

It should also behave more like expected when there already is a
temporary window open (e.g. Preferences).
2019-11-15 00:23:52 +01:00
YimingWu
91248876e5 GPencil MultiStroke modifier
This patch includes a modifiers that developed for NPR rendering.

- MultiStroke modifier that generates multiple strokes around the original ones.

Differential Revision: https://developer.blender.org/D5795
2019-11-14 19:24:49 +01:00
8ff9eb97fb Merge branch 'blender-v2.81-release' 2019-11-14 10:44:27 +01:00
c25a910e4e Buildbot: Explicitly disable code signer on Linux and macOS
The script requires Python 3.7 as a very minimum, and CentOS is
only 3.6.

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

Reviewed By: brecht

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

Differential Revision: https://developer.blender.org/D6244
2019-11-13 17:15:54 +01:00
d7b3b3b22f Merge branch 'blender-v2.81-release' 2019-11-14 00:59:44 +11:00
c7b7722254 Fix T71434: Sculpt lags changing brush size
Add a check to wm.radial_control so undo steps are only added
to properties that have undo enabled (as is done with number buttons).
2019-11-14 00:57:26 +11:00
5ff7827980 Cleanup: correct mul_v4_v4fl declaration 2019-11-14 00:09:39 +11:00
2179f314a6 Cleanup: use int for operator return argument 2019-11-14 00:08:02 +11:00
Jeroen Bakker
e527544b76 Cycles: OpenCL Performance
When using OpenCL with Cycles the rendering time increased substantial.
After doing some tests the bottleneck was found in 4d voronoi and 2d and
3d smooth voronoi.

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

AMD RX480 + BMW scene

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

Reviewed By: sergey

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

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

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

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

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

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

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

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

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

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

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

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

The code is based on D6036 from Nathan Letwory.

Differential Revision: https://developer.blender.org/D6216
2019-11-13 09:24:41 +01:00
b09498700c Merge branch 'blender-v2.81-release' 2019-11-13 15:08:43 +11:00
c98b062f87 Merge branch 'blender-v2.81-release' 2019-11-13 15:08:29 +11:00
d60a60f0cb Add support for the TBB allocator on windows.
The heap on windows is single threaded causing it to lag behind linux in performance in allocation heavy multithreaded scenarios, BVH building is a prime example.

See https://developer.blender.org/D6218 for benchmark results

for testing with the allocator enabled/disabled you can set the environment variable TBB_MALLOC_DISABLE_REPLACEMENT=1 to disable the TBB allocator.

Reviewed By: @sergey

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

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

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

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

Only those explicitly listed directories will be updated.

This allows to:

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

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

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

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

Differential Revision: https://developer.blender.org/D6230
2019-11-12 14:01:06 +01:00
5b5dccbc80 Merge branch 'blender-v2.81-release' 2019-11-12 12:24:19 +01:00
65bc5041c3 Fix T71508: wrong gravity settings in scene defaults
Typo in rBf5e0dfe59c7e.
Showed when creating a new default scene.

Maniphest Tasks: T71508

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

Differential Revision: https://developer.blender.org/D6220
2019-11-11 15:30:27 -03:00
37bfb1fe17 Merge branch 'blender-v2.81-release' 2019-11-11 17:38:07 +01:00
a97cc5389a Fix T71452: instance collection to scene from outliner not incrementing collection usercount
Maniphest Tasks: T71452

Differential Revision: https://developer.blender.org/D6222
2019-11-11 17:32:43 +01:00
Dalai Felinto
fc79d27951 Merge remote-tracking branch 'origin/blender-v2.81-release' 2019-11-11 12:20:36 -03:00
Dalai Felinto
c1af9ef031 Fix T71487: Crashes When Calling Texture Space Operators
Issue introduced on 69ad44d5b4.

Differential Revision: https://developer.blender.org/D6224
2019-11-11 11:39:20 -03:00
Dalai Felinto
982bffa69f Merge branch 'blender-v2.81-release' 2019-11-11 11:26:24 -03:00
Dalai Felinto
3e4e346e59 Fix T71489: Video editor crash
Bug introduced on rBb77da65e8c4d.

Differential Revision: https://developer.blender.org/D6223
2019-11-11 10:56:07 -03:00
Alessio Monti di Sopra
9a60bdbf07 VSE: open file browser sidebar by default when adding external strips
Open the file browser sidebar by default when adding Movie/Sound/Image Sequence Strips, to show the operator options.

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

Reviewed by: William Reynish, Julian Eisel
2019-11-11 13:39:32 +01:00
Julian Eisel
b962253ed1 Fix T71474: Temporary image editor cancels to file editor after file operation 2019-11-11 12:43:20 +01:00
19c44ae087 Merge branch 'blender-v2.81-release' 2019-11-11 20:09:21 +11:00
f44f09534b Merge branch 'blender-v2.81-release' 2019-11-11 10:07:37 +01:00
c3dab45510 Fix lattice deform after undo and edit-mode exit
Follow up on T71414
2019-11-11 20:07:12 +11:00
3316610785 Revert "Fix T71126: add old hotkeys to set start/end frame in the timeline to"
This caused T71483.
Having timeline and dopesheet merged in 2.8 makes using S/E keys in timeline not work well.
2.7x keymap needs to fit with 2.8x internals, so probably 2.7x keymap will have to live with Ctrl+Home / Ctrl+End here.

This reverts commit 4fbcbbfb96.
2019-11-11 09:59:41 +01:00
25002739c2 Merge branch 'blender-v2.81-release' 2019-11-11 13:17:32 +11:00
df4f29b928 Fix T71414: Undoing change of lattice resolution deforms mesh 2019-11-11 13:07:37 +11:00
4c5477a8dc Windows: Fix build errors during deps build on windows. 2019-11-10 15:45:30 -07:00
b720c0f6aa Fix T71436: proportional_edit_objects turns off when translating cursor in edit mode 2019-11-09 16:12:42 -03:00
dca32f2b4f Fluid Particles: fix threading crash with viscoelastic springs.
As correctly pointed out by a comment in the code, adding
new springs wasn't thread safe, and caused crashes.

Fix by buffering new springs in intermediate thread-local
arrays, which are flushed on the main thread. This is valid
because the new springs are not used until the next sim step.

Differential Revision: https://developer.blender.org/D6133
2019-11-09 13:44:43 +03:00
6f1237b2eb make_update.py: update windows library folder 2019-11-08 19:09:59 -07:00
3ed7ff1f9f Merge branch 'blender-v2.81-release' 2019-11-09 10:05:30 +11:00
0a0d735acd Fix T71379: Even edge slide shows random points on screen 2019-11-09 09:59:10 +11:00
4b229f9e2d Fix T69799: Glitches when moving object camera is locked to
The idea is to indicate that the view3d matrix is being transformed too
and this avoids cyclic dependencies.
2019-11-08 17:58:00 -03:00
bcf008516f UI: Graph Editor Insert Keyframes Menu
Fixes alignment issues on Graph Editor menus used to insert keyframes.

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

Reviewed by Campbell Barton
2019-11-08 08:49:16 -08:00
f0bee88443 Merge branch 'blender-v2.81-release' 2019-11-08 17:48:30 +01:00
8c695404a4 Fix T70778: Library Override dissabled after re-instancing same collection in different scene.
Very stupid mistake in own new generic ID lib_link function, that would try
to link ID pointers for all data-blocks, not only those actually needing it.
2019-11-08 17:47:48 +01:00
a67aa11b12 Windows: Switch to the dynamic C runtime
This change switches windows to the dynamic C runtime
avoiding issues coming from mixing the static and dynamic
runtime like the ones outlined in [1]

[1] https://developer.blender.org/D5387#122165

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

Reviewed by: @Sergey
2019-11-08 09:01:00 -07:00
e408a62c2a Merge branch 'blender-v2.81-release' 2019-11-08 14:53:19 +01:00
76be5b5bf5 Fix T70789: Using Remove Single Override breaks file loading (crash).
We only need to refine rna pointer for actual collection properties,
other arrays we handle directly the the appy callback.
2019-11-08 14:52:57 +01:00
f47c469e90 Merge branch 'blender-v2.81-release' 2019-11-08 14:38:43 +01:00
3b66d2ed21 Fix T71405: Trying to Ctrl-C on many buttons crashes Blender
Usually Ctrl+C copies the operator name to the clipboard
["bpy.ops.material.new()", "bpy.ops.object.material_slot_remove()"]
Crash happens for all buttons of UI_BTYPE_BUT without associated
operator [some are defined with callbacks only, often these are created
with e.g uiDefIconBut (instead of e.g. uiDefIconButO)]

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

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

Maniphest Tasks: T71405

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

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

Maniphest Tasks: T55632

Differential Revision: https://developer.blender.org/D6201
2019-11-08 14:03:40 +01:00
1e4dbc84a7 Merge branch 'blender-v2.81-release' 2019-11-08 22:19:51 +11:00
5cf5dfcfad Fix T71194: UV Face centers wrong location with sub-surface mesh 2019-11-08 22:16:25 +11:00
7f17ac71e1 Merge branch 'blender-v2.81-release' 2019-11-08 19:18:51 +11:00
7b9f4320cc Merge branch 'blender-v2.81-release' 2019-11-08 19:18:25 +11:00
326b25ae8e Fix T66124: Gizmo orientation doesn't refresh when making face 2019-11-08 19:17:27 +11:00
73b9e86b49 EditMesh: avoid undo push on face creation if no action is made 2019-11-08 19:16:27 +11:00
45a03057fa Fix tool leader-key consuming mouse wheel events 2019-11-08 17:41:04 +11:00
0a42d0c566 Cleanup: adjust layout for example experimental UI
- Use a separate split for each feature,
  since two top-level splits can become un-aligned.
- Only show the task instead of the entire URL.
2019-11-08 16:45:18 +11:00
Dalai Felinto
a7fcd78d2d User Preference Experimental Tab
Experimental tab in User Preferences for experimental features.
The tab option is only visible when "Developer Extras" is on.

Included here is a (commented out) example panel to be used as a
template for the new experimental panels. Since these panels will come
and go it is nice to have a reference in the code.

Differential Revision: https://developer.blender.org/D6203
2019-11-08 01:31:01 -03:00
3ecb1056c9 Merge branch 'blender-v2.81-release' 2019-11-08 12:17:42 +11:00
e9d7fddeb4 Fix dyntopo sculpt not setting vertex indices dirty
This is an old bug exposed by new cursor drawing
which uses vertex indices.
2019-11-08 12:13:23 +11:00
72351aec72 Cleanup: clang-format 2019-11-08 11:50:16 +11:00
8d8c4562cc Merge branch 'blender-v2.81-release' 2019-11-08 11:45:39 +11:00
5b936f03f5 Merge branch 'blender-v2.81-release' 2019-11-08 11:45:15 +11:00
5c2670ca39 Cleanup: spelling 2019-11-08 11:44:23 +11:00
bda58b8a89 Cleanup: clang-format 2019-11-08 11:44:23 +11:00
23e1fb365b Merge branch 'blender-v2.81-release' 2019-11-07 21:36:23 +01:00
eefd806afc Fix in addition to T61432: Sampling Subframes not working 2.8
As mentioned in the discussion, emission from particles did not make use of subframes. This commit resolves this issue.
2019-11-07 21:33:56 +01:00
aadc90d0fc Stretch To: implement a mode similar to Damped Track for rotation.
Most of the time Stretch To is used in actual rigs, like BlenRig
or Rigify, in combination with Damped Track to handle rotation
before the stretch, because it produces rotations more appropriate
for organic deformation, and doesn't flip because of internal
gimbal lock.

The prevalence of this pattern suggests that Stretch To should
support that kind of rotation directly as an option.

Differential Revision: https://developer.blender.org/D6134
2019-11-07 19:03:03 +03:00
4e5768b2a7 Stretch To: clean up the math code in the implementation.
Combine computing `size` and normalizing the matrix, invert the
direction of `vec` to avoid negating it later, use `rescale_m4`
instead of matrix multiplication to scale the final result.

Differential Revision: https://developer.blender.org/D6134
2019-11-07 18:39:17 +03:00
50dc5648f5 Merge branch 'blender-v2.81-release' 2019-11-07 16:20:00 +01:00
74af698769 Fix T70875: Library Override: Clicking an Library Overriden Object crashes Blender.
We also need to rebuild the whole collection/viewlayer object cache
thing when we relink an objector collection in a collection (since it
might be part of a view layer).

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

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

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

Also in toe-in the convergence plane is always facing the original
camera orientation. It is a known small annoyance.
2019-11-06 17:48:09 -03:00
5abd006c78 Fix T70279: crash loading certain old, possibly corrupt files with nodes
This test should not be needed and the cause is unclear, but better to avoid
the crash. Possibly caused by files saved with development versions that had
different node type IDs.
2019-11-06 20:06:33 +01:00
6528fcaeea Fix T69845: OSL wrong texture node output for fixed vector value 2019-11-06 19:29:04 +01:00
Julian Eisel
3ed4097292 Fix broken selection behavior in multiple editors right after saving
Steps to recreate were:
* Open a Node Editor, add some nodes
* Save the file
* Select all nodes (A)
* Save it again, but with Ctrl+S
* Try to select an already selected node
It's supposed to deselect other nodes now, but for as long as the report
banner is shown in the status-bar ('Saved "foo.blend"'), this doesn't
work.

Also happened in the VSE, Dopesheet, NLA or everywhere else we recently
added drag-all-selected support to.

Issue was in there since 2.80. Basically the timer event sent by the
report banner broke assumptions in the selection operator.

Hope this fix doesn't have any side effects. Checked with Bastien
(initial author of this logic), but seems things are fine.
2019-11-06 19:28:53 +01:00
0faed98da1 Merge branch 'blender-v2.81-release' 2019-11-06 19:26:45 +01:00
a58c1d4497 Fix 2D paint antialiasing offset
The AA offset should be substracted, not added. I think this was
introduced when I refactored the code in a code review.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6186
2019-11-06 19:25:42 +01:00
9243c77e43 Merge branch 'blender-v2.81-release' 2019-11-06 19:22:44 +01:00
265295e6a6 Fix Voxel Remesher preserve volume artifacts
Should Fix T70326

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

Reviewed By: jbakker

Maniphest Tasks: T70326

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

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D6187
2019-11-06 19:14:04 +01:00
d52ddfa6cc Merge branch 'blender-v2.81-release' 2019-11-06 18:26:53 +01:00
7ef03eae20 Fix T71336: GPencil: Wrong mouse cursor 2019-11-06 16:53:36 +00:00
64cd9a079b Fix T70952: EXR files bigger than 2GB don't open on Windows 2019-11-06 17:16:46 +01:00
46aeffc5b6 Merge branch 'blender-v2.81-release' 2019-11-06 15:09:55 +00:00
65b414cfb2 Fix T71319, T71015: crash in edit mode with out of range material assignments 2019-11-06 16:08:10 +01:00
Charlie Jolly
3a65ea3b2d Fix: Forward compatibility issue in shader nodes
Raised in https://developer.blender.org/rBe5618725fd1e

Reviewed By: brecht

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

Usually ABI detection is happening in platform_unix.cmake when
detecting whether there are any precompiled libraries folder
available. This detection is not happening when library folder
is provided explicitly, expecting ABI to be setup explicitly
as well.
2019-11-06 13:50:43 +01:00
7728bfd4c4 Constraints: remove special meaning of Local Space for parentless Objects.
In 2011 special handling was introduced, apparently for no other
reason than to address a complaint in T25707 that World and Local
space are equivalent for objects without parent. This causes issues
and confusion, as mentioned in rB599c8a2c8e4.

This special meaning of Local Space is not documented in the manual,
and is not known to experienced riggers, so removing it should not
be a problem.

Differential Revision: https://developer.blender.org/D6095
2019-11-06 15:36:05 +03:00
e3f1f5bd00 Fix crash when adding Scene variable to a driver
When a Scene variable is added to a driver, and the RNA path is still NULL,
it no longer crashes Blender.
2019-11-06 11:53:23 +01:00
b0e7a1d4b4 Alembic: improved import/export of mesh normals
This commit implements the change in behaviour described in T71246.
In short:

For export, per mesh:
    - Custom loop normals are defined → loop normals are exported.
    - One or more polys are marked flat → loop normals are exported.
    - Otherwise, no normals are exported.

For import, when the Alembic mesh contains:
    - loop normals (kFacevaryingScope) → use as custom loop normals, and
      enble Auto Smooth to have Blender actually use them.
    - vertex normals (kVertexScope or kVaryingScope) → convert to loop
      normals, and handle as above.
    - no normals → mark mesh as smooth.
    - unsupported normal types (kConstantScope, kUniformScope,
      kUnknownScope) → handle as 'no normals'.

This also fixes T71130: Alembic split normal export issue

Previously the mesh flag `ME_AUTOSMOOTH` was used in conjunction with
the poly flag `ME_SMOOTH` to determine whether loop normals or vertex
normals were exported. This behaviour was hard to predict for artists,
and hard to describe in the manual. Instead, Blender now only exports
loop normals, computing them if necessary. This way, the mesh in Alembic
should always have the same loop normals as in Blender.

Maniphest Tasks: T71130

Differential Revision: https://developer.blender.org/D6197
2019-11-06 10:45:36 +01:00
4f5086b6dc Mathutils: expose the utility to find the closest point of a triangle.
This computation is complex and useful enough to expose the existing
C math utility used by BVH nearest to Python. Otherwise this requires
the use of intersect_point_tri and multiple intersect_point_line calls
with some added vector math.

Differential Revision: https://developer.blender.org/D6200
2019-11-06 11:15:11 +03:00
b617cf69f3 Merge branch 'blender-v2.81-release' 2019-11-06 13:07:46 +11:00
863ca3dd76 Cleanup: remove unused game engine variable 2019-11-06 13:06:04 +11:00
3e44b0ed6c Merge branch 'blender-v2.81-release' 2019-11-06 12:49:44 +11:00
7168dfd005 Cleanup: remove EditNurb from DNA 2019-11-06 12:46:25 +11:00
9d1031b011 Fixed delaunay check, was causing 'desperation' messages.
Check was losing precision -- adjust by translating points
before calculating circumcircle.
Also, needed to check for flippability of edges before flipping.
2019-11-05 13:23:20 -05:00
0bee94f920 Fixed delaunay check, was causing 'desperation' messages.
Check was losing precision -- adjust by translating points
before calculating circumcircle.
Also, needed to check for flippability of edges before flipping.
2019-11-05 13:12:34 -05:00
3c161fb82c Merge branch 'blender-v2.81-release' 2019-11-05 17:45:31 +01:00
9ea661f47a Alembic import: fix incorrect 'topology changed' error
When importing subdivision surfaces a 'Topology Changed' error was shown
even though the topology didn't change at all. The code was comparing to
`totpoly` where `totloop` should have been used.
2019-11-05 17:44:37 +01:00
af9a50bfe6 Merge branch 'blender-v2.81-release' 2019-11-05 17:35:27 +01:00
Ha Hyung-jin
9a9e93e804 Fix T71071: errors when using multiple CUDA/Optix GPUs and host mapped memory
The multi device code did not correctly handle cases where some GPUs store a
resource in device memory and others store it in host mapped memory.

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

Differential Revision: https://developer.blender.org/D6183
2019-11-05 15:38:02 +01:00
2412451595 Merge branch 'blender-v2.81-release' 2019-11-05 15:26:39 +01:00
a1747b058d Fix T71259: Array Modifier Performance is slow
Was happening when object transform is animated.

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

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

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

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

Thx @sergey for guidance!

Maniphest Tasks: T68396

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

Now the range is clamped by a value derived from the click-step
so dragging numbers never increases it to an impractically large value.
2019-11-05 14:10:53 +11:00
f4e081ea3f Merge branch 'blender-v2.81-release' 2019-11-05 09:17:15 +11:00
95a60fe84d Fix errors in fix for T68018 2019-11-05 09:14:47 +11:00
Julian Eisel
ef7fd50f8a UI: Rewrite stacked full-screen logic, fixing issues
To recreate the main issue:
* Set render and file browser to show in full-screen in the preferences
* Default scene, press F12 in 3D View
* Press Alt+S to save the image
* Escape the file browser
* Escape the image editor
The former 3D View would now show the image editor. This is a common
use-case that should work.

Full-screen code is a hassle to get to work as expected. There are
reports from 2.5, I did lots of work years ago to get these kind of
use-cases to work fine. But apparently I broke this one with a fix for
another common use-case in March (0a28bb1422).
This now stores hints in the space, rather than the area, which should
make things much more controlable and hopefully help us fix issues like
this.
Here are a few references describing further common issues (all should
work fine now): 0a28bb1422, e61588c5a5, T19296

Checked over this with Bastien, we agreed that at some point we should
do a big rewrite of all of this, for now this is acceptable.
2019-11-04 21:01:38 +01:00
4b337a86f1 Merge branch 'blender-v2.81-release' 2019-11-04 18:10:56 +01:00
b45828ebe9 Fix T71123: OptiX error in Cycles viewport when adding HDRI
Cycles did not update the "is_enabled" flag on lights when they were synchronized again, which caused all lights disabled by "LightManager::disable_ineffective_light" to be disabled indefinitely. As a result the OptiX kernels were not reloaded with correct features when a change to a light was made. This fixes that by updating the "is_enabled" flag during synchronization.

Differential Revision: https://developer.blender.org/D6141
2019-11-04 18:09:56 +01:00
ece4515fc8 Fix T71250: ID user decrement error with ID properties in ViewLayer
Credit for the original patch goes to @scorpion81.
2019-11-04 15:02:03 +01:00
Robert Guetzkow
3f3d1ad480 Correct naming of cryptomatte output sockets on the render layers node
The cryptomatte sockets were incorrectly numbered using a step size of two. While the increment by two is necessary to get the correct number of render passes, they should be numbered consecutively matching the socket names of the cryptomatte node.

Reviewed By: lukasstockner97

Differential Revision: https://developer.blender.org/D6185
2019-11-04 14:53:09 +01:00
9fac6765c8 Nasking: Toggle cyclic on Ctrl-Click on initial vertex
This change replaces old behavior when spline was toggled as cyclic
on double-click.

Doing so was tricky on a tablet and is rather non-intuitive in general.

Differential Revision: https://developer.blender.org/D6162
2019-11-04 10:54:59 +01:00
e236f5b574 Masking: Cleanup, limit variable scope 2019-11-04 10:54:59 +01:00
3d55d80c59 Masking: Cleanup, indentation level 2019-11-04 10:54:59 +01:00
a81108ae74 Masking: Cleanup, naming of mask layer 2019-11-04 10:54:59 +01:00
Henrik Dick
e45cfb574e Solidify Modifier: support non-manifold input
This adds a new mode to solidify to support non-manifold geometry
with edges using 3 or more faces as input, resulting in a manifold mesh.

Since the differences between these methods don't translate well
into short terms, they're named "Simple" and "Complex" in the UI.

This also adds clamp with respect to angles
to the existing solidify modifier calculation.
2019-11-04 10:35:21 +11:00
b5244cd5dc Fix errors in fix for T68018 2019-11-03 17:56:05 +11:00
Alessio Monti di Sopra
d4bef6a215 VSE: add a Set frame range to Strips operator
Add operator that sets the frame range, with an option to choose the regular or the preview one, around the selected strips.

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D6078
2019-11-02 22:53:48 -07:00
Alessio Monti di Sopra
b9c2f8f3c8 UI: Fix preview frame range drawing in sequencer and driver editors
Draw preview range overlay in the video sequencer in the same way as in the other animation editors
Add color control in the theme.
Prevent overlay to be drawn in the driver editor.

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D6074
2019-11-02 22:52:22 -07:00
7ddbc7b031 Merge branch 'blender-v2.81-release' 2019-11-02 21:53:14 -07:00
8ab6ef30ab Fix T68018: Crash on building movie proxy
Skip building proxy if directory can not be created.

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

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

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

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

This adds a context argument to passed to drawing functions since
finding the weight-paint pose-object in the drawing loop isn't efficient.
2019-11-02 04:32:50 +11:00
89e2a8f17a Windows: Replace deprecated SHGetFolderPathW
No functional change.

Differential Revision: https://developer.blender.org/D6172
2019-11-01 14:23:32 -03:00
ca56fe6d91 Fix python error when trying to delete presets
In some cases the default data paths for blender does not exist.
For example on windows when using the portable install.

This would lead to errors when trying to lookup default paths in
is_path_builtin. Now we handle cases like this gracefully.
2019-11-01 17:58:29 +01:00
88833170f2 UI: Disk to Disc Spelling Change
Identifiers for icons representing optical drives should use 'disc', not 'disk'.

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

Reviewed by Julian Eisel
2019-11-01 09:02:50 -07:00
5840c17970 Fix T70725: Frame Symmetry Stroke
Frame Selected centers around the last valid stroke.
When Symmetry is enabled the last mirrored `location` was added to the
`average_stroke_accum` in stead of the original stroke location.

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

Issue happened in Vertex and Weight paint.

Reviewed By:
	Pablo Dobarro

Differential Revision: https://developer.blender.org/D6161
2019-11-01 15:10:44 +01:00
f5b09ae034 Merge branch 'blender-v2.81-release' 2019-11-01 14:31:35 +01:00
1121e1f1a6 Fix T71251: Move Strokes to Layer slider gets wonky
This parameter must be hidden.
2019-11-01 14:30:55 +01:00
c1f8268734 Fix T60607: Spin tool duplicates after Spin Duplicate 2019-11-01 11:24:36 +11:00
61bf51acb5 Cleanup: pep8 for examples 2019-11-01 10:53:47 +11:00
c11d3c1b92 Cleanup: correct logical error in last commit
Worked because: -INT_MIN == INT_MIN
2019-11-01 10:45:24 +11:00
ddf20fae4c Sequencer: use all selected strips for select side operator
D6127 by @a.monti with edits.
2019-11-01 08:52:20 +11:00
e1c9c0106c Merge branch 'blender-v2.81-release' 2019-11-01 07:33:31 +11:00
78ad368d12 Fix inability to toggle pose-mode without sync-selection
- There was no way to select some kinds of data without activating them.
- Pose mode could not be activated at all.

No change to behavior with sync-selection enabled.
2019-11-01 06:29:48 +11:00
44d67b6dc8 Transform: Add option to exclude back facing geometry from snapping
Add new `Backface Culling` option to the snapping properties.
This option has nothing to do with the view3d display or the
workbench `Backface Culling` option.

Limitation:
- In edit mode, this option only affects snap to faces.

Maniphest Tasks: T71217

Differential Revision: https://developer.blender.org/D6155
2019-10-31 14:09:53 -03:00
3c32c5c2dd make.bat: Warn user about missing svn.exe 2019-10-31 09:45:56 -06:00
eb95e28635 Merge branch 'blender-v2.81-release' 2019-10-31 15:57:55 +01:00
8c6c46469c Fix T71172: Cycles preferences.get_devices() not refreshing Optix devices 2019-10-31 15:54:44 +01:00
4f3913db9f Merge branch 'blender-v2.81-release' 2019-11-01 01:51:06 +11:00
6df0bfad67 Fix oso extension detection in the text editor 2019-11-01 01:48:35 +11:00
a45113a119 Merge branch 'blender-v2.81-release' 2019-10-31 14:53:12 +01:00
0bd51f4fc0 Fix T70687: Deleting sculpting mask extraction causes crash
Reviewed By: jbakker

Maniphest Tasks: T70687

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

Reviewed By: jbakker, campbellbarton

Differential Revision: https://developer.blender.org/D6044
2019-10-31 14:45:26 +01:00
26e454eec3 Merge branch 'blender-v2.81-release' 2019-10-31 14:41:14 +01:00
be2bdaf6aa Fix EEVEE sculpt mask rendering
Reviewed By: jbakker

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

Reviewed By: jbakker

Maniphest Tasks: T70866

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

Reviewed By: jbakker

Maniphest Tasks: T71053

Differential Revision: https://developer.blender.org/D6159
2019-10-31 14:32:09 +01:00
Julian Eisel
f069f5be7f UI: Only show render result in image editors in view mode
Previously, with the render display mode set to "Image Editor", we'd use
any image editor that doesn't already show a (non-render-result) image,
even if they weren't set to view mode (but UV, paint or mask mode).
It could be confusing or annoying when using an Image Editor for a
purpose that the mode wasn't created for.
Note that with the introduction of a UV sub-Editor, the old behavor was
even more confusing. Changing a UV Editor to show the render result was
weird.
2019-10-31 11:56:10 +01:00
501a3e93ec GPencil: Display dot icon for active material in Assign menu
Now, a dot icon is displayed in front of the current object active material.
2019-10-31 11:49:46 +01:00
2e2fd12a55 Cleanup: comments for is_path_builtin
Also reduce scope of import.
2019-10-31 18:01:58 +11:00
3252ef4aca Cleanup: import functions from bpy.props
Some instances used bpy.props when the convention is to import them.
2019-10-31 18:00:18 +11:00
59b16e28d9 Fix tool leader-key in image space
- This wasn't working for tool-systems that use the space data.
- Don't activate when the keymap is empty.
2019-10-31 10:03:42 +11:00
8126b9f8a8 Merge branch 'blender-v2.81-release' 2019-10-30 22:42:46 +01:00
ed079850cb GPencil: Fix unreported missing stroke color for 1st popover material 2019-10-30 22:42:16 +01:00
b1b0e56a72 Fix T59065: Blender default keyset is deletable by user!
Previously, you could delete presets that were part of the blender
default install. Now we check if the preset file resides in the bundled
file paths. If so, prevent deletion of the preset.

Reviewed By: Campbell

Differential Revision: http://developer.blender.org/D4522
2019-10-30 19:23:36 +01:00
ace7ec785d Merge branch 'blender-v2.81-release' 2019-10-31 03:19:04 +11:00
d9bce6bcf5 Fix image paint showing project-paint settings
Also make projpaint a keyword-only argument to avoid copy-paste errors
like this re-occurring in the future.
2019-10-31 03:16:48 +11:00
20881bcffd Fix T71212: Drivers using scene.frame_current don't refresh on playback
Need to make such drivers explicitly dependent on time.
2019-10-30 15:15:56 +01:00
0f9757b12d Depsgraph: Cleanup, use anonymous nsamespace
Jeeps overall line lengths with function definition shorter.
2019-10-30 15:15:56 +01:00
f305972377 OpenSubdiv: Initial implementation of batched evaluation
The idea is to give multiple coordinates to evaluator and evaluate them
all at once, avoiding any possible overhead.
2019-10-30 15:15:56 +01:00
05ee67a7c8 OpenSubdiv: Make internal evaluator aware of batched evaluation
Allows to pass multiple patch coordinates for evaluation.
2019-10-30 15:15:55 +01:00
ca3a96c243 OpenSubdiv: Use more generic access to patch coordinates
Saves another unnecessary temporary data copy during evaluation.
2019-10-30 15:15:55 +01:00
d3c87876c9 OpenSubdiv: Cleanup, remove old compatibility code
Consider that all builders have face-varying evaluation now.
2019-10-30 15:15:55 +01:00
5843827fb9 OpenSubdiv: Cleanup, remove unused class 2019-10-30 15:15:55 +01:00
4227a35b32 OpenSubdiv: Avoid unnecessary memory copies
Make evaluator itself to write directly to the output buffer.

Brings unmeasurable speedup and makes it possible to simplify
some buffer class logic.
2019-10-30 15:15:55 +01:00
31873218b2 OpenSubdiv: Use smaller buffer sizes and strides
We currently don't support interleaved varying data, so can make
some buffer smaller.
2019-10-30 15:15:55 +01:00
b4fb3db559 OpenSubdiv: Cleanup, remove unused PatchBuffer class 2019-10-30 15:15:55 +01:00
8e470033ab OpenSubdiv: Cleanup, remove unused evaluator member 2019-10-30 15:15:55 +01:00
7dda8f7faf OpenSubdiv: Cleanup, remove unused static methods 2019-10-30 15:15:55 +01:00
622aedb78a Merge branch 'blender-v2.81-release' 2019-10-31 00:52:12 +11:00
5043003584 GNUmakefile: avoid using group/owner for source_archive
Thanks to @JRottm for pointing out this issue.
2019-10-31 00:51:15 +11:00
03be16026a Merge branch 'blender-v2.81-release' 2019-10-31 00:27:27 +11:00
60d0446db3 GNUmakefile: use tar.xz instead of tar.gz
Also rename "make tgz" to "make source_archive" as it wasn't clear
this only archived the source, not binaries.

D6153 by @JRottm with minor edits
2019-10-31 00:19:05 +11:00
8fe4d9c002 Merge branch 'blender-v2.81-release' 2019-10-30 14:19:05 +01:00
068c6a6f15 Fix T71182: Object Parenting - 'Without Inverse' option missing in menu
Maniphest Tasks: T71182

Differential Revision: https://developer.blender.org/D6150
2019-10-30 14:14:18 +01:00
Bastien Montagne
29433da4c6 BLI_task: Add new generic BLI_task_parallel_iterator().
This new function is part of the 'parallel for loops' functions. It
takes an iterator callback to generate items to be processed, in
addition to the usual 'process' func callback.

This allows to use common code from BLI_task for a wide range of custom
iteratiors, whithout having to re-invent the wheel of the whole tasks &
data chuncks handling.

This supports all settings features from `BLI_task_parallel_range()`,
including dynamic and static (if total number of items is knwon)
scheduling, TLS data and its finalize callback, etc.

One question here is whether we should provide usercode with a spinlock
by default, or enforce it to always handle its own sync mechanism.
I kept it, since imho it will be needed very often, and generating one
is pretty cheap even if unused...

----------

Additionaly, this commit converts (currently unused)
`BLI_task_parallel_listbase()` to use that generic code. This was done
mostly as proof of concept, but performance-wise it shows some
interesting data, roughly:
 - Very light processing (that should not be threaded anyway) is several
   times slower, which is expected due to more overhead in loop management
   code.
 - Heavier processing can be up to 10% quicker (probably thanks to the
   switch from dynamic to static scheduling, which reduces a lot locking
   to fill-in the per-tasks chunks of data). Similar speed-up in
   non-threaded case comes as a surprise though, not sure what can
   explain that.

While this conversion is not really needed, imho we should keep it
(instead of existing code for that function), it's easier to have
complex handling logic in as few places as possible, for maintaining and
for improving it.

Note: That work was initially done to allow for D5372 to be possible... Unfortunately that one proved to be not better  than orig code on performances point of view.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D5371
2019-10-30 12:23:45 +01:00
3e7af19bf1 GPencil: Replace eyedropper toolbar icon 2019-10-30 11:11:26 +01:00
58f378817c UI: Add new toolbar icons for polyline & eyedropper
These are meant for use in Grease Pencil Draw mode.
2019-10-30 10:53:01 +01:00
367def2f16 Merge branch 'blender-v2.81-release' 2019-10-30 10:19:41 +01:00
ff7be96322 Toggle 'PLAY' <> 'PAUSE' icons for pausing preview rendering
mentioned in T70974

Maniphest Tasks: T70974

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

Maniphest Tasks: T71026

Differential Revision: https://developer.blender.org/D6123
2019-10-30 09:44:00 +01:00
dff7abf061 UI: Hover States
Hover (active) widget states now affecting more elements and in a more consistent way.

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

Reviewed by Campbell Barton
2019-10-29 18:11:19 -07:00
5207b977f7 UI: Correct prvicons
Correct source, output, and formatting of prvicons - larger icons used for file browser.

Not Reviewed
2019-10-30 09:27:12 +11:00
01171c3380 Merge branch 'blender-v2.81-release' 2019-10-30 07:50:11 +11:00
aff6446e06 UI: remove text alignment icons for sequencer text
This implied paragraph alignment, when the alignment defines
the origin of the text relative to the X,Y coordinates.

Resolves T71082
2019-10-30 07:49:22 +11:00
09e813f303 Merge branch 'blender-v2.81-release' 2019-10-30 06:15:38 +11:00
7ae187c5d4 UI: make color strip 'Only Boost' readable in glow panel
D6115 by @tintwotin
2019-10-30 06:13:32 +11:00
48d1928798 Merge branch 'blender-v2.81-release' 2019-10-30 06:08:38 +11:00
3ec23f619a Merge branch 'blender-v2.81-release' 2019-10-30 06:08:30 +11:00
cff00f6b04 Cleanup: pep8, remove redundant parenthesis 2019-10-30 05:50:17 +11:00
10b83a94d9 Cleanup: use "use_" prefix for booleans 2019-10-30 05:50:17 +11:00
3d40121370 Merge branch 'blender-v2.81-release' 2019-10-29 19:49:37 +01:00
8e6882a70d Fix T69468 EEVEE: Collections Holdout Button in Outliner Is Ignored
Not the cleanest implementation but the simplest.

This doubles the number of default shader variations.
2019-10-29 19:44:02 +01:00
638e0e520f Merge branch 'blender-v2.81-release' 2019-10-30 05:19:15 +11:00
1907081f0e Sequencer: add missing Show Seconds in View Menu
D6106 by @tintwotin
2019-10-30 05:18:04 +11:00
dfaaf50538 Cleanup: remove icon files committed by accident 2019-10-30 03:51:35 +11:00
77acda6fd0 Merge branch 'blender-v2.81-release' 2019-10-30 03:40:03 +11:00
f20cd49c30 Fix bones without parents missing head vertex
When the connected was enabled for a parentless bone the head vertex
wasn't displayed and couldn't be selected.
2019-10-30 03:37:50 +11:00
81cc09b78a Merge branch 'blender-v2.81-release' 2019-10-29 17:16:35 +01:00
cf95d7f10e UI: Icons update.
Updated icon set from Andrzej Ambroż.

  - Includes new icons for Top Bar, Status Bar, CD/DVD drives, Home, Documents, Temp, Memory, Options.
  - Includes small tweaks to many icons throughout Blender
  - Also adds a large CD/DVD drive icon for the file browser

This does not add the new icons in the interface yet.
2019-10-29 16:55:56 +01:00
87ac3d14b2 Fix T70905: Image Editor header hides mask, cache and keyframe info if
flipped to bottom

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

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

Maniphest Tasks: T70905

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

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

Maniphest Tasks: T71171

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

Maniphest Tasks: T71124

Differential Revision: https://developer.blender.org/D6142
2019-10-29 10:28:41 -03:00
9e48cb1049 Merge branch 'blender-v2.81-release' 2019-10-30 00:17:01 +11:00
8ffacda786 Merge branch 'blender-v2.81-release' 2019-10-30 00:16:15 +11:00
455ccac5b8 Merge branch 'blender-v2.81-release' 2019-10-30 00:15:29 +11:00
9389ad3736 Fix Proxy folder not getting deleted
D6145 by @Eitan
2019-10-30 00:14:08 +11:00
4fbcbbfb96 Fix T71126: add old hotkeys to set start/end frame in the timeline to
Blender 27X keymap

Maniphest Tasks: T71126

Differential Revision: https://developer.blender.org/D6151
2019-10-29 14:03:03 +01:00
a05be009a5 Cleanup: remove unused object_image_guess
This made sense when we had tex-face feature,
since it's removed & unused, remove this function too.

D6079 by @alm
2019-10-29 23:41:17 +11:00
bcac0ed977 Fix T70913: OpenCL Compiler Errors
Reverting part of a clean up that was done 6 months ago. The
consequence was that OpenCL compositing wasn't working since
then.
2019-10-29 09:40:29 +01:00
51ac654b3f Merge branch 'blender-v2.81-release' 2019-10-29 19:30:24 +11:00
7cc489a2c8 Error in last commit 2019-10-29 19:29:38 +11:00
7d7bd02ea7 Cleanup: quiet TBB deprecation warning 2019-10-29 19:25:08 +11:00
Stefan Werner
2dab4393b0 macOS: Allow NSView subclasses to accept first mouse event.
This brings the behavior in line with Windows and Linux. Going between
multiple windows now doesn't use the first click only to change focus
but also allows Blender to process those events.
2019-10-28 22:19:00 +01:00
Julian Eisel
fb3add54d9 Merge branch 'blender-v2.81-release'
Had conflicting changes from b546263642 and 7c1fbe24ca, but the
changes from the former have to be used.
2019-10-28 19:43:59 +01:00
Julian Eisel
7c1fbe24ca Fix T71019: Disappearing file thumbnails & crash on area split
When opening the file browser as regular editor, the ID filter flags
as stored in FileSelectParams were not set explicitly, so they were 0.
Since 9100982e80, the value actually passed to the filtering could
differ from that, causing the file list cache to be constantly updated
on every redraw.

Caused by 9100982e80.

Note that this "accidentially" got fixed in master with b546263642,
which is why the issue only showed up in the release branch from that
point.
2019-10-28 19:34:41 +01:00
1ed46bf727 Keymap: use Alt, Spacebar to set the cursor tool
There were no shortcuts for setting the 3D cursor.
2019-10-29 05:30:14 +11:00
5a481e41ce Merge branch 'blender-v2.81-release' 2019-10-29 04:51:35 +11:00
43a8fdb6ad UI: add icon for drawing space key
Drawing was already added, only the icon was missing.
2019-10-29 04:50:04 +11:00
e38a00f981 Merge branch 'blender-v2.81-release' 2019-10-29 03:47:10 +11:00
c050247edc CMake: update cmake_consistency_check
Support for listing files which are known not to exist
(needed by standalone cycles).
2019-10-29 03:46:50 +11:00
9267e6275c PyAPI: change behavior of bpy.path.module_names
Instead of checking for names that contain ".", only skip files
that start with a "." (since they're used for ".git" & ".arcconfig").

While other path names may fail to import, it's not the purpose of this
function to validate the path, have the caller must raise an error
instead of silently skipping them.

See D6140.
2019-10-29 02:14:53 +11:00
d310cbfa0f Merge branch 'blender-v2.81-release' 2019-10-29 01:38:34 +11:00
312075e688 CMake: add missing headers, use space before comments 2019-10-29 01:33:44 +11:00
Julian Eisel
74c9a4769e Fix: Some ID-Filters not enabled on Link/Append
Caused by 9100982e80.
2019-10-28 15:19:26 +01:00
1bde6c04f9 Merge branch 'blender-v2.81-release' 2019-10-29 00:46:59 +11:00
f5ebe8395d Cleanup: correct argument type mismatch
Add transform_snap.h header which includes DNA enum.
2019-10-29 00:45:05 +11:00
9cd0e75fff Merge branch 'blender-v2.81-release' 2019-10-28 09:54:35 -03:00
ce0db668ec Fix T50148: Header: Wrong rounding when moving frames
Deduplicate the code and use the same logic used to
calculate individual elements in `t->values_final[0]`.

Differential revision: https://developer.blender.org/D6135
2019-10-28 09:51:53 -03:00
a83bbefec6 Cleanup: use doxy sections for transform_snap 2019-10-28 09:32:59 -03:00
de152d0724 Tool System: Use tapping Alt as a leader key to switch tools
Now tapping Alt prompts for a second input to switch tools.

Initial implementation of T69992
2019-10-28 22:59:59 +11:00
df9f1d91da UI: use zero box-spacing when used in headers
Without this, boxes are unusable in header layouts as they
add vertical space which shifts the items out of the header.
2019-10-28 22:40:12 +11:00
23f4c3b126 Merge branch 'blender-v2.81-release' 2019-10-28 21:42:53 +11:00
88911e4664 Keymap: use Ctrl-F2 for batch rename
Alt-F2 conflicted for Gnome on Linux,
change the keymap since it doesn't conflict on macOS or Windows.

Resolves T70480
2019-10-28 21:38:56 +11:00
c2870e157e Merge branch 'blender-v2.81-release' 2019-10-28 11:05:04 +01:00
a2bfd28d5e Fix T71150: GPencil: Wrong Naming of Convert GP object to Meshes
The problem was the real menu text must be: `Convert to Polygon Curve` as is Object menu.

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

Differential Revision: https://developer.blender.org/D6122
2019-10-28 10:27:06 +01:00
dd904f6761 WM: add utility to lookup a keymap item from an event
Useful for modal operators to be able to match events
against regular keymaps.
2019-10-28 04:59:35 +11:00
ae55523013 UI: add utility to show icons for the keymap item
This is useful for drawing keymap items into the header or status bar

While these icons are available directly,
mapping them from the keymap item isn't trivial.
2019-10-28 02:57:56 +11:00
c036db9f57 Merge branch 'blender-v2.81-release' 2019-10-28 00:44:31 +11:00
9b6aa740be Cleanup: remove redundant NULL checks 2019-10-28 00:40:51 +11:00
1e630d79fb Merge branch 'blender-v2.81-release' 2019-10-27 10:05:43 +01:00
f1824e6ec4 Cleanup: Fix tooltip text 2019-10-27 10:05:08 +01:00
1aa1716924 Merge branch 'blender-v2.81-release' 2019-10-25 21:50:48 +11:00
7137d89daa Preferences: remove keymap items created with invalid data path
Before T65397 was fixed, invalid "(null)" data paths were being created.

Remove these keymap items from preferences.
2019-10-25 21:47:16 +11:00
2a3b5dc730 Merge branch 'blender-v2.81-release' 2019-10-25 06:11:47 +11:00
892c3891ed UI: partial revert of renaming Normal -> Regular
These instances refer to winding/direction.
2019-10-25 06:00:46 +11:00
e50b4d7de4 UI: Incorrect Cursor Used in Split Area Operator
Incorrect cursor shown for horizontal split when selected from edge context menu.

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

Reviewed by Campbell Barton
2019-10-24 09:17:55 -07:00
0c66039cfd Merge branch 'blender-v2.81-release' 2019-10-25 01:27:20 +11:00
ad3f9c6dfe Fix crash drawing the paint cursor over the redo region
Also fix CTX_wm_region_view3d which didn't check the region type.
2019-10-25 01:25:23 +11:00
b35c14f015 Merge branch 'blender-v2.81-release' 2019-10-25 00:53:42 +11:00
ce6e7a0941 Fix T60689: Flip Active/Selected bone fails in weight paint mode
Multiple selection operations failed with weight-paint + pose mode.

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

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

Previous behavior felt unnatural when adding gizmos to these tools.
2019-10-24 17:56:40 +11:00
ac788b3d6d Merge branch 'blender-v2.81-release' 2019-10-24 15:30:58 +11:00
9be3ef6c72 Fix T71036: Separate loose parts crashes in object mode
Error in own recent optimization.
2019-10-24 15:29:09 +11:00
Dalai Felinto
9aa1bb6388 Fix T70439: Local view always including new objects
The same issue is valid for objects from a recently re-enabled
collection.
2019-10-23 13:40:12 -03:00
d212fb774f Cleanup: add back comment that was removed when moving code
Keep comments when moving code between files.

Also wrap lines over 120 width.
2019-10-24 00:42:53 +11:00
976a2ce58b Merge branch 'blender-v2.81-release' 2019-10-23 15:03:37 +11:00
b9dd87f0cb Doxygen: update configuration
Quiet warnings when generating docs.
2019-10-23 15:02:52 +11:00
3e3e5fd9c8 Merge branch 'blender-v2.81-release' 2019-10-23 14:59:44 +11:00
Richard Antalik
0d8df07232 Fix T70845: Crash when switching scene of scene strip.
Crash on assert in `sound_verify_evaluated_id()`

Reviewed By: sergey

Maniphest Tasks: T70845

Differential Revision: https://developer.blender.org/D6104
2019-10-23 14:58:48 +11:00
4dc443908c CMake: disable OpenMP on macOS bpy_module config
This gives linking errors on build.
2019-10-23 14:50:42 +11:00
Richard Antalik
15d27c1ae5 Fix T70845: Crash when switching scene of scene strip.
Crash on assert in `sound_verify_evaluated_id()`

Reviewed By: sergey

Maniphest Tasks: T70845

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

Now adding shortcuts will be disabled if the path can't be computed.
2019-10-21 19:57:43 +11:00
3af8f88539 Merge branch 'blender-v2.81-release' 2019-10-21 19:20:35 +11:00
34c835cbd1 Fix project from view crash before the GPU is initialized 2019-10-21 19:19:04 +11:00
95fddf1452 Merge branch 'blender-v2.81-release' 2019-10-21 15:07:22 +11:00
41ec25d27b Cleanup: style 2019-10-21 15:05:56 +11:00
7fa8c41693 Merge branch 'blender-v2.81-release' 2019-10-21 14:51:29 +11:00
3ceff8b7bc CMake: fix building as a Python module on macOS
Caused by c553b790fc
2019-10-21 14:48:17 +11:00
7242d79072 Merge branch 'blender-v2.81-release' 2019-10-21 02:58:45 +11:00
71538eaad6 Fix T70864: Separate loose parts runs indefinitely
Large objects with many separate pieces became unstably slow
(run for hours and not finish).

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

In own tests, millions of vertices and thousands of loose parts
now run in around 5-15 seconds.
2019-10-21 02:47:07 +11:00
47d7f5e200 Shrinkwrap: improve numerical stability of Target Normal Project.
* Add proper adjustment for scale in the solver epsilon computation.
* Run at least one full iteration of the solver, even if the initial
  state meets the epsilon requirement.
* When applying offset, blend normal into the offset direction
  as the initial point moves very close to the target mesh.

Also random improvements to debug trace output in the console.
2019-10-20 16:53:21 +03:00
fed27c25aa Merge branch 'blender-v2.81-release' 2019-10-20 18:26:11 +11:00
98ab0f173c Mesh: add API functions for poly & loop removal
These existed for verts & edges, add for API completeness.
Also add ED_mesh_geometry_clear,
needed to reduce memory for edit-mesh separate.
2019-10-20 18:25:17 +11:00
b72a3146eb Merge branch 'blender-v2.81-release' 2019-10-20 16:43:57 +11:00
047c66279a Cleanup: missing declaration warnings 2019-10-20 16:42:49 +11:00
Charlie Jolly
c2a2cd13be GPencil: Primitive: Polyline Tool
T70927

Maniphest Tasks: T70927

Differential Revision: https://developer.blender.org/D6097
2019-10-19 12:27:40 +01:00
3de4446959 Merge branch 'blender-v2.81-release' 2019-10-18 16:43:09 +02:00
970d7ed860 Fix T70790: Crash in sculpt mode switching from two meshes after reload saved file
This fixes the crash, but it does not fix the core issue. The PBVH should
always be available when an object is in sculpt mode and tools should
not need to check for that.

Reviewed By: jbakker

Maniphest Tasks: T70790

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

Maniphest Tasks: T70839

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

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

Maniphest Tasks: T70903

Reviewed By: campbellbarton

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

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

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

Addresses concern raised in rBcf2c09002fae.

Reviewed By: sergey

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

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

Thanks to sebbas for part of the patch!

Reviewed By: sebbas, fclem

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

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

Thanks to sebbas for part of the patch!

Reviewed By: sebbas, fclem

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

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

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

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

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

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

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

Also fixed the same problem when onion and multiedit is enabled.
2019-10-16 21:56:25 +02:00
51429343a5 Merge branch 'blender-v2.81-release' 2019-10-16 20:18:17 +02:00
7e78fbf2de Fix assert and memleak in recent Skin Root Display patch
Caused by 4ddf3215a7
2019-10-16 20:16:53 +02:00
bb890d4f65 Merge branch 'blender-v2.81-release' 2019-10-16 19:06:22 +02:00
131ac2ec82 Fix T70249 EEVEE: Light bleeding on SSS translucency
This was caused by 2 things: Shadow map bias and aliasing.

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

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

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

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

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

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

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D6056
2019-10-16 15:40:25 +02:00
e413b39a93 PyAPI: use public API's for module & builtin access
D6038 by @Dormouse
2019-10-16 23:16:51 +11:00
87539172ed Cleanup: warnings 2019-10-16 23:16:51 +11:00
Julian Eisel
b546263642 UI: Remember ID-Filter in-between File Browser calls
This adds the ID-Filters visible on append/link to the settings the file
browser remembers, potentially storing them in the Preferences.

Artists in the studio here requested this. They typically have to set up
the same or similar settings every time, so this saves them from that.
2019-10-16 14:06:48 +02:00
Julian Eisel
a3f7ae1b96 UI: Add missing workspace icon to link/append ID-Filters 2019-10-16 11:29:27 +02:00
Julian Eisel
a6b9e1dfdb Fix: Some ID-Filters not enabled on Link/Append
Caused by 9100982e80.
2019-10-16 11:26:04 +02:00
dcf57e34f3 GPencil: Fix unreported problem when use Onion Skin in several windows
The onion skin was nos displayed in secondary screens when disable the Onion switch or the Overlay in the main window.

Added a check to verify if the main overlay and onion switches are enabled in any screen in order to generate the cache data.

This is required to generate the onion skin and limit the times the cache is updated because the cache is generated only in the first screen and if the first screen has the onion disabled the cache for onion skin is not generated. The loop adds time, but always is faster than regenerate the cache all the times.

Reviewed By: mendio, pepeland

Differential Revision: https://developer.blender.org/D6049
2019-10-16 10:33:39 +02:00
Stefan Werner
35a545b752 Cycles: Allow PTX targets for CUDA kernel build.
This is intended for developers on Windows primarily:
Now, CUDA architectures of type compute_xx are supported. This allows for quicker builds,
at the expense of the CUDA driver running ptxas the first time a kernel is loaded.

Differential Revision: https://developer.blender.org/D5953
2019-10-16 10:29:04 +02:00
76e8d2cc17 Merge branch 'blender-v2.81-release' 2019-10-16 19:15:52 +11:00
80f0bc99a9 Fix T70850: Scene.frame_set doesn't update camera from markers 2019-10-16 19:10:28 +11:00
4a77ddf146 Merge branch 'blender-v2.81-release' 2019-10-16 09:40:56 +02:00
0dcc5572d6 Fix (unreported) VSE scene strip should not be able to set the scene to
self

Spotted while looking into T70845

Reviewers: sergey, ISS, campbellbarton

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

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

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

Reviewed By: mont29

Maniphest Tasks: T70667

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

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

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

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

Reviewers: campbellbarton, ISS

Maniphest Tasks: T68700

Differential Revision: https://developer.blender.org/D5495
2019-10-15 10:06:14 +02:00
fba127619d Merge branch 'blender-v2.81-release' 2019-10-15 09:48:54 +02:00
fa76f08db5 Fix T70560: Large cones are created with double vertices (even though
the radius is zero)

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

Reviewed By: campbellbarton

Maniphest Tasks: T70560

Differential Revision: https://developer.blender.org/D6001
2019-10-15 09:46:59 +02:00
23b3b5bc76 Merge branch 'blender-v2.81-release' 2019-10-15 18:29:42 +11:00
7fb12536b7 UI: increase precision for fps-base value
The default precision displayed 1.001 as 1.00,
leading to confusing final FPS values.

Fixes T70827
2019-10-15 18:25:49 +11:00
e2e95d56ff Merge branch 'blender-v2.81-release' 2019-10-15 17:30:07 +11:00
0500dcd711 Fix scan-fill normal flipping for displist & mask filling
Missed from fix for T70594 which reversed the normals,
Resolves T70809
2019-10-15 17:23:23 +11:00
364c1f4222 Merge branch 'blender-v2.81-release' 2019-10-15 15:21:09 +11:00
4fcdcbe38d Cleanup: pep8 for templates 2019-10-15 15:20:15 +11:00
52ccfdb953 Merge branch 'blender-v2.81-release' 2019-10-15 14:22:52 +11:00
46102cf4e0 Fix T70812: AppTemplate Splash image is not loading
Allow different splash heights, without this changes the the
default splash would stop app templates splash screen from loading.

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

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

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

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

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

Differential Revision: https://developer.blender.org/D6033
2019-10-14 22:45:33 -03:00
b2d83a0697 Merge branch 'blender-v2.81-release' 2019-10-15 12:29:45 +11:00
a9fbd05e7d Fix image undo restoring float/byte tiles into the wrong buffer type
This also resolves the (unlikely) issue of undo having uninitialized
zbuf data, now it's cleared instead.
2019-10-15 12:24:26 +11:00
c1db52def2 Merge branch 'blender-v2.81-release' 2019-10-15 12:06:11 +11:00
c412a54123 Docs: clarify writefile.c file format info 2019-10-15 12:04:59 +11:00
100af18955 Docs: clarify writefile.c format text 2019-10-15 12:02:40 +11:00
695cbf5eef Fix incorrect brush falloff flag use
Harmless currently since they're the same value,
would fail if other options were added.
2019-10-15 10:04:34 +11:00
Julian Eisel
9a85592dde Fix: First item in File Browser can't be renamed
Stupid mistake in 5edfde58fe.
2019-10-14 21:07:24 +02:00
519891c669 Merge branch 'blender-v2.81-release' 2019-10-14 18:48:16 +02:00
879d269e87 Py API doc generator: more tweaks to adapt to new release process.
Now we also create a 'version' symlink for master.
2019-10-14 18:46:50 +02:00
Julian Eisel
f55a5478e8 Merge branch 'blender-v2.81-release' 2019-10-14 18:16:54 +02:00
5ba41bea8a Fix autokeyframe not working on bones mirrored bones
The previous code for this didn't work as the MIRROR bone flag would be
cleared before the autokeyframe code was run.
2019-10-14 18:16:21 +02:00
Julian Eisel
760481518b UI: Add renaming to Node and VSE strip context menu
We should have that consistently everywhere the operation is available.
2019-10-14 18:13:58 +02:00
b8ca806b77 Fix autokeyframe not working on bones mirrored bones
The previous code for this didn't work as the MIRROR bone flag would be
cleared before the autokeyframe code was run.
2019-10-14 17:48:08 +02:00
2cdc187142 Merge branch 'blender-v2.81-release' 2019-10-14 17:40:06 +02:00
15539f7b6d Py API doc generator: tweak to handle new release process.
We need to handle beta stage in a specific way, since it's no longer
master, but not yet 'real' rc/release stage...

For now, only point to version dir of the API doc, but no need to create
any symlink (that way, 'current' remain pointing to 2.80 release, while
'2.81' is no longer a symlink to 'master', but its own actual doc).
2019-10-14 17:39:17 +02:00
6b6b27fd13 Update Py API link in help menu to point to version dir also in beta.
Now that we have beta and master in parallel, we cannot point to API doc
from master in beta builds of incoming release anymore.
2019-10-14 17:39:17 +02:00
Julian Eisel
5edfde58fe File Browser: Add F2 shortcut to rename files
Previously, we used Ctrl+Click for renaming, but since that shortcut is
now consistently used to add items to the selection, we can't use that.
In other cases we switched to F2 now, so it makes sense for the File
Browser too.
Further, AFAIK renaming was only possible through the context menu,
which makes it hard to discover in the right click select keymap (have
to press W).

Note that I had to do some internal changes to ensure the context menu
always acts on the clicked/hovered item, while the shortcut operates on
the active item. William and I agreed that this is likely the behavior
expected by most users.
2019-10-14 16:32:18 +02:00
ac52a53628 Merge branch 'blender-v2.81-release' 2019-10-14 15:56:58 +02:00
841e969580 GPencil: Fix unreported duplicated brushes
The eraser and fill brushes were duplicated due a bug introduced by versioning code.
2019-10-14 15:53:39 +02:00
df0ec670fb Merge branch 'blender-v2.81-release' 2019-10-14 15:46:52 +02:00
Julian Eisel
80fe0ac7ff Fix T70581: Node Wrangler output switching broken
When executing the node selection operator through Python, or in fact
any similar select operator with drag-all-selected support, the operator
was enabling modal execution, which should not be done in this case.
Reason was simply a wrong default for an internal property.
2019-10-14 12:11:13 +02:00
0fb55ff845 Fix T70787: Duplicating objects with custom property of type ID creates bogus links.
Note that the issue also affected animdata handling...

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

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

{F7798605}

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

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

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

Toolbar:

{F7718606}

Reviewed By: brecht, mendio

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

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

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

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

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

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

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

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

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

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

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

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

This patch includes code contributed by Kris (Metricity).

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

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

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

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

Differential Revision: D6021

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

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

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

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

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

Reviewed By: dfelinto

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

To fix this, we use fromnode instead of tonode.

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

Reviewed By: brecht

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

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

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

Reviewed By: jbakker

Maniphest Tasks: T70544

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

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

Reviewed By: jbakker

Maniphest Tasks: T70554

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

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

Fixes T70521

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

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

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

Design task: T61327

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

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

Reviewed by: brecht (thank you)

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

Reviewed By: sergey

Maniphest Tasks: T69682

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

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

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

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

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

Now remember if rotation changed at any time.

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

Reviewed By: dfelinto

Maniphest Tasks: T70585

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

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

Gives extra speedup with a file mentioned in the report.

Reviewed By: brecht, mont29

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

Reviewed By: zeddb

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

Reviewed By: ISS, sergey

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

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

Maniphest Tasks: T70463

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

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

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

Reviewed By: brecht

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

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

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

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

Reviewed By: brecht

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

Maniphest Tasks: T70387

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

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

Reviewed By: brecht, pablodp606

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

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

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

Reviewed By: jbakker, brecht

Maniphest Tasks: T70573

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

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

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

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

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

Reviewed By: fclem

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

Ref T70418

Reviewed By: mont29

Maniphest Tasks: T70418

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

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

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

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

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

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

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

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

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

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

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

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

Reviewed By: Sybren, Hjalti

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

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

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

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

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

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

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

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

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

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

Reviewed By: brecht

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

Reviewers: brecht

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

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

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

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

Maniphest Tasks: T70454

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

Reviewed By: brecht

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

Maniphest Tasks: T70499

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

Reviewers: brecht

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

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

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

Reviewed By: Brecht

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reviewed by: brecht

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

Maniphest Tasks: T70299

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

Maniphest Tasks: T66312

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

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

Maniphest Tasks: T69227

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

Maniphest Tasks: T70102

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

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

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

Reviewed By: brecht

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

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

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

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

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

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

Patch contributed by Paul (Thirio).

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

Reviewed By: brecht

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

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

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

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

Maniphest Tasks: T70358

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

Reviewed By: brecht

Maniphest Tasks: T70310

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

Maniphest Tasks: T70324

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

Reviewed By: billreynish

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

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

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

Reviewed By: fclem

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

Reviewed By: brecht

Maniphest Tasks: T70443

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

Maniphest Tasks: T70441

Reviewed By: fclem

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

Reviewed By: fclem

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

Reviewed By: brecht

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

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

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

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

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

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

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

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

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

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

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

Reviewed By: brecht

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

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

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

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

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

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

Reviewers: campbellbarton

Maniphest Tasks: T70376

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

Reviewed by: angavrilov

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

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

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

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

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

Reviewers: brecht, #user_interface, billreynish, campbellbarton

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

Maniphest Tasks: T69460

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

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

Reviewed By: brecht

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

Maniphest Tasks: T70385

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

Reviewed By: brecht

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

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

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

Reviewed By: brecht

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

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

This commit makes the following changes:

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

Reviewed by: Brecht

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

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

This reverts commit 7c6c5b40ca.

Reviewed By: brecht

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

Reviewed By: billreynish

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

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

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

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

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

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

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

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

Ref T70295

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

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

Ref T70295

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

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

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

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

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

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

Reviewed by: Brecht Van Lommel

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

Reviewed By: billreynish, brecht

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

Reviewed By: brecht

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

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

Reviewed By: jbakker

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

Maniphest Tasks: T70291

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

Reviewed By: brecht

Maniphest Tasks: T56497

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

Maniphest Tasks: T70280

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

Reviewed By: jbakker

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

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

Reviewers: brecht, mendio

Reviewed By: brecht

Subscribers: pepeland, mendio

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

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

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

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

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

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

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

Reviewers: brecht

Maniphest Tasks: T70276

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

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

Reviewers: JacquesLucke

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

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

Reviewers: sergey

Maniphest Tasks: T68645

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

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

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

Reviewers: sergey

Maniphest Tasks: T69488

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

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

Reviewed By: jbakker

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

Reviewed By: jbakker

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

Reviewed By: jbakker, brecht

Maniphest Tasks: T68745

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

Reviewed By: billreynish

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

Reviewers: mano-wii

Reviewed By: mano-wii

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

Reviewers: jacqueslucke

Maniphest Tasks: T70259

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

Spotted while looking into T70259

Reviewers: JacquesLucke

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

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

Also fixes misnamed vertical and horizontal split cursors.

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

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

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

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

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

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

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

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

Reviewed By: Sybren

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

This commit uses several processes to get better endings:

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

Reviewed By: fclem

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

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

Reviewed by: angavrilov

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

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

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

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

Reviewers: brecht

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

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

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

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

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

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

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

Reviewed By: brecht

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

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

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

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

Reviewed by: sergey

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

{F693806}

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

Reviewers: keir, brecht, Severin

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

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

Reviewers: sergey

Maniphest Tasks: T66555

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

Maniphest Tasks: T70140

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

Maniphest Tasks: T69875

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

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

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

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

Reviewed By: brecht

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

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

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

Fixes T64739: incorrect texture space for various modifiers

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

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

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

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

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

Cleanup: Node Shader Tree: Remove GPUmaterial special nodegroup handling

Reviewers: brecht

Reviewed By: brecht

Maniphest Tasks: T69672

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

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

Reviewed By: JacquesLucke

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

Reviewed By: campbellbarton

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

Author: mdewanchand

Reviewed By: ISS

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

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

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

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

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

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

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

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

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

Fixes T70103: can't select extruded Vertex

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

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

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

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

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

part of T69957

Reviewers: jbakker

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

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

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

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

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

coop with @sergey, thx.

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

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

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

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

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

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

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

Includes a unit test for the above heuristic.

Reviewed by: jbakker

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

Reviewers: brecht

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

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

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

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

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

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

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

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

Fixes T64739: incorrect texture space for various modifiers

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

Reviewers: campbellbarton

Maniphest Tasks: T68852

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

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

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

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

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

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

Reviewers: mont29, campbellbarton

Reviewed By: mont29, campbellbarton

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

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

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

Reviewed By: brecht

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

Reviewers: pablodp606, jbakker, mano-wii

Maniphest Tasks: T70006

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

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

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

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

Reviewers: sergey

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

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

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

Maniphest Tasks: T69984

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

Reviewed By: jbakker

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

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

Reviewers: brecht

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

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

part of T69957

Reviewers: jbakker

Maniphest Tasks: T69957

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

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

Reviewers: jbakker

Maniphest Tasks: T69687

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

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

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

Reviewed By: jbakker

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

Reviewed By: jbakker

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

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

Reviewed By: brecht

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

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

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

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

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

Reviewers: fclem

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

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

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

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

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

The problem:

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

Who's fault is this:

Ours, C99 Spec says

```
7.1.3 Reserved identifiers

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

...

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

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

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

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

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

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

Author: gdquest

Reviewed By: ISS

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

Reviewed By: brecht

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

Reviewed By: brecht

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

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

Reviewers: brecht

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

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

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

part of T69741

Reviewers: fclem

Maniphest Tasks: T69741

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

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

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

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

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

Reviewers: brecht, sergey
Subscribers: billreynish

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

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

Maniphest Tasks: T69816

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

Maniphest Tasks: T69804

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

Reviewers: billreynish, mano-wii

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

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

Same code as done in 'Set Vertex Colors'.

reported in T69835

Reviewers: brecht

Maniphest Tasks: T69835

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

part of T69741

Reviewers: sergey

Maniphest Tasks: T69741

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

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

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

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

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

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

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

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

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

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

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

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

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

Design: @mendio

Subscribers: mendio

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

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

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

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

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

Reviewers: mano-wii

Subscribers: mano-wii

Maniphest Tasks: T69752

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

Reviewers: brecht

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

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

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

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

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

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

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

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

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

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

Stack: A stack implemented on top of a vector.

Vector: An array that can grow dynamically.

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

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

Additionally, most methods have unit tests.

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

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

Reviewed By: brecht

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

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

And it removes the following three modes of operation:

- F3.
- F4.
- Cracks.

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

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

Reviewers: brecht, JacquesLucke

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

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

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

Reviewers: mont29, brecht

Maniphest Tasks: T69582

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

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

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

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

Reviewed By: brecht

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

Reviewed By: brecht

Maniphest Tasks: T69737

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

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

Reviewers: campbellbarton

Reviewed By: campbellbarton

Subscribers: ThatAsherGuy

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

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

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

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

Reviewers: sergey

Maniphest Tasks: T59143

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

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

Reviewers: sergey

Maniphest Tasks: T69558

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

Maniphest Tasks: T69722

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

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

Reviewed By: brecht

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

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

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

Reviewed By: brecht

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

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

Reviewers: brecht

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

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

Reviewers: brecht

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

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

Reviewers: brecht

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

Reviewers: brecht

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

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

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

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

Maniphest Tasks: T69729

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

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

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

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

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

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

Reviewed By: brecht

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

Reviewed By: brecht

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

Reviewers: brecht

Maniphest Tasks: T69702

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

Reviewed By: brecht

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

Reviewed By: brecht

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

Reviewers: jbakker

Maniphest Tasks: T69651

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

Reviewers: brecht

Maniphest Tasks: T69432

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

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

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

Reviewed By: brecht

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

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

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

Reviewed By: brecht

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

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

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

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

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

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

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

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

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

Reviewed By: brecht

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

Reviewed by: Campbell Barton

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

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

Reviewed By: brecht

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

Reviewed By: brecht

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

Reviewers: mendio, pepeland

Reviewed By: mendio, pepeland

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

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

Reviewed By: brecht

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

Reviewers: brecht

Maniphest Tasks: T69663

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

- DNA_struct_default_get(name)
- DNA_struct_default_alloc(name)

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

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

Reviewed By: brecht

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

It seems to work fine in practice.

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

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

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

Part of solving T69526.

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

Reviewers: campbellbarton

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

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

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

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

Reviewers: brecht

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

{F7719513}

Reviewers: mendio, pepeland

Reviewed By: mendio

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

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

Reviewed By: fclem, #gpu_viewport

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

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

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

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

Reviewers: brecht

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

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

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

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

Reviewers: brecht, JacquesLucke

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

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

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

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

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

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

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

Reviewed By: brecht, fclem

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

Reviewers: brecht

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

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

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

The Python use_offset property is replaced with compatibility stubs.

Reviewers: brecht

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

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

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

Doing this would require moving the panel to C.

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

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

Instead we can check if the directory is empty.

Reviewers: mont29

Reviewed By: mont29

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

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

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

Reviewers: brecht, lichtwerk

Reviewed By: brecht, lichtwerk

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

Reviewers: brecht

Maniphest Tasks: T68840

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

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

Reviewers: brecht

Reviewed By: brecht

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

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

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

Reviewers: antoniov, pepeland

Tags: #bf_blender, #grease_pencil

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

Reviewers: brecht

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

Reviewers: brecht

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

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

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

Reviewers: billreynish

Maniphest Tasks: T69522

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

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

Reviewers: fclem, sergey

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

Reviewed By: billreynish

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

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

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

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

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

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

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

Fixes T65038, T59742 (possibly others)

Reviewers: brecht

Maniphest Tasks: T65038, T59742

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

Reviewers: brecht

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

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

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

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

Reviewers: brecht, JacquesLucke

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

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

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

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

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

Reviewed By: brecht, fclem

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

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

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

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

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

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

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

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

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

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

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

* None: completely remove scale and shear.

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

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

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

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

Reviewers: brecht

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

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

Reviewed By: fclem

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

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

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

Reviewers: antoniov, pepeland

Tags: #bf_blender, #grease_pencil

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

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

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

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

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

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

Reviewers: brecht

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

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

----

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

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

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

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

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

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

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

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

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

----

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

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

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

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

Reviewed By: fclem, campbellbarton

Differential Revision: https://developer.blender.org/D5629
2019-09-03 14:09:44 +02:00
Lucas Boutrot
97f7f5fdbb Fix T69384: Noise Depth widgets steps set to 0
Reviewed By: brecht, lichtwerk

Maniphest Tasks: T69384

Differential Revision: https://developer.blender.org/D5652
2019-09-03 13:42:43 +02:00
21c099c5be Fix compiler warning after recent change to splash screen version 2019-09-03 13:05:55 +02:00
a620501acb Fix T62152: Shear X and Y are swapped 2019-09-03 20:36:31 +10:00
85b1506c6e Fix Credits link not working in About menu 2019-09-03 12:35:17 +02:00
81849e7c9d Buildbot: support building releases, make non-releases more consistent
* Auto detect rc and release version cycle in BKE_blender_version.h.
* On Windows, generate zip and installer if a release is detected.
* On macOS, always generate a dmg instead of zip.
* Use standard package names without hash if a release is detected.
* Buildbot package names now match platform names in releases.

Ref T67056

Differential Revision: https://developer.blender.org/D5643
2019-09-03 12:23:39 +02:00
ad5e91a107 Subsurf: Show error when Blender is built without OpenSubdiv 2019-09-03 11:45:52 +02:00
42478436ae Add OpenSubdiv information to bpy.app
Allows to customize interface and inform about lack of
subdivision surface support.
2019-09-03 11:45:52 +02:00
5ea6545ad5 Fix library link errors after building with install_deps.sh on Ubuntu
On some systems this would use the builtin echo command without support for
the -e option.

Thanks Alexander Gavrilov for helping find this.
2019-09-03 11:20:29 +02:00
9be138bf63 Fix empty image wire drawing with front/back depth
The vertex shaders depth offset was ignored in this case.
2019-09-03 19:16:37 +10:00
65db18fc56 Fix T68868: Assert in depsgraph debugging logs
Was happening when tagging for LEGACY_0 was used.
2019-09-03 11:06:41 +02:00
abfb8b6963 3D View: option only to show axis aligned image empties
Useful for using reference images that only make sense to see
in aligned axis-views.

This restores functionality possible with 2.7x background images.
See: T52668.
2019-09-03 19:01:27 +10:00
8a7a7af627 Fix T69326: Parent type ARMATURE doesn't work 2019-09-03 10:48:29 +02:00
841346df5d Depsgraph: Cleanup, more clear variable name 2019-09-03 10:43:40 +02:00
f45e55c9c8 Depsgraph: Cleanup comment 2019-09-03 10:43:05 +02:00
d74cc6c08c Drivers: add separators to the Transform Channel type enum menu.
It's hard to find things quickly in the wall of '...ation' without breaks.
2019-09-02 23:51:09 +03:00
d4a905fd85 UI: Fix Bug With Join Area Tolerance
Join area tolerance not properly checking all vertices on shared edge.

Differential Revision: https://developer.blender.org/D5662
2019-09-02 13:06:42 -07:00
47cde3292c Return proper RNA path in py console for 'private ID' data.
We can now generate a proper path here, make use of it.

Note: not sure how property pyrna path is supposed to be accessed? code is
similar to the struct pyrna path anyway...
2019-09-02 18:46:20 +02:00
6f1fa7aa25 Fix/enhance new RNA path from real ID helpers.
Main issue was that `rna_prepend_real_ID_path()` would return
nothing in case given path was NULL, when it should actually return the
`prefix` computed by `RNA_find_real_ID_and_path()` in that case...

Also make return `real_id` pointer optionnal, no reasons to make it
mandatory here. And some general naming fixes.
2019-09-02 18:43:43 +02:00
1fd5c90e63 DatablockManagement: Cleanup: get rid of BKE_collection_copy_master().
Now that we 'properly' support private ID data in lib management, there
is no reason anymore to have that custom func, badly named and
by-passing the whole generic ID management code.
2019-09-02 18:39:08 +02:00
99e8aeaa4a DatablockManagement: Fix/sanitize handling of flags for private ID data in copy functions.
Not sure exactly why that was working with nodetrees in depsgraph (could be some special
code in the despgraph), but we always want to allocate memory for the nodetrees here!
2019-09-02 18:39:08 +02:00
3850557073 Cleanup: get rid of BKE_collection_master() useless accessor.
In its current version that was a totally useless extra layer of crap
that we can totally avoid. Plus name was bad too.
2019-09-02 18:39:08 +02:00
0ebc76354f DatablockManagement: Cleanup logic of private IDs handling in BKE_libblock_copy_ex().
Now that we have the private ID data flag, we can be more simple *and*
generic here.
2019-09-02 18:39:08 +02:00
64efbbca8e Make Scene Master collection 'Private' ID data, like root nodetrees.
Same issue here as with root nodetrees, those are private ID data owned
by another ID, and not in Main DB. This requires special handling.

there are still quiet a few things to do here, like getting rid of
special code for master collection (regular ID copying should handle
that just as it already does for root nodetrees), cleanup in ID copying
code, etc.
2019-09-02 18:39:08 +02:00
283d96de11 Buildbot: refactor all build slave code
* Move common code into buildbot_utils.py
* Remove legacy code from removed builders
* Split code into smaller functions

Differential Revision: https://developer.blender.org/D5642
2019-09-02 17:37:22 +02:00
a565096109 GPencil: Add suport to Poly Curves to Convert to Strokes operator
The Poly curves were not supported when convert curves to grease pencil strokes, but now are supported.

Also, some code cleanup to make it more readable.
2019-09-02 17:24:05 +02:00
a3559a70dd Fix T69404: Merge by distance crash with Unselected
Error introduced when removing the automerge bmesh operator.
2019-09-03 00:35:22 +10:00
Julian Eisel
2356f60c62 UI: Don't show button context menu for drag-labels
While the vast majority of labels would never get a button context menu
(as opposed to the regular context menu of this region), draggable
labels would still reach code for such context menu creation. From what
I can tell only file browser icons/thumbnails and the properties editor
data path would be affected. The button context menu doesn't make sense
for them, so let the region context menu show up instead.

If at some point we want button context menus for specific labels, we
can make checks more granular.
2019-09-02 15:41:46 +02:00
591db72ee2 GPencil: New Strength mode for Opacity modifier
This new option applies the opacity using the strength of the stroke instead to use the alpha channel of the material.

Tested in greasepencil-object branch

{F7712796}

The vertex group filter has been removed because this filter is not logic in Material mode and must be valid only in Strength mode.

{F7713147}

Reviewers: pepeland, mendio

Reviewed By: mendio

Differential Revision: https://developer.blender.org/D5650
2019-09-02 13:31:37 +02:00
a6816bf5db CMake: De-duplicate test target name construction 2019-09-02 09:42:44 +02:00
b8be0557a7 Fix noisy GFlags warnings when building tests
Split include directories into regular and system ones, which
makes it so strict flags are properly cancelled out for GFlags
headers.
2019-09-02 09:42:44 +02:00
2c68d50421 CMake: Cleanup, unset temporary variables
Was happening in macros, polluting the namespace.

No functional changes, just making things cleaner.
2019-09-02 09:42:44 +02:00
7f2b4c871e WM: batch rename, regular expression support
Find/Replace can now use regular expressions.
2019-09-02 15:23:39 +10:00
928e0258fe GPencil: Set fill material when curve is 2D and has filling
Now the material is set as fill if the curve is 2D and is filled with a material. This is done in the Convert operator only, because the SVG add-on works totally different due the SVG has more parameters to determine the type of filling.
2019-09-01 22:47:23 +02:00
35bc4c2cf4 GPencil: Add Convert to Grease Pencil to context Object menu 2019-09-01 22:30:47 +02:00
8ca9626985 UI: Active Default Button Highlight
Buttons marked as the default action are shown in full selected color. Simplification of all the related active_default code.

Differential Revision: https://developer.blender.org/D5574

Reviewed by Campbell Barton
2019-09-01 09:40:28 -07:00
a9e389b8c4 WM: make find/replace default for batch rename
Use this since it's a common operation for batch naming.
2019-09-02 01:57:39 +10:00
6ff675f830 Fix transforming origin affecting unselected children 2019-09-02 01:39:34 +10:00
460e4024e8 WM: batch rename, material & object-data support 2019-09-02 00:58:39 +10:00
18d4ad5a59 Copy Rotation & Transform: add Euler order override options.
For reasons similar to drivers, it should be possible to set an
explicit Euler rotation order in constraints that use Euler angles.

The Transform constraint in a way approaches drivers in its use,
in that it effectively alters channels using values of other
channels after applying a fixed form mathematical expression.

For this reason, instead of just specifying the euler order for
its inputs, it uses the same enum as driver variables. However
Quaternion components are converted to a weighted pseudo-angle
representation as the rest of the constraint UI expects angles.
2019-09-01 14:13:23 +03:00
ae43b1d51b Fix T69364: GPencil Array Modifiers causes crash
This bug was introduced when adding the support for default materials.
2019-09-01 09:31:20 +02:00
883706395e Drivers: support accessing Quaternion rotation channels.
After adding the Euler order option, it's an easy addition to
the enum. The list of channels had of course to be expanded too.
2019-08-31 20:53:32 +03:00
a5b1231de7 WM: batch rename operator
Matches rename active, supports objects, bones, sequence strips & nodes.

Support chaining actions, these can be extended, initially support:

- set/prefix/suffix
- search replace
- stripping characters
- capitalization.
2019-09-01 03:36:00 +10:00
284e4d18be Fix non-functional return argument in new gpencil code
Also remove unused arguments.
2019-09-01 03:35:48 +10:00
ebafb46e4a Build: don't require svn to be available for "make update" when not used
Specifically on Linux, when not having a tests checkout.
2019-08-31 18:52:28 +02:00
505340202e Fix T66452: Convert Curve to Grease Pencil Strokes
This commit adds support to convert curves to Grease Pencil strokes and create the materials too.

Also, there is a new python API. This API is required by the modified SVG import addon to create strokes( see T67065).

All curves selected in one operation are converted in the same Grease Pencil object.
2019-08-31 17:48:44 +02:00
a098bd094c Build: use non-interactive svn commands for "make update"
Needed for buildbot, but interactively solving svn conflicts in the middle
of manual make update is also not ideal.
2019-08-31 15:52:11 +02:00
82ef1edce4 Drivers: support explicit euler rotation order for transform channels.
The meaning of the euler angles completely depends on the rotation
order. Currently the rotation order is taken from the target of the
driver variable, which somewhat makes sense if it uses euler, but if
it's quaternion, then the order is always set to XYZ.

Add a new option for the rotation channels of the Transform Channel
driver variables that defaults to the old behavior, but allows setting
an explicit rotation order.
2019-08-31 14:22:12 +03:00
9821dd72ba Cleanup: rename natural string comparison 2019-08-31 17:32:30 +10:00
e72053a201 Outliner: fix unnecessary syncing
Depending on the outliner display mode and the outliner dirty state,
a sync may not be needed on each draw. This commit adds a check
before syncing to prevent syncing when not needed.
2019-08-30 21:09:40 -06:00
82627c5016 Outliner: always sync object selection
This changes from-outliner selection syncing to always sync the
selection state of objects. This allows selecting objects while in
edit mode for parenting or adding hooks. This also fixes a few issues
where the sync algorithm would fail when no active object existed.
2019-08-30 20:47:27 -06:00
6726e98fe2 Cleanup: clang-format 2019-08-30 13:33:49 -06:00
6c16c2c233 MSVC: Fix BlendThumb debug build.
Spotted by @deadpin on chat
2019-08-30 13:27:56 -06:00
5b547932fa GPencil: Fix move_to_layer menu in Stroke context menu
Missing in previous commit
2019-08-30 20:53:01 +02:00
dacc773c29 make_deps: remove blendthumb
now in regular codebase.
2019-08-30 11:56:02 -06:00
74763d1ae8 Transform: use recalc geometry depsgraph tag
Better be specific with the data that needs updating.
2019-08-31 03:52:49 +10:00
a785835b2c Fix T69299: Transform origin & skip-children jitters 2019-08-31 03:42:37 +10:00
503716bb65 Cleanup: 2 space indentation 2019-08-31 03:42:37 +10:00
f430685d2d Windows: Fix compatibility with older cmake
Older cmake did not find the BlendThumb sub project.
2019-08-30 11:40:46 -06:00
d8bc28ca20 Fix possible crash with new sculpting cursor, due to stack overflow 2019-08-30 19:34:11 +02:00
c65febf396 Cleanup: Silence debug prints in readfile code.
Not sure since when that one has been enabled, but there is no reasons
to print all that for regular users...
2019-08-30 19:08:09 +02:00
0f3b910c3a Cleanup: redundant lowercase in BLI_natstrcmp 2019-08-31 02:40:34 +10:00
bed321f6da Cleanup: remove debug print 2019-08-30 18:13:10 +02:00
86b9470037 Tests: reorder render tests so cycles/eevee/workbench are not interleaved 2019-08-30 18:01:50 +02:00
718747c589 Tests: auto download test files when running "make test" 2019-08-30 18:01:50 +02:00
464e545c72 Tests: move "make test" on macOS and Linux to Python script 2019-08-30 17:57:18 +02:00
e218d8c24b Build: integrate make_update.py into Windows make.bat 2019-08-30 17:57:18 +02:00
fd48e17461 Buildbot: add script to update libraries and submodules
This is meant to replace the individual build steps for the various libraries
and submodules, so we can easily get the correct revisions associated with
different branches and releases.
2019-08-30 17:57:18 +02:00
53cd445785 Build: support updating for release branches in make_update.py 2019-08-30 17:57:18 +02:00
018fe9e006 Build: move "make update" on macOS and Linux to Python script
Differential Revision: https://developer.blender.org/D5545
2019-08-30 17:57:18 +02:00
410cde82e3 Fix "make deps" error when building deps with make and Blender with ninja 2019-08-30 17:57:18 +02:00
bb8a9a6f8b Fix BLI_array macro so can use BLI_strict_flags.h.
Was doing int comparision against size_t, so added casts.
2019-08-30 11:39:27 -04:00
OmarSquircleArt
8cd0da88e5 GPU: Split gpu_shader_material into multiple files.
This patch continue the efforts to split the `gpu_shader_material` file
started in D5569.

Dependency resolution is now recursive. Each shading node gets its own
file. Additionally, some utility files are added to be shared between
files, like `math_util`, `color_util`, and `hash`. Some files are always
included because they may be used in the execution function, like
`world_normals`.

Some glsl functions appeared to be unused, so they were removed, like
`output_node`, `bits_to_01`, and `exp_blender`. Other functions have
been renamed to be more general and get used as utils, like `texco_norm`
which became `vector_normalize`.

A lot of the opengl tests fails, but those same tests also fail in
master, so this is probably unrelated to this patch.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5616
2019-08-30 17:28:57 +02:00
ac646bc20d Cleanup: spelling 2019-08-31 01:21:42 +10:00
ec51355a47 UI: Outliner Natural Sort
Collection contents alphabetical sort now uses a Natural Sort that takes number magnitude into account.

Differential Revision: https://developer.blender.org/D5636

Reviewed by Brecht Van Lommel
2019-08-30 07:50:11 -07:00
e0c792135a Sculpt: New brush cursor, active vertex and normal radius
This commit includes the new brush cursor, active vertex updates and the normal radius brush property for all sculpt brushes.
  -The new brush cursor previews the real stroke radius over the mesh and the sampled sculpt normal.
  -The active vertex is used in sculpt tools and brushes as a starting point for an operation, similar to a preselection. It is also mirrored following the enabled symmetry options to preview the stroke symmetry.
  -The normal radius brush property limits the radius that is going to be used to sample the sculpt normal and area center. It controls how closely the cursor follows the surface and it improves the behavior of most brushes, making them suitable for hard surface sculpting.

Reviewed By: campbellbarton, brecht

Differential Revision: https://developer.blender.org/D3594
2019-08-30 16:46:20 +02:00
8a07ec582e Install_deps: Do not take sub-versions '6' numbers of RHEL/CentOS versions as main '6' version. 2019-08-30 16:40:26 +02:00
66ec72045f Windows: Move building of blendthumb into the blender codebase.
Previously this was done in the deps builder due to the fact we needed
both 32 and 64 bit versions of this dll and CMAKE does not support that
in a single build folder. Now that 32 bit support has been dropped, this
can be safely moved into the codebase.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5633
2019-08-30 08:40:08 -06:00
26c110f2d2 Cleanup: Fix typo error 2019-08-30 16:19:35 +02:00
93f1d76bf0 DrawManager: UV Stretching
Calculating UV Stretching on large meshes showed garbage. The reason
is that the calculation is not thread save. Temporarily disable
threading for UV Stretching
2019-08-30 16:16:57 +02:00
30d900934c UI: assert on invalid click-step for integer buttons
Avoids T69305 going by unnoticed.
2019-08-30 23:41:22 +10:00
a209681bee UI: Remove Colons From Number Fields
Removes the colon separating label and number inside some number fields.

Differential Revision: https://developer.blender.org/D5628

Reviewed by Brecht Van Lommel
2019-08-30 05:54:39 -07:00
f7b47ce16d Fix T69324: Console error in particle systems using "Follow Leader" boid
brain rule

Was missing from rna renaming in rBeee445590a29.
2019-08-30 14:33:45 +02:00
d5d3dc4189 GPencil: Use default material when slot material is empty
When a material slot is empty, the default material is used.

The default color used is Gray to get a good contrast in dense scenes with dark and white background.

Reviewers: brecht, dfelinto, mendio, pepeland

Differential Revision: https://developer.blender.org/D5625
2019-08-30 14:26:39 +02:00
4608220c9b Fix (unreported) 'Duplicate Particle System' operator not ensuring
unique name

This was leading to equally named particle systems, causing problems
later on.
Spotted while looking into T67958.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5632
2019-08-30 14:07:59 +02:00
b9ed30c25c Cycles: OpenCL Separate Compilation Debug Flag
OpenCL Parallel compilation only works inside Blender. When using cycles in a different setup (standaline or other software) it failed compiling kernels as they don't have the appropriate Python API and command line arguments.

This change introduces a `running_inside_blender` debug flag, that triggers out of process compilation of the kernels. Compilation still happens in subthread that enabled the preview kernels and compilation of the kernels during BVH building

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5439
2019-08-30 13:53:23 +02:00
040d075f17 GPencil: Fix unreported problem with Move to Layer popup
As the operator was designed to use only as popup, when it was used as menu option, the popup was displayed again.

Reviewers: mendio, pepeland

Differential Revision: https://developer.blender.org/D5630
2019-08-30 13:00:41 +02:00
44ace647a8 Fix interger number buttons increment/decrement arrows not working in
some cases

Since rB78b56fa7d973 defining a button with 'but->a1 = 0' wasnt
automatically setting its step value to 1 in 'ui_do_but_NUM' anymore.
Instead of handling this more forgiving in 'ui_do_but_NUM', went over
the remaining cases of buttons and and defined them with a step value of
1.

Fixes T69305

Reviewed By: brecht

Maniphest Tasks: T69305

Differential Revision: https://developer.blender.org/D5631
2019-08-30 12:45:38 +02:00
f033fa0fbc GPencil: Set active layer when click in Dopesheet keyframe area
Now, when clicking in the keys area, the layer is synchronized, not only in the left area with the names. This is one of the most requested feature by artists.

Also, removed some old comments.

Reviewers: brecht, angavrilov

Reviewed By: brecht

Subscribers: pepeland, mendio

Differential Revision: https://developer.blender.org/D5627
2019-08-30 11:58:02 +02:00
e33b4572af GPencil: Make visible active layer when hide others
To make more consistent the UI, when hide all other layers, the active layer is always set to visble.
2019-08-30 11:26:18 +02:00
cc49644551 Build: check necessary software is installed for make deps on macOS and Linux
To avoid errors deep into the build process. Fixes T69297.
2019-08-30 11:21:23 +02:00
a771fdb5dc Cleanup: clang-format, spelling 2019-08-30 10:55:31 +10:00
2fca31a5d6 Cleanup: no need to zero the area in beautify calculation
Also correct comment.
2019-08-30 10:50:06 +10:00
7c44182c4a GPencil: Minor Menu tweaks
- Added 'Hide Inactive Layers' operator and reordered 'Show/Hide' menu items
- Move 'New Layer' to bottom in 'Move to Layer' operator for consistency.
- Removed extra end points in some menu items (...)

Reviewers: antoniov, billreynish

Tags: #bf_blender, #grease_pencil

Differential Revision: https://developer.blender.org/D5626
2019-08-29 20:12:39 +02:00
33cd0535a0 Build: install_deps add lib64 paths for ldconfig
Building deps on some systems will install to opt/lib/library/lib64
directories rather than opt/lib/library/lib. This adds additional
lib64 paths for ldconfig to ensure the libraries are found at
runtime.
2019-08-29 11:15:43 -06:00
5c7852ef9c LibOverride: Create override operator: various fixes.
* `make_override_library_exec` was not properly cleaning `LIB_TAG_DOIT`
from all IDs in the Main DB.
* `BKE_override_library_create_from_tag` was doing dangerous things
(like iterating over a BMain listbase while adding items to it...).
* It would remap *all* local usages of overridden linked IDs to new
overriding local IDs, which was very inconvinient.

New handling of remapping now allows to only remap inside of the group
of IDs that is being overridden, in other words you can still have e.g.
other empties still instancing the same linked collection...
2019-08-29 18:11:12 +02:00
b9c400cee2 BKE_libblock_relink_ex: pass all remapping flags instead of a single boolean.
There is no reasons to limit access to remapping flags here, we may want
to use other options than only the ID_REMAP_SKIP_NEVER_NULL_USAGE one...
2019-08-29 18:11:12 +02:00
f4307d4bd9 LibOverride: Add entry to create a liboverride to object->relations menu. 2019-08-29 18:11:12 +02:00
497297850a Copy Scale: support copying arbitrary non-uniform scale as uniform.
Uniform scale is superior to non-uniform scale in that it works with
parenting without causing shear. Thus it is a valid desire in some
cases to turn arbitrary scale into guaranteed uniform scale.

Implementing this in the Copy Scale constraint allows one for instance
to 'inherit scale as uniform' by disabling Inherit Scale, and using
Copy Scale from parent with Offset and Make Uniform.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5614
2019-08-29 17:22:27 +03:00
c160853b04 UI: Correct Sequencer Text Alignment Tooltips
Pointed out in rBM5719
2019-08-29 10:06:09 -04:00
7745c6e35c Fix T56532: Boolean locks up Blender
Actual issue is with triangle beautify,
avoid precision error by scaling the epsilon
by the face area when it's over 1

The mesh in the report was very large (approx 2000 on each side),
causing precision issues with a fixed epsilon.
2019-08-29 23:11:18 +10:00
7f23c91478 LibOverride: Fix use-after-free error when freeing whole Main DB.
We do not want to touch to other ID pointers in that case, those might
have already been freed...
2019-08-29 14:49:54 +02:00
6b33bd1067 GPencil: For Stroke select don't display points
Now, when it's selected the stroke select mode, the points are not displayed and the stroke is fully selected automatically extending the selection.

Differential Revision: https://developer.blender.org/D5622
2019-08-29 10:44:24 +02:00
6b5e2f61b9 Cleanup: unused warning 2019-08-29 13:22:10 +10:00
c61a47d521 Cleanup: use custom data for object transform data 2019-08-29 13:22:10 +10:00
f4424727de Outliner: fix sync select on read file without loading UI
Tag for a complete sync when loading a file with load UI disabled.
2019-08-28 20:49:15 -06:00
5b96dc2381 Fix T69267: Missing Boids force field tooltip 2019-08-28 21:14:18 -04:00
749567e0b2 Move math and vector double routines into blenlib from delaunay code 2019-08-28 18:33:24 -06:00
07b1a5e05c Fix T69273: Rotate tool gizmo not showing incremental snapping tick marks 2019-08-28 20:36:56 -03:00
b1079ec3f2 Edit Mesh: AutoMerge and Split: Improve detection of the best split face 2019-08-28 20:07:43 -03:00
7aed8f69d1 Fix possible endless loop in AutoMerge and Split 2019-08-28 20:04:26 -03:00
a7ac8a22f8 GPencil: Animation menu updates
Animation menu updates for Edit Mode and Draw Mode (header and context menu):

- Rename menu items for a better understanding of what the operators really do.
- Change shortcuts (legacy from the old Grease pencil)

{F7708018}

Reviewers: antoniov, pepeland, billreynish

Tags: #bf_blender, #grease_pencil

Differential Revision: https://developer.blender.org/D5617
2019-08-28 22:33:44 +02:00
34ed58dcaf Fix T68971: Copy As New Driver from Material node creates a bad reference.
NodeTree structures of materials and some other data blocks are
effectively node group datablock objects that are contained inside
the parent block. Thus, direct references to them are only valid
while blender is running, and are lost on save.

Fix Copy As New Driver to create a reference that goes through
the owner datablock, by adding a new ID flag to mark private
pseudo-datablocks.

Also fix functions that return full paths to structures and
properties, e.g. used in python tooltips. Functions for paths
from ID to struct or property can't be changed because of
Animation Data related code.

Reviewers: mont29

Differential Revision: https://developer.blender.org/D5559
2019-08-28 21:52:54 +03:00
69a966aca0 Transform: option to transform parent objects without children
Supports parent/child chains with mixed selections.

Currently accessible from the pivot popover
(may be moved along with the other options here).
2019-08-29 01:53:07 +10:00
01bd22929f Fix T69221: inconsistent handling of filenames derived from image names.
We did not properly sanitize image data block name when using it to init
file name...
2019-08-28 17:51:40 +02:00
d5192d6fd6 Fix strict compiler warning in release mode 2019-08-28 16:00:40 +02:00
6f97855d06 CMake: Remove unsupported G++ strict flag
According to the documentation this flag is only supported
by C and Objective-C languages:

  https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html

Solves noisy output on every C++ file in the project when
using latest GCC-9.
2019-08-28 15:47:05 +02:00
f88022b96f Cleanup: make transform data in object mode flag public
This fits better with intended flag usage.
2019-08-28 13:44:21 +10:00
ed066f231d Cleanup: remove automerge BMesh operator
Move logic into EDBM_automerge since this is meant to run after
transform and isn't a generic editing operation.
2019-08-28 13:20:05 +10:00
f93b69c17a Cleanup: split automerge logic into own file
This isn't closely related to selection & this file was over 5k lines.
2019-08-28 13:19:55 +10:00
697fd86506 Cycles: Stitching of subdivided and displaced meshes
This patch stitches the vertices along patch edges so that cracks can
no longer form when applying subdivision or displacement a mesh.

Subpatches are now formed in a way that ensures vertex indices along
subpatch edges are equal for adjacent subpatches. A mapping of vertices
along patch edges is built to preform stitching. Overall performance is
roughly the same, some gains were made in splitting, but some was lost
in stitching.

This fixes:
- T49049 (cracks between patches from material and uv seams)
- T49048 (discontinuous normals with true displacement)

Reviewers: sergey, brecht

Differential Revision: https://developer.blender.org/D3692
2019-08-27 14:27:53 -04:00
7aef075ef6 Cleanup some outdated dead code and comments in Outliner. 2019-08-27 19:49:01 +02:00
9bda62c136 Fix T69176: Outliner->BlenderFile->Delete not working on some objects.
Object not referenced in any scene would not be deletable with previous
code... that was fine in 2.7x since it was not supposed to happen, but
now we can just use the nuclear `BKE_id_delete` for objects as well,
will take care of properly unlinking everything as needed.
2019-08-27 19:44:49 +02:00
490f966af5 Fix multires modifier using too much memory outside of sculpt mode
This reduce memory usage by about 25% in object mode for multires meshes.
2019-08-27 18:22:29 +02:00
c5b8d3b6d7 Cleanup: fix compiler warning 2019-08-27 18:22:29 +02:00
ec9e2dc3c0 Cleanup: spelling 2019-08-28 01:57:09 +10:00
179226977b Cleanup: clang-format 2019-08-28 01:57:09 +10:00
d5ed3de654 Fix Poly Build crash with empty meshes
Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D5609
2019-08-27 17:44:36 +02:00
6d37654ce8 UI: Area Join Tolerance
Allow area joining even if the areas are not quite perfectly aligned.

Differential Revision: https://developer.blender.org/D5595

Reviewed by Brecht Van Lommel
2019-08-27 08:30:36 -07:00
a758dce0fa UI: Graph Editor Dot Scaling
Scale Graph Editor keyframe dots and handles based on Resolution Scale rather than Line Width.

Differential Revision: https://developer.blender.org/D5600

Reviewed by Brecht Van Lommel
2019-08-27 08:05:17 -07:00
ce47dc5e70 LibOverride: Fix broken Hook modifier case.
Hook modifier uses same kind of parent inverse matrix as regular object
parenting, so we need to bypass that matrix re-computation when setting
the overridding object here as well.

Also cleanup some minor glitches in object parents' override_apply func.
2019-08-27 16:31:03 +02:00
d8baafd693 Edit Mesh: Poly build tool improvements
This commit changes the functionality of the Poly build tool to make it more suitable for retopology tasks:
  - Click and drag from a boundary edge extrudes a new quad
  - Click and drag on vertices tweaks the position
  - Ctrl + click adds geometry. There is a geometry preview in the gizmo. It also can automatically convert triangles to quads.
  - Shift + click deletes mesh elements (faces or vertices)
  - Updated preselection code. Different mesh elements take priority depending on the selected action.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D5573
2019-08-27 16:24:16 +02:00
2a2fd75ef9 Cleanup: Fix build error with MSVC
`BLI_cpu_support_sse41` needs BLI_System.h.

Reviewers: brecht
2019-08-27 08:13:23 -06:00
d667105ba9 Fix T69210: Crash on Making GPencil Materials zero user
The evaluated data must not copy the material if it's NULL.

Still the stroke exists in the file, so maybe need some thinking in how resolve this, but anyway this is a different topic not related to bug.
2019-08-27 15:58:58 +02:00
0067b3b09b GPencil: Draw Mode menu update
- Rename menu 'Stroke' to 'Draw': the menu includes not only strokes related things and the name follows the usage in other paint modes in Blender.
- Remove duplicate animation operators.
- Menu updates to include clean up and layers operators that don't need previous selection.

{F7705120}

Reviewers: antoniov, pepeland, billreynish

Tags: #bf_blender, #grease_pencil

Differential Revision: https://developer.blender.org/D5599
2019-08-27 15:47:43 +02:00
8e4f3b2bb0 Fix T68763: Smooth Brush not working in LookDev or Rendered Mode
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5585
2019-08-27 15:02:38 +02:00
87cafe92ce Sculpt/Paint: Brush world spacing option for sculpt mode
New brush option to calculate the distance to generate a new brush step using the cursor position over the mesh instead of the screen coordinates. This avoids artifacts when sculpting across curved surfaces.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5432
2019-08-27 14:58:24 +02:00
Stefan Werner
cd890c4c25 Compositor: Reversed order of Normal and Albedo in Denoising Node. 2019-08-27 14:43:48 +02:00
Stefan Werner
d547f9d3d2 Fix T68944: Added check for SSE4.1 to denoising node.
Since OpenImageDenoise requires a CPU with SSE 4.1 or newer,
let the node act as passthrough on unsupported CPUs and display
a message in the node itself.
2019-08-27 14:03:49 +02:00
e39528b351 Fix marker name drawing without intended offset in some cases
Order of arguments matters here.
2019-08-27 13:04:43 +02:00
Yevgeny Makarov
ed92a1ff65 UI: fix jumping of play/pause buttons, add more space when showing subframes
Differential Revision: https://developer.blender.org/D5604
2019-08-27 12:52:42 +02:00
Robert Fornof
b19099346a UI: rename Energy to Power in context menu, for consistency
Differential Revision: https://developer.blender.org/D5310
2019-08-27 12:50:08 +02:00
Yevgeny Makarov
41b27a4def UI: add title to assign shortcut popup, tweak padding
Differential Revision: https://developer.blender.org/D5576
2019-08-27 12:50:08 +02:00
Alex Fuller
ee2bed7947 Fix undefined symbols for ccl::Node with some compilers and build options
Differential Revision: https://developer.blender.org/D5590
2019-08-27 12:50:08 +02:00
Yevgeny Makarov
9169d40175 UI: tweak warning messages style and layout in save/close dialog
Differential Revision: https://developer.blender.org/D5589
2019-08-27 12:32:42 +02:00
Yevgeny Makarov
1a40f089ea UI: improve layout of curve widget clipping options popup
Differential Revision: https://developer.blender.org/D5593
2019-08-27 12:32:35 +02:00
Yevgeny Makarov
811ac2965a UI: fix some menus and popups not taking into account UI scale for padding
Differential Revision: https://developer.blender.org/D5581
2019-08-27 12:27:23 +02:00
Yevgeny Makarov
9d5fb3491d UI: make layout in adjust last operator popup consistent with corner panel
Differential Revision: https://developer.blender.org/D5581
2019-08-27 12:25:52 +02:00
a7609598fa Cleanup: clang-format 2019-08-27 12:18:28 +02:00
Vinay Mulakkayala
af71be23c2 Build: run ldconfig for OpenImageDenoise in install_deps.sh
Differential Revision: https://developer.blender.org/D5580
2019-08-27 12:18:28 +02:00
1c21b79108 Fix T69165: wrong update function on Bone b-bone properties crashes.
Obvious fix suggested by @lichtwerk.
2019-08-27 12:52:06 +03:00
666be7d886 Fix T69166: built-in start-up file has unnecessary screen data 2019-08-27 19:20:38 +10:00
ebe7a407d7 Cleanup: use static set instead of list 2019-08-27 19:20:34 +10:00
90751d1835 Fix compiler error in Windows
This error was introduced in commit https://developer.blender.org/rB66700196074ad168f3322f2766846a0a07f7a00f
2019-08-27 11:14:36 +02:00
Stefan Werner
b91b9a8eca Compositor: Run only one instance of OIDN at a time.
Running multiple instances of OIDN simultaneously can use dozens
of GBs of memory. Since OIDN is multithreaded internally, we can run
only one instance at a time and should not lose much performance.
Fixing T69006
2019-08-27 11:06:48 +02:00
6670019607 Workbench: Specular Highlighting for MatCaps
With Blender 2.80 we introduced a more flexible matcap system. One
change we did was to multiply the matcap with the base color that was
shaded. As matcaps contains diffuse and specular lighting in a single
texture this lead to rendering artifacts. Artists were complaining that
everything looked to metalic.

We now support a separate `diffuse` and `specular` pass for matcaps.

`shaded_color = diffuse_light * base_color + specular_light`

For matcaps to support this feature they need to be multilayer openexr
files with 2 renderpasses (named `diffuse` and `specular`). In the future
we can change this to first pass/second pass in stead of this naming
convention.

Reviewed By: fclem, brecht

Differential Revision: https://developer.blender.org/D5335
2019-08-27 08:56:56 +02:00
bc51250c1f UV Editor: Remove Unimplemented Show Edges Option
Show Edges option in the UV editor does not do anything. Only RNA/DNA
code could be found, so it is save to be removed.

Differential Revision: https://developer.blender.org/D5446
2019-08-27 08:35:47 +02:00
21daeaa95a Cleanup: rename max_len -> alloc_len 2019-08-27 15:38:38 +10:00
13f54f65c4 Cleanup: struct member name wasn't descriptive 2019-08-27 15:07:51 +10:00
2b618b0f2d Cleanup: unused warning 2019-08-27 15:01:41 +10:00
e57b14feae Edit Mesh AutoMerge: Improve Split Edges & Faces option
Now all wire edges linked to the merged vertex are used for split faces.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D5603
2019-08-27 01:42:02 -03:00
60ba7d4539 Clean: style 2019-08-27 14:25:05 +10:00
2435850961 Fix crash transforming origins when no editable origins exist 2019-08-27 14:25:05 +10:00
963a991a20 Fix specific case where a vertex is ignored in snapping
Sometimes the index of the edge and the vertex may coincide.
2019-08-27 01:06:30 -03:00
3df04851cf Cycles/Windows: Fix over estimation of System RAM.
`system_physical_ram` reported 1024x more System RAM than what
was actually available.
2019-08-26 18:34:54 -06:00
d9be59e872 Fix T68687 Eevee: Modulo node behaves unexpectedly/inconsistently
This was a regression.
2019-08-27 01:50:01 +02:00
ce2368cf69 Fix T69122: Area Join Error on Invalid Cursor Position
Improved error handling of Join Area operator in cased it is passed cursor position that is not valid.

Differential Revision: https://developer.blender.org/D5598

Reviewed by Brecht Van Lommel
2019-08-26 13:39:25 -07:00
378a13483f Fix T69185: Cycles kernel OpenCL compile error after recent changes 2019-08-26 22:06:02 +02:00
c69d75e880 GPencil: Fix typo error in previous commit 2019-08-26 21:04:04 +02:00
e148873f3f GPencil: Temporary fix to keep running Cycles + GPencil object in background.
This is a temporary solution to keep the render running.
2019-08-26 21:00:20 +02:00
8c7cbad542 Gpencil: Splitting and rearranging Context Menu in Edit Mode
Following the changes in the Edit Mode menus on the header, this patch split the current context menus into Point and Stroke and also rearrange the operators.

{F7704949}

Reviewers: antoniov, pepeland, billreynish

Reviewed By: billreynish

Tags: #bf_blender, #grease_pencil

Differential Revision: https://developer.blender.org/D5596
2019-08-26 20:53:16 +02:00
7f840426fd GPU: add mechanism for splitting up big gpu_shader_material.glsl file
Compiling this big file for every Eevee material is bad for performance, and
now that we are adding more nodes it gets worse. This patch adds a simple
mechanism to split up that file, and use only the parts used by shader nodes.

When a function is used by GPU_link, we detect which GLSL file it came from
and use it in GLSL code generation automatically. Dependencies between GLSL
files are manually specified, and function names must be unique across all
GLSL files.

Most of the actual splitting up will be done in later commits.

Differential Revision: https://developer.blender.org/D5569
2019-08-26 19:18:34 +02:00
6b189d2bcf Edit Mesh: New option "Split Edges & Faces" to "AutoMerge"
Ref T66423

Differential revision: https://developer.blender.org/D5562
2019-08-26 14:15:25 -03:00
7273dbd47b Fix T69051 Vertex Paint: Selection not show in vertex select mode. 2019-08-26 18:43:53 +02:00
1a6491639a Fix T68954 UVEdit: Auto Smooth option conflicts with uvs display 2019-08-26 18:43:53 +02:00
d5f3f4410d Missed adding file in recent commit 2019-08-27 01:53:00 +10:00
6d87ad08a4 Keymap: Use Ctrl-Period to toggle origin editing
Add a key binding since this option is typically for quick adjustments.
2019-08-27 01:49:21 +10:00
7fee153bf5 3D View: show selected object axis when affect origins is enabled
This replaces temporarily enabling draw-axis.
2019-08-27 01:46:03 +10:00
487cd7237c DRW: check exact draw flags before getting wire-frame color
Only some options need this.
2019-08-27 01:46:03 +10:00
c32377da98 Cycles: support move semantics for device_memory
Ref D5363
2019-08-26 17:42:52 +02:00
f6da680946 Cycles: refactor of BVH building to prepare for Optix
Ref D5363
2019-08-26 17:39:57 +02:00
2dd1e6b376 GPencil: Add missing update of modifiers
This was missing in previous commit for T66294
2019-08-26 17:31:55 +02:00
8f8e6a7c7b Fix Cycles session being (re)created twice
In most cases this only makes a small startup time difference, but there is
no reason to do this.

Ref D5363
2019-08-26 17:12:45 +02:00
2b55f621fe Cleanup: fix compiler warnings 2019-08-26 16:08:17 +02:00
1ff939f3f7 Cleanup: avoid unnecessary primitive type lookup and variable initialization
Ref D5363
2019-08-26 16:07:01 +02:00
6055db084d Cycles: optimize Sobol loop
Ref D5363
2019-08-26 16:07:01 +02:00
030a023eb2 Cleanup: add zero bit counting functions 2019-08-26 16:07:01 +02:00
d133934ea4 Cycles: code to optionally zero initialize some structs in the kernel
This will be used by Optix to help the compiler figure out scoping. It is not
used by other devices currently, but worth testing if it helps there too.

Ref D5363
2019-08-26 16:07:01 +02:00
39439a3afe Fix T69156: Blender crash when baking rigid body world.
Issue was exposed by recent own rB03bf84db86b commit, but was actually
present in RNA API for PointCaches since (probably) ages: whole accessor
code here was assuming that owner ID was an Object, when it is actually
a scene for RigidBody simulations...

Had also to make `BKE_ptcache_id_find()` and friends a bit more
flexible, now they also accept a NULL object pointer parameter...
2019-08-26 16:03:58 +02:00
51d9f56f87 GPencil: Invert Paste operator and make Paste to Active default
Before there were two options: Paste to original layer called "Paste" and Paste to active   layer called "Paste & Merge"

Now, by default the paste is in active layer and the "Paste & Merge" has been renamed "Paste".

For old "Paste", now is called "Paste by Layer" and it's not the default value anymore.

Note: Minor edits to add icons not present in Differential revision.

Differential Revision: https://developer.blender.org/D5591
2019-08-26 15:49:16 +02:00
742119bcb5 Fix T68826 Eevee: Multi-Mat not working if switching from Solid shading
The correct fix would be to avoid all those hacks but this is needed if
we want to be able to parallelize object vbo extractions.

This is the fixed version of the hack. The issue was that the ibo ranges
were saved before the batch were reset and the IBO was discarded, leading
to a read after free error. All previous reported crash were tested and
are now not reproductible.
2019-08-26 15:43:28 +02:00
b9f61eb874 Cycles: Fix Architecture logging on x64.
x64 builds with WITH_CYCLES_OPTIMIZED_KERNEL_SSE2 not defined
since SSE2 is the lower bar for x64 cpus. Turning the architecture
logging related if into the last if in the architecture detection
chain, which will never execute unless you turn off all kernels
in de debug flags.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5579
2019-08-26 07:22:44 -06:00
16c1b10ed2 Fix T69146: Segment Fault using Undo for file with several scenes and script.
The specifc bug here came fro; some IDProperties ID pointer storing
references to workspaces.

But that was actually a main loophole in that 'unndoing data while
keeping same UI' process, as we never know who might store a pointer to
one of those datablocks that we want to keep the 'old' version off.

It might actually be ever more needed when we start undoing (changing)
only the IDs actually modified in an undo step...

Notes:
* While not ideal, I think we can afford an extra looping over the whole
Main DB here... Remapping process in itself is fairly cheap, thanks to
the hashes.
* This commit is considered rather risky (especially thanks to 'private'
IDs), think it should work fine for now, unless some IDPointers start
storing references to private IDs...

Once D5559 is in, we shall do another pass here, probably also forbids
assigning private IDs to IDProperties, etc.
2019-08-26 14:51:30 +02:00
81e2fdcd1d Cleanup: simplify perlin noise function definition
Ref D5363
2019-08-26 14:13:00 +02:00
7b150e8767 Cleanup: use saturate3() for float3 clamping
Ref D5363
2019-08-26 14:11:08 +02:00
b5daed9680 Cleanup: fix compiler warning 2019-08-26 13:47:00 +02:00
2778754925 Cleanp: fix compiler warnings 2019-08-26 11:27:04 +02:00
fd52dc58dd Cycles: GPU code generation optimizations for direct lighting
Use a single loop to iterate over all lights, reducing divergence and amount
of code to generate. Moving ray intersection calls out of conditionals will
also help the Optix compiler.

Ref D5363
2019-08-26 10:26:53 +02:00
f491c23f1e Cycles: inline more functions on the GPU
This makes little difference for CUDA and OpenCL, but will be helpful
for Optix.
2019-08-26 10:26:53 +02:00
2b999c6a68 Cycles: change svm node decoding for more efficient code generation on GPU
These functions no longer accept NULL. They were renamed for clarity and to
avoid hidden merge issues.

Ref D5363
2019-08-26 10:26:53 +02:00
db257e679a Cycles: remove workaround to pass ray by value
CUDA is working correct without it now, and it's more efficient not to do this.

Ref D5363
2019-08-26 10:26:53 +02:00
edbb755dfe Cycles: tweaks for better GPU code generation
Uninitialized variables are harder to handle for the compiler.

Ref D5363
2019-08-26 10:26:53 +02:00
b05e7ea719 Cycles: fixes for building kernel without certain features
Ref D5363
2019-08-26 10:10:35 +02:00
7a15b938bd Cleanup: fix use of wrong constant
Ref D5363
2019-08-26 10:10:35 +02:00
7b0cd21750 Cleanup: fix compiler warning 2019-08-26 10:10:35 +02:00
dc216c89e0 Fix render test Python error on crashes 2019-08-26 10:10:35 +02:00
b2608af702 Gizmo: match the DOF gizmo size with the non-gizmo indicator 2019-08-26 17:12:42 +10:00
c70e6a2e21 Fix T69153: Camera DOF gizmo fails
Regression from bc3139d792
2019-08-26 17:04:47 +10:00
abd1a2d07d Gizmo: report error when property isn't found
Also add assert so this doesn't go unnoticed, see: T69153
2019-08-26 16:58:26 +10:00
db851c78b4 Transform: support snapping origins onto the objects geometry
Normally it wouldn't make sense for the object to snap onto it's self,
when moving origins this is a common use-case.
2019-08-26 14:40:00 +10:00
7b61fe1638 Cleanup: use BLI_assert 2019-08-26 14:32:35 +10:00
8d03e04493 Fix assert restricting allowed operation 2019-08-26 01:18:40 -03:00
22822b0572 Cleanup: unused arg 2019-08-26 12:20:02 +10:00
af8e8be7b1 Cleanup: Move RNA Manual References to Modules
This file used to be stored in the Add-ons repository
to allow easy commit access for updating.
Since then, we have created an automated process,
the script can now easily be updated by anyone.

This also makes more logical sense to store the file here
as it is not an add-on.
2019-08-25 15:05:25 -04:00
fd9614de0c UI: Dim Disabled Menu Items on Hover
Dims the text and background of disabled menu items while mouse is hovering.

Differential Revision: https://developer.blender.org/D5575

Reviewed by William Reynish
2019-08-25 12:01:29 -07:00
b876fe3f3d GPencil: Show edit points in Sculpt only if mask is enabled
If the masks are disabled, the edit points must not visible.
2019-08-25 20:56:09 +02:00
de0fc96dfe cleanup: collada: removed unused public class variable 2019-08-25 19:38:12 +02:00
2f1604cef7 fix: Removed Debug statement from Collada CMakeLists. cmake now silently determines which collada library version it uses 2019-08-25 19:38:12 +02:00
f2c3dc94b1 Fix T69127: Node sockets location bug after a keyframe is inserted 2019-08-25 16:37:06 +01:00
63533a0c7d Cleanup: Clarify alloc comment text 2019-08-25 17:13:13 +02:00
a67f218b54 GPencil: Use evaluated data for Sculpt Brushes
As part of T66294 is needed to use the evaluated data for Sculpt brushes to make possible to Sculpt a transformed stroke.

Without this commit, it was impossible sculpt the stroke if the modifier moves away the stroke point from original position. Also, some calculation is done in order to determine the rotation to transform the brush effect too.
2019-08-25 16:04:23 +02:00
6917ac06a2 Fix error accessing a named UV layer when baking 2019-08-25 16:45:47 +10:00
755c11c3db Curve: remove tessface calculation when calculating modifiers
- All parts of the code that need tessface should calculate it on demand.
- The check for tessloopnormal mask isn't correct
  (since this is loop data, not tessface data).
2019-08-25 16:45:47 +10:00
6eadd40597 Cleanup: redundant struct declarations 2019-08-25 16:45:47 +10:00
f1ddc6ed0a Cleanup: clang-format 2019-08-25 16:45:47 +10:00
8df6673165 Cleanup: skip adding tessface loop & color layers
Also correct check in unused poll function
2019-08-25 16:45:47 +10:00
7585d47b36 Cleanup: remove UV name syncing function
MTFace's on the mesh are now only used for conversion.
There is no need to keep both UV layers in sync at once.
2019-08-25 16:45:47 +10:00
5572986aad Cleanup: rename mesh looptri/tessface functions
Use consistent terminology.
2019-08-25 16:45:47 +10:00
2626a6fca2 Cleanup: remove tessface check when entering edit-mode 2019-08-25 15:49:32 +10:00
bada34c766 Cleanup: remove BKE_mesh_calc_normals_tessface
This was used for versioning, now normals are calculated after
initializing MPoly data.
2019-08-25 15:49:26 +10:00
4ab50eb7fa Cleanup: remove unused ED_mesh_*_tessface functions 2019-08-25 15:06:12 +10:00
f8d7993eec Cleanup: remove unused DM_to_mesh function 2019-08-25 14:09:09 +10:00
19f27cf3e9 RNA: remove Mesh.update() calc_loop_triangles argument
This calculated tessfaces, not loop-triangles.

Remove this since they aren't accessible from RNA anymore.
2019-08-25 12:39:15 +10:00
17e1c97e43 Cleanup: remove USE_TESSFACE_DEFAULT define 2019-08-25 12:21:09 +10:00
d42a23b31a Cleanup: remove tessface loop from set-smooth function 2019-08-25 12:08:18 +10:00
6bb2912704 GPencil: Fix unreported unable to deselect when masking is OFF
When the mask is disabled, all select operators must be disabled, but the deselect all operator must work or it's impossible to deselect.
2019-08-24 17:59:32 +02:00
a53ed1e049 Fix crash when snapping ruler 2019-08-24 09:21:13 -03:00
3437fcf2f1 BKE_bvhutils: implement hiden check
Accidentally unused in rB7c3bbe93aaa2
2019-08-24 09:20:55 -03:00
091e7979d3 GPencil: Use evaluated data in selection
Now the selection is using the position after evaluating the modifiers and makes possible to select a stroke point that has been moved from the original location.

Related to T66294
2019-08-24 13:46:00 +02:00
b1ed72f152 Cleanup: use eval as suffix
Follow conversion already used in most places.
2019-08-24 13:27:08 +02:00
8b806b8e64 Fix object origin transform with vertex snapping 2019-08-24 21:23:04 +10:00
d9d1c68809 UI: Add Meta strip icon to Sequencer sidebar
Patch by Peter Fog (tintwotin).

Differential Revision: https://developer.blender.org/D5567

Reviewers: Brecht Van Lommel (brecht), William Reynish (billreynish)
2019-08-24 12:25:51 +02:00
b7f786c0b1 GPencil: Fix typo error 2019-08-24 09:02:42 +02:00
ae0b855a32 Fix T68807: smoothing group issue
Showed in OBJ export.
Caused by comparison mistake in rB2e91fc39ac7.

Reviewers: mont29

Maniphest Task: T68807

Differential Revision: https://developer.blender.org/D5561
2019-08-24 08:50:58 +02:00
c9923baf84 Fix BKE_bvhtree_from_editmesh_get not setting cached value
The stored value was always false because of shadowing.

Also disable unused code.
2019-08-24 12:16:30 +10:00
fd43854fa3 Cleanup: use doxy sections for editfont 2019-08-24 12:06:58 +10:00
dc434bc273 Cleanup: correct use of term 'split' 2019-08-24 12:06:58 +10:00
67d9647ae4 Cleanup: use eval as a suffix
Follow conversion already used in most places.
2019-08-24 12:06:58 +10:00
a68e8ac993 BKE bvhutils: create and use new BKE_bvhtree_from_editmesh_get
With this function it is easier to create and have control over editmeshes `BHVtree`s.
2019-08-23 19:51:18 -03:00
4c353205ea UI: Various tooltip corrections and fixes
Patch by Yevgeny Makarov (jenkm)

Differential Revision: D5514
2019-08-24 00:45:21 +02:00
bf242362f6 UI: Sequencer: Move header spacer in to Preview modes
Patch by Peter Fog (tintwotin)

Differential Revision: D5511
2019-08-24 00:24:43 +02:00
beb025b3ab UI: Clip Editor: Move fractional zoom values into sub-menu
Patch by Peter Fog (tintwotin)

Differential Revision: D5525
2019-08-24 00:22:38 +02:00
acdb14d264 Transform: option to transform origins in object mode
Currently supports mesh, armature, lattice, curve & metaballs.

Access from pivot popover.
2019-08-24 07:34:43 +10:00
71c43e9225 Cleanup: unused args 2019-08-24 07:34:43 +10:00
e270b6f34c Cleanup: Fix PEP8 issues 2019-08-23 23:24:07 +02:00
ee4ec69b28 Fix T66924 : Move GPencil Modifiers evaluation to Depsgraph
Before, the evaluation of modifers were done in draw manager. The reason of the old design was grease pencil was designed before depsgraph was in place.

This commit moves this logic to depsgraph to follow general design and reduce Draw Manager complexity. Also, this is required in order to use modifiers in Edit modes.

Really, there is nothing really new in the creation of derived data, only the logic has been moved to depsgraph, but the main logic is the same. In order to get a reference to the original stroke and points, a pointer is added to Runtime data as part of the evaluated data. These pointers allow to know and use the original data.

As the modifiers now are evaluated in Depsgraph, the evaluated stroke is usable in Edit modes, so now it's possible to work with the evaluated version instead to use a "ghost" of the final image over the original geometry as work today.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5470
2019-08-23 23:10:48 +02:00
d795dd1fa7 GPencil: Object data UI updates
Some tweaks for the Grease Pencil object data UI:
- Update main layers controls for consistency (Opacity, Blend mode).
- Move "Show only On Keyframed" checkbox to Display section.
- Change "Duplicate Layer" icon in Layer menu.

{F7695928}

Reviewers: antoniov, pepeland, billreynish

Reviewed By: billreynish

Tags: #bf_blender, #grease_pencil

Differential Revision: https://developer.blender.org/D5571
2019-08-23 23:01:37 +02:00
f16a28c4af Revert "Fix T68826 Eevee: Multi-Mat not working if switching from Solid shading"
This reverts commit d357e7b065. This caused crashes in UV editor drawing and
updates in lookdev mode.

Fixes T69087, T69083, T69088, T69096.
2019-08-23 20:32:51 +02:00
777ca2dcdb Snapping System: Improve drawing indicating Perpendicular snap
Since pependicular snap depends on `snapTarget` it is important to indicate where this target is so as not to confuse users.
So draw a pivot where the target is and a dotted line toward the perpendicular snap point.

Reviewers: campbellbarton, brecht, billreynish

Differential Revision: https://developer.blender.org/D5557
2019-08-23 15:20:37 -03:00
9574ac1c8d LibOverride: Disable the re-parenting of overriding objects to the instancing empty.
Does not seems to be that useful... And it's breaking the objects also
'parented' to an armature through a modifier...
2019-08-23 18:58:21 +02:00
Yevgeny Makarov
e33fc3c37b UI: layout padding changes to autorun dialog, to match save dialog
Differential Revision: https://developer.blender.org/D5568
2019-08-23 18:42:26 +02:00
c3e4a26816 UI: layout and text changes for unsaved changes dialog
Patch by Harley Acheson, with additional changes by Yevgeny Makarov.

Differential Revision: https://developer.blender.org/D5133
2019-08-23 18:36:30 +02:00
77f01748e7 GPencil: Fix unreported set origin from Python
The set origin was not working from python because the operator was checking if the stroke was valid in the console area.

As the stroke only can be valid for GP obects, this check is not needed.
2019-08-23 17:20:12 +02:00
18f4182e98 LibOverride: Fixed bug in removing override op operator.
In case the property is a RNA pointer, `RNA_path_resolve()` will try to
resolve it and return that pointer, instead of returning expected
container... That is a bad inconsistency in the rNA path API, but no
proper way to solve it for now...
2019-08-23 15:55:00 +02:00
6d64da1e67 Fix potential issues when loading files with missing libraries
This is a continuation of rB39f005eae8eed8b939579aff8c9a05a4f50e5e38

Now all the fields where we check for object type in RNA (like
rna_Curve_object_poll) will have a safe guard for when this isn't the
case.  For example when loading files that has missing object libraries
and all missing objects are replaced with empties (placeholders).

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D5425
2019-08-23 15:54:11 +02:00
8eb2296872 UI: use consistent "Color Burn" name for blend mode
Previously it was named just "Burn" in some places.

Differential Revision: https://developer.blender.org/D5186
2019-08-23 13:14:15 +02:00
2f8ea1c11e Fix T67140: transforming bone does not update bone tab in properties editor 2019-08-23 13:04:54 +02:00
3d1cb78336 Fix T69075: OSL build with install_deps.sh failing at runtime
Now uses the same cmake flags as make deps.
2019-08-23 12:04:54 +02:00
162c320a75 LibOverride: Add some basic non-nodal material properties to override realm. 2019-08-23 10:27:22 +02:00
a1aa4a2597 RNA: Cleanup PointerRNA struct
The old layout of `PointerRNA` was confusing for historic reasons:
```
typedef struct PointerRNA {
  struct {
    void *data;
  } id;

  struct StructRNA *type;
  void *data;
} PointerRNA;
```

This patch updates it to:
```
typedef struct PointerRNA {
  struct ID *owner_id;
  struct StructRNA *type;
  void *data;
} PointerRNA;
```

Throughout the code base `id.data` was replaced with `owner_id`.
Furthermore, many explicit pointer type casts were added which
were implicit before. Some type casts to `ID *` were removed.

Reviewers: brecht, campbellbarton

Differential Revision: https://developer.blender.org/D5558
2019-08-23 09:52:12 +02:00
232049dd94 Armature: use BKE_armature_transform when applying transformation
Keep ED_armature_transform for RNA Armature.transform
since it operates on edit-bones in edit-mode.

Rename ED_armature_transform_bones to ED_armature_edit_transform
since it wasn't obviously an edit-mode function.
2019-08-23 12:03:11 +10:00
30582c59cc Armature: add BKE_armature_transform
ED_armature_transform uses edit-mode conversion which re-creates bones.
Needed for efficiently transforming object-data in object-mode.
2019-08-23 11:53:28 +10:00
adfb9ec87c Cleanup: const args, naming, doxy groups, clang-format 2019-08-23 09:09:38 +10:00
1de7717ed7 Outliner: new icons for sequences and contraints
Adds a new icon for the action constraint so the icon draws with the
constraints color. Also adds two new icons for sequencer meta strips
and duplicate strips for use in the outliner sequence display mode.

The meta strip icon could be used in the sequencer sidebar.
2019-08-22 14:40:33 -06:00
22ebc57987 UI: Changes to Area Options Menu
Adds more options to the context menu that pops up on area edges. Both Split types, Join, and Swap.

Differential Revision: https://developer.blender.org/D5459

Reviewed by Brecht Van Lommel
2019-08-22 13:19:11 -07:00
7c3bbe93aa Cleanup/Refactor: Simplify/deduplicate bvhutils code
This is a step that allow using `bvh_cache` for `EditMeshe`s.
2019-08-22 14:07:40 -03:00
d09b1ff1a6 Cleanup: undeclared variable warnings
Forward declare variables, or make them static.
2019-08-23 02:29:45 +10:00
4457c92fa3 GPencil: Fix missing variable due typo error 2019-08-22 18:28:19 +02:00
5888a2283e Cmake/MSVC: Enable Edit and Continue for debug builds.
This change switches the debug symbol format from /Zi to /ZI for
debug builds of blender, allowing Edit and Continue to work.

This allows limited [1] code changes in the debugger without
having to stop the process and recompile a new binary leading
to improved developer productivity.

All MSVC versions we support support this flag, Clang on
windows does not mind the /ZI flag, but doesn't currently
emit the required information to have this feature work.

[1] https://docs.microsoft.com/en-us/visualstudio/debugger/supported-code-changes-cpp
2019-08-22 10:20:40 -06:00
ec07340004 UI: Remove "Show Frame Indicator" option
This option was doing nothing in Blender 2.80.
I don't really see a reason for keeping it around.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D5552
2019-08-22 17:55:21 +02:00
e6f3d8b3e1 Revert "Fix T68971: Copy As New Driver from Material node creates a bad reference."
This reverts commits 54fd8176d7, 4c5becb6b1 and 8f578150e.

Those kind of commits must be reviewed and approved by project owners.

That one:
* Broke Collada building by not properly updating all calls to modified
function.
* Broke *whole* ID management by not properly updating library_query.c.

And in general, I am strongly against backward ID pointers, those are
*always* a serious PITA for ID management. Sometimes  they cannot be
avoided, but in general other ways to get that kind of info should be
investigated first.
2019-08-22 16:07:36 +02:00
eae9b86297 Fix crash using 'Mesh > Normals > Point to Target' from the header menu
This was working from Alt+N menu but was passing wrong ARegion
(alongside wrong mouse coords) to ED_view3d_win_to_3d_int when called
from the header menu.

Operator context INVOKE_REGION_WIN takes care of this.

This also fixes wrong behavior of 'Mesh > Normals > Rotate' when called
from the header menu.

part of T69019

Reviewers: billreynish, mont29

Maniphest Tasks: T69019

Differential Revision: https://developer.blender.org/D5555
2019-08-22 16:01:47 +02:00
54fd8176d7 NodeTree: also assign the owner pointer when copying. 2019-08-22 16:55:02 +03:00
33a287e5c0 Snapping System: Return element type in 'ED_transform_snap_object_project_view3d_ex' 2019-08-22 10:53:21 -03:00
8965a81271 Cleanup: Split some code out of rna_access.c
That file was getting out of control, now comparison/override RNA code is
in `rna_access_compare_override.c`. 1K lines of code for now, but that
area is likely to grow more in the future...

Note that we can probably split more out of `rna_access.c`, but for now
that will do.
2019-08-22 15:33:44 +02:00
Dalai Felinto
662d94e020 Multi-View user interface minor tweak
There is no reason to not expand this enum as we did for 2.79.
It is self explanatory enough and it has only two options.
2019-08-22 10:16:43 -03:00
4c5becb6b1 Fix missing argument.
Missed because of broken dependency tracking in msvc build process.
2019-08-22 16:14:48 +03:00
8f578150ea Fix T68971: Copy As New Driver from Material node creates a bad reference.
NodeTree structures of materials and some other data blocks are
effectively node group data block objects that are contained inside
the parent block. Thus, direct references to them are only valid
while blender is running, and are lost on save.

Fix Copy As New Driver to create a reference that goes through
the owner data block, by adding a new runtime field to bNodeTree.
2019-08-22 15:46:37 +03:00
443586f34d LibOverride: Enforce full override operations check on file save.
We try to avoid diffing too much things during edition, but when saving
a file we need to check all possible overridable IDs to ensure we have
all needed override operations...

Was pretty sure that was already in code, but apparently not (or it got
lost at some point...).
2019-08-22 14:34:09 +02:00
e3442c8864 LibOverride: Cleanup: tget rid of G.main usage when we can get it from context. 2019-08-22 14:33:56 +02:00
df5237ec5e LibOverride: Fix broken logic in code checking and adding new override ops.
When we wanted to force all overidable IDs to be checked, code would end
up checking the whole Main DB, instead of only overrideable ones.
2019-08-22 14:33:56 +02:00
OmarSquircleArt
08ab3cbcce Shading: Add object color to Object Info node.
The object color property is added as an additional output in
the Object Info node.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5554
2019-08-22 14:26:09 +02:00
a244384864 Fix T68969: current value '0' matches no enum in 'ToolSettings', '(null)', 'snap_node_element'
I don't think a versioning solution is necessary in this case.
But it can still be implemented.
2019-08-22 09:10:46 -03:00
75127b6be7 Revert "Fix grid snap value in recent snapping updates"
This reverts commit 48a7f979a5.

Another solution to come.
2019-08-22 09:10:46 -03:00
OmarSquircleArt
c6f8ea7b45 Fix T69044: OpenCL fail due to bad fract function.
The fract function in OpenCL does more than just return the fraction.
It also writes the floor to the second argument. Which wasn't put
in consideration.

Instead, we use a simple `a - floor(a)` like the Math node.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5553
2019-08-22 13:51:39 +02:00
b208096538 Transform: Snap Perpendicular: Avoid snapping to snapTarget 2019-08-22 08:07:41 -03:00
3f9c0ab993 Transform: Snap Perpendicular: Use snapTarget instead of center_global 2019-08-22 08:00:53 -03:00
d13952e603 LibOverride: Cleanup: rename parameters in RNA apply code.
We cannot use local/reference here, that is very confusing, since at
that stage current local is kind of src of data for the future local ID,
that is currently a mere copy of the linked data... ;)

So we are much better with src/dst names here.
2019-08-22 12:21:25 +02:00
Charlie Jolly
2ba233a31f Nodes: Support for socket shapes other than circle
Previously there was already "draw_shape" property,
but it was doing nothing. This commit renames the
property to "display_shape". Furthermore, different
shapes like SQUARE and DIAMOND are supported now.

Currently, the shapes are drawn using the shader that also
draws keyframes. In the future we might want to separate
this.

The new shapes are not used anywhere yet, but they can
be used by addon developers and will probably be useful
when we want to support different kinds node systems later.
For example, different shapes can be used to distinguish
between data and control flow.

Differential Revision: https://developer.blender.org/D2829
2019-08-22 11:10:11 +02:00
0356c8f25b Cleanup: remove edit-mode check in vertex coordinate access
This makes the function more predictable since other object
types don't access edit-mode data.
2019-08-22 13:23:27 +10:00
c2442541a6 Cleanup: typo in last commit 2019-08-22 09:13:17 +10:00
189aa32a3a Cleanup: vertex coordinate access, naming & minor changes
This also splits vertex access and allocation so it's possible
to copy coordinates into an existing array without allocating it.
2019-08-22 06:48:10 +10:00
4a2d1953f3 Cleanup: use doxy groups 2019-08-22 04:56:18 +10:00
e6f8f18902 Cleanup: clang-format 2019-08-22 04:38:05 +10:00
OmarSquircleArt
e83f092201 Shading: Add Volume Info node.
The Volume Info node provides the Color, Desnity, Flame, and Temperature
of smoke domains.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5551
2019-08-21 20:22:24 +02:00
OmarSquircleArt
133dfdd704 Shading: Add White Noise node.
The White Noise node hashes the input and returns a random number in the
range [0, 1]. The input can be a 1D, 2D, 3D, or a 4D vector.

Reviewers: brecht, JacquesLucke

Differential Revision: https://developer.blender.org/D5550
2019-08-21 20:04:09 +02:00
OmarSquircleArt
7f4a2fc437 Shading: Add more operators to Vector Math node.
Add Multiply, Divide, Project, Reflect, Distance, Length, Scale, Snap,
Floor, Ceil, Modulo, Fraction, Absolute, Minimum, and Maximum operators
to the Vector Math node. The Value output has been removed from operators
whose output is a vector, and the other way around. All of those removals
has been handled properly in versioning code.

The patch doesn't include tests for the new operators. Tests will be added
in a later patch.

Reviewers: brecht, JacquesLucke

Differential Revision: https://developer.blender.org/D5523
2019-08-21 19:36:33 +02:00
6785da095d Cleanup: remove old Windows scons installer, this is handled by CMake now 2019-08-21 18:44:22 +02:00
6086a6d939 Cleanup: Fix build error with MSVC
Previously eigens internal include order somehow implicitly provided
M_PI and friends. The recent eigen version bump broke this implicit
behaviour, better to be explicit that we need the math defines for MSVC.
2019-08-21 10:38:33 -06:00
34921e9e56 Timeline: refactor cache drawing
I did this mostly to get to know the point cache from this direction.
This should not change anything from the user perspective.
2019-08-21 17:21:50 +02:00
922da6dfb4 LibOverride: Fix inverted logic in RNA collection operation application.
Note to self: need to recheck the namings of whole override code,
currently this is way to confusing and inconsistent.
2019-08-21 17:13:51 +02:00
654fd58270 Cleanup: minor error in assert message in libOverride collection code. 2019-08-21 17:13:51 +02:00
d357e7b065 Fix T68826 Eevee: Multi-Mat not working if switching from Solid shading
The correct fix would be to avoid all those hacks but this is needed if
we want to be able to parallelize object vbo extractions.
2019-08-21 15:53:57 +02:00
8a11e70252 GPU: Fix Element index range calculation
Fix T68880 2D line display is broken
2019-08-21 14:47:57 +02:00
b19c437eff Update Eigen to 3.3.7
This is in preparation for the QuadriFlow remesher lib.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D5549
2019-08-21 14:15:28 +02:00
1658fd1f7e Fix T68837 Eevee: Fix "GPU failed to find function math_max" message
Was a missing rename.
2019-08-21 13:39:09 +02:00
de232f8887 Update CUEW to latest version 2019-08-21 11:49:29 +02:00
ecfe020e6c Fix T68951: Incrementing int property causes overflow
This was probably introduced in rBfdef1a6712b.
2019-08-21 11:31:10 +02:00
8f50cdd7d5 Fix T68943: GPencil Time modifier gets strange value in offset parameter
This is due a limitation in the RNA property when the range is too extreme. As we don't need that, the value was set to SHRT_MAX frames as maximum offset.

Also fixed the same problem in other modules of Grease Pencil.
2019-08-21 11:08:10 +02:00
Julian Eisel
6e8a76c96a UI: Don't left align operator buttons in toolbars
This hack would make operator (push down) buttons without icons align
their text to the left in toolbars. Everywhere else in Blender, we
center it by default.

We barely use operator buttons in toolbars anymore. Even if we do and
there's a good reason to make text left aligned, it's better to use
`uiLayout.alignment = 'LEFT'` to achieve the same effect, but without
lowish-level hacks for a specific region type.

Differential Revision: https://developer.blender.org/D5527
2019-08-21 10:35:46 +02:00
Demeter Dzadik
f041d2f116 Fix T65671: Armature X-Mirror inconsistencies
This fixes bendy bone properties not being mirrored correctly

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D5408
2019-08-21 09:59:11 +02:00
3d8f158697 GPencil: add new filter by material to modifiers
This commit adds a new filter by material using the name and not only the index.

Reviewers: antoniov, pepeland

Differential Revision: https://developer.blender.org/D5544
2019-08-21 08:41:19 +02:00
8ffbe39834 Cleanup: pass lattice directly vertex coord utilities 2019-08-21 15:05:52 +10:00
666d74e4d6 Fix T68444: outliner bone visibility not updating
Tags for update when pose bone visibility is toggled in the outliner.
2019-08-20 22:30:32 -06:00
55c626770e Fix T68429: wrong pose bone hide icon in outliner
The hide icon was drawing instead of the disable in viewports icon.
2019-08-20 22:17:27 -06:00
50fdbf3ec0 Cleanup: use const arguments for vertex coords 2019-08-21 11:58:41 +10:00
0050a044fa Cleanup: remove unused derived-mesh API calls 2019-08-21 11:41:40 +10:00
48a7f979a5 Fix grid snap value in recent snapping updates
Increase the size of the snap mode so the flag can be used.
2019-08-21 11:41:40 +10:00
899d2461bf Fix T68911: "illegal recursive expansion of macro id"
I imagined that could be a problem for some drivers.
I should have avoided.
2019-08-20 21:56:39 -03:00
daba3e871f Fix conflict with "Edge Center" snap mode
`SCE_SNAP_MODE_GRID` is used for both nodes and objects.
I don't think it's worth versioning in this case.
2019-08-20 19:35:11 -03:00
dd08d68df8 Transform: New Snap Option: Edge Perpendicular
Part of T66420

Option for snapping to the nearest point of a reference coordinate.
The patch also adds Edge Center and Perpendicular snaps to the ruler.

{F7675906}

Reviewers: campbellbarton, brecht

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D5543
2019-08-20 19:18:50 -03:00
2db09212fc Fix T68869: outliner missing subversion bump
The recent commit of synced selection added an active color theme to
the outliner, and synced selection enabled by default. The subversion
bump was missed.
2019-08-20 15:59:22 -06:00
f39145b211 Cleanup: remove redundant operator data in keymap 2019-08-21 07:23:20 +10:00
2930fbd86c Keymap: Shift-Ctrl-Click didn't allow toggle selection
D5518 by @jenkm
2019-08-21 07:13:23 +10:00
b6b01c48fa GPencil: Hide self_overlap parameter for Texture strokes
This property is not supported in this mode and must be removed from UI.
2019-08-20 20:26:48 +02:00
58341242bf Editor Transform: New Snap Option Middle
Part of T66420

Reviewers: campbellbarton, brecht

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D5532
2019-08-20 15:07:48 -03:00
1876e18b1b Fix use of uninitialized variable in Cycles math node 2019-08-20 18:19:22 +02:00
a23e1c38f3 Fix T68877: GPencil - Missing remove unused slots in menu
The operator was missing in the menu for grease pencil materials.
2019-08-20 18:11:26 +02:00
14c4a217eb Liboverride: Add more missing ID RNA pointers as overridable. 2019-08-20 17:48:33 +02:00
207f2137dd Fix T68789: Do not use new python format strings thingy in UI code.
This is 100% incompatible with translation...
2019-08-20 17:48:32 +02:00
OmarSquircleArt
be002bb57f Cycles Tests: Fix Math tests when use_clamp is true.
The clamp option is implemented using graph expansion, where a Clamp node
named "clamp" is added and connected to the output. So the final result
is actually from the node "clamp".

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5540
2019-08-20 17:21:40 +02:00
247507a85f Cleanup: remove undefined function 2019-08-20 11:47:50 -03:00
c48d1d54f1 Select Engine: Move some private members out of select context 2019-08-20 11:36:36 -03:00
0827110a35 Cleanup: Move select_engine function to corresponding header 2019-08-20 11:36:35 -03:00
61ff578eab UI: add URL presets
This adds a url-preset operator to simplify opening re-usable links.

- Standard websites have their own tool-tip.
- De-duplicate logic to get URL's that include version information.
- Reporting bugs no longer needs to have all information
  included in the URL.

D5498 by @luisbg with edits.
2019-08-20 23:44:18 +10:00
e6a81ad61e Cleanup: comparison warning 2019-08-20 23:42:04 +10:00
8bee9af462 BLI: double version of some math functions. 2019-08-20 21:09:55 +08:00
a942d97b79 Fix release notes showing twice in the splash-screen 2019-08-20 22:47:25 +10:00
8919c1cad5 Cleanup: clang-format, sorted lists 2019-08-20 22:47:25 +10:00
3dbe172344 Fix crash with no grid unit 2019-08-20 09:11:32 -03:00
859f2561c8 Fix T61286: Viewport grid units not visible
The original code was commented on.
Unlike blender 2.79, the grid units are now displayed only when RV3D_VIEW_IS_AXIS.
The visible subdivisions in the grid are made by the GPU and depending on the pixel.
The code used here only mimics this behavior and adds a bit of overhead.

Reviewers: fclem, campbellbarton

Subscribers: FloridaJo, zlsa, rl.amorato, EitanSomething

Differential Revision: https://developer.blender.org/D4325
2019-08-20 08:58:07 -03:00
f2cab8267f Memory: Fix guarded aligned malloc with small alignment
When calling `MEM_guarded_mallocN_aligned` with an alignment of 4,
a pointer that was returned that is 4 byte but not 8 byte aligned.
When freeing this pointer, `MEM_guarded_freeN` thinks that it is an
illegal pointer, because it asserts that `((intptr_t)memh) & 0x7 == 0`.

The fix is to always use at least 8 byte alignment.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5529
2019-08-20 09:45:47 +02:00
6367845c51 Cleanup: outliner range selection
No functional changes. This commit simplifies the recursive call,
removes unneeded function calls, and adds comments.
2019-08-19 17:08:38 -06:00
4421eb684d Outliner: Add range extend select
Add support for ctrl+shift+lmb to default and industry compatible
keymaps to select a range without removing the existing selection.
2019-08-19 16:49:43 -06:00
74d05eb71a GPencil: Improve reproject operator in surface mode
This change was applied to GP branch during the period 2.80 cannot be updated. Now the patch can be moved to master.

The commit fix the problem when reproject over surface in multiframe mode and the surfaces can moved.

Also improved the surface algorithm thanks to Lukas W (@geloescht).

New Algorithm: Differential Revision: https://developer.blender.org/D4878

Tested by @mendio and @pepeland
2019-08-19 21:05:48 +02:00
beab06b242 GPencil: Change UI scale for z-depth offset
Actually, the value for this parameter must be in the order of 0.00001 and this makes the UI uncomfortable.

Now, the value is divided by 1000 internally and the UI values are more logic.

Reviewers: mendio, pepeland

Differential Revision: https://developer.blender.org/D5528
2019-08-19 20:32:20 +02:00
d1017027af Fix build error with OpenImageDenoise after recent changes for dynamic linking
CMake variables are case sensitive.
2019-08-19 20:19:55 +02:00
e54cde403c Fix T68831: use NULL instead of the wrong pointer to read default array.
The pointer argument is supposed to be the object the property belongs
to, not a pointer to the property metadata itself. This only worked
before because the argument was never used.
2019-08-19 20:23:06 +03:00
953264138d LibOverride: add some more missing override flags for RNA ID pointers. 2019-08-19 19:11:35 +02:00
5fa17ce720 Mesh Batch Cache: Fix crash caused by rB3cbf2462391c 2019-08-19 18:08:44 +02:00
4bf37bafc2 View3D Grid: fix imperial grid drawing
This is a step to finish the D4325 and fix the T61286.
Currently the grid is highlighted in steps of 10 out of 10, which is wrong for the imperial units as seen in `buImperialLenDef`.
The idea of the code is to pass the steps of the grid already dimensioned as a uniform.

Another important thing to note is that subdivisions now only affect the grid without unity.
This matches the 2.7x Blender versions.

No performance loss (almost no gain too).

Reviewers: fclem

Subscribers: zlsa, rl.amorato

Differential Revision: https://developer.blender.org/D4379
2019-08-19 12:05:57 -03:00
3cbf246239 Fix T68719 Viewport: Wrong material index when switching between view mode
This was due to the GPUIndexBuf ranges only computed when requesting
the triangles indices. If the tris were already calculated, the new shading
batches would never have the GPUIndexBuf ranges and instead use the full
triangle index buffer.

So since this only happen when shading data does not match, we just save
the previous GPUIndexBuf ranges and reuse them for the new batch.

This patch is a bit of a hack on top of a hack but it works fine.
2019-08-19 17:02:27 +02:00
0b2e0877de Outliner: sync selection on undo/redo
Tags all outliner sync types on undo and redo operations.
2019-08-19 09:00:42 -06:00
c8e775180b Fix crash when loading a file with existing proxy, and lib has been edited.
Editing a lib char should never, ever be done once you have proxies of
it in your project, that will most certainly break a lot of things...

But at leats let's try no to crash here.
2019-08-19 16:48:04 +02:00
caed5b04d2 Outliner: rename filter "invisible" to "hidden"
No functional changes. Renames the "invisible" object filter to
"Hidden" to be more consistent.
2019-08-19 08:20:13 -06:00
45a09de9dd Fix building with shared OIDN libraries
Previously cmake would error out if it couldn't find the static
libraries even though it can build with shared libraries just fine.
2019-08-19 15:21:44 +02:00
04f9c795aa UI: replace "reports to text" operator with showing info log
This operator only existed to be able to see multiple reports, now instead the
info log can be opened and contents can be copy/pasted.

Patch by Valentin (Poulpator)

Differential Revision: https://developer.blender.org/D5510
2019-08-19 14:56:37 +02:00
Luis de Bethencourt Guimera
aebc596175 Fix T68672: splash screen does not remain centered when window resizes
Differential Revision: https://developer.blender.org/D5508
2019-08-19 14:56:31 +02:00
3f725f10cc Fix T68647: objects cannot be moved to collection if there is no active
object

This showed e.g. when deleting active object, then selecting using box
select.
This commit also lifts the restriction that linked objects could not be
moved to a collection.

Reviewers: campbellbarton, dfelinto

Maniphest Tasks: T68647

Differential Revision: https://developer.blender.org/D5485
2019-08-19 14:48:37 +02:00
5615c675af Fix T68779: "Match Texture Space" causes blender to crash
need to access curve_cache from evaluated object.
thx @sergey for pointing that out.

Reviewers: sergey

Maniphest Tasks: T68779

Differential Revision: https://developer.blender.org/D5526
2019-08-19 14:30:54 +02:00
ce5477d993 Fix T68802: Paint brush's Fill Threshold option is lost 2019-08-19 14:25:55 +02:00
ca3f25fc64 build deps macOS: add PUGI_XML home to OSL 2019-08-19 15:00:28 +03:00
79710a417c UI: re-order sequencer effects panel in side-bar
When working with Effect strips it is not optimal to have to scroll
downwards to get to the important settings for these kinds of strips.

D5512 by @tintwotin
2019-08-19 20:50:52 +10:00
6f17527062 Fix T68806: UI: underscores instead of spaces in some labels. 2019-08-19 10:41:59 +02:00
edbd47b78a LibOverride: Fix some more broken characters after override.
Think pretty much any ID pointer property should be overrideable
actually, without this reconstructing a local hierarchy of overriding
data-blocks simply cannot work properly...
2019-08-19 10:06:36 +02:00
10001d9099 Mesh Batch Cache: Fix regression with mesh that have poly mat id > mat_len 2019-08-18 22:41:12 +02:00
38380ddca3 Fix T67008: Missing move handle and flickering in FileBrowser
Fix T67008: Missing move handle and flickering in FileBrowser

Allow split regions (child regions) to contribute to the action zones (azone) of the parent region.
This fixes the issues in file browser and also in the user preferences.

Reviewers: Severin, mont29, campbellbarton

Reviewed By: Severin, mont29, campbellbarton

Subscribers: brecht, campbellbarton

Maniphest Tasks: T67008

Differential Revision: https://developer.blender.org/D5273
2019-08-18 16:42:41 +02:00
454b120f48 GPencil: Interpolate pressure in active Smooth
Now the pressure is interpolated in active smooth and not only position as before.
2019-08-18 11:40:23 +02:00
8ac40e4163 Cleanup: spelling, change breaked to braked 2019-08-18 19:30:33 +10:00
14e3c0b3e3 Cleanup: unused warning 2019-08-18 19:30:13 +10:00
OmarSquircleArt
e5618725fd Shading: Refactor Math node and use dynamic inputs.
- Implement dynamic inputs. The second input is now unavailable in single
operand math operators.
- Reimplemenet the clamp option using graph expansion for Cycles.
- Clean up code and unify naming between Blender and Cycles.
- Remove unused code.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5481
2019-08-18 11:16:04 +02:00
e12c17b305 Industry Compat Keymap: support new outliner features
Adds support for changes in the outliner from the soc-2019-outliner
branch. All changes made in the default keymap are made in the
Industry Compatible  keymap, except for renaming. Renaming is done
with Return in the Industry Compatible keymap.
2019-08-17 19:43:46 -06:00
e3d90abac7 Fix: Outliner gsoc versioning
Move outliner versioning for syncing and themes to the block
for the next subversion bump. It was not moved from the first
location it was placed in the soc-2019-outliner branch.

Old files will now load with synced selection enabled reliably.
2019-08-17 19:24:32 -06:00
e69fb44027 Fix T68782: false occlusion in selecting vertices and edges with objects in any wire view 2019-08-17 18:40:08 -03:00
b1959a96a2 Cleanup: spelling 2019-08-18 04:26:34 +10:00
2aef1347f9 Cleanup: correct comments 2019-08-18 04:26:29 +10:00
fdb0f3bc0b Fix T68760: "Reload Scripts" '_sys_path_ensure' missing
Missed this in recent update.
2019-08-18 02:32:43 +10:00
c3d037e88f DRW: Fix couple of issues in DRW_draw_select_id
Theses 2 function calls are mandatory.
2019-08-17 17:27:28 +02:00
85f90ed6fd Fix T68723: GPencil - Split Select mode for Sculpt and Edit mode
Actually, the selection mode is not visible in Sculpt mode when mask is enabled, but still is used.
Also, the mode is shared between Edit mode and Sculpt mode and for meshes the selector is by mode.

This commit splits the select mode in different properties and show the selector in Sculpt mode to define the Select mode. Also, the Select Mask button has been removed and now the Select Mode buttons work equal to Meshes where the select buttons are the mask enable too.

Fixed some old code not valid detected during these changes.

Differential Revision: https://developer.blender.org/D5500
2019-08-17 16:26:46 +02:00
0e1d4dec7a Fix T68722: Improve Smooth algorithm for Thickness and Strength
Now the GPencil smooth algorithm uses a average value instead to use only two points and the interpolated value.

Differential Revision: https://developer.blender.org/D5489
2019-08-17 12:51:05 +02:00
a477c2e0e0 Fix unreported GPencil Thickness modifier affecting strokes not in Vertex Groups
Prior to this commit: If the Grease Pencil Thickness modifier is set to Normalize and a Vertex Group is selected, the thickness of all strokes are effected when changing the Thickness parameter. Points on strokes are only normalised (= pressure set to 1.0) if they are part of the Vertex Group; the strokes themselves may still change thickness.

With this patch: If Normalize is selected with a Vertex Group, Blender now pre-checks each stroke to determine whether it has vertices within or outside the Vertex Group. If all the points on the stroke belong to the Vertex Group, it normalises the whole stroke to a uniform thickness. If some or none of the points of the stroke belong to the Vertex Group, the stroke is now left as is.

Reviewed By: @antoniov
Differential Revision: https://developer.blender.org/D5483 with minor edit.
2019-08-17 11:17:12 +02:00
463eef36d3 Fix T68753: GPencil tooltip typo 2019-08-17 11:04:03 +02:00
e8ffe25eb1 PyRNA: include class name in double-register exception
Helps debugging errors when classes are registered twice.
2019-08-17 04:51:50 +10:00
fdcae9ed0c Outliner: Add range extend select and modify keymap
Modifies selection keymap to be more conventional, with
shift click for range selection and ctrl click for extend
selection.
2019-08-16 12:30:54 -06:00
7ee2392887 Outliner: Support box select on click+drag 2019-08-16 12:30:54 -06:00
7ba2de8f8f Outliner: set parent for entire selection
Set and clear parents for all elements in the selection in the outliner.

This also removes the popup menu for setting the parent to curves,
armatures, and lattices. It makes more sense to keep the outliner
simple and only do object parenting.
2019-08-16 12:30:54 -06:00
1e51411db4 Outliner: Fix scenes in scene display not starting open 2019-08-16 12:30:54 -06:00
6bc6d016c5 Outliner: Fixes to show active and scroll page
Adjusts the scrolling of show active and scroll page operators
to use the `outliner_scroll_view` operator to ensure scrolling
does not leave the outliner bounds.

Also changes show active to expand subtrees containing all
instances of the active object, which may be linked to multiple
collections.
2019-08-16 12:30:54 -06:00
b83b0d73a6 Outliner: set scene camera on camera data activate 2019-08-16 12:30:54 -06:00
05f2ccd6d4 Outliner: Draw sequencer and vertex group icons
Draw icons for sequencer and vertex groups. The sequence
types need updates because they all draw in various colors
and some sequence types do not have an icon.
2019-08-16 12:30:54 -06:00
4902094440 Outliner: Use F2 to rename active outliner item
Previously with F2 mapped to the global rename active object
operator, it was not posible to use the conventional F2 to rename any
outliner element like collections or object data. This adds F2 to the
outliner keymap to call the outliner rename operator rather than the
popup rename object operator.
2019-08-16 12:30:54 -06:00
252fb48997 Outliner: walk navigation operator and openclose fixes
Adds a keyboard walk navigation and selection operator to the
outliner. Up and down arrow keys walk up and down the list of
elements, and left and right will open and close elements if
the elements are closed or opened respectively. Holding shift
while walking up and down the tree expands the selection.

Holding shift while clicking or pressing left and right arrows
will expand or collapse all children elements recursively.
Pressing enter to openclose the hovered element is removed.

Also allows click+drag for openclose of element subtrees.

This moves openclose toggling to the openclose operator to
remove duplicate code. The outliner tree building is tweaked
slightly to set the proper parents in scene display mode for walk
select to walk to parents without errors.
2019-08-16 12:30:54 -06:00
eb92ac05d6 Outliner: invisible object filter
Adds an invisible object filter in the outliner to show hidden
objects. This is useful to quickly locate hidden items in a large outliner
tree and easily toggle visibilty back on. Invisible refers to an object
being hidden, or viewport visibility restricted.
2019-08-16 12:30:54 -06:00
01006aa45d Outliner: Allow select on row icons
Allow selection of subtree elements on a collapsed element's
row. Because subtree elements are aggregated by type, a select on
an icon that represents multiple subtree elements will invoke a
popup menu to select the specific subtree element.

Also draws highlights on cursor hover over a row icon.

Any child elements that are linked to multiple collections will
only be listed in the popup one time, and selection from the
popup will select the first instance in the subtree.
2019-08-16 12:30:54 -06:00
bf95ab6bb2 Outliner: Draw constraint icons and enable button
Draw all constraint icons and enable/disable restrict buttons.

The action constraint needs its own icon. It currently draws white
instead of the blue modifier color.
2019-08-16 12:30:53 -06:00
35a5dee2ef Eyedropper: Support datadropper in the outliner
Adds support for using the eyedropper in the outliner in addition to
the 3D view.
2019-08-16 12:30:53 -06:00
0a903e7ab1 Collections: change active if hidden or excluded
When the active collection is hidden or excluded, change the active
collection to the first visible parent collection. This behavior existed
previously for excluding collections, and is now expanded to also
switch the active collection when viewport hidden or restricted.

This does not prevent viewport hidden or restricted collections from
being reactivated later. This could be added as a separate commit.
Excluded collections cannot be activated, so it may make sense to
extend this behavior to hiding collections.
2019-08-16 12:30:53 -06:00
71eb653280 Outliner: Synced selection and active element highlighting
Adds a toggle to the filter menu for outliner synced selection. Enabled
by default, this ensures selection is synced between objects, bones, and
sequences. An active outliner element theme color is added to indicate
which element is active.

Synced selection is controlled on the operator level. Each operator
that modifies selection for objects, bones, sequences, or outliner
elements needs to call the respective ED_outliner_select_sync_from..
function to tag outliners to be synced.

Syncing is done lazily on outliner draw.
2019-08-16 12:30:53 -06:00
7ba2720a70 Fix T68103: bevel sometimes infinite loops with patch miter.
Needed to null terminate list of chain to process width adjustments on.
2019-08-16 13:20:48 -04:00
Rémi Verschelde
b57d386dc1 Fix T68009: Recognize X.Org/AMD as GPU_DEVICE_ATI and open source driver
Reviewed By: #gpu_viewport, fclem

Differential Revision: https://developer.blender.org/D5392
2019-08-16 18:41:43 +02:00
OmarSquircleArt
25f1783673 Fix T68702: Input socket in the Normal node isn't drawn properly.
The Normal vector socket in the Normal node wasn't drawn properly and
couldn't be controlled. Additionally, the socket name was drawn over it.

This happened because the socket had a default value of a zero vector.
To fix this, we set the default value to the unit vector `(0, 0, 1)`.
Moreover, we don't draw the UI name if the subtype is `PROP_DIRECTION`.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5503
2019-08-16 17:59:12 +02:00
39288768b5 Revert "Outliner: only activate outliner items when clicking on icon/text"
The soc-2019-outliner branch relied on the previous behavior,
since this is going to be merged soon, postpone this change.

This reverts commit 9dab57a9f8.
2019-08-17 01:25:11 +10:00
66bd96e0bb Cleanup: remove gawain reference 2019-08-17 01:17:30 +10:00
d489aa2955 Cleanup: clang-format 2019-08-17 01:17:11 +10:00
2790740813 Cleanup: spelling 2019-08-17 00:57:05 +10:00
05edcf6329 Cleanup: unused args/vars 2019-08-17 00:53:32 +10:00
145f851731 UI: click on status bar report message now opens window with Info editor
Patch by Valentin (Poulpator)

Differential Revision: https://developer.blender.org/D5468
2019-08-16 16:49:04 +02:00
42cee6ab21 Fix part of T62917: selected edge not highlighted with black and white overlays
Differential Revision: https://developer.blender.org/D5369
2019-08-16 16:49:04 +02:00
ea8e0df672 Fix T55054: possible use of unsupported instructions in Cycles texture code
Differential Revision: https://developer.blender.org/D5326
2019-08-16 16:49:04 +02:00
4f03217dad Fix Unreported crash when opening linked material using nodegroups
This removes the recursive conversion of material using old blend modes.

With the approval of @brecht
2019-08-16 16:42:19 +02:00
d8bb429964 Fix T68651: LibOverride: Fix bad handling of RNA collections pointers.
We were storing the 'item' part in the RNA path of the override op
itself, which will not work with IDs because overriding local one might
not have the same name as the linked one (when some local ID with same
name already exists).

Now we are properly handling  this using the expected actual override
operation, which stores necessary data (names or indices) from both
local and linked data.
2019-08-16 16:25:52 +02:00
d436d67fcc Cleanup: proper use of UNUSED_VARS_NDEBUG instead of random hack. 2019-08-16 16:25:52 +02:00
dc0376555f LibOverride: do not allow diffing on collections' all_objects member.
This is useless (as diffing on `objects` + `children` shall be enough),
and potentially very time consuming in case of heavy hierarchy of
collections.
2019-08-16 16:25:52 +02:00
078d02f557 User Preferences: Added "Enabled add-ons only" preference
This checkbox replaces the "Disabled" and "Enabled" entries in the
filter drop-down. As a result, it now takes a single click to limit the
shown entries to enabled add-ons only. This is also an actual flag in
the preferences, and thus its state is saved between runs on Blender (in
contrast to the filter, which is always reset to "All").

Reviewed by: brecht, billreynish
2019-08-16 15:02:09 +02:00
ecc3b033a7 Fix T68715 Hidden polygon Edit mode are hidden in Object level 2019-08-16 15:00:50 +02:00
ee8aad79c1 Fix T56408: Hair children recalc on every frame on Alembic mesh
This fixes the glitching hairs described in T56408, T63534, and possibly
also T63534.

The fix consists of returning the original mesh (i.e. as visible in edit
mode) when constructing the ORCO mesh. This allows a static set of
coordinates to be used when computing the child hair positions.

The original mesh is only returned when it has the same topology (at
least same number of vertices, loops, and polys. It's up the author of
the Alembic file to ensure stable geometry when it's desired to be
compatible with Blender's hair system.

Reviewers: mont29, brecht

Differential Revision: https://developer.blender.org/D5492
2019-08-16 14:52:08 +02:00
c70f975d5c Fix T67999: calling Mesh.materials.clear() crashes Blender
The `BKE_material_pop_id()` and `BKE_material_clear_id()` functions had
a parameter `update_data` that, when `false`, would cause the mesh polys
to keep their material index, even when the indexed material slots were
removed. This behaviour was never used in the C code and not supported
by the drawing code, making polygons disappear and causing crashes. The
Python binding in RNA, however, defaulted to `update_data=False`.

This commit removes the `update_data` parameter altogether, and makes
the functions always fix up the material indices.

Reviewed by: mont29, brecht
2019-08-16 14:36:57 +02:00
82e719ff87 Fix T64998: Multi window spin tool crash
There could be a more direct way to initialize a gizmo in a view,
for now this resolves the crash.
2019-08-16 22:21:44 +10:00
Stefan Werner
8e4f55aba6 build_env: Added OpenImageDenoise to install_deps.sh
Building OIDN still needs to be enabled explicitly with --with-oidn.
It will fail with older versions of CMake or TBB, so I can't make
any guarantees for various Linux distributions or versions.
2019-08-16 14:01:37 +02:00
13c9df10a8 Fix T68710: crash on applying modifier after removing all shape keys
This was a mistake in rB87629b2a7443

`BKE_object_shapekey_free` would never return `true`, so DEG updates
would not happen...
So `ob->shapenr` was not up-to-date etc., leading to crash in
`BKE_mesh_nomain_to_mesh` shapekey handling...

Reviewers: brecht

Maniphest Tasks: T68710

Differential Revision: https://developer.blender.org/D5501
2019-08-16 13:58:47 +02:00
f8920bd8c7 Cleanup: fix compiler warnings 2019-08-16 12:44:06 +02:00
bdf8450713 Transform: use a kd-tree to calculate proportional distances
While speedup is non-linear, it gives ~30% speedup for ~6 million verts.

D3993 by @Al with edits.
2019-08-16 18:35:35 +10:00
9dab57a9f8 Outliner: only activate outliner items when clicking on icon/text
This is 2.7x behavior, while there are plans to improve on this,
committing in case larger changes take longer.

Without this it's not easy to select object data without changing modes.

See D5493
2019-08-16 07:07:22 +10:00
8f565f5a6f WM: reuse visible region calculation
Avoids calculating the visible part of a region whenever
on-screen overlays are drawn.
2019-08-16 06:44:25 +10:00
266e7b67fd Cleanup: use boolean 2019-08-16 06:44:25 +10:00
0f79c346c6 Fix check that validates a selection index 2019-08-15 17:08:38 -03:00
50ad4428ac Windows/MSI: Rework MSI installer.
The installer always upgraded the last version installed and did not allow for two versions to be installed side by side.

The reworked installer will allow side by side installs

install order:
```
2.81 -> 2.81a -> 2.82  : Allowed , will result in both 2.82 and 2.81a being installed
2.82 -> 2.81  -> 2.81a : Allowed , will result in both 2.82 and 2.81a being installed
2.82 -> 2.81a          : Allowed , will result in both 2.82 and 2.81a being installed
2.82 -> 2.81a -> 2.81  : Not Allowed, 2.81 will only install if you manually remove 2.81a first.
```

Do note though that this will not apply to any previously issued installers and even for 2.80a this is not something we can fix.

This patch is for landing in 2.81 *only* and should be excluded from any possible 2.80a release.

Second change is a change to the compression level, building the MSI takes 30 minutes, which is crazy, perhaps worth it if the compression actually pays of.

```
MSI - none     1:35  247.0 MB (260,025,634 bytes)
MSI - mszip    2:02   89.6 MB ( 94,022,946 bytes)
MSI - low      2:35   81.6 MB ( 85,646,626 bytes)
MSI - medium   4:11   77.3 MB ( 81,136,930 bytes)
MSI - high    28:01   74.7 MB ( 78,384,418 bytes)

zip            1:32   93.2 MB ( 97,732,293 bytes)
7Z             2:22   65.0 MB ( 68,171,614 bytes)
```

It didn't, so I lowered it to medium, seemed reasonable.

Differential Revision: https://developer.blender.org/D5494

Reviewers: brecht, jesterking
2019-08-15 13:43:44 -06:00
Dalai Felinto
cbd1739004 Fix T68705: Changing any editor to the properties crashes Blender
Issue introduced (more like exposed) in b7f86ff722.
2019-08-15 16:39:51 -03:00
b5fe838d44 Fix T68689 Fix infinite recursion cause by versioning code
Complex nodetrees could fire infinite recursion with previous algo.
Now using another gset we make sure we can only evaluate a tree once.
2019-08-15 18:46:37 +02:00
5d72ceb8d8 Fix broken text editing of integer number buttons, after recent changes 2019-08-15 18:20:33 +02:00
f61c6a2a1f Build: enable OpenImageDenoise, now that we have libraries for all platforms
Note that we are still missing an update for install_deps.sh to easily build this
on Linux. Only "make deps" has it for now.
2019-08-15 18:13:22 +02:00
c883fe25da Cleanup: clang-format, unused arg 2019-08-16 01:59:32 +10:00
8856c26fc3 Windows: add cycles debug logging to helper batch file. 2019-08-15 09:42:00 -06:00
4aad773061 Cleanup: Silence C4115 warning
`'ParticleSystem': named type definition in parentheses`
And prevent the need for struct `Object` to be defined.
2019-08-15 12:35:28 -03:00
f4faf6d856 Cleanup: Remove redundant headers 2019-08-15 12:35:28 -03:00
9684971add Fix T56843 : fix case sensitive filenames on win10
When building with case sensitive folders there were some linker errors.
2019-08-15 09:27:15 -06:00
4d320f4313 Edit Mesh Selection: Refactor: Redraw idmap buffer at runtime with only objects inside the rect
But in the future the selection code may also be used in object mode (eg for snapping).
So to avoid using too much VRAM resources, it is good to avoid drawing all objects in the viewport.

The solution was to create an array with only objects that are detected within the selection area.
If the selection operator is modal, objects already detected are not removed from the array until view3d is moved or orbited.
To detect the object, its BoundBox is tested.
Since the Select Engine does not have a dedicated depth texture, whenever a new object is "found" the depth of the objects in the array already drawn is redrawn.

Reviewers: campbellbarton, fclem

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D5435
2019-08-15 10:31:54 -03:00
261a02fc59 DRW: New function DRW_culling_min_max_test
For testing intersection with frustrum planes without having to transform all bound box vertices into global space.
2019-08-15 10:20:21 -03:00
78b56fa7d9 Fix T65461: IntProperty does not respect its 'step' field
Originally D5020 by @deadpin, refactored to make the change simpler.
2019-08-15 22:57:41 +10:00
fdef1a6712 UI: make int/float button clicking logic consistent
- When no change is performed on a float button, cancel the action.
- Move left/right clicks into the same block.
- Replace ambiguous names: temp, tempf.
2019-08-15 22:57:41 +10:00
e4084f8b24 Fix CDT bug causing crash with some output modes.
Forgot to properly maintain the edge for faces while
dissolving edges.
2019-08-15 07:55:29 -04:00
48a6997e2a Fix T64888: full-screen button overlaps side-bar 2019-08-15 21:34:16 +10:00
95a0144293 Fix T68684: Vertex snapping with median not working if the object is not at center of the world 2019-08-15 08:29:49 -03:00
9e54e6bdc5 Cleanup: Minor change to previous commit 2019-08-15 13:17:28 +02:00
143a44caeb GPencil: Fix unreported missing VFX in Video Editor
As the video editor mode is not Render mode the VFX was omitted.

Now, the mode is only checked for View3D.
2019-08-15 13:15:15 +02:00
ff1ea600c9 Fix T68675: particle edit mode makes blender crash
In rB9c010c44f420, DRW_mesh_batch_cache_create_requested was changed to
take a scene (instead of toolsettings directly), but
DRW_draw_depth_object is calling this with with NULL, just checking for
this seems to fix...

Reviewers: fclem

Maniphest Tasks: T68675

Differential Revision: https://developer.blender.org/D5488
2019-08-15 11:56:57 +02:00
eac2a7ab0e Fix full-screen button overlapping navigation gizmo 2019-08-15 19:51:28 +10:00
e6fa174fd7 UI: skip drawing the full-screen when alpha is zero 2019-08-15 19:51:28 +10:00
a2a9c95845 Fix T68678: Invisible fullscreen button
Regression from 6148ed8cf9
2019-08-15 19:51:28 +10:00
c7598cd1a5 Cleanup: spelling
Missed in recent commit.
2019-08-15 19:51:28 +10:00
5b04829d43 Cleanup: replace commented out code by comment 2019-08-15 11:28:42 +02:00
32395dd4e2 UI: Finalize old TODO in UI float number handling.
Just enable some commented-out code from rB636289b755f6ce (disabled at
that time because we were too close of 2.79 release...).

Issue raised in D5486, thanks.
2019-08-15 11:13:54 +02:00
63b3cc1702 Cleanup: spelling 2019-08-15 16:56:24 +10:00
1ddc12ceb9 Cleanup: unused warnings
Reminder not to leave in unused code, or comment why it should be kept.
2019-08-15 16:55:48 +10:00
bb2394a298 Fix T68014: Add-on's override Python built-in modules
Append addon paths to the sys.path to avoid name
collisions with system modules.
2019-08-15 16:09:15 +10:00
7c258a8ad1 Mesh: bypass legacy tessface conversion step when remeshing 2019-08-15 15:59:58 +10:00
f4d548d384 msvc: Enable /bigobj on all object files.
bf_intern_openvdb makes a significant number of template instantiations
causing it go over the maximum number of sections (int16) in a coff file
when doing a debug build.

This change switches the compiler to use the extended coff format which
has this field extended (int32) all linkers post msvc2005 can process
this format so there's no reason not to turn this on globally.

Clang on windows does not need this change since clang switches implicitly
to the extended format when required. [1]

[1] https://reviews.llvm.org/rL217812
2019-08-14 17:57:01 -06:00
Dalai Felinto
cb7ead2e3b Fix T68658: Text offset makes scale to fit not to work
Differential Revision: https://developer.blender.org/D5484
2019-08-14 19:18:51 -03:00
5ff8fcfa72 Eevee: Fix tangent map node not using the right UVMap 2019-08-14 23:59:34 +02:00
6fcd071c7b GPU: Vertex Format: Increase number of byte per attribute name
This reduces the risks of hash collision while maintaining a small number
of character per attrib.
2019-08-14 23:59:34 +02:00
80e9eb66d5 Mesh Batch Cache: Split UV an tangent into 2 distinct VBOs
This is done because they don't have the same update frequency. UV can be
persistent even on geometry update (ex: skinned object) but tangents
can change if the normals change.

Also the name buffer per vbo was too small to contain all names.
2019-08-14 23:59:33 +02:00
deb5416a1a GPU: Vertex Format: ADd function for safe GLSL attrib name
This remove code duplication and use base63 encoding of the hash.
Use mumur hash to have more randomness.
2019-08-14 23:59:33 +02:00
67f49f9c03 Cleanup: fix compiler warnings 2019-08-14 23:40:12 +02:00
037cf920b4 Sculpt: mesh abstraction API
These functions make possible porting the tools from the sculpt branch, making them compatible with PBVH_FACES and PBVH_BMESH without duplicating the code. They can also help to simplify some existing code.

These functions should not be used when working with PBVH_GRIDS data in SculptSession. PBVH_GRIDS needs to be removed from the sculpt code and converted to PBVH_FACES to be compatible with this API.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5352
2019-08-14 22:59:31 +02:00
5489611e53 Compositor: Added denoising node
This node is built on Intel's OpenImageDenoise library.
Other denoisers could be integrated, for example Lukas' Cycles denoiser.

Compositor: Made OpenImageDenoise optional, added CMake and build_env files to find OIDN

Compositor: Fixed some warnings in the denoising operator

build_environment: Updated OpenImageDenoise to 0.8.1

build_environment: Updated OpenImageDenoise in `make deps` for macOS

Reviewers: sergey, jbakker, brecht

Reviewed By: brecht

Subscribers: YAFU, LazyDodo, Zen_YS, slumber, samgreen, tjvoll, yeus, ponomarovmax, getrad, coder.kalyan, vitos1k, Yegor, DeepBlender, kumaran7, Darkfie9825, aliasguru, aafra, ace_dragon, juang3d, pandrodor, cdog, lordodin, jtheninja, mavek, marcog, 5k1n2, Atair, rawalanche, 0o00o0oo, filibis, poor, lukasstockner97

Tags: #compositing

Differential Revision: https://developer.blender.org/D4304
2019-08-14 21:40:35 +02:00
1845f0ee8b Cleanup: Fix build error with MSVC
C99 style initializers are C++20 feature and should not be used.

Reported by @deadpin on chat.
2019-08-14 12:52:51 -06:00
655f5818a5 Cleanup: use BKE_mesh_ prefix for the remesh API
These functions deal with voxel remeshing of Mesh data,
and aren't related to MOD_remesh.c for e.g.

Name so other kinds of remeshing wont cause confusion.
2019-08-15 04:46:51 +10:00
76e5b4bee4 Fix T68657: Voxel remesh crash
Mesh was being double freed.
2019-08-15 03:51:06 +10:00
8ee3e7da28 Cleanup: use doxy sections for wm_operators.c 2019-08-15 03:42:04 +10:00
966f4a162b Cleanup: warnings, unnecessary nested header 2019-08-15 03:42:04 +10:00
9c010c44f4 Mesh Batch Cache: Refactor + Multithread
For clarity sake, the batch cache now uses exclusively per Loop attributes.
While this is a bit of a waste of VRAM (for the few case where per vert
attribs are enough) it reduces the complexity and amount of overall VBO
to update in general situations.

This patch also makes the VertexBuffers filling multithreaded. This make
the update of dense meshes a bit faster. The main bottleneck is the
IndexBuffers update which cannot be multithreaded efficiently (have to
increment a counter and/or do a final sorting pass).

We introduce the concept of "extract" functions/step.
All extract functions are executed in one thread each and if possible,
using multiple thread for looping over all elements.

Reviewed By: brecht

Differential Revision: http://developer.blender.org/D5424
2019-08-14 19:05:26 +02:00
45a45f7d66 OpenVDB: Voxel Remesher
The voxel remesher introduces a new workflow for sculpting without any of the limitations of Dyntopo (no geometry errors or performance penalty when blocking shapes). It is also useful for simulations and 3D printing.

This commit includes:
- Voxel remesh operator, voxel size mesh property and general remesh flags.
- Paint mask reprojection.
- Geometry undo/redo for sculpt mode. This should support remesh operations as well as future tools that modify the topology of the sculpt in a single step, like trimming tools or mesh insert brushes.
- UI changes in the sculpt topbar and the mesh properties pannel.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5407
2019-08-14 18:58:19 +02:00
16c28b5a67 UI: suppress Copy/Paste/Edit Driver options on whole array property fields.
When a button represents the whole array (e.g. color picker buttons),
these context menu options were available, but didn't really work
correctly. Since it's not clear how they could reasonably work without
a valid index, it's better to hide them.
2019-08-14 19:18:13 +03:00
9ac3964be1 OpenVDB: mesh/level set conversion, filters and CSG operations
This code is needed to implement the Voxel Remesher as well as other features like a better remesh modifier with filters and CSG operations.

Done by Martin Felke and Pablo Dobarro

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5364
2019-08-14 18:13:56 +02:00
5ca5357e08 Install_deps: bump official numpy version to 1.17.0
Following recent ;ails re python version bump (looks like py version
itself had already been bumped in that script).
2019-08-14 17:49:15 +02:00
4b9e05b428 Cleanup: clang-format, sort structs & cmake files 2019-08-15 01:34:58 +10:00
8cbe9f1b9a Cleanup: headers 2019-08-15 01:32:46 +10:00
c5c4012b10 Cleanup: split out splash screen into own file
`wm_operators.c` is mainly for generic operator logic
where as the splash screen is one of a kind.
2019-08-15 01:32:46 +10:00
9bc10c1f54 Cleanup: remove comment to workaround weak code parsing
This is quite an old comment, recent IDE's/editors
should be able to handle escaped quotes in strings.

If kludges like this are needed, developers should note exactly why.
2019-08-15 01:32:46 +10:00
2623e68c3b GPencil: Revert commit d727f4f223 (Interpolate menu)
The menu is not redundant,  it is just another way to reach the tool and also give more discoverability of the operator shortcut (Many tools in Blender are also on menus, toolbar or header, just think of Move, Rotate, Scale).

There is also no reason to force the user/artist to change to edit mode for interpolate strokes, when the tool works perfectly in drawing mode too. It would only slow down the 2D animation workflow.

Reviewers: @mendio
2019-08-14 17:32:23 +02:00
63bf2ddc5d Fix main part of T68646: Library overrides: Broken parenting (parent inverse matrix gets reset) after reload.
We need a custom 'apply override' callback here to prevent resetting
the inverse parent matrix.

Things are now working for basic cases, but complex ones (in production
rigs e.g.) are still partially broken...
2019-08-14 17:27:34 +02:00
05417b2220 Text editor: syntax highlighting + line numbers on by default
The most common use of the text editor seems to be for scripting. Having
line numbers and syntax highlighting enabled by default seems sensible.

Syntax highlighting is now enabled by default, but is automatically
disabled when the datablock has a non-highlighted extension.
Highlighting is enabled for filenames like:
    - Text
    - Text.001
    - somefile.py
and is automatically disabled when the datablock has an extension for
which Blender has no syntax highlighter registered.

Reviewers: billreynish, campbellbarton

Subscribers: brecht, billreynish

Differential Revision: https://developer.blender.org/D5472
2019-08-14 16:59:37 +02:00
72eb70f933 Added missing forward declaration 2019-08-14 16:55:51 +02:00
f0f5e11b33 Eevee: Fix: Regression when using ssr and default shader 2019-08-14 16:43:52 +02:00
0dcd442c1f Fix T68487: double free when inserting keyframe outside of action clip range 2019-08-14 16:12:16 +02:00
Julian Eisel
b7f86ff722 Fix Area.ui_type invalid during area change
To reproduce:
* Split 3D View to show Info Editor
* Change 3D View a few times to various subtypes (Timeline, UV Editor
  etc).
Every now and then, the Info Editor should show `UNKNOWN ENUM`. Other
prints may also be lagging behind.

Reviewed By: campbellbarton, brecht
Differential Revision: https://developer.blender.org/D5325
2019-08-14 15:51:54 +02:00
03b2371387 Cleanup: move trailing comments to avoid wrapping code
Some statements were split across multiple lines because of their
trailing comments.

In most cases it's clearer to put the comments above.
2019-08-14 23:32:24 +10:00
bc4fe45aef Cleanup: pep8, prefix unused arg 2019-08-14 23:32:24 +10:00
Julian Eisel
e6425aa2bf Manage GPU_matrix stacks per GPUContext
Previously, we had one global `GPU_matrix` stack, so the API was not
thread safe. This patch makes the stack be per `GPUContext`, effectively
making it local per thread (`GPUContext` is located in thread local
storage).

Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5405
2019-08-14 15:27:10 +02:00
4074ab361e Eevee: Fix background alpha regression 2019-08-14 14:29:02 +02:00
7ae3aa7b63 Cleanup: don't unnecessarily use ustring in IES file parsing 2019-08-14 14:16:11 +02:00
d2195d9ef2 Fix T68637: Crash assigning caps-lock shortcut
Report that this isn't supported instead, also for unknown key.
2019-08-14 21:40:16 +10:00
67c10dbf13 Eevee: Add support for the holdout node
Support should be full when using Alpha Blend mode and partial if using
any other blend mode (opaque / alpha clip / alpha hashed).
2019-08-14 13:36:56 +02:00
13d469e6f0 Eevee: Remove Additive & Multiply Blend mode
This commit also provide a compatibility code that will convert old
materials using Additive or Multiply Blend mode to their node equivalent.

This conversion is only done on outputs that are enabled for eevee.
2019-08-14 13:36:56 +02:00
d5002f007e Eevee: Improve Transparent BSDF behavior
Alpha blended Transparency is now using dual source blending making it
fully compatible with cycles Transparent BSDF.

Multiply and additive blend mode can be achieved using some nodes and are
going to be removed.
2019-08-14 13:36:56 +02:00
8a338950c6 Fix T68537 Eevee: Modulo node behaves unexpectedly/inconsistently
There was still some float imprecision when both input values are equal.
2019-08-14 13:36:56 +02:00
55c38f476e Custom Properties: allow changing the property UI to color picker.
To fully support storing colors as a custom property, it is necessary
to allow switching the property UI to the standard color picker button.
That means in effect supporting custom property subtype values.

Change RNA_property_subtype to look for a 'subtype' string field
in _RNA_UI and parse it as an enum value. To minimize performance
impact, only do it if the property is an array; also, don't use
the custom subtype during RNA path parsing.

On the python side, allow setting some most useful seeming values
from the custom property settings editor.

Also, since some color picker code seems to run into a risk of
buffer overruns if the array size is wrong, check the size in
the UI layout code to be safe.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D5475
2019-08-14 13:38:23 +03:00
c47c7a44b2 Fix T68623: bpy.types.UI_UL_list.filter_items_by_name is case sensitive.
Was a mismatch with default behavior from C-defined basic UI list...
2019-08-14 11:43:25 +02:00
b4051db4fc Fix cycles crash when voxel attributes changed
This could happen e.g. when changing smoke type from flow to domain or
connecting a volume shader with to a domain without an actual flow type
around.

Fixes T58569, T68359

Reviewers: brecht

Maniphest Tasks: T58569, T68359

Differential Revision: https://developer.blender.org/D5478
2019-08-14 10:54:28 +02:00
OmarSquircleArt
7a7eadaf7f Shading: Add a clamp option to the Map Range node.
If the option is enabled, the output is clamped to the target range.
The target range is [To Min, To Max]. The option is enabled by default.

The clamp option is implemented in EEVEE by linking to the `clamp_value`
GLSL function. And it is implemented in Cycles using a graph expand
function.

Reviewers: brecht, JacquesLucke

Differential Revision: https://developer.blender.org/D5477
2019-08-14 10:53:19 +02:00
c9acc5faad Fix T68597: GPencil Dope Sheet can fail to display active GP object
Now, the dopesheet is activated if the object is in any Edition mode.
2019-08-14 10:30:58 +02:00
b3c3c83560 cleanup: fix python related build error on windows.
Recent python changes caused issues on some systems.
2019-08-13 19:55:33 -06:00
fc0f47e349 make.bat: Support running python from lib folder for make format
We are no longer depended on a system python being installed.
2019-08-13 17:03:09 -06:00
c538903558 deps: python 3.7.4 for windows.
This also updates to a new packaging method where python is runnable
from the library folder rather than having tarballs in the release
folder.
2019-08-13 17:02:19 -06:00
87d3685e93 deps/cleanup: remove partial boost-python support.
boost python was not required by any dependency nor was it ever properly supported.
2019-08-13 17:00:23 -06:00
54013d541c build_environment/python: Bump versions of our site-packages
IDNA     2.8
CHARDET  3.0.4
URLLIB3  1.25.3
CERTIFI  2019.6.16
REQUESTS 2.22.0
NUMPY    1.17.0
2019-08-13 16:58:26 -06:00
OmarSquircleArt
313b789289 Shading: Add Clamp node to Cycles and EEVEE.
This patch adds a new node that clamps a value between a maximum and
a minimum values.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D5476
2019-08-13 22:22:15 +02:00
42798a5ca1 Fix T67516 VSE: Animation evaluated incorrectly when scene strip present
The calls to `BKE_animsys_evaluate_all_animation()` and
`BKE_mask_evaluate_all_masks()` used the wrong timecode to evaluate the
animation system. This happened:

- Sequencer in scene A was rendered at frame X.
- Scene strip for scene B which should be evaluated at frame Y.
- BKE_animsys_evaluate_all_animation() was called with frame Y, which
  also re-evaluated the animation data in scene A.
- Other sequencer strips with animated values were then evaluated for
  frame Y and not frame X.

Since the depsgraph for rendering the scene strip is already OK and does
its job, it's no longer necessary to re-evaluate all the animation in
this way.

Removed `BKE_mask_evaluate_all_masks()` because it's no longer used.

Reviewers: sergey, brecht, iss

Differential Revision: https://developer.blender.org/D5394
2019-08-13 16:38:22 +02:00
OmarSquircleArt
71641ab56d Shading: Add Map Range node to Cycles and EEVEE.
This patch adds a new Map Range node that linearly remaps an input
value from a range to another. This node is similar to the compositor's
Map Range node.

Reviewers: brecht, JacquesLucke

Differential Revision: https://developer.blender.org/D5471
2019-08-13 16:38:56 +02:00
aef08fda3a Custom Properties: officially support int and float arrays in the UI.
In some rare cases it is convenient to store a short array value
as a custom property, e.g. a vector or color. For example, it may
be helpful when importing/exporting certain formats that support
custom or nonstandard attributes on objects.

The custom property storage already can handle arrays in order to
support properties defined via python. The only thing missing is
UI support (and some bugs), and this patch fixes that:

- Allow editing short array properties via Custom Properties panel.
- Fix a UI layout sizing bug triggered by the previous item.
- Fix a dependency graph bug with drivers using such properties.
- Make RNA_*_get_default_array code robust in case of size mismatch.
- Support custom default values for array properties, allowing
  both an array and a scalar value.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D5457
2019-08-13 17:13:19 +03:00
6e7ea807e1 UI: Fix wrong properties being grayed out
This has been mentioned in T68610.
2019-08-13 15:47:03 +02:00
03bf84db86 Fix T66373: Strange translation text behaviour.
i18n code does not work from threads on some plaforms, so it is disabled
in Blender when called from non-main thread.

Means that we have to go to a slightly different approach, with dirty
tag and generating string on request for UI.

Note: Also had to update the `info` string size, to fit with expensive
asiatic scripts in utf-8... Using mem for that kind of runtime data is
not really nice, but for now it will have to do.
2019-08-13 15:37:11 +02:00
6f9cbbc8ec Add mathutils.geometry.delaunay_2d_cdt() function to Python API.
Provides Python API access to recently added Constrained Delaunay
Triangulation routine.
Reviewed in D5467.
2019-08-13 07:31:14 -04:00
918150a0b9 Fix T65670: bone envelope head radius missing from transform panel
Make the transforms section of the properties panel consistent with
the transforms section of the side-bar, and to expose some currently
hidden BBone properties in the Bendy Bone section.

- Object transformations were not consistent with Pose Bone
  transformations in that they did not use single-column layout.

- Even in Pose Bone transformations,
  the rotation mode option was after Scale.

- Edit Bone Transforms panel included "Tail Radius" and
  "Envelope Deform Distance", neither of which belong there. See T65670.

- Expose bbone_x and bbone_z.

D5454 by @Mets
2019-08-13 18:20:05 +10:00
b84db342a5 Fix build errors with older GCC versions like 4.9
We can add more fine grained checks for when these flags are supported so
that adding asan flags manually still has all the workarounds, but for now
compiling succesfully is more important.
2019-08-13 06:04:17 +02:00
af3f0bf9d4 Fix T68507: Gpencil: Show always the Select Menu in Edit Mode
In Grease Pencil Edit Mode the Select menu should always be visible. Right now the menu visibility is controlled by the Selection Mask button next interpolate popover

Differential Revision: https://developer.blender.org/D5466
2019-08-12 23:22:08 +02:00
bb1719ddb5 Fix T68547: Plane Constraint inaccuracy
If it is to prevent division by zero just check if the `factor` is zero (instead of using an epsilon).
2019-08-12 17:13:32 -03:00
1a8dccd70a UI: Use singular noun form in add menus 2019-08-12 15:46:07 -04:00
3c014fe3fb Fix T68187: Factory Preferences doesn't update gizmo colors 2019-08-13 04:44:25 +10:00
ef5bf8d67e Fix T68557: Incorrect property reported in error
Error spotted by @gbayliss
2019-08-13 03:45:29 +10:00
b5f5f6e319 Cleanup: rename BaseOffset to ObjectOffsets 2019-08-12 12:29:38 -03:00
4815bd7748 Fix wrong detection in recent ninja build change 2019-08-12 17:28:01 +02:00
44d95cbf95 Cleanup: DRW manager: Move select_buffer.c utilities out of the selection engine internals 2019-08-12 12:10:44 -03:00
37b4384b59 Fix T67032: Do not systematically link 'orphaned' indirectly linked objects to scene.
Not even in append case. If those objects are already part of a
collection, we can now leave them fully un-instantiated in any scene,
since user can easily do it themselves as they need to.
2019-08-12 15:44:17 +02:00
102035373a Build: automatically detect ninja build system when running "make"
So that you don't have to specify "make ninja" every time.
2019-08-12 15:24:23 +02:00
922e77036b Fix Bullet build error with Clang 8 and Xcode 11
See D5366 and upstream:
https://github.com/bulletphysics/bullet3/commit/7f6c479ea6
2019-08-12 15:12:27 +02:00
3736dabd93 Fix running space_node directly
Part of T65393
2019-08-12 22:54:17 +10:00
961d43c623 Fix T68539: transferring uv (Ctrl+L) does not update immediately in
object mode
2019-08-12 14:49:27 +02:00
f555379ce3 Fix T66922: Merge by distance tooltip text wrong
merge/dissolve distance is actually a maximum, not a minimum

Reviewers: campbellbarton

Maniphest Tasks: T66922

Differential Revision: https://developer.blender.org/D5462
2019-08-12 14:44:51 +02:00
ca9698b8e0 Sculpt/Paint: Ignore INBETWEEN_MOUSEMOVE events on certain brush tools
Some brush tools were being executed too often when using devices with high polling rates, causing performance issues. This should improve the performance of brushes that don't need those updates.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5429
2019-08-12 12:58:08 +02:00
761aeb4899 Fix crashes caused by library placeholders.
This fixes inconsistencies in materials between objects and obdata
due to placeholders generation for missing libdata.

Note that we cannot do that when generating the obdata placeholder,
as not all objects using it might be already loaded...
So this has to be done near the end of the reading/linking process.

Reported here by Blender Studio.

Reviewers: brecht

Subscribers: jbakker, zeddb

Tags: #datablocks_and_libraries

Differential Revision: https://developer.blender.org/D5428
2019-08-12 11:54:37 +02:00
35a9a85b27 Fix T68542: ParticleSystem.uv_on_emitter returns always 0,0 while Particle.uv_on_emitter returns a value.
'cached' particles (for paths actually) are only generated for some kind
(hair, keyed, and baked system afaik), not for all.

Note that we could probably just use directly `totpart` and `totchild`,
but keeping code as close to what it was as possible, for now...
2019-08-12 11:47:08 +02:00
2b5575cc35 Fix error displaying brush panel (sidebar) in Vertex Paint mode
oversight in rB83fc8342d827
2019-08-12 11:37:24 +02:00
52421e9ace View3D: Circle Select optimization
Don't recreate `select_bitmap` for each edited object.
2019-08-11 22:12:11 -03:00
0d719fcacb Cleanup: spelling 2019-08-12 01:10:43 +10:00
a5f59bffd6 Cleanup: use doxy comments 2019-08-11 22:41:04 +10:00
63c463ac45 Docs: improve comments 2019-08-11 22:34:22 +10:00
1cd65b274b BLI_math: add isect_tri_tri_v2, wrap via mathutils.geometry 2019-08-11 21:50:48 +10:00
c3a9fc5efb Text: support comment without selection
D5451 by @Poulpator with fixes.
2019-08-11 20:52:45 +10:00
e2c6cfec18 Preferences: tag as dirty when loading factory startup 2019-08-11 18:03:17 +10:00
18ba66d75e UI: clarify auto-save preference
- Grey out the option when factory settings have been loaded.
- Note it it's tool-top that it's ignored when factory settings
  have been loaded.

Suggestions by @JulienKaspar
2019-08-11 17:51:09 +10:00
22cdadaa32 Cleanup: clang-format 2019-08-11 02:47:32 +10:00
cd91ff98c0 Cleanup: unused var 2019-08-11 02:47:32 +10:00
OmarSquircleArt
26911ba1e2 Nodes: Display vector values expanded, except when specified as compact.
Change the default drawing method of vector sockets to use a column layout.
This allows more interactive use of nodes and avoids the one or two clicks
needed to edit vector sockets in the old default component layout.

Developers may still use the component layout by flaging the socket with the
`SOCK_COMPACT` socket flag. For now, we choose to draw the SSS scale vector
of the Principled and SSS nodes in a compact form because they don't require
much interactivity.

Reviewers: brecht, JacquesLucke

Differential Revision: https://developer.blender.org/D5458
2019-08-10 17:57:54 +02:00
f51f4355b9 GPencil: Refine tooltip for Simplify modifier 2019-08-10 17:22:58 +02:00
7440144e2b GPencil: Hide selection tool in sculpt mode when mask is disabled
The selection tool must be hidden if the sculpt mask is not enabled because these options are not usable in this mode.

Also, the Select tools have been moved to the bottom of the toolbar.

Now, the logic is similar to Meshes.

Differential Revision: http://developer.blender.org/D5452
2019-08-10 17:20:12 +02:00
7029810b04 GPencil: Add new Distance property to Simplify modifier
Before, the length variable was reused for Sample and Merge Simplify. Now, the Merge has its own distance property and variable in the modifier struct.
2019-08-10 17:16:12 +02:00
745f773d92 GPencil: Fix tooltips for Simplify modifier 2019-08-10 17:00:49 +02:00
049c50e095 GPencil: Disable Select operator for Sculpt mode if Mask is OFF
The selection is only valid when the mask is enabled, so the operators must be disabled.

This modification is part of D5452
2019-08-10 16:50:21 +02:00
9e68b560a6 GPencil: New macros to check Sculpt and Weight Paint modes 2019-08-10 16:26:59 +02:00
b99c616b9b Fix T68414: GPencil crash after using L key and Ctrl+Z in Draw Mode
There is a segment fault because the operator was in modal but the Ctrl+Z breaks the custom data. Now, the Ctrl+Z ends the operator.
2019-08-10 16:04:42 +02:00
b91643c711 Add Constrained Delaunay Triangulation routine to Blenlib.
See Design task T68277, and patch D5423.
This commit includes edits by @ideasman42 to patch in
branch temp-D5423-update, plus responses to his comments.
2019-08-10 08:24:20 -05:00
553b581f25 GPencil: Improves Close stroke when the closing gap is very small
For very small gaps, we don't need generate geometry.
2019-08-10 13:15:20 +02:00
41f8f08e51 UI: Add initial context menus for Info and Console editors
Both keymaps are also updated
2019-08-10 11:35:16 +02:00
77516c25e4 GPencil: Fix segment fault using Search menu
The poll was not checking Object type
2019-08-10 10:20:30 +02:00
a571ff2c16 Text: minor change to text prefix behavior
Don't keep the cursor at the start of the line,
this was creating a selection when adding a prefix without a selection.
2019-08-10 04:48:59 +10:00
d20d9aa3e8 Fix T68486: GPencil ehen interpolate strokes, only display one stroke not all
The drawing loop exit too early.
2019-08-09 20:28:12 +02:00
3c81c53a31 UI: add menus for the info editor
D5444 by @tintwotin with edits
2019-08-10 01:48:53 +10:00
0944750921 Keymap: Ctrl-G now maps to Find Set Selected
This finds using the current selection instead
of using the text in the find side-bar.

More useful for quickly jump to other instances of a word.
2019-08-10 01:48:53 +10:00
18668a20cb Cleanup: Remove blank lines and trim end line spaces 2019-08-09 17:46:05 +02:00
810caad80e Fix T67591: Gpencil reorganize Edit Menu
The Grease Pencil Stroke Menu in Edit mode is cluttered with operators that act over stroke, points or the entire object.

To keep the consistency of the edit menu with other Blender Objects, we should separate the menu in: Grease Pencil - Stroke - Point.
Also we should add some missing operators and other menus like Show/hide or Weights among others

Differential Revision: http://developer.blender.org/D5449
2019-08-09 17:39:34 +02:00
899c85a118 Fix T67821: Snap to Symmetry not updating
Added a missing depsgraph update.
2019-08-09 17:26:54 +02:00
58f38ff5c1 UI: add back header icons to toggle text display options
These were removed in D5028, adding back by popular demand.
2019-08-10 01:14:40 +10:00
2b029234ba Cleanup: alternate fix for T66019
Prefer triple quoting to avoid having to escape quotes.
2019-08-10 00:44:50 +10:00
62ff55167c Cleanup: simplify preview check in sequencer
Also removed XXX comment which is now resolved.
2019-08-10 00:22:22 +10:00
a148056841 UI: Show suffix '*' instead of graying out 'Save Preferences'
Save preferences still works when preferences have not been edited.
2019-08-10 00:09:39 +10:00
c274151afe Cleanup: move space types under DNA_DEPRECATED
Prevent accidental use
2019-08-10 00:05:12 +10:00
b88d4ae12e Cleanup: remove redundant time check 2019-08-10 00:05:12 +10:00
65408cba20 UI: Clean up Sequencer/Preview Menu and Preview Menu
The Sequencer/Preview Menu is a mixture of both the Sequencer and the Preview menu functions, but they are currently not presented in an organized way.

Moved the Preview Zoom functions up next to the Sequencer Zoom functions with a separator in between.
Moved the Preview Show functions up next to the Sequencer Show functions with a separator in between.
Uncommented Show Framenumber Indicator, since it does not work or have a function after scrubbing in the timebar was implemented.
Renamed Show Metadata to Show Image Metadata, since it does only show metadata for images.
Added Show Annotations to View Menu for consistency.
Added Frame Overlay to View Menu for consistency.
Added Fractional Zoom to a sub-menu, since Sequencer/Preview View menu became too long. This sub-menu is in consistency with the Fractional Zoom menu in the Image Editor.
In Sequencer/Preview mode the Fractional Zoom will be named Fractional Preview Zoom, to specify that this function is only for the Preview.

Patch by Peter Fog (tintwotin)

Differential Revision: https://developer.blender.org/D5339
2019-08-09 15:35:42 +02:00
e1665905df Fix T68322: Shear in Dopesheet causes crash
The Shear transform operator is now disallowed in the timeline and
dopesheet editors.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D5440
2019-08-09 14:53:25 +02:00
9deb73df3d Clarify "Save on Exit" tooltip
The old text, "Save modified preferences on exit" suggests that only the
modified preferences are saved. This is not the case: all preferences
are saved at once. This distinction is especially important after having
loaded factory default settings.

As discussed with @campbellbarton and @JulienKaspar.
2019-08-09 14:35:28 +02:00
fbc90ae2bf UI: Sequencer Sidebar Text-Strip Panel adjustments
The functions are now divided into two nested sub panels, since it makes it easier to navigate through the options.

The Location values are moved above the Alignment values, to avoid the confusion that the alignment values could be presets for the location.

In the menu and context menu the Text Effect strip was among the functions which had the Input sub menu visible. Text strips do not take strip inputs, so this is a bug, which is solved with this diff.

Patch by Peter Fog (tintwotin)

Differential Revision: https://developer.blender.org/D5142
2019-08-09 14:08:20 +02:00
97336dbb3d Cleanup: Fix stupid style error in previous commit 2019-08-09 11:41:50 +02:00
8aa2f3b6ce GPencil: Add "Self Overlap" parameter to materials to disable Stencil
This parameter was removed in 2.80 and we decided to back again, but now is inverted.
2019-08-09 11:37:02 +02:00
533e48520e UI: expand on console menus
Some features weren't exposed anywhere in the interface.

D5443 by @tintwotin
2019-08-09 19:16:35 +10:00
4c9fe65745 UI: Sculpt menus cleanup
This removes the Brush pulldown menu from Sculpt and Paint modes. This menu only contained a random duplicated subset of brush options. Now everything is accessible centrally in the Brush Tool Settings.

The Sculpt menu likewise contained various random brush options. These are removed and replaced by a list of commands, just like the other paint modes.

Also removes the Show Mask option from the mode options panel since this is also in Overlays.

Reviewers: Campbell Barton

Differential Revision: https://developer.blender.org/D5420
2019-08-08 22:54:57 +02:00
634621d54d BMesh: add utility to calculate normal from a vertex cloud
Extract from BM_verts_sort_radial_plane & simplify.
2019-08-09 05:44:27 +10:00
1eead85cdc Cleanup: remove function already implemented in BKE_deform 2019-08-09 02:02:32 +10:00
47cd57eedc Docs: improve description of 3D view distance offset utility 2019-08-09 01:55:05 +10:00
39b5b22174 Cleanup: use doxy sections 2019-08-09 01:55:05 +10:00
a0d9043f43 Cleanup: warnings 2019-08-09 01:55:05 +10:00
e18e9aa0d0 Cleanup: Typo in naming (BLE instead of BKE, tssttt). 2019-08-08 17:20:39 +02:00
1342d1879e Fix T52551: undo causes crash after enabling a new rigid body when scene uses a referenced rigid body world.
Poll functions were not correct here, we cannot make objects part of
rigidbody sim if the RB collection is a linked one...
2019-08-08 17:20:39 +02:00
45ec08dc99 GPencil: Add mode Merge to Simplify modifier
This option uses the same logic of the merge by distance but as an option of modifier to allow dynamic merge.

This option will be very useful for LANPR generated strokes.
2019-08-08 17:16:17 +02:00
179e886ab3 GPencil: New Simplify modifier mode Sample and operator
This mode simplify the stroke doing a resampling of the points and generate new geometry at the distance defined.

Sample function developed by @NicksBest

New Resample Stroke operator

This operator recreates the stroke geometry with a predefined length between points.

The operator uses the same code used in Simplify modifier.

Reviewers: @mendio
2019-08-08 16:43:54 +02:00
5ca3bc7a14 Fix T68393: lift hardcoded limit on particle children 'child_radius'
Reviewers: jacqueslucke

Maniphest Tasks: T68393

Differential Revision: https://developer.blender.org/D5436
2019-08-08 15:22:56 +02:00
2fb42816cf Fix T68375: Polyline: can not make segment (cyclic)
Reviewers: campbellbarton

Maniphest Tasks: T68375

Differential Revision: https://developer.blender.org/D5438
2019-08-08 15:13:49 +02:00
3504b4c9c3 Fix T68360: Zoom too sensitive with hi-dpi
Scale pixel-input by pixel size for zoom operators.
2019-08-08 22:53:30 +10:00
01aae653a1 Cleanup: use static for undeclared function 2019-08-08 22:51:01 +10:00
b9d0f33530 Fix T67545: GPencil - New Merge by Distance operator
Merge points when the distance is less than a predefined value.

The method to interpolate the position created a wrong merge. Now, always the secondary point is merged with the first one (merge at first), except the last point.
2019-08-08 14:13:01 +02:00
9d4a8cbd88 2nd attempt to fix build error from rB22bdd08dfd08
sorry for the noise, if that doesnt do it, I'll revert and check this
thoroughly...
2019-08-08 10:44:32 +02:00
6689614e39 attempt to fix build error from rB22bdd08dfd08 2019-08-08 10:38:01 +02:00
22bdd08dfd Fix T68250: Camera keyframing (Walk/Fly) despite canceling movement
Reviewers: campbellbarton (thx!)

Maniphest Tasks: T68250

Differential Revision: https://developer.blender.org/D5418
2019-08-08 09:41:19 +02:00
3241a29990 Keymap: don't use 'any' modifiers for the text editor context menu 2019-08-08 16:40:40 +10:00
8c0daaecdf Cleanup: rename text toolbox to context menu 2019-08-08 16:39:50 +10:00
512b562b3b Text: reorganize menus
- Add "Live Edit" to Text menu.
- "Top/Bottom of File" renamed to "Top/Bottom" and placed in Navigation sub-menu.
- Added navigation functions to Navigation menu,
  since they were not exposed in the menus.
- Added selection functions to Select menu,
  since they were not exposed in the menus.
- Moved the Select menu to the Header in consistency with the 3D View.
- Inserted comment in context menu.

D5434 with edits.
2019-08-08 16:15:59 +10:00
7bc300a74b Fix T67587: Fix Drawing in Wireframe Non X-Ray Mode
When using Vertex or Weight paint mode on a wireframe the overlay was
blended with the background. In this case we now use alpha blending.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D5340
2019-08-08 08:00:57 +02:00
66356dae94 Fix T67638: Stretched Camera Background Images
The matrices that projects background images in the 3d view
were incorrect. The root cause was that the coordinate systems were not
respected, that was most noticeable when rotating a stretched image.

We re-validated conversions of coordinate spaces (UV -> Image -> Camera -> Window)
and made sure that the rotation is done in image space.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D5431
2019-08-08 07:53:21 +02:00
9fd9d90247 Keymap: only use Alt-Left/Right for legacy keymap
Ctrl-Left/Right aren't in conflict for the default keymap.
2019-08-08 15:31:47 +10:00
d727f4f223 UI: Remove Grease Pencil Interpolation from stroke menu
This is a bit redundant because there is the interpolation popover.
Also these options were available while drawing which is not useful.
2019-08-07 19:56:52 -04:00
5e77fb2482 API Docs: Correct Hotkey
Here we can link to the manual and keep the hotkey updated in the manual 
rather than the API docs.

Fixes T68371
2019-08-07 17:20:40 -04:00
ba0870713b Fix T68268: Crash switching to Weight Paint mode
Also applied to sculpt mode
2019-08-08 04:36:43 +10:00
7c08cddedb Fix unassigned return argument in recent select refactor 2019-08-08 04:36:43 +10:00
764cc75e1f Edit Mesh Selection: Move ED_view3d_select_ functions to bf_draw
It is easier to deal with private values of the DRW_select engine and gives room for improvement.

Reviewers: campbellbarton, fclem

Differential Revision: https://developer.blender.org/D5415
2019-08-07 12:43:31 -03:00
9d7d34c12a Select utils refactor: remove lagacy ED_view3d_select_id_read_rect
`ED_view3d_select_id_read_rect` serves only as a bridge to `DRW_framebuffer_select_id_read`.
Keeping these codes similar only increases the complexity of some functions.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D5415
2019-08-07 12:43:31 -03:00
dafecfa683 UV: select overlap operator
New operator to select overlapping UV's,
from all visible edit-mesh UV's.

D5421 @deadpin with edits.
2019-08-08 01:28:03 +10:00
3e27dd5b55 Fix T67623 Eevee: Modulo node making unexpected/inconsistent behaviour
This was a precision error. Using a more robust approach
2019-08-07 13:08:48 +02:00
be4063dbbb Fix error in recent trackball aspect cleanup
Error in 7f8d620e20
2019-08-07 21:02:19 +10:00
b560e15028 Fix T68348: Hotkeys do nothing when over viewport gizmos
This was done intentionally so mouse press events tools didn't prevent gizmos
receiving click events before `USE_GIZMO_MOUSE_PRIORITY_HACK` was added.
2019-08-07 20:36:48 +10:00
8f8e91987b Fix tool-tips remaining after operators start
It was possible for e.g. to have a header tooltip displayed,
then start walk-navigation which didn't close the tool-tip.
2019-08-07 20:36:44 +10:00
c3ef1f8db3 3D View: utility function to set the depth from a location
Avoids having to do projection/offset calculations inline.
2019-08-07 18:27:21 +10:00
7fcf1f2d9c Fix T68340: Add reference image to hidden collection fails 2019-08-07 16:40:27 +10:00
7672 changed files with 1224056 additions and 750616 deletions

View File

@@ -1,6 +1,7 @@
{
"project_id" : "Blender",
"conduit_uri" : "https://developer.blender.org/",
"phabricator.uri" : "https://developer.blender.org/",
"git.default-relative-commit" : "origin/master",
"arc.land.update.default" : "rebase",
"arc.land.onto.default" : "master"

View File

@@ -132,9 +132,7 @@ PenaltyBreakAssignment: 100
AllowShortFunctionsOnASingleLine: None
# Disable for now since it complicates initial migration tests,
# TODO: look into enabling this in the future.
SortIncludes: false
SortIncludes: true
# Don't right align escaped newlines to the right because we have a wide default
AlignEscapedNewlines: DontAlign
@@ -193,6 +191,7 @@ ForEachMacros:
- FOREACH_MAIN_ID_BEGIN
- FOREACH_MAIN_LISTBASE_BEGIN
- FOREACH_MAIN_LISTBASE_ID_BEGIN
- FOREACH_MESH_BUFFER_CACHE
- FOREACH_NODETREE_BEGIN
- FOREACH_OBJECT_BEGIN
- FOREACH_OBJECT_FLAG_BEGIN
@@ -215,17 +214,31 @@ ForEachMacros:
- GHASH_ITER_INDEX
- GPU_SELECT_LOAD_IF_PICKSEL_LIST
- GP_EDITABLE_STROKES_BEGIN
- GP_EVALUATED_STROKES_BEGIN
- GSET_FOREACH_BEGIN
- GSET_ITER
- GSET_ITER_INDEX
- ITER_BEGIN
- ITER_PIXELS
- ITER_SLOTS
- ITER_SLOTS_BEGIN
- LOOP_EDITED_POINTS
- LOOP_KEYS
- LOOP_POINTS
- LOOP_SELECTED_KEYS
- LOOP_SELECTED_POINTS
- LOOP_TAGGED_KEYS
- LOOP_TAGGED_POINTS
- LOOP_UNSELECTED_POINTS
- LOOP_VISIBLE_KEYS
- LOOP_VISIBLE_POINTS
- LISTBASE_CIRCULAR_BACKWARD_BEGIN
- LISTBASE_CIRCULAR_FORWARD_BEGIN
- LISTBASE_FOREACH
- LISTBASE_FOREACH_BACKWARD
- LISTBASE_FOREACH_MUTABLE
- MAN2D_ITER_AXES_BEGIN
- LISTBASE_FOREACH_BACKWARD_MUTABLE
- LISTBASE_FOREACH_INDEX
- MAN_ITER_AXES_BEGIN
- NODE_INSTANCE_HASH_ITER
- NODE_SOCKET_TYPES_BEGIN
@@ -233,13 +246,22 @@ ForEachMacros:
- NODE_TYPES_BEGIN
- PIXEL_LOOPER_BEGIN
- PIXEL_LOOPER_BEGIN_CHANNELS
- RENDER_PASS_ITER_BEGIN
- RNA_BEGIN
- RNA_PROP_BEGIN
- RNA_STRUCT_BEGIN
- RNA_STRUCT_BEGIN_SKIP_RNA_TYPE
- SEQP_BEGIN
- SEQ_BEGIN
- SCULPT_VERTEX_DUPLICATES_AND_NEIGHBORS_ITER_BEGIN
- SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN
- SEQ_ALL_BEGIN
- SEQ_CURRENT_BEGIN
- SURFACE_QUAD_ITER_BEGIN
- foreach
- ED_screen_areas_iter
- SLOT_PROBING_BEGIN
- SET_SLOT_PROBING_BEGIN
- MAP_SLOT_PROBING_BEGIN
- VECTOR_SET_SLOT_PROBING_BEGIN
# Use once we bump the minimum version to version 8.
# # Without this string literals that in-line 'STRINGIFY' behave strangely (a bug?).

36
.clang-tidy Normal file
View File

@@ -0,0 +1,36 @@
Checks: >
-*,
readability-*,
-readability-uppercase-literal-suffix,
-readability-magic-numbers,
-readability-isolate-declaration,
-readability-convert-member-functions-to-static,
-readability-implicit-bool-conversion,
-readability-avoid-const-params-in-decls,
-readability-simplify-boolean-expr,
-readability-make-member-function-const,
-readability-misleading-indentation,
-readability-inconsistent-declaration-parameter-name,
-readability-redundant-preprocessor,
-readability-redundant-member-init,
-readability-const-return-type,
-readability-static-accessed-through-instance,
-readability-redundant-declaration,
-readability-qualified-auto,
-readability-use-anyofallof,
bugprone-*,
-bugprone-narrowing-conversions,
-bugprone-unhandled-self-assignment,
-bugprone-branch-clone,
-bugprone-macro-parentheses,
-bugprone-reserved-identifier,
-bugprone-sizeof-expression,
-bugprone-integer-division,
-bugprone-incorrect-roundings,
-bugprone-copy-constructor-init,
WarningsAsErrors: '*'

22
.github/stale.yml vendored Normal file
View File

@@ -0,0 +1,22 @@
# Configuration for probot-stale - https://github.com/probot/stale
# This file is used on Blender's GitHub mirror to automatically close any pull request
# and invite contributors to join the official development platform on blender.org
# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 1
# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
daysUntilClose: 1
# Label to use when marking as stale
staleLabel: stale
# Comment to post when closing a stale Issue or Pull Request.
closeComment: >
This issue has been automatically closed, because this repository is only
used as a mirror of git.blender.org. Blender development happens on
developer.blender.org.
To get started contributing code, please read:
https://wiki.blender.org/wiki/Process/Contributing_Code

6
.gitignore vendored
View File

@@ -40,3 +40,9 @@ Desktop.ini
# in-source lib downloads
/build_files/build_environment/downloads
# in-source buildbot signing configuration
/build_files/buildbot/codesign/config_server.py
# smoke simulation noise tile (generated)
waveletNoiseTile.bin

View File

@@ -16,6 +16,7 @@
#
# The Original Code is Copyright (C) 2006, Blender Foundation
# All rights reserved.
#
# ***** END GPL LICENSE BLOCK *****
#-----------------------------------------------------------------------------
@@ -40,7 +41,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
endif()
endif()
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.10)
# Prever LEGACY OpenGL to eb compatible with all the existing releases and
# platforms which don't hare GLVND yet. Only do it if preference was not set
@@ -96,6 +97,16 @@ 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()
# find_package() uses <PackageName>_ROOT variables.
if(POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()
#-----------------------------------------------------------------------------
# Load some macros.
include(build_files/cmake/macros.cmake)
@@ -129,74 +140,9 @@ 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
)
# 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)
elseif(WIN32)
set(_init_JACK OFF)
elseif(APPLE)
set(_init_JACK OFF)
endif()
#-----------------------------------------------------------------------------
# Options
# First platform specific non-cached vars
if(UNIX AND NOT (APPLE OR HAIKU))
set(WITH_X11 ON)
endif()
# Blender internal features
option(WITH_BLENDER "Build blender (disable to build only the blender player)" ON)
mark_as_advanced(WITH_BLENDER)
@@ -215,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)
@@ -229,19 +175,29 @@ 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)
if(APPLE)
# There's no OpenXR runtime in sight for macOS, neither is code well
# tested there -> disable it by default.
option(WITH_XR_OPENXR "Enable VR features through the OpenXR specification" OFF)
mark_as_advanced(WITH_XR_OPENXR)
else()
option(WITH_XR_OPENXR "Enable VR features through the OpenXR specification" ON)
endif()
option(WITH_GMP "Enable features depending on GMP (Exact Boolean)" ON)
# Compositor
option(WITH_COMPOSITOR "Enable the tile based nodal compositor" ON)
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" OFF)
option(WITH_OPENVDB_BLOSC "Enable blosc compression for OpenVDB, only enable if OpenVDB was built with blosc support" OFF)
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)
@@ -252,14 +208,26 @@ mark_as_advanced(WITH_GHOST_DEBUG)
option(WITH_GHOST_SDL "Enable building Blender against SDL for windowing rather than the native APIs" OFF)
mark_as_advanced(WITH_GHOST_SDL)
if(WITH_X11)
if(UNIX AND NOT (APPLE OR HAIKU))
option(WITH_GHOST_X11 "Enable building Blender against X11 for windowing" ON)
mark_as_advanced(WITH_GHOST_X11)
option(WITH_GHOST_WAYLAND "Enable building Blender against Wayland for windowing (under development)" OFF)
mark_as_advanced(WITH_GHOST_WAYLAND)
endif()
if(WITH_GHOST_X11)
option(WITH_GHOST_XDND "Enable drag'n'drop support on X11 using XDND protocol" ON)
endif()
option(WITH_GMP "Use the gmp library for more accurate booleans" OFF)
# Misc...
option(WITH_HEADLESS "Build without graphical support (renderfarm, server mode only)" OFF)
mark_as_advanced(WITH_HEADLESS)
option(WITH_QUADRIFLOW "Build with quadriflow remesher support" ON)
option(WITH_AUDASPACE "Build with blenders audio library (only disable if you know what you're doing!)" ON)
option(WITH_SYSTEM_AUDASPACE "Build with external audaspace library installed on the system (only enable if you know what you're doing!)" OFF)
mark_as_advanced(WITH_AUDASPACE)
@@ -275,7 +243,7 @@ if(UNIX AND NOT APPLE)
mark_as_advanced(WITH_OPENMP_STATIC)
endif()
if(WITH_X11)
if(WITH_GHOST_X11)
option(WITH_X11_XINPUT "Enable X11 Xinput (tablet support and unicode input)" ON)
option(WITH_X11_XF86VMODE "Enable X11 video mode switching" ON)
option(WITH_X11_XFIXES "Enable X11 XWayland cursor warping workaround" ON)
@@ -298,16 +266,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_CLOTH_ELTOPO "Enable Experimental cloth solver" OFF) # this is now only available in a branch
# mark_as_advanced(WITH_MOD_CLOTH_ELTOPO)
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)
@@ -316,23 +281,27 @@ 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_HDF5 "Enable Legacy Alembic Support (not officially supported)" OFF)
option(WITH_ALEMBIC "Enable Alembic Support" ON)
# Universal Scene Description support
option(WITH_USD "Enable Universal Scene Description (USD) Support" ON)
# 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)
@@ -348,7 +317,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.
@@ -364,8 +333,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_RAYOPTIMIZATION "Enable use of SIMD (SSE) optimizations for the raytracer" ON)
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)
@@ -401,13 +369,13 @@ 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_EMBREE "Build Cycles with Embree support" OFF)
option(WITH_CYCLES_OSL "Build Cycles with OSL support" ON)
option(WITH_CYCLES_EMBREE "Build Cycles with Embree support" ON)
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)
option(WITH_CYCLES_CUDA_BUILD_SERIAL "Build cubins one after another (useful on machines with limited RAM)" OFF)
mark_as_advanced(WITH_CYCLES_CUDA_BUILD_SERIAL)
set(CYCLES_CUDA_BINARIES_ARCH sm_30 sm_35 sm_37 sm_50 sm_52 sm_60 sm_61 sm_70 sm_75 CACHE STRING "CUDA architectures to build binaries for")
set(CYCLES_CUDA_BINARIES_ARCH sm_30 sm_35 sm_37 sm_50 sm_52 sm_60 sm_61 sm_70 sm_75 compute_75 CACHE STRING "CUDA architectures to build binaries for")
mark_as_advanced(CYCLES_CUDA_BINARIES_ARCH)
unset(PLATFORM_DEFAULT)
option(WITH_CYCLES_LOGGING "Build Cycles with logging support" ON)
@@ -421,6 +389,7 @@ mark_as_advanced(WITH_CYCLES_DEBUG)
mark_as_advanced(WITH_CYCLES_NATIVE_ONLY)
option(WITH_CYCLES_DEVICE_CUDA "Enable Cycles CUDA compute support" ON)
option(WITH_CYCLES_DEVICE_OPTIX "Enable Cycles OptiX support" OFF)
option(WITH_CYCLES_DEVICE_OPENCL "Enable Cycles OpenCL compute support" ON)
option(WITH_CYCLES_NETWORK "Enable Cycles compute over network support (EXPERIMENTAL and unfinished)" OFF)
mark_as_advanced(WITH_CYCLES_DEVICE_CUDA)
@@ -454,13 +423,29 @@ mark_as_advanced(WITH_CXX_GUARDEDALLOC)
option(WITH_ASSERT_ABORT "Call abort() when raising an assertion through BLI_assert()" ON)
mark_as_advanced(WITH_ASSERT_ABORT)
option(WITH_BOOST "Enable features depending on boost" ON)
if(UNIX AND NOT APPLE)
option(WITH_CLANG_TIDY "Use Clang Tidy to analyze the source code (only enable for development on Linux using Clang)" OFF)
mark_as_advanced(WITH_CLANG_TIDY)
endif()
option(WITH_BOOST "Enable features depending on boost" ON)
option(WITH_TBB "Enable features depending on TBB (OpenVDB, OpenImageDenoise, sculpt multithreading)" ON)
# TBB malloc is only supported on for windows currently
if(WIN32)
option(WITH_TBB_MALLOC_PROXY "Enable the TBB malloc replacement" ON)
endif()
# This should be turned off when Blender enter beta/rc/release
option(WITH_EXPERIMENTAL_FEATURES "Enable experimental features (still need to enable them in the user preferences)" ON)
mark_as_advanced(WITH_EXPERIMENTAL_FEATURES)
# Unit testsing
option(WITH_GTESTS "Enable GTest unit testing" OFF)
option(WITH_OPENGL_RENDER_TESTS "Enable OpenGL render related unit testing (Experimental)" OFF)
option(WITH_OPENGL_DRAW_TESTS "Enable OpenGL UI drawing related unit testing (Experimental)" OFF)
set(TEST_PYTHON_EXE "" CACHE PATH "Python executable to run unit tests")
mark_as_advanced(TEST_PYTHON_EXE)
# Documentation
if(UNIX AND NOT APPLE)
@@ -501,6 +486,8 @@ endif()
if(CMAKE_COMPILER_IS_GNUCC)
option(WITH_LINKER_GOLD "Use ld.gold linker which is usually faster than ld.bfd" ON)
mark_as_advanced(WITH_LINKER_GOLD)
option(WITH_LINKER_LLD "Use ld.lld linker which is usually faster than ld.gold" OFF)
mark_as_advanced(WITH_LINKER_LLD)
endif()
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
@@ -536,7 +523,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
@@ -551,15 +539,6 @@ if(WIN32)
option(WITH_WINDOWS_FIND_MODULES "Use find_package to locate libraries" OFF)
mark_as_advanced(WITH_WINDOWS_FIND_MODULES)
option(WITH_WINDOWS_CODESIGN "Use signtool to sign the final binary." OFF)
mark_as_advanced(WITH_WINDOWS_CODESIGN)
set(WINDOWS_CODESIGN_PFX CACHE FILEPATH "Path to pfx file to use for codesigning.")
mark_as_advanced(WINDOWS_CODESIGN_PFX)
set(WINDOWS_CODESIGN_PFX_PASSWORD CACHE STRING "password for pfx file used for codesigning.")
mark_as_advanced(WINDOWS_CODESIGN_PFX_PASSWORD)
option(WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS "Organize the visual studio projects according to source folder structure." ON)
mark_as_advanced(WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS)
@@ -568,6 +547,19 @@ 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)
option(WITH_WINDOWS_SCCACHE "Use sccache to speed up builds (Ninja builder only)" OFF)
mark_as_advanced(WITH_WINDOWS_SCCACHE)
option(WITH_WINDOWS_PDB "Generate a pdb file for client side stacktraces" ON)
mark_as_advanced(WITH_WINDOWS_PDB)
option(WITH_WINDOWS_STRIPPED_PDB "Use a stripped PDB file" On)
mark_as_advanced(WITH_WINDOWS_STRIPPED_PDB)
endif()
# The following only works with the Ninja generator in CMake >= 3.0.
@@ -578,8 +570,14 @@ if("${CMAKE_GENERATOR}" MATCHES "Ninja")
mark_as_advanced(WITH_NINJA_POOL_JOBS)
endif()
# avoid using again
option_defaults_clear()
if(UNIX AND NOT APPLE)
option(WITH_CXX11_ABI "Use native C++11 ABI of compiler" ON)
mark_as_advanced(WITH_CXX11_ABI)
endif()
# Installation process.
option(POSTINSTALL_SCRIPT "Run given CMake script after installation process" OFF)
mark_as_advanced(POSTINSTALL_SCRIPT)
# end option(...)
@@ -638,12 +636,6 @@ if(WITH_PYTHON_MODULE AND WITH_PYTHON_INSTALL)
message(FATAL_ERROR "WITH_PYTHON_MODULE requires WITH_PYTHON_INSTALL to be OFF")
endif()
# may as well build python module without a UI
if(WITH_PYTHON_MODULE)
set(WITH_HEADLESS ON)
endif()
if(NOT WITH_PYTHON)
set(WITH_CYCLES OFF)
set(WITH_DRACO OFF)
@@ -656,28 +648,30 @@ 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)
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)
set_and_warn_dependency(WITH_BOOST WITH_ALEMBIC OFF)
if(WITH_BOOST AND NOT (WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_INTERNATIONAL OR
WITH_OPENVDB OR WITH_OPENCOLORIO OR WITH_USD OR WITH_ALEMBIC))
message(STATUS "No dependencies need 'WITH_BOOST' forcing WITH_BOOST=OFF")
set(WITH_BOOST OFF)
endif()
set_and_warn_dependency(WITH_TBB WITH_CYCLES OFF)
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)
# OpenVDB uses 'half' type from OpenEXR & fails to link without OpenEXR enabled.
set_and_warn_dependency(WITH_IMAGE_OPENEXR WITH_OPENVDB OFF)
# auto enable openimageio for cycles
if(WITH_CYCLES)
set(WITH_OPENIMAGEIO ON)
@@ -707,13 +701,15 @@ if(WITH_INSTALL_PORTABLE)
endif()
if(WITH_GHOST_SDL OR WITH_HEADLESS)
set(WITH_X11 OFF)
set(WITH_GHOST_WAYLAND OFF)
set(WITH_GHOST_X11 OFF)
set(WITH_X11_XINPUT OFF)
set(WITH_X11_XF86VMODE OFF)
set(WITH_X11_XFIXES OFF)
set(WITH_X11_ALPHA OFF)
set(WITH_GHOST_XDND OFF)
set(WITH_INPUT_IME OFF)
set(WITH_XR_OPENXR OFF)
endif()
if(WITH_CPU_SSE)
@@ -749,14 +745,12 @@ if(NOT WITH_CUDA_DYNLOAD)
endif()
#-----------------------------------------------------------------------------
# Check for valid directories
# ... a partial checkout may cause this.
#
# note: we need to check for a known subdir in both cases.
# since uninitialized git submodules will give blank dirs
# Check check if submodules are cloned
if(WITH_INTERNATIONAL)
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/release/datafiles/locale/languages")
file(GLOB RESULT "${CMAKE_SOURCE_DIR}/release/datafiles/locale")
list(LENGTH RESULT DIR_LEN)
if(DIR_LEN EQUAL 0)
message(WARNING
"Translation path '${CMAKE_SOURCE_DIR}/release/datafiles/locale' is missing, "
"This is a 'git submodule', which are known not to work with bridges to other version "
@@ -778,7 +772,9 @@ if(WITH_PYTHON)
message(FATAL_ERROR "At least Python 3.7 is required to build")
endif()
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/release/scripts/addons/modules")
file(GLOB RESULT "${CMAKE_SOURCE_DIR}/release/scripts/addons")
list(LENGTH RESULT DIR_LEN)
if(DIR_LEN EQUAL 0)
message(WARNING
"Addons path '${CMAKE_SOURCE_DIR}/release/scripts/addons' is missing, "
"This is a 'git submodule', which are known not to work with bridges to other version "
@@ -827,67 +823,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
#
@@ -969,7 +912,7 @@ if(MSVC)
# endianess-detection and auto-setting is counterproductive
# so we just set endianness according CMAKE_OSX_ARCHITECTURES
elseif(CMAKE_OSX_ARCHITECTURES MATCHES i386 OR CMAKE_OSX_ARCHITECTURES MATCHES x86_64)
elseif(CMAKE_OSX_ARCHITECTURES MATCHES i386 OR CMAKE_OSX_ARCHITECTURES MATCHES x86_64 OR CMAKE_OSX_ARCHITECTURES MATCHES arm64)
add_definitions(-D__LITTLE_ENDIAN__)
elseif(CMAKE_OSX_ARCHITECTURES MATCHES ppc OR CMAKE_OSX_ARCHITECTURES MATCHES ppc64)
add_definitions(-D__BIG_ENDIAN__)
@@ -997,6 +940,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.
@@ -1020,7 +985,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")
@@ -1080,7 +1045,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)
@@ -1090,7 +1058,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")
@@ -1130,10 +1098,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)
@@ -1176,6 +1140,7 @@ if(WITH_SYSTEM_GLEW)
message(FATAL_ERROR "GLEW is required to build Blender. Install it or disable WITH_SYSTEM_GLEW.")
endif()
set(GLEW_INCLUDE_PATH "${GLEW_INCLUDE_DIR}")
set(BLENDER_GLEW_LIBRARIES ${GLEW_LIBRARY})
else()
if(WITH_GLEW_ES)
@@ -1204,10 +1169,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()
@@ -1294,7 +1255,7 @@ endif()
if(WITH_LIBMV)
# We always have C++11 which includes unordered_map.
set(CERES_DEFINES -DCERES_STD_UNORDERED_MAP)
set(CERES_DEFINES "-DCERES_STD_UNORDERED_MAP;-DCERES_USE_CXX_THREADS")
endif()
#-----------------------------------------------------------------------------
@@ -1388,13 +1349,16 @@ if(CMAKE_COMPILER_IS_GNUCC)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_LOGICAL_OP -Wlogical-op)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNDEF -Wundef)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_INIT_SELF -Winit-self) # needs -Wuninitialized
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_NULL -Wnonnull) # C only
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_MISSING_INCLUDE_DIRS -Wmissing-include-dirs)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_DIV_BY_ZERO -Wno-div-by-zero)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_TYPE_LIMITS -Wtype-limits)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_FORMAT_SIGN -Wformat-signedness)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_RESTRICT -Wrestrict)
# C-only.
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_NULL -Wnonnull)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ABSOLUTE_VALUE -Wabsolute-value)
# gcc 4.2 gives annoying warnings on every file with this
if(NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "4.3")
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNINITIALIZED -Wuninitialized)
@@ -1427,7 +1391,6 @@ if(CMAKE_COMPILER_IS_GNUCC)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_DIV_BY_ZERO -Wno-div-by-zero)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_TYPE_LIMITS -Wtype-limits)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_ERROR_RETURN_TYPE -Werror=return-type)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_ERROR_IMPLICIT_FUNCTION_DECLARATION -Werror=implicit-function-declaration)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_CHAR_SUBSCRIPTS -Wno-char-subscripts)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_UNKNOWN_PRAGMAS -Wno-unknown-pragmas)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_POINTER_ARITH -Wpointer-arith)
@@ -1502,6 +1465,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)
@@ -1520,6 +1484,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")
@@ -1564,7 +1530,7 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "MSVC")
if(MSVC_VERSION GREATER_EQUAL 1911)
# see https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/c5038?view=vs-2017
set(_WARNINGS "${_WARNINGS} /w35038") #order of initialisation in c++ constructors
set(_WARNINGS "${_WARNINGS} /w35038") # order of initialization in c++ constructors
endif()
string(REPLACE ";" " " _WARNINGS "${_WARNINGS}")
@@ -1604,17 +1570,22 @@ if(WITH_PYTHON)
endif()
endif()
if(
if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17")
# Make MSVC properly report the value of the __cplusplus preprocessor macro
# Available MSVC 15.7 (1914) and up, without this it reports 199711L regardless
# of the C++ standard chosen above
if(MSVC_VERSION GREATER 1913)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:__cplusplus")
endif()
elseif(
CMAKE_COMPILER_IS_GNUCC OR
CMAKE_C_COMPILER_ID MATCHES "Clang" OR
CMAKE_C_COMPILER_ID MATCHES "Intel"
)
# TODO(sergey): Do we want c++11 or gnu-c++11 here?
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(MSVC)
# Nothing special is needed, C++11 features are available by default.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
else()
message(FATAL_ERROR "Unknown compiler ${CMAKE_C_COMPILER_ID}, can't enable C++11 build")
message(FATAL_ERROR "Unknown compiler ${CMAKE_C_COMPILER_ID}, can't enable C++17 build")
endif()
# Visual Studio has all standards it supports available by default
@@ -1628,6 +1599,12 @@ if(
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
endif()
if(UNIX AND NOT APPLE)
if(NOT WITH_CXX11_ABI)
set(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -D_GLIBCXX_USE_CXX11_ABI=0")
endif()
endif()
# Include warnings first, so its possible to disable them with user defined flags
# eg: -Wno-uninitialized
set(CMAKE_C_FLAGS "${C_WARNINGS} ${CMAKE_C_FLAGS} ${PLATFORM_CFLAGS}")
@@ -1669,10 +1646,6 @@ endif()
#-----------------------------------------------------------------------------
# Libraries
if(WITH_GTESTS)
include(GTestTesting)
endif()
if(WITH_BLENDER)
add_subdirectory(intern)
add_subdirectory(extern)
@@ -1760,13 +1733,18 @@ if(FIRST_RUN)
info_cfg_option(WITH_CYCLES)
info_cfg_option(WITH_FREESTYLE)
info_cfg_option(WITH_OPENCOLORIO)
info_cfg_option(WITH_XR_OPENXR)
info_cfg_option(WITH_OPENIMAGEDENOISE)
info_cfg_option(WITH_OPENVDB)
info_cfg_option(WITH_ALEMBIC)
info_cfg_option(WITH_QUADRIFLOW)
info_cfg_option(WITH_USD)
info_cfg_option(WITH_TBB)
info_cfg_option(WITH_GMP)
info_cfg_text("Compiler Options:")
info_cfg_option(WITH_BUILDINFO)
info_cfg_option(WITH_OPENMP)
info_cfg_option(WITH_RAYOPTIMIZATION)
info_cfg_text("System Options:")
info_cfg_option(WITH_INSTALL_PORTABLE)

View File

@@ -32,6 +32,7 @@ Convenience Targets
* debug: Build a debug binary.
* full: Enable all supported dependencies & options.
* lite: Disable non essential features for a smaller binary and faster build.
* release Complete build with all options enabled including CUDA and Optix, matching the releases on blender.org
* headless: Build without an interface (renderfarm or server automation).
* cycles: Build Cycles standalone only, without Blender.
* bpy: Build as a python module which can be loaded from python directly.
@@ -62,8 +63,7 @@ Testing Targets
Not associated with building Blender.
* test:
Run ctest, currently tests import/export,
operator execution and that python modules load
Run automated tests with ctest.
* test_cmake:
Runs our own cmake file checker
which detects errors in the cmake file list definitions
@@ -72,17 +72,6 @@ Testing Targets
which are tagged to use the stricter formatting
* test_deprecated:
Checks for deprecation tags in our code which may need to be removed
* test_style_c:
Checks C/C++ conforms with blenders style guide:
https://wiki.blender.org/wiki/Source/Code_Style
* test_style_c_qtc:
Same as test_style but outputs QtCreator tasks format
* test_style_osl:
Checks OpenShadingLanguage conforms with blenders style guide:
https://wiki.blender.org/wiki/Source/Code_Style
* test_style_osl_qtc:
Checks OpenShadingLanguage conforms with blenders style guide:
https://wiki.blender.org/wiki/Source/Code_Style
Static Source Code Checking
Not associated with building Blender.
@@ -119,7 +108,7 @@ Utilities
Example
make icons_geom BLENDER_BIN=/path/to/blender
* tgz:
* source_archive:
Create a compressed archive of the source code.
* update:
@@ -153,6 +142,10 @@ Information
endef
# HELP_TEXT (end)
# This makefile is not meant for Windows
ifeq ($(OS),Windows_NT)
$(error On Windows, use "cmd //c make.bat" instead of "make")
endif
# System Vars
OS:=$(shell uname -s)
@@ -164,9 +157,8 @@ CPU:=$(shell uname -m)
BLENDER_DIR:=$(shell pwd -P)
BUILD_TYPE:=Release
ifndef BUILD_CMAKE_ARGS
BUILD_CMAKE_ARGS:=
endif
# CMake arguments, assigned to local variable to make it mutable.
CMAKE_CONFIG_ARGS := $(BUILD_CMAKE_ARGS)
ifndef BUILD_DIR
BUILD_DIR:=$(shell dirname "$(BLENDER_DIR)")/build_$(OS_NCASE)
@@ -193,6 +185,16 @@ ifndef PYTHON
PYTHON:=python3
endif
# For macOS python3 is not installed by default, so fallback to python binary
# in libraries, or python 2 for running make update to get it.
ifeq ($(OS_NCASE),darwin)
ifeq (, $(shell command -v $(PYTHON)))
PYTHON:=../lib/darwin/python/bin/python3.7m
ifeq (, $(shell command -v $(PYTHON)))
PYTHON:=python
endif
endif
endif
# -----------------------------------------------------------------------------
# additional targets for the build configuration
@@ -204,37 +206,52 @@ ifneq "$(findstring debug, $(MAKECMDGOALS))" ""
endif
ifneq "$(findstring full, $(MAKECMDGOALS))" ""
BUILD_DIR:=$(BUILD_DIR)_full
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/blender_full.cmake"
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/blender_full.cmake" $(CMAKE_CONFIG_ARGS)
endif
ifneq "$(findstring lite, $(MAKECMDGOALS))" ""
BUILD_DIR:=$(BUILD_DIR)_lite
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/blender_lite.cmake"
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/blender_lite.cmake" $(CMAKE_CONFIG_ARGS)
endif
ifneq "$(findstring release, $(MAKECMDGOALS))" ""
BUILD_DIR:=$(BUILD_DIR)_release
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/blender_release.cmake" $(CMAKE_CONFIG_ARGS)
endif
ifneq "$(findstring cycles, $(MAKECMDGOALS))" ""
BUILD_DIR:=$(BUILD_DIR)_cycles
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/cycles_standalone.cmake"
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/cycles_standalone.cmake" $(CMAKE_CONFIG_ARGS)
endif
ifneq "$(findstring headless, $(MAKECMDGOALS))" ""
BUILD_DIR:=$(BUILD_DIR)_headless
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/blender_headless.cmake"
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/blender_headless.cmake" $(CMAKE_CONFIG_ARGS)
endif
ifneq "$(findstring bpy, $(MAKECMDGOALS))" ""
BUILD_DIR:=$(BUILD_DIR)_bpy
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/bpy_module.cmake"
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/bpy_module.cmake" $(CMAKE_CONFIG_ARGS)
endif
ifneq "$(findstring developer, $(MAKECMDGOALS))" ""
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/blender_developer.cmake"
CMAKE_CONFIG_ARGS:=-C"$(BLENDER_DIR)/build_files/cmake/config/blender_developer.cmake" $(CMAKE_CONFIG_ARGS)
endif
# -----------------------------------------------------------------------------
# build tool
ifneq "$(findstring ninja, $(MAKECMDGOALS))" ""
CMAKE_CONFIG_ARGS:=$(CMAKE_CONFIG_ARGS) -G Ninja
BUILD_COMMAND:=ninja
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -G Ninja
DEPS_BUILD_COMMAND:=ninja
else
BUILD_COMMAND:=make -s
ifneq ("$(wildcard $(BUILD_DIR)/build.ninja)","")
BUILD_COMMAND:=ninja
else
BUILD_COMMAND:=make -s
endif
ifneq ("$(wildcard $(DEPS_BUILD_DIR)/build.ninja)","")
DEPS_BUILD_COMMAND:=ninja
else
DEPS_BUILD_COMMAND:=make -s
endif
endif
# -----------------------------------------------------------------------------
@@ -256,7 +273,10 @@ ifndef NPROCS
ifeq ($(OS), Linux)
NPROCS:=$(shell nproc)
endif
ifneq (,$(filter $(OS),Darwin FreeBSD NetBSD))
ifeq ($(OS), NetBSD)
NPROCS:=$(shell getconf NPROCESSORS_ONLN)
endif
ifneq (,$(filter $(OS),Darwin FreeBSD))
NPROCS:=$(shell sysctl -n hw.ncpu)
endif
endif
@@ -265,7 +285,7 @@ endif
# -----------------------------------------------------------------------------
# Macro for configuring cmake
CMAKE_CONFIG = cmake $(BUILD_CMAKE_ARGS) \
CMAKE_CONFIG = cmake $(CMAKE_CONFIG_ARGS) \
-H"$(BLENDER_DIR)" \
-B"$(BUILD_DIR)" \
-DCMAKE_BUILD_TYPE_INIT:STRING=$(BUILD_TYPE)
@@ -306,6 +326,7 @@ all: .FORCE
debug: all
full: all
lite: all
release: all
cycles: all
headless: all
bpy: all
@@ -329,7 +350,7 @@ deps: .FORCE
@echo
@echo Building dependencies ...
$(BUILD_COMMAND) -C "$(DEPS_BUILD_DIR)" -j $(NPROCS) $(DEPS_TARGET)
$(DEPS_BUILD_COMMAND) -C "$(DEPS_BUILD_DIR)" -j $(NPROCS) $(DEPS_TARGET)
@echo
@echo Dependencies successfully built and installed to $(DEPS_INSTALL_DIR).
@echo
@@ -364,7 +385,7 @@ package_archive: .FORCE
# Tests
#
test: .FORCE
cd $(BUILD_DIR) ; ctest . --output-on-failure
$(PYTHON) ./build_files/utils/make_test.py "$(BUILD_DIR)"
# run pep8 check check on scripts we distribute.
test_pep8: .FORCE
@@ -380,45 +401,6 @@ test_cmake: .FORCE
test_deprecated: .FORCE
$(PYTHON) tests/check_deprecated.py
test_style_c: .FORCE
# run our own checks on C/C++ style
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/source/blender" \
"$(BLENDER_DIR)/source/creator" \
--no-length-check
test_style_c_qtc: .FORCE
# run our own checks on C/C++ style
USE_QTC_TASK=1 \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/source/blender" \
"$(BLENDER_DIR)/source/creator" \
--no-length-check \
> \
"$(BLENDER_DIR)/test_style.tasks"
@echo "written: test_style.tasks"
test_style_osl: .FORCE
# run our own checks on C/C++ style
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/intern/cycles/kernel/shaders" \
"$(BLENDER_DIR)/release/scripts/templates_osl"
test_style_osl_qtc: .FORCE
# run our own checks on C/C++ style
USE_QTC_TASK=1 \
PYTHONIOENCODING=utf_8 $(PYTHON) \
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
"$(BLENDER_DIR)/intern/cycles/kernel/shaders" \
"$(BLENDER_DIR)/release/scripts/templates_osl" \
> \
"$(BLENDER_DIR)/test_style.tasks"
@echo "written: test_style.tasks"
# -----------------------------------------------------------------------------
# Project Files
@@ -505,8 +487,8 @@ check_descriptions: .FORCE
# Utilities
#
tgz: .FORCE
./build_files/utils/build_tgz.sh
source_archive: .FORCE
./build_files/utils/make_source_archive.sh
INKSCAPE_BIN?="inkscape"
icons: .FORCE
@@ -520,21 +502,11 @@ icons_geom: .FORCE
"$(BLENDER_DIR)/release/datafiles/blender_icons_geom_update.py"
update: .FORCE
if [ "$(OS_NCASE)" = "darwin" ] && [ ! -d "../lib/$(OS_NCASE)" ]; then \
svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/$(OS_NCASE) ../lib/$(OS_NCASE) ; \
fi
if [ -d "../lib" ]; then \
svn cleanup ../lib/* ; \
svn update ../lib/* ; \
fi
git pull --rebase
git submodule update --init --recursive
git submodule foreach git checkout master
git submodule foreach git pull --rebase origin master
$(PYTHON) ./build_files/utils/make_update.py
format: .FORCE
PATH="../lib/${OS_NCASE}/llvm/bin/:$(PATH)" \
python3 source/tools/utils_maintenance/clang_format_paths.py $(PATHS)
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

@@ -30,7 +30,7 @@
# build_deps 2015 x64 / build_deps 2015 x86
#
# MAC OS X USAGE:
# Install with homebrew: brew install cmake autoconf automake libtool yasm nasm
# Install with homebrew: brew install cmake autoconf automake libtool yasm nasm bison
# Run "make deps" from main Blender directory
#
# LINUX USAGE:
@@ -43,28 +43,22 @@ project("BlenderDependencies")
cmake_minimum_required(VERSION 3.5)
include(ExternalProject)
include(cmake/check_software.cmake)
include(cmake/options.cmake)
include(cmake/versions.cmake)
if(ENABLE_MINGW64)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
include(cmake/setup_mingw64.cmake)
else()
include(cmake/setup_mingw32.cmake)
endif()
include(cmake/setup_mingw64.cmake)
else()
set(mingw_LIBDIR ${LIBDIR})
endif()
include(cmake/zlib.cmake)
include(cmake/blendthumb.cmake)
include(cmake/openal.cmake)
include(cmake/png.cmake)
include(cmake/jpeg.cmake)
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)
@@ -81,6 +75,7 @@ include(cmake/llvm.cmake)
include(cmake/clang.cmake)
if(APPLE)
include(cmake/openmp.cmake)
include(cmake/nasm.cmake)
endif()
include(cmake/openimageio.cmake)
include(cmake/tiff.cmake)
@@ -90,33 +85,40 @@ include(cmake/tbb.cmake)
include(cmake/openvdb.cmake)
include(cmake/python.cmake)
include(cmake/python_site_packages.cmake)
include(cmake/package_python.cmake)
include(cmake/numpy.cmake)
if(UNIX AND NOT APPLE)
include(cmake/usd.cmake)
# Boost needs to be included after python.cmake due to the PYTHON_BINARY variable being needed.
include(cmake/boost.cmake)
if(UNIX)
# Rely on PugiXML compiled with OpenImageIO
else()
include(cmake/pugixml.cmake)
endif()
if((NOT APPLE) OR ("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64"))
include(cmake/ispc.cmake)
include(cmake/openimagedenoise.cmake)
include(cmake/embree.cmake)
endif()
if(NOT APPLE)
include(cmake/xr_openxr.cmake)
endif()
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)
# OCIO deps
include(cmake/tinyxml.cmake)
include(cmake/yamlcpp.cmake)
# LCMS is an OCIO dep, but only if you build the apps, leaving it here for convenience
#include(cmake/lcms.cmake)
# include(cmake/lcms.cmake)
endif()
if(NOT WIN32 OR ENABLE_MINGW64)
include(cmake/gmp.cmake)
include(cmake/openjpeg.cmake)
if(NOT WIN32 OR BUILD_MODE STREQUAL Release)
if(WIN32)
@@ -126,10 +128,10 @@ if(NOT WIN32 OR ENABLE_MINGW64)
include(cmake/ogg.cmake)
include(cmake/vorbis.cmake)
include(cmake/theora.cmake)
include(cmake/opus.cmake)
include(cmake/vpx.cmake)
include(cmake/x264.cmake)
include(cmake/xvidcore.cmake)
include(cmake/faad.cmake)
include(cmake/ffmpeg.cmake)
include(cmake/fftw.cmake)
include(cmake/sndfile.cmake)
@@ -155,4 +157,9 @@ if(UNIX)
include(cmake/sqlite.cmake)
endif()
if(UNIX AND NOT APPLE)
include(cmake/libglu.cmake)
include(cmake/mesa.cmake)
endif()
include(cmake/harvest.cmake)

View File

@@ -16,22 +16,6 @@
#
# ***** END GPL LICENSE BLOCK *****
if(ALEMBIC_HDF5)
set(ALEMBIC_HDF5_HL)
# in debug mode we do not build HDF5_hdf5_hl_LIBRARY which makes cmake really
# unhappy, stub it with the debug mode lib. it's not linking it in at this
# point in time anyhow
if(BUILD_MODE STREQUAL Debug)
set(ALEMBIC_HDF5_HL -DHDF5_hdf5_hl_LIBRARY=${LIBDIR}/hdf5/lib/libhdf5_hl_D.${LIBEXT})
endif()
endif()
if(WIN32)
set(ALEMBIC_ILMBASE ${LIBDIR}/openexr)
else()
set(ALEMBIC_ILMBASE ${LIBDIR}/ilmbase)
endif()
set(ALEMBIC_EXTRA_ARGS
-DBUILDSTATIC=ON
-DLINKSTATIC=ON
@@ -40,17 +24,18 @@ set(ALEMBIC_EXTRA_ARGS
-DBoost_USE_MULTITHREADED=ON
-DUSE_STATIC_BOOST=On
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBoost_USE_STATIC_RUNTIME=OFF
-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}
-DBoost_NO_BOOST_CMAKE=ON
-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
@@ -58,7 +43,6 @@ set(ALEMBIC_EXTRA_ARGS
-DUSE_PRMAN=0
-DUSE_HDF5=Off
-DUSE_STATIC_HDF5=Off
-DHDF5_ROOT=${LIBDIR}/hdf5
-DUSE_TESTS=Off
-DALEMBIC_NO_OPENGL=1
-DUSE_BINARIES=ON
@@ -67,7 +51,6 @@ set(ALEMBIC_EXTRA_ARGS
-DGLUT_INCLUDE_DIR=""
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
${ALEMBIC_HDF5_HL}
)
ExternalProject_Add(external_alembic
@@ -100,6 +83,5 @@ add_dependencies(
external_alembic
external_boost
external_zlib
external_ilmbase
external_openexr
)

View File

@@ -1,67 +0,0 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(BUILD_MODE STREQUAL Release)
if(WIN32)
set(THUMB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../release/windows/blendthumb)
ExternalProject_Add(external_zlib_32
URL ${ZLIB_URI}
CMAKE_GENERATOR ${GENERATOR_32}
URL_HASH MD5=${ZLIB_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/zlib32
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib32 ${DEFAULT_CMAKE_FLAGS}
INSTALL_DIR ${LIBDIR}/zlib32
)
ExternalProject_Add(external_zlib_64
URL ${ZLIB_URI}
CMAKE_GENERATOR ${GENERATOR_64}
URL_HASH MD5=${ZLIB_HASH}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
PREFIX ${BUILD_DIR}/zlib64
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib64 ${DEFAULT_CMAKE_FLAGS}
INSTALL_DIR ${LIBDIR}/zlib64
)
ExternalProject_Add(external_blendthumb_32
CMAKE_GENERATOR ${GENERATOR_32}
SOURCE_DIR ${THUMB_DIR}
PREFIX ${BUILD_DIR}/blendthumb32
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blendThumb32 ${DEFAULT_CMAKE_FLAGS} -DZLIB_INCLUDE=${LIBDIR}/zlib32/include -DZLIB_LIBS=${LIBDIR}/zlib32/lib/zlibstatic.lib
INSTALL_DIR ${LIBDIR}/blendthumb32
)
add_dependencies(
external_blendthumb_32
external_zlib_32
)
ExternalProject_Add(external_blendthumb_64
CMAKE_GENERATOR ${GENERATOR_64}
SOURCE_DIR ${THUMB_DIR}
PREFIX ${BUILD_DIR}/blendthumb64
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/blendThumb64 ${DEFAULT_CMAKE_FLAGS} -DZLIB_INCLUDE=${LIBDIR}/zlib64/include -DZLIB_LIBS=${LIBDIR}/zlib64/lib/zlibstatic.lib
INSTALL_DIR ${LIBDIR}/blendthumb64
)
add_dependencies(
external_blendthumb_64
external_zlib_64
)
endif()
endif()

View File

@@ -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

@@ -19,42 +19,21 @@
set(BOOST_ADDRESS_MODEL 64)
if(WIN32)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(PYTHON_ARCH x64)
set(PYTHON_ARCH2 win-AMD64)
set(PYTHON_OUTPUTDIR ${BUILD_DIR}/python/src/external_python/pcbuild/amd64/)
else()
set(PYTHON_ARCH x86)
set(PYTHON_ARCH2 win32)
set(PYTHON_OUTPUTDIR ${BUILD_DIR}/python/src/external_python/pcbuild/win32/)
set(BOOST_ADDRESS_MODEL 32)
endif()
if(MSVC14)
set(BOOST_TOOLSET toolset=msvc-14.0)
set(BOOST_COMPILER_STRING -vc140)
endif()
set(JAM_FILE ${BUILD_DIR}/boost/src/external_boost/user-config.jam)
set(semi_path "${PATCH_DIR}/semi.txt")
FILE(TO_NATIVE_PATH ${semi_path} semi_path)
set(BOOST_CONFIGURE_COMMAND bootstrap.bat &&
echo using python : ${PYTHON_OUTPUTDIR}\\python.exe > "${JAM_FILE}" &&
echo. : ${BUILD_DIR}/python/src/external_python/include ${BUILD_DIR}/python/src/external_python/pc >> "${JAM_FILE}" &&
echo. : ${BUILD_DIR}/python/src/external_python/pcbuild >> "${JAM_FILE}" &&
type ${semi_path} >> "${JAM_FILE}"
)
set(BOOST_TOOLSET toolset=msvc-14.1)
set(BOOST_COMPILER_STRING -vc141)
set(BOOST_CONFIGURE_COMMAND bootstrap.bat)
set(BOOST_BUILD_COMMAND bjam)
#--user-config=user-config.jam
set(BOOST_BUILD_OPTIONS runtime-link=static )
#set(BOOST_WITH_PYTHON --with-python)
set(BOOST_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=clang-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()
@@ -70,6 +49,21 @@ else()
endif()
endif()
if(WITH_BOOST_PYTHON)
set(JAM_FILE ${BUILD_DIR}/boost.user-config.jam)
configure_file(${PATCH_DIR}/boost.user.jam.in ${JAM_FILE})
set(BOOST_PYTHON_OPTIONS
--with-python
--user-config=${JAM_FILE}
)
if(WIN32 AND BUILD_MODE STREQUAL Debug)
set(BOOST_PYTHON_OPTIONS
${BOOST_PYTHON_OPTIONS}
define=BOOST_DEBUG_PYTHON
)
endif()
endif()
set(BOOST_OPTIONS
--with-filesystem
--with-locale
@@ -82,8 +76,11 @@ set(BOOST_OPTIONS
--with-serialization
--with-program_options
--with-iostreams
${BOOST_WITH_PYTHON}
-sNO_BZIP2=1
-sNO_LZMA=1
-sNO_ZSTD=1
${BOOST_TOOLSET}
${BOOST_PYTHON_OPTIONS}
)
string(TOLOWER ${BUILD_MODE} BOOST_BUILD_TYPE)
@@ -101,9 +98,10 @@ ExternalProject_Add(external_boost
INSTALL_COMMAND "${BOOST_HARVEST_CMD}"
)
if(WIN32)
if(WITH_BOOST_PYTHON)
add_dependencies(
external_boost
Make_Python_Environment
external_python
external_numpy
)
endif()

View File

@@ -25,6 +25,8 @@ if(UNIX AND NOT APPLE)
set(BZIP2_CFLAGS "-fPIC -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64")
set(BZIP2_CONFIGURE_ENV ${BZIP2_CONFIGURE_ENV} && export LDFLAGS=${BZIP2_LDFLAGS} && export CFLAGS=${BZIP2_CFLAGS}
&& export PREFIX=${BZIP2_PREFIX})
else()
set(BZIP2_CONFIGURE_ENV ${CONFIGURE_ENV})
endif()
ExternalProject_Add(external_bzip2

View File

@@ -0,0 +1,66 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(UNIX)
if(APPLE)
set(_libtoolize_name glibtoolize)
else()
set(_libtoolize_name libtoolize)
endif()
set(_required_software
autoconf
automake
${_libtoolize_name}
nasm
yasm
tclsh
bison
)
foreach(_software ${_required_software})
find_program(_software_find NAMES ${_software})
if(NOT _software_find)
set(_software_missing "${_software_missing}${_software} ")
endif()
unset(_software_find CACHE)
endforeach()
if(APPLE)
if(NOT EXISTS "/usr/local/opt/bison/bin/bison")
set(_software_missing "${_software_missing} bison")
endif()
endif()
if(_software_missing)
message(
"\n"
"Missing software for building Blender dependencies:\n"
" ${_software_missing}\n"
"\n"
"On Debian and Ubuntu:\n"
" apt install autoconf automake libtool yasm nasm tcl\n"
"\n"
"On macOS (with homebrew):\n"
" brew install cmake autoconf automake libtool yasm nasm bison\n"
"\n"
"Other platforms:\n"
" Install equivalent packages.\n")
message(FATAL_ERROR "Install missing software before continuing")
endif()
endif()

View File

@@ -19,8 +19,8 @@
set(CLANG_EXTRA_ARGS
-DCLANG_PATH_TO_LLVM_SOURCE=${BUILD_DIR}/ll/src/ll
-DCLANG_PATH_TO_LLVM_BUILD=${LIBDIR}/llvm
-DLLVM_USE_CRT_RELEASE=MT
-DLLVM_USE_CRT_DEBUG=MTd
-DLLVM_USE_CRT_RELEASE=MD
-DLLVM_USE_CRT_DEBUG=MDd
-DLLVM_CONFIG=${LIBDIR}/llvm/bin/llvm-config
)
@@ -30,6 +30,11 @@ else()
set(CLANG_GENERATOR "Unix Makefiles")
endif()
if(APPLE)
set(CLANG_EXTRA_ARGS ${CLANG_EXTRA_ARGS}
-DLIBXML2_LIBRARY=${LIBDIR}/xml2/lib/libxml2.a
)
endif()
ExternalProject_Add(external_clang
URL ${CLANG_URI}
@@ -46,9 +51,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

@@ -26,10 +26,20 @@ set(EMBREE_EXTRA_ARGS
-DEMBREE_RAY_MASK=ON
-DEMBREE_FILTER_FUNCTION=ON
-DEMBREE_BACKFACE_CULLING=OFF
-DEMBREE_TASKING_SYSTEM=INTERNAL
-DEMBREE_MAX_ISA=AVX2
-DEMBREE_TASKING_SYSTEM=TBB
-DEMBREE_TBB_ROOT=${LIBDIR}/tbb
-DTBB_STATIC_LIB=${TBB_STATIC_LIBRARY}
)
if(TBB_STATIC_LIBRARY)
set(EMBREE_EXTRA_ARGS
${EMBREE_EXTRA_ARGS}
-DEMBREE_TBB_LIBRARY_NAME=tbb_static
-DEMBREE_TBBMALLOC_LIBRARY_NAME=tbbmalloc_static
)
endif()
if(WIN32)
set(EMBREE_BUILD_DIR ${BUILD_MODE}/)
else()
@@ -41,9 +51,16 @@ ExternalProject_Add(external_embree
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${EMBREE_HASH}
PREFIX ${BUILD_DIR}/embree
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/embree/src/external_embree < ${PATCH_DIR}/embree.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/embree ${DEFAULT_CMAKE_FLAGS} ${EMBREE_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/embree
)
add_dependencies(
external_embree
external_tbb
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)

View File

@@ -1,40 +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 *****
set(FAAD_EXTRA_ARGS)
if(WIN32)
set(FAAD_EXTRA_CONFIGURE "utils\\win32\\ac2ver.exe" "faad2" "configure.ac" > libfaad\\win32_ver.h)
else()
set(FAAD_EXTRA_CONFIGURE echo .)
endif()
ExternalProject_Add(external_faad
URL ${FAAD_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FAAD_HASH}
PREFIX ${BUILD_DIR}/faad
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && ${FAAD_EXTRA_CONFIGURE} && ${CONFIGURE_COMMAND} --disable-shared --enable-static --prefix=${LIBDIR}/faad
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/faad/src/external_faad/ && make install
INSTALL_DIR ${LIBDIR}/faad
)
if(MSVC)
set_target_properties(external_faad PROPERTIES FOLDER Mingw)
endif()

View File

@@ -16,10 +16,10 @@
#
# ***** END GPL LICENSE BLOCK *****
set(FFMPEG_CFLAGS "-I${mingw_LIBDIR}/lame/include -I${mingw_LIBDIR}/openjpeg/include/ -I${mingw_LIBDIR}/ogg/include -I${mingw_LIBDIR}/vorbis/include -I${mingw_LIBDIR}/theora/include -I${mingw_LIBDIR}/vpx/include -I${mingw_LIBDIR}/x264/include -I${mingw_LIBDIR}/xvidcore/include -I${mingw_LIBDIR}/zlib/include")
set(FFMPEG_LDFLAGS "-L${mingw_LIBDIR}/lame/lib -L${mingw_LIBDIR}/openjpeg/lib -L${mingw_LIBDIR}/ogg/lib -L${mingw_LIBDIR}/vorbis/lib -L${mingw_LIBDIR}/theora/lib -L${mingw_LIBDIR}/vpx/lib -L${mingw_LIBDIR}/x264/lib -L${mingw_LIBDIR}/xvidcore/lib -L${mingw_LIBDIR}/zlib/lib")
set(FFMPEG_CFLAGS "-I${mingw_LIBDIR}/lame/include -I${mingw_LIBDIR}/openjpeg/include/ -I${mingw_LIBDIR}/ogg/include -I${mingw_LIBDIR}/vorbis/include -I${mingw_LIBDIR}/theora/include -I${mingw_LIBDIR}/opus/include -I${mingw_LIBDIR}/vpx/include -I${mingw_LIBDIR}/x264/include -I${mingw_LIBDIR}/xvidcore/include -I${mingw_LIBDIR}/zlib/include")
set(FFMPEG_LDFLAGS "-L${mingw_LIBDIR}/lame/lib -L${mingw_LIBDIR}/openjpeg/lib -L${mingw_LIBDIR}/ogg/lib -L${mingw_LIBDIR}/vorbis/lib -L${mingw_LIBDIR}/theora/lib -L${mingw_LIBDIR}/opus/lib -L${mingw_LIBDIR}/vpx/lib -L${mingw_LIBDIR}/x264/lib -L${mingw_LIBDIR}/xvidcore/lib -L${mingw_LIBDIR}/zlib/lib")
set(FFMPEG_EXTRA_FLAGS --pkg-config-flags=--static --extra-cflags=${FFMPEG_CFLAGS} --extra-ldflags=${FFMPEG_LDFLAGS})
set(FFMPEG_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/openjpeg/lib/pkgconfig:${mingw_LIBDIR}/x264/lib/pkgconfig:${mingw_LIBDIR}/vorbis/lib/pkgconfig:${mingw_LIBDIR}/ogg/lib/pkgconfig:${mingw_LIBDIR})
set(FFMPEG_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/openjpeg/lib/pkgconfig:${mingw_LIBDIR}/x264/lib/pkgconfig:${mingw_LIBDIR}/vorbis/lib/pkgconfig:${mingw_LIBDIR}/ogg/lib/pkgconfig:${mingw_LIBDIR}:${mingw_LIBDIR}/vpx/lib/pkgconfig:${mingw_LIBDIR}/theora/lib/pkgconfig:${mingw_LIBDIR}/openjpeg/lib/pkgconfig:${mingw_LIBDIR}/opus/lib/pkgconfig:)
if(WIN32)
set(FFMPEG_ENV set ${FFMPEG_ENV} &&)
@@ -50,7 +50,8 @@ if(APPLE)
set(FFMPEG_EXTRA_FLAGS
${FFMPEG_EXTRA_FLAGS}
--target-os=darwin
)
--x86asmexe=${LIBDIR}/nasm/bin/nasm
)
endif()
ExternalProject_Add(external_ffmpeg
@@ -73,6 +74,7 @@ ExternalProject_Add(external_ffmpeg
--disable-libgsm
--disable-libspeex
--enable-libvpx
--enable-libopus
--prefix=${LIBDIR}/ffmpeg
--enable-libtheora
--enable-libvorbis
@@ -93,8 +95,6 @@ ExternalProject_Add(external_ffmpeg
--disable-version3
--disable-debug
--enable-optimizations
--disable-sse
--disable-ssse3
--enable-ffplay
--disable-openssl
--disable-securetransport
@@ -126,10 +126,10 @@ endif()
add_dependencies(
external_ffmpeg
external_zlib
external_faad
external_openjpeg
external_xvidcore
external_x264
external_opus
external_vpx
external_theora
external_vorbis
@@ -142,6 +142,12 @@ if(WIN32)
external_zlib_mingw
)
endif()
if(APPLE)
add_dependencies(
external_ffmpeg
external_nasm
)
endif()
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_ffmpeg after_install

View File

@@ -19,8 +19,12 @@
set(FFTW_EXTRA_ARGS)
if(WIN32)
set(FFTW3_ENV set CFLAGS=-fno-stack-check -fno-stack-protector -mno-stack-arg-probe -fno-lto &&)
set(FFTW3_PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/fftw3/src/external_fftw3 < ${PATCH_DIR}/fftw3.diff)
set(FFTW_EXTRA_ARGS --disable-static --enable-shared)
set(FFTW_INSTALL install-strip)
else()
set(FFTW_EXTRA_ARGS --enable-static)
set(FFTW_INSTALL install)
endif()
ExternalProject_Add(external_fftw3
@@ -28,10 +32,10 @@ ExternalProject_Add(external_fftw3
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${FFTW_HASH}
PREFIX ${BUILD_DIR}/fftw3
CONFIGURE_COMMAND ${CONFIGURE_ENV} && ${FFTW3_ENV} cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && ${CONFIGURE_COMMAND} --enable-static --prefix=${mingw_LIBDIR}/fftw3
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && ${CONFIGURE_COMMAND} ${FFTW_EXTRA_ARGS} --prefix=${mingw_LIBDIR}/fftw3
PATCH_COMMAND ${FFTW3_PATCH_COMMAND}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make install
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3/ && make ${FFTW_INSTALL}
INSTALL_DIR ${LIBDIR}/fftw3
)
@@ -39,7 +43,8 @@ if(MSVC)
set_target_properties(external_fftw3 PROPERTIES FOLDER Mingw)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_fftw3 after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/lib/libfftw3.a ${HARVEST_TARGET}/fftw3/lib/libfftw.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/lib/libfftw3.dll.a ${HARVEST_TARGET}/fftw3/lib/libfftw.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/bin/libfftw3-3.dll ${HARVEST_TARGET}/fftw3/lib/libfftw3-3.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/include/fftw3.h ${HARVEST_TARGET}/fftw3/include/fftw3.h
DEPENDEES install
)

View File

@@ -24,7 +24,8 @@ set(FREETYPE_EXTRA_ARGS
-DFT_WITH_HARFBUZZ=OFF
-DFT_WITH_BZIP2=OFF
-DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=TRUE
-DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE)
-DCMAKE_DISABLE_FIND_PACKAGE_BZip2=TRUE
-DCMAKE_DISABLE_FIND_PACKAGE_BrotliDec=TRUE)
ExternalProject_Add(external_freetype
URL ${FREETYPE_URI}
@@ -32,7 +33,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

@@ -0,0 +1,95 @@
# ***** 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(GMP_EXTRA_ARGS -enable-cxx)
if(WIN32)
# Shared for windows because static libs will drag in a libgcc dependency.
set(GMP_OPTIONS --disable-static --enable-shared --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32)
else()
set(GMP_OPTIONS --enable-static --disable-shared )
endif()
if(APPLE AND ("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64"))
set(GMP_OPTIONS
${GMP_OPTIONS}
--disable-assembly
)
endif()
ExternalProject_Add(external_gmp
URL ${GMP_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${GMP_HASH}
PREFIX ${BUILD_DIR}/gmp
CONFIGURE_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/gmp/src/external_gmp/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/gmp ${GMP_OPTIONS} ${GMP_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/gmp/src/external_gmp/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/gmp/src/external_gmp/ && make install
INSTALL_DIR ${LIBDIR}/gmp
)
if(MSVC)
set_target_properties(external_gmp PROPERTIES FOLDER Mingw)
endif()
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_gmp after_install
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-3.dll.def ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def
COMMAND lib /def:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def /machine:x64 /out:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/gmp/bin/libgmp-10.dll ${HARVEST_TARGET}/gmp/lib/libgmp-10.dll
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib ${HARVEST_TARGET}/gmp/lib/libgmp-10.lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/gmp/include ${HARVEST_TARGET}/gmp/include
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug AND WIN32)
ExternalProject_Add_Step(external_gmp after_install
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-3.dll.def ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def
COMMAND lib /def:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def /machine:x64 /out:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib
DEPENDEES install
)
endif()
if(WIN32)
# gmpxx is somewhat special, it builds on top of the C style gmp library but exposes C++ bindings
# given the C++ ABI between MSVC and mingw is not compatible, we need to build the bindings
# with MSVC, while GMP can only be build with mingw.
ExternalProject_Add(external_gmpxx
URL ${GMP_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${GMP_HASH}
PREFIX ${BUILD_DIR}/gmpxx
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_gmpxx.txt ${BUILD_DIR}/gmpxx/src/external_gmpxx/CMakeLists.txt &&
${CMAKE_COMMAND} -E copy ${PATCH_DIR}/config_gmpxx.h ${BUILD_DIR}/gmpxx/src/external_gmpxx/config.h
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/gmpxx ${DEFAULT_CMAKE_FLAGS} -DGMP_LIBRARY=${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib -DGMP_INCLUDE_DIR=${BUILD_DIR}/gmp/src/external_gmp -DCMAKE_DEBUG_POSTFIX=_d
INSTALL_DIR ${LIBDIR}/gmpxx
)
set_target_properties(external_gmpxx PROPERTIES FOLDER Mingw)
add_dependencies(
external_gmpxx
external_gmp
)
ExternalProject_Add_Step(external_gmpxx after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/gmpxx/ ${HARVEST_TARGET}/gmp
DEPENDEES install
)
endif()

View File

@@ -31,10 +31,6 @@ if(BUILD_MODE STREQUAL Release)
COMMAND # jpeg rename libfile + copy include
${CMAKE_COMMAND} -E copy ${LIBDIR}/jpg/lib/jpeg-static.lib ${HARVEST_TARGET}/jpeg/lib/libjpeg.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/jpg/include/ ${HARVEST_TARGET}/jpeg/include/ &&
# OpenImageIO
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/include ${HARVEST_TARGET}/OpenImageIO/include &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/lib ${HARVEST_TARGET}/OpenImageIO/lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/OpenImageIO/bin/idiff.exe ${HARVEST_TARGET}/OpenImageIO/bin/idiff.exe &&
# png
${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_static.lib ${HARVEST_TARGET}/png/lib/libpng.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/png/include/ ${HARVEST_TARGET}/png/include/ &&
@@ -44,41 +40,13 @@ if(BUILD_MODE STREQUAL Release)
# glew-> opengl
${CMAKE_COMMAND} -E copy ${LIBDIR}/glew/lib/libglew32.lib ${HARVEST_TARGET}/opengl/lib/glew.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/glew/include/ ${HARVEST_TARGET}/opengl/include/ &&
# sndfile
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/lib/libsndfile.dll.a ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/bin/libsndfile-1.dll ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.dll &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/include/sndfile.h ${HARVEST_TARGET}/sndfile/include/sndfile.h &&
# tiff
${CMAKE_COMMAND} -E copy ${LIBDIR}/tiff/lib/tiff.lib ${HARVEST_TARGET}/tiff/lib/libtiff.lib &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tiff/include/ ${HARVEST_TARGET}/tiff/include/ &&
# BlendThumb
${CMAKE_COMMAND} -E copy ${LIBDIR}/BlendThumb64/bin/blendthumb.dll ${HARVEST_TARGET}/ThumbHandler/lib/BlendThumb64.dll &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/BlendThumb32/bin/blendthumb.dll ${HARVEST_TARGET}/ThumbHandler/lib/BlendThumb.dll &&
# hidapi
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hidapi/ ${HARVEST_TARGET}/hidapi/ &&
# webp, straight up copy
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/webp ${HARVEST_TARGET}/webp &&
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tiff/include/ ${HARVEST_TARGET}/tiff/include/
DEPENDS
)
endif()
if(BUILD_MODE STREQUAL Debug)
add_custom_target(Harvest_Debug_Results
# OpenImageIO
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_d.lib &&
${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO_Util.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_Util_d.lib &&
# python
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/python/ ${HARVEST_TARGET}/python/ &&
# hdf5
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/hdf5/lib ${HARVEST_TARGET}/hdf5/lib &&
# numpy
${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}d.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}d.tar.gz &&
# python
${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_d.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_d.tar.gz
DEPENDS Package_Python
)
endif()
else(WIN32)
function(harvest from to)
@@ -121,8 +89,8 @@ 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(gmp/include gmp/include "*.h")
harvest(gmp/lib gmp/lib "*.a")
harvest(jemalloc/include jemalloc/include "*.h")
harvest(jemalloc/lib jemalloc/lib "*.a")
harvest(jpg/include jpeg/include "*.h")
@@ -166,12 +134,20 @@ harvest(openimageio/bin openimageio/bin "maketx")
harvest(openimageio/bin openimageio/bin "oiiotool")
harvest(openimageio/include openimageio/include "*")
harvest(openimageio/lib openimageio/lib "*.a")
if((NOT APPLE) OR ("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64"))
harvest(openimagedenoise/include openimagedenoise/include "*")
harvest(openimagedenoise/lib openimagedenoise/lib "*.a")
harvest(embree/include embree/include "*.h")
harvest(embree/lib embree/lib "*.a")
endif()
harvest(openjpeg/include/openjpeg-2.3 openjpeg/include "*.h")
harvest(openjpeg/lib openjpeg/lib "*.a")
harvest(opensubdiv/include opensubdiv/include "*.h")
harvest(opensubdiv/lib opensubdiv/lib "*.a")
harvest(openvdb/include/openvdb openvdb/include/openvdb "*.h")
harvest(openvdb/lib openvdb/lib "*.a")
harvest(xr_openxr_sdk/include/openxr xr_openxr_sdk/include/openxr "*.h")
harvest(xr_openxr_sdk/lib xr_openxr_sdk/lib "*.a")
harvest(osl/bin osl/bin "oslc")
harvest(osl/include osl/include "*.h")
harvest(osl/lib osl/lib "*.a")
@@ -193,11 +169,18 @@ harvest(theora/lib ffmpeg/lib "*.a")
harvest(tiff/include tiff/include "*.h")
harvest(tiff/lib tiff/lib "*.a")
harvest(vorbis/lib ffmpeg/lib "*.a")
harvest(opus/lib ffmpeg/lib "*.a")
harvest(vpx/lib ffmpeg/lib "*.a")
harvest(webp/lib ffmpeg/lib "*.a")
harvest(x264/lib ffmpeg/lib "*.a")
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*")
harvest(mesa/lib mesa/lib "*.so*")
endif()
endif()

View File

@@ -1,42 +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 *****
set(HDF5_EXTRA_ARGS
-DHDF5_ENABLE_THREADSAFE=Off
-DHDF5_BUILD_CPP_LIB=Off
-DBUILD_TESTING=Off
-DHDF5_BUILD_TOOLS=Off
-DHDF5_BUILD_EXAMPLES=Off
-DHDF5_BUILD_HL_LIB=On
-DBUILD_STATIC_CRT_LIBS=On
-DBUILD_SHARED_LIBS=On
)
if(WIN32)
set(HDF5_PATCH ${PATCH_CMD} --verbose -p 0 -d ${BUILD_DIR}/hdf5/src/external_hdf5 < ${PATCH_DIR}/hdf5.diff)
endif()
ExternalProject_Add(external_hdf5
URL ${HDF5_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${HDF5_HASH}
PREFIX ${BUILD_DIR}/hdf5
PATCH_COMMAND ${HDF5_PATCH}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/hdf5 ${HDF5_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/hdf5
)

View File

@@ -1,29 +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 *****
set(HIDAPI_EXTRA_ARGS)
ExternalProject_Add(external_hidapi
URL ${HIDAPI_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${HIDAPI_HASH}
PREFIX ${BUILD_DIR}/hidapi
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_hidapi.txt ${BUILD_DIR}/hidapi/src/external_hidapi/cmakelists.txt && ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/hidapi/src/external_hidapi < ${PATCH_DIR}/hidapi.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/hidapi -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${HIDAPI_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/hidapi
)

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

@@ -0,0 +1,75 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(ISPC_EXTRA_ARGS_WIN
-DFLEX_EXECUTABLE=${LIBDIR}/flexbison/win_flex.exe
-DBISON_EXECUTABLE=${LIBDIR}/flexbison/win_bison.exe
-DM4_EXECUTABLE=${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/m4.exe
)
elseif(APPLE)
# Use bison installed via Homebrew.
# The one which comes which Xcode toolset is too old.
set(ISPC_EXTRA_ARGS_APPLE
-DBISON_EXECUTABLE=/usr/local/opt/bison/bin/bison
)
elseif(UNIX)
set(ISPC_EXTRA_ARGS_UNIX
-DCMAKE_C_COMPILER=${LIBDIR}/clang/bin/clang
-DCMAKE_CXX_COMPILER=${LIBDIR}/clang/bin/clang++
)
endif()
set(ISPC_EXTRA_ARGS
-DARM_ENABLED=Off
-DISPC_NO_DUMPS=On
-DISPC_INCLUDE_EXAMPLES=Off
-DISPC_INCLUDE_TESTS=Off
-DLLVM_ROOT=${LIBDIR}/llvm/lib/cmake/llvm
-DLLVM_LIBRARY_DIR=${LIBDIR}/llvm/lib
-DCLANG_EXECUTABLE=${LIBDIR}/clang/bin/clang
-DISPC_INCLUDE_TESTS=Off
-DCLANG_LIBRARY_DIR=${LIBDIR}/clang/lib
-DCLANG_INCLUDE_DIRS=${LIBDIR}/clang/include
${ISPC_EXTRA_ARGS_WIN}
${ISPC_EXTRA_ARGS_APPLE}
${ISPC_EXTRA_ARGS_UNIX}
)
ExternalProject_Add(external_ispc
URL ${ISPC_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${ISPC_HASH}
PREFIX ${BUILD_DIR}/ispc
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/ispc/src/external_ispc < ${PATCH_DIR}/ispc.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ispc -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${ISPC_EXTRA_ARGS} ${BUILD_DIR}/ispc/src/external_ispc
INSTALL_DIR ${LIBDIR}/ispc
)
add_dependencies(
external_ispc
ll
external_clang
)
if(WIN32)
add_dependencies(
external_ispc
external_flexbison
)
endif()

View File

@@ -18,7 +18,7 @@
if(WIN32)
# cmake for windows
set(JPEG_EXTRA_ARGS -DNASM=${NASM_PATH} -DWITH_JPEG8=ON -DCMAKE_DEBUG_POSTFIX=d)
set(JPEG_EXTRA_ARGS -DNASM=${NASM_PATH} -DWITH_JPEG8=ON -DCMAKE_DEBUG_POSTFIX=d -DWITH_CRT_DLL=On)
ExternalProject_Add(external_jpeg
URL ${JPEG_URI}
@@ -42,20 +42,17 @@ if(WIN32)
set(JPEG_LIBRARY jpeg-staticd${LIBEXT})
endif()
else(WIN32)
# autoconf for unix
if(APPLE)
set(JPEG_EXTRA_ARGS --host x86_64-apple-darwin --with-jpeg8)
else()
set(JPEG_EXTRA_ARGS --with-jpeg8)
endif()
# cmake for unix
set(JPEG_EXTRA_ARGS
-DWITH_JPEG8=ON
-DENABLE_STATIC=ON
-DENABLE_SHARED=OFF
-DCMAKE_INSTALL_LIBDIR=${LIBDIR}/jpg/lib)
ExternalProject_Add(external_jpeg
URL ${JPEG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${JPEG_HASH}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && autoreconf -fiv && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/jpg NASM=yasm ${JPEG_EXTRA_ARGS}
BUILD_IN_SOURCE 1
BUILD_COMMAND ${CONFIGURE_ENV} && make install
PREFIX ${BUILD_DIR}/jpg
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/jpg ${DEFAULT_CMAKE_FLAGS} ${JPEG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/jpg

View File

@@ -24,7 +24,7 @@ ExternalProject_Add(external_lcms
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${LCMS_HASH}
PREFIX ${BUILD_DIR}/lcms
#patch taken from ocio
# Patch taken from ocio.
PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_lcms.txt ${BUILD_DIR}/lcms/src/external_lcms/CMakeLists.txt
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/lcms ${DEFAULT_CMAKE_FLAGS} ${LCMS_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/lcms

View File

@@ -0,0 +1,40 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(LIBGLU_CFLAGS "-static-libgcc")
set(LIBGLU_CXXFLAGS "-static-libgcc -static-libstdc++ -Bstatic -lstdc++ -Bdynamic -l:libstdc++.a")
set(LIBGLU_LDFLAGS "-pthread -static-libgcc -static-libstdc++ -Bstatic -lstdc++ -Bdynamic -l:libstdc++.a")
set(LIBGLU_EXTRA_FLAGS
CFLAGS=${LIBGLU_CFLAGS}
CXXFLAGS=${LIBGLU_CXXFLAGS}
LDFLAGS=${LIBGLU_LDFLAGS}
)
ExternalProject_Add(external_libglu
URL ${LIBGLU_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${LIBGLU_HASH}
PREFIX ${BUILD_DIR}/libglu
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
cd ${BUILD_DIR}/libglu/src/external_libglu/ &&
${CONFIGURE_COMMAND_NO_TARGET} --prefix=${LIBDIR}/libglu ${LIBGLU_EXTRA_FLAGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/libglu/src/external_libglu/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/libglu/src/external_libglu/ && make install
INSTALL_DIR ${LIBDIR}/libglu
)

View File

@@ -16,13 +16,21 @@
#
# ***** END GPL LICENSE BLOCK *****
if(APPLE AND "${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
set(LLVM_TARGETS AArch64)
else()
set(LLVM_TARGETS X86)
endif()
set(LLVM_EXTRA_ARGS
-DLLVM_USE_CRT_RELEASE=MT
-DLLVM_USE_CRT_DEBUG=MTd
-DLLVM_USE_CRT_RELEASE=MD
-DLLVM_USE_CRT_DEBUG=MDd
-DLLVM_INCLUDE_TESTS=OFF
-DLLVM_TARGETS_TO_BUILD=X86
-DLLVM_TARGETS_TO_BUILD=${LLVM_TARGETS}
-DLLVM_INCLUDE_EXAMPLES=OFF
-DLLVM_ENABLE_TERMINFO=OFF
-DLLVM_BUILD_LLVM_C_DYLIB=OFF
-DLLVM_ENABLE_UNWIND_TABLES=OFF
)
if(WIN32)
@@ -38,6 +46,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

@@ -0,0 +1,54 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(MESA_CFLAGS "-static-libgcc")
set(MESA_CXXFLAGS "-static-libgcc -static-libstdc++ -Bstatic -lstdc++ -Bdynamic -l:libstdc++.a")
set(MESA_LDFLAGS "-L${LIBDIR}/zlib/lib -pthread -static-libgcc -static-libstdc++ -Bstatic -lstdc++ -Bdynamic -l:libstdc++.a -l:libz_pic.a")
set(MESA_EXTRA_FLAGS
CFLAGS=${MESA_CFLAGS}
CXXFLAGS=${MESA_CXXFLAGS}
LDFLAGS=${MESA_LDFLAGS}
--enable-glx=gallium-xlib
--with-gallium-drivers=swrast
--disable-dri
--disable-gbm
--disable-egl
--disable-gles1
--disable-gles2
--disable-llvm-shared-libs
--with-llvm-prefix=${LIBDIR}/llvm
)
ExternalProject_Add(external_mesa
URL ${MESA_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${MESA_HASH}
PREFIX ${BUILD_DIR}/mesa
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
cd ${BUILD_DIR}/mesa/src/external_mesa/ &&
${CONFIGURE_COMMAND_NO_TARGET} --prefix=${LIBDIR}/mesa ${MESA_EXTRA_FLAGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/mesa/src/external_mesa/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/mesa/src/external_mesa/ && make install
INSTALL_DIR ${LIBDIR}/mesa
)
add_dependencies(
external_mesa
ll
)

View File

@@ -0,0 +1,29 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_nasm
URL ${NASM_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${NASM_HASH}
PREFIX ${BUILD_DIR}/nasm
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/nasm/src/external_nasm < ${PATCH_DIR}/nasm.diff
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/nasm/src/external_nasm/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/nasm
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/nasm/src/external_nasm/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/nasm/src/external_nasm/ && make install
INSTALL_DIR ${LIBDIR}/nasm
)

View File

@@ -17,6 +17,7 @@
# ***** END GPL LICENSE BLOCK *****
if(MSVC)
message("BIN >${PYTHON_BINARY}<")
if(BUILD_MODE STREQUAL Debug)
set(NUMPY_DIR_POSTFIX -pydebug)
set(NUMPY_ARCHIVE_POSTFIX d)
@@ -30,17 +31,6 @@ endif()
set(NUMPY_POSTFIX)
if(WIN32)
set(NUMPY_INSTALL
${CMAKE_COMMAND} -E copy_directory "${BUILD_DIR}/python/src/external_python/run/lib/site-packages/numpy/core/include/numpy" "${LIBDIR}/python/include/python${PYTHON_SHORT_VERSION}/numpy" &&
${CMAKE_COMMAND} -E chdir "${BUILD_DIR}/numpy/src/external_numpy/build/lib.${PYTHON_ARCH2}-${PYTHON_SHORT_VERSION}${NUMPY_DIR_POSTFIX}"
${CMAKE_COMMAND} -E tar "cfvz" "${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz" "."
)
else()
set(NUMPY_INSTALL echo .)
set(NUMPY_PATCH echo .)
endif()
ExternalProject_Add(external_numpy
URL ${NUMPY_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
@@ -48,19 +38,13 @@ ExternalProject_Add(external_numpy
PREFIX ${BUILD_DIR}/numpy
PATCH_COMMAND ${NUMPY_PATCH}
CONFIGURE_COMMAND ""
PATCH_COMMAND COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/numpy/src/external_numpy < ${PATCH_DIR}/numpy.diff
LOG_BUILD 1
BUILD_COMMAND ${PYTHON_BINARY} ${BUILD_DIR}/numpy/src/external_numpy/setup.py build ${NUMPY_BUILD_OPTION} install --old-and-unmanageable
INSTALL_COMMAND ${NUMPY_INSTALL}
INSTALL_COMMAND ""
)
if(WIN32)
ExternalProject_Add_Step(external_numpy after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz
DEPENDEES install
)
endif()
add_dependencies(
external_numpy
Make_Python_Environment
external_python
)

View File

@@ -21,6 +21,7 @@ ExternalProject_Add(external_ogg
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${OGG_HASH}
PREFIX ${BUILD_DIR}/ogg
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/ogg/src/external_ogg < ${PATCH_DIR}/ogg.diff
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ogg --disable-shared --enable-static
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && make install

View File

@@ -52,7 +52,6 @@ if(BUILD_MODE STREQUAL Release)
PREFIX ${BUILD_DIR}/openal
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openal ${DEFAULT_CMAKE_FLAGS} ${OPENAL_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openal
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openal/src/external_openal < ${PATCH_DIR}/openal.diff
)
if(WIN32)

View File

@@ -30,6 +30,13 @@ set(OPENCOLORIO_EXTRA_ARGS
-DOCIO_STATIC_JNIGLUE=OFF
)
if(APPLE AND NOT("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64"))
set(OPENCOLORIO_EXTRA_ARGS
${OPENCOLORIO_EXTRA_ARGS}
-DOCIO_USE_SSE=OFF
)
endif()
if(WIN32)
set(OCIO_PATCH opencolorio_win.diff)
set(OPENCOLORIO_EXTRA_ARGS
@@ -50,7 +57,7 @@ if(WIN32)
-DUSE_EXTERNAL_LCMS=ON
-DINC_1=${LIBDIR}/tinyxml/include
-DINC_2=${LIBDIR}/yamlcpp/include
#lie because ocio cmake is demanding boost even though it is not needed
# Lie because ocio cmake is demanding boost even though it is not needed.
-DYAML_CPP_VERSION=0.5.0
)
else()
@@ -95,7 +102,7 @@ if(WIN32)
ExternalProject_Add_Step(external_opencolorio after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencolorio/include ${HARVEST_TARGET}/opencolorio/include
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/opencolorio/lib/static ${HARVEST_TARGET}/opencolorio/lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/yamlcpp/lib/libyaml-cppmt.lib ${HARVEST_TARGET}/opencolorio/lib/libyaml-cpp.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/yamlcpp/lib/libyaml-cppmd.lib ${HARVEST_TARGET}/opencolorio/lib/libyaml-cpp.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tinyxml/lib/tinyxml.lib ${HARVEST_TARGET}/opencolorio/lib/tinyxml.lib
DEPENDEES install
)
@@ -103,7 +110,7 @@ if(WIN32)
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_opencolorio after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/opencolorio/lib/static/Opencolorio.lib ${HARVEST_TARGET}/opencolorio/lib/OpencolorIO_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/yamlcpp/lib/libyaml-cppmtd.lib ${HARVEST_TARGET}/opencolorio/lib/libyaml-cpp_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/yamlcpp/lib/libyaml-cppmdd.lib ${HARVEST_TARGET}/opencolorio/lib/libyaml-cpp_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tinyxml/lib/tinyxml.lib ${HARVEST_TARGET}/opencolorio/lib/tinyxml_d.lib
DEPENDEES install
)

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

@@ -0,0 +1,76 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(OIDN_EXTRA_ARGS
-DOIDN_APPS=OFF
-DTBB_ROOT=${LIBDIR}/tbb
-DTBB_STATIC_LIB=${TBB_STATIC_LIBRARY}
-DOIDN_STATIC_LIB=ON
-DOIDN_STATIC_RUNTIME=OFF
-DISPC_EXECUTABLE=${LIBDIR}/ispc/bin/ispc
)
if(WIN32)
set(OIDN_EXTRA_ARGS
${OIDN_EXTRA_ARGS}
-DTBB_DEBUG_LIBRARY=${LIBDIR}/tbb/lib/tbb.lib
-DTBB_DEBUG_LIBRARY_MALLOC=${LIBDIR}/tbb/lib/tbbmalloc.lib
)
else()
set(OIDN_EXTRA_ARGS
${OIDN_EXTRA_ARGS}
-Dtbb_LIBRARY_RELEASE=${LIBDIR}/tbb/lib/tbb_static.a
-Dtbbmalloc_LIBRARY_RELEASE=${LIBDIR}/tbb/lib/tbbmalloc_static.a
)
endif()
ExternalProject_Add(external_openimagedenoise
URL ${OIDN_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OIDN_HASH}
PREFIX ${BUILD_DIR}/openimagedenoise
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openimagedenoise ${DEFAULT_CMAKE_FLAGS} ${OIDN_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openimagedenoise
)
add_dependencies(
external_openimagedenoise
external_tbb
external_ispc
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_openimagedenoise after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openimagedenoise/include ${HARVEST_TARGET}/openimagedenoise/include
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/openimagedenoise.lib ${HARVEST_TARGET}/openimagedenoise/lib/openimagedenoise.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/common.lib ${HARVEST_TARGET}/openimagedenoise/lib/common.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/dnnl.lib ${HARVEST_TARGET}/openimagedenoise/lib/dnnl.lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_openimagedenoise after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/openimagedenoise.lib ${HARVEST_TARGET}/openimagedenoise/lib/openimagedenoise_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/common.lib ${HARVEST_TARGET}/openimagedenoise/lib/common_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/dnnl.lib ${HARVEST_TARGET}/openimagedenoise/lib/dnnl_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -32,7 +32,7 @@ endif()
if(WIN32)
set(PNG_LIBNAME libpng16_static${LIBEXT})
set(OIIO_SIMD_FLAGS -DUSE_SIMD=sse2 -DOPJ_STATIC=1)
set(OIIO_SIMD_FLAGS -DUSE_SIMD=sse2)
set(OPENJPEG_POSTFIX _msvc)
else()
set(PNG_LIBNAME libpng${LIBEXT})
@@ -49,31 +49,34 @@ endif()
if(MSVC)
set(OPENJPEG_FLAGS
-DOPENJPEG_HOME=${LIBDIR}/openjpeg_msvc
-DOPENJPEG_INCLUDE_DIR=${LIBDIR}/openjpeg_msvc/include/openjpeg-${OPENJPEG_SHORT_VERSION}
-DOPENJPEG_LIBRARY=${LIBDIR}/openjpeg_msvc/lib/openjp2${LIBEXT}
-DOPENJPEG_LIBRARY_DEBUG=${LIBDIR}/openjpeg_msvc/lib/openjp2${LIBEXT}
-DOpenJpeg_ROOT=${LIBDIR}/openjpeg_msvc
)
else()
set(OPENJPEG_FLAGS
-DOPENJPEG_INCLUDE_DIR=${LIBDIR}/openjpeg/include/openjpeg-${OPENJPEG_SHORT_VERSION}
-DOPENJPEG_LIBRARY=${LIBDIR}/openjpeg/lib/${OPENJPEG_LIBRARY}
-DOpenJpeg_ROOT=${LIBDIR}/openjpeg
)
endif()
set(OPENIMAGEIO_EXTRA_ARGS
-DBUILDSTATIC=ON
-DBUILD_SHARED_LIBS=OFF
${OPENIMAGEIO_LINKSTATIC}
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/openexr/include/openexr/
-DOPENEXR_ILMIMF_LIBRARIES=${LIBDIR}/openexr/lib/IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBoost_USE_STATIC_RUNTIME=OFF
-DBOOST_ROOT=${LIBDIR}/boost
-DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
-DBoost_NO_SYSTEM_PATHS=ON
-DBoost_NO_BOOST_CMAKE=ON
-OIIO_BUILD_CPP11=ON
-DUSE_LIBSQUISH=OFF
-DUSE_QT5=OFF
-DUSE_NUKE=OFF
-DUSE_OPENVDB=OFF
-DUSE_BZIP2=OFF
-DUSE_FREETYPE=OFF
-DUSE_DCMTK=OFF
-DUSE_LIBHEIF=OFF
-DUSE_OPENGL=OFF
-DUSE_TBB=OFF
-DUSE_FIELD3D=OFF
@@ -81,15 +84,12 @@ set(OPENIMAGEIO_EXTRA_ARGS
-DUSE_PYTHON=OFF
-DUSE_GIF=OFF
-DUSE_OPENCV=OFF
-DUSE_OPENSSL=OFF
-DUSE_OPENJPEG=ON
-DUSE_FFMPEG=OFF
-DUSE_PTEX=OFF
-DUSE_FREETYPE=OFF
-DUSE_LIBRAW=OFF
-DUSE_PYTHON=OFF
-DUSE_PYTHON3=OFF
-DUSE_OCIO=OFF
-DUSE_OPENCOLORIO=OFF
-DUSE_WEBP=${WITH_WEBP}
-DOIIO_BUILD_TOOLS=${OIIO_TOOLS}
-DOIIO_BUILD_TESTS=OFF
@@ -103,17 +103,13 @@ set(OPENIMAGEIO_EXTRA_ARGS
-DJPEG_LIBRARY=${LIBDIR}/jpg/lib/${JPEG_LIBRARY}
-DJPEG_INCLUDE_DIR=${LIBDIR}/jpg/include
${OPENJPEG_FLAGS}
-DOCIO_PATH=${LIBDIR}/opencolorio/
-DOpenEXR_USE_STATIC_LIBS=On
-DOPENEXR_HOME=${LIBDIR}/openexr/
-DILMBASE_INCLUDE_PATH=${LIBDIR}/ilmbase/
-DILMBASE_PACKAGE_PREFIX=${LIBDIR}/ilmbase/
-DILMBASE_INCLUDE_DIR=${LIBDIR}/ilmbase/include/
-DOPENEXR_HALF_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IMATH_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DILMBASE_INCLUDE_DIR=${LIBDIR}/openexr/include/
-DOPENEXR_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_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DSTOP_ON_WARNING=OFF
${WEBP_FLAGS}
@@ -125,28 +121,38 @@ ExternalProject_Add(external_openimageio
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENIMAGEIO_HASH}
PREFIX ${BUILD_DIR}/openimageio
PATCH_COMMAND
${PATCH_CMD} -p 0 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/src/include < ${PATCH_DIR}/openimageio_gdi.diff &&
${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/ < ${PATCH_DIR}/openimageio_static_libs.diff
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/ < ${PATCH_DIR}/openimageio.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openimageio ${DEFAULT_CMAKE_FLAGS} ${OPENIMAGEIO_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/openimageio
)
add_dependencies(
external_openimageio
external_png external_zlib
external_ilmbase
external_png
external_zlib
external_openexr
external_jpeg
external_boost
external_tiff
external_opencolorio
external_openjpeg${OPENJPEG_POSTFIX}
${WEBP_DEP}
)
if(NOT WIN32)
add_dependencies(
external_openimageio
external_opencolorio_extra
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_openimageio after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/include ${HARVEST_TARGET}/OpenImageIO/include
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/OpenImageIO/lib ${HARVEST_TARGET}/OpenImageIO/lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/OpenImageIO/bin/idiff.exe ${HARVEST_TARGET}/OpenImageIO/bin/idiff.exe
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_openimageio after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimageio/lib/OpenImageIO_Util.lib ${HARVEST_TARGET}/openimageio/lib/OpenImageIO_Util_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -38,7 +38,7 @@ ExternalProject_Add(external_openjpeg
INSTALL_DIR ${LIBDIR}/openjpeg
)
#on windows ffmpeg wants a mingw build, while oiio needs a msvc build
# On windows ffmpeg wants a mingw build, while oiio needs a msvc build.
if(MSVC)
set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
ExternalProject_Add(external_openjpeg_msvc

View File

@@ -22,6 +22,7 @@ ExternalProject_Add(external_openmp
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENMP_HASH}
PREFIX ${BUILD_DIR}/openmp
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openmp/src/external_openmp < ${PATCH_DIR}/openmp.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openmp ${DEFAULT_CMAKE_FLAGS}
INSTALL_COMMAND cd ${BUILD_DIR}/openmp/src/external_openmp-build && install_name_tool -id @executable_path/../Resources/lib/libomp.dylib runtime/src/libomp.dylib && make install
INSTALL_DIR ${LIBDIR}/openmp

View File

@@ -36,12 +36,11 @@ if(WIN32)
set(OPENSUBDIV_EXTRA_ARGS
${OPENSUBDIV_EXTRA_ARGS}
-DTBB_INCLUDE_DIR=${LIBDIR}/tbb/include
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/tbb_static.lib
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/tbb.lib
-DCLEW_INCLUDE_DIR=${LIBDIR}/clew/include/CL
-DCLEW_LIBRARY=${LIBDIR}/clew/lib/clew${LIBEXT}
-DCUEW_INCLUDE_DIR=${LIBDIR}/cuew/include
-DCUEW_LIBRARY=${LIBDIR}/cuew/lib/cuew${LIBEXT}
-DCMAKE_EXE_LINKER_FLAGS_RELEASE=libcmt.lib
)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(OPENSUBDIV_EXTRA_ARGS
@@ -68,7 +67,7 @@ endif()
ExternalProject_Add(external_opensubdiv
URL ${OPENSUBDIV_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${OPENSUBDIV_Hash}
URL_HASH MD5=${OPENSUBDIV_HASH}
PREFIX ${BUILD_DIR}/opensubdiv
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opensubdiv -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${OPENSUBDIV_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/opensubdiv

View File

@@ -20,33 +20,40 @@ if(BUILD_MODE STREQUAL Debug)
set(BLOSC_POST _d)
endif()
if(WIN32)
set(OPENVDB_SHARED ON)
set(OPENVDB_STATIC OFF)
else()
set(OPENVDB_SHARED OFF)
set(OPENVDB_STATIC ON)
endif()
set(OPENVDB_EXTRA_ARGS
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBoost_USE_STATIC_RUNTIME=OFF
-DBOOST_ROOT=${LIBDIR}/boost
-DBoost_NO_SYSTEM_PATHS=ON
-DBoost_NO_BOOST_CMAKE=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=${OPENVDB_SHARED}
-DOPENVDB_CORE_STATIC=${OPENVDB_STATIC}
-DOPENVDB_BUILD_BINARIES=Off
-DCMAKE_DEBUG_POSTFIX=_d
)
if(WIN32)
@@ -54,15 +61,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 +88,6 @@ add_dependencies(
openvdb
external_tbb
external_boost
external_ilmbase
external_openexr
external_zlib
external_blosc
@@ -89,13 +97,15 @@ if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(openvdb after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openvdb/include ${HARVEST_TARGET}/openvdb/include
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/libopenvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/openvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/bin/openvdb.dll ${HARVEST_TARGET}/openvdb/bin/openvdb.dll
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(openvdb after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/libopenvdb.lib ${HARVEST_TARGET}/openvdb/lib/openvdb_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/lib/openvdb_d.lib ${HARVEST_TARGET}/openvdb/lib/openvdb_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openvdb/bin/openvdb_d.dll ${HARVEST_TARGET}/openvdb/bin/openvdb_d.dll
DEPENDEES install
)
endif()

View File

@@ -17,10 +17,10 @@
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
option(ENABLE_MINGW64 "Enable building of ffmpeg/iconv/libsndfile/lapack/fftw3 by installing mingw64" ON)
option(ENABLE_MINGW64 "Enable building of ffmpeg/iconv/libsndfile/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)
option(WITH_BOOST_PYTHON "Enable building of boost with python support" OFF)
set(MAKE_THREADS 1 CACHE STRING "Number of threads to run make with")
if(NOT BUILD_MODE)
@@ -46,11 +46,7 @@ message("PATCH_DIR = ${PATCH_DIR}")
message("BUILD_DIR = ${BUILD_DIR}")
if(WIN32)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(PATCH_CMD ${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/patch.exe)
else()
set(PATCH_CMD ${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/patch.exe)
endif()
set(PATCH_CMD ${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/patch.exe)
set(LIBEXT ".lib")
set(LIBPREFIX "")
@@ -62,43 +58,36 @@ if(WIN32)
endif()
set(COMMON_MSVC_FLAGS "${COMMON_MSVC_FLAGS} /bigobj")
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MDd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
else()
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /D_DEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_C_FLAGS_DEBUG "/MDd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /D_DEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
endif()
set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "/MT ${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_C_FLAGS_RELEASE "/MT ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "/MT ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_C_FLAGS_MINSIZEREL "/MD ${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_C_FLAGS_RELEASE "/MD ${COMMON_MSVC_FLAGS} /O2 /Ob2 /DNDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "/MD ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/MTd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/MDd ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
else()
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /D PLATFORM_WINDOWS /MTd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
endif()
set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "/MT /${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "/MT ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MT ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "/MD /${COMMON_MSVC_FLAGS} /O1 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "/MD ${COMMON_MSVC_FLAGS} /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MD ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=1 /DOIIO_STATIC_BUILD /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(PLATFORM_FLAGS)
set(PLATFORM_CXX_FLAGS)
set(PLATFORM_CMAKE_FLAGS)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(MINGW_PATH ${DOWNLOAD_DIR}/mingw/mingw64)
set(MINGW_SHELL ming64sh.cmd)
set(PERL_SHELL ${DOWNLOAD_DIR}/perl/portableshell.bat)
set(MINGW_HOST x86_64-w64-mingw32)
else()
set(MINGW_PATH ${DOWNLOAD_DIR}/mingw/mingw32)
set(MINGW_SHELL ming32sh.cmd)
set(PERL_SHELL ${DOWNLOAD_DIR}/perl32/portableshell.bat)
set(MINGW_HOST i686-w64-mingw32)
endif()
set(MINGW_PATH ${DOWNLOAD_DIR}/mingw/mingw64)
set(MINGW_SHELL ming64sh.cmd)
set(PERL_SHELL ${DOWNLOAD_DIR}/perl/portableshell.bat)
set(MINGW_HOST x86_64-w64-mingw32)
set(CONFIGURE_ENV
cd ${MINGW_PATH} &&
call ${MINGW_SHELL} &&
call ${PERL_SHELL} &&
call ${MINGW_SHELL} &&
set path &&
set CFLAGS=-g &&
set LDFLAGS=-Wl,--as-needed -static-libgcc
@@ -125,16 +114,32 @@ else()
COMMAND xcode-select --print-path
OUTPUT_VARIABLE XCODE_DEV_PATH OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(OSX_ARCHITECTURES x86_64)
set(OSX_DEPLOYMENT_TARGET 10.11)
execute_process(
COMMAND xcodebuild -version -sdk macosx SDKVersion
OUTPUT_VARIABLE MACOSX_SDK_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT CMAKE_OSX_ARCHITECTURES)
execute_process(COMMAND uname -m OUTPUT_VARIABLE ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE)
message(STATUS "Detected native architecture ${ARCHITECTURE}.")
set(CMAKE_OSX_ARCHITECTURES "${ARCHITECTURE}")
endif()
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64")
set(OSX_DEPLOYMENT_TARGET 10.13)
else()
set(OSX_DEPLOYMENT_TARGET 11.00)
endif()
set(OSX_SYSROOT ${XCODE_DEV_PATH}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk)
set(PLATFORM_CFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET}")
set(PLATFORM_CXXFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET} -std=c++11 -stdlib=libc++")
set(PLATFORM_LDFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET}")
set(PLATFORM_BUILD_TARGET --build=x86_64-apple-darwin15.0.0) # OS X 10.11
set(PLATFORM_CFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET} -arch ${CMAKE_OSX_ARCHITECTURES}")
set(PLATFORM_CXXFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET} -std=c++11 -stdlib=libc++ -arch ${CMAKE_OSX_ARCHITECTURES}")
set(PLATFORM_LDFLAGS "-isysroot ${OSX_SYSROOT} -mmacosx-version-min=${OSX_DEPLOYMENT_TARGET} -arch ${CMAKE_OSX_ARCHITECTURES}")
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64")
set(PLATFORM_BUILD_TARGET --build=x86_64-apple-darwin17.0.0) # OS X 10.13
else()
set(PLATFORM_BUILD_TARGET --build=aarch64-apple-darwin20.0.0) # macOS 11.00
endif()
set(PLATFORM_CMAKE_FLAGS
-DCMAKE_OSX_ARCHITECTURES:STRING=${OSX_ARCHITECTURES}
-DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES}
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${OSX_DEPLOYMENT_TARGET}
-DCMAKE_OSX_SYSROOT:PATH=${OSX_SYSROOT}
)
@@ -167,6 +172,7 @@ else()
set(CONFIGURE_ENV
export MACOSX_DEPLOYMENT_TARGET=${OSX_DEPLOYMENT_TARGET} &&
export MACOSX_SDK_VERSION=${OSX_DEPLOYMENT_TARGET} &&
export CFLAGS=${PLATFORM_CFLAGS} &&
export CXXFLAGS=${PLATFORM_CXXFLAGS} &&
export LDFLAGS=${PLATFORM_LDFLAGS}
@@ -189,18 +195,6 @@ set(DEFAULT_CMAKE_FLAGS
${PLATFORM_CMAKE_FLAGS}
)
if(WIN32)
#we need both flavors to build the thumbnail dlls
if(MSVC12)
set(GENERATOR_32 "Visual Studio 12 2013")
set(GENERATOR_64 "Visual Studio 12 2013 Win64")
elseif(MSVC14)
set(GENERATOR_32 "Visual Studio 14 2015")
set(GENERATOR_64 "Visual Studio 14 2015 Win64")
endif()
endif()
if(WIN32)
if(BUILD_MODE STREQUAL Debug)
set(ZLIB_LIBRARY zlibstaticd${LIBEXT})

View File

@@ -0,0 +1,35 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
ExternalProject_Add(external_opus
URL ${OPUS_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${OPUS_HASH}
PREFIX ${BUILD_DIR}/opus
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/opus/src/external_opus/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/opus
--disable-shared
--enable-static
--with-pic
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/opus/src/external_opus/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/opus/src/external_opus/ && make install
INSTALL_DIR ${LIBDIR}/opus
)
if(MSVC)
set_target_properties(external_opus PROPERTIES FOLDER Mingw)
endif()

View File

@@ -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,37 +33,39 @@ 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
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=ON
-DBoost_USE_STATIC_RUNTIME=ON
-DBoost_USE_STATIC_RUNTIME=OFF
-DBOOST_ROOT=${LIBDIR}/boost
-DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
-DBoost_NO_SYSTEM_PATHS=ON
-DBoost_NO_BOOST_CMAKE=ON
-DLLVM_DIRECTORY=${LIBDIR}/llvm
-DLLVM_INCLUDES=${LIBDIR}/llvm/include
-DLLVM_LIB_DIR=${LIBDIR}/llvm/lib
-DLLVM_VERSION=3.4
-DLLVM_LIBRARY=${OSL_LLVM_LIBRARY}
-DOPENEXR_HOME=${LIBDIR}/openexr/
-DILMBASE_HOME=${LIBDIR}/ilmbase/
-DILMBASE_INCLUDE_DIR=${LIBDIR}/ilmbase/include/
-DOPENEXR_HALF_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Half${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IMATH_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Imath${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_ILMTHREAD_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}IlmThread${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/ilmbase/lib/${LIBPREFIX}Iex${ILMBASE_VERSION_POSTFIX}${LIBEXT}
-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 +74,8 @@ set(OSL_EXTRA_ARGS
-DSTOP_ON_WARNING=OFF
-DUSE_LLVM_BITCODE=OFF
-DUSE_PARTIO=OFF
-DUSE_QT=OFF
-DINSTALL_DOCS=OFF
${OSL_SIMD_FLAGS}
-DPARTIO_LIBRARIES=
)
@@ -106,14 +110,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

@@ -0,0 +1,60 @@
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(MSVC)
set(PYTARGET ${HARVEST_TARGET}/python/${PYTHON_SHORT_VERSION_NO_DOTS})
set(PYSRC ${LIBDIR}/python/)
if(BUILD_MODE STREQUAL Release)
add_custom_command(
OUTPUT ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
COMMAND echo packaging python
COMMAND echo this should ouput at ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E make_directory ${PYTARGET}/libs
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.lib ${PYTARGET}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.lib
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python.exe ${PYTARGET}/bin/python.exe
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python${PYTHON_SHORT_VERSION_NO_DOTS}.dll ${PYTARGET}/bin/python${PYTHON_SHORT_VERSION_NO_DOTS}.dll
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/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/
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PYSRC}/DLLs/ ${PYTARGET}/DLLs/
COMMAND cd ${PYTARGET}/lib/ && for /d /r . %%d in (__pycache__) do @if exist "%%d" echo "%%d" && rd /s/q "%%d"
)
add_custom_target(Package_Python ALL DEPENDS external_python external_numpy external_python_site_packages OUTPUT ${HARVEST_TARGET}/python/${PYTHON_SHORT_VERSION_NO_DOTS}/bin/python${PYTHON_POSTFIX}.exe)
endif()
if(BUILD_MODE STREQUAL Debug)
add_custom_command(
OUTPUT ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
COMMAND echo packaging python
COMMAND echo this should ouput at ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E make_directory ${PYTARGET}/libs
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib ${PYTARGET}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python${PYTHON_POSTFIX}.exe ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll ${PYTARGET}/bin/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/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/
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PYSRC}/DLLs/ ${PYTARGET}/DLLs/
COMMAND cd ${PYTARGET}/lib/ && for /d /r . %%d in (__pycache__) do @if exist "%%d" echo "%%d" && rd /s/q "%%d"
)
add_custom_target(Package_Python ALL DEPENDS external_python external_numpy external_python_site_packages OUTPUT ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe)
endif()
endif()

View File

@@ -22,10 +22,14 @@ set(PNG_EXTRA_ARGS
-DPNG_STATIC=ON
)
if(APPLE AND ("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64"))
set(PNG_EXTRA_ARGS ${PNG_EXTRA_ARGS} -DPNG_HARDWARE_OPTIMIZATIONS=ON -DPNG_ARM_NEON=on -DCMAKE_SYSTEM_PROCESSOR="aarch64")
endif()
ExternalProject_Add(external_png
URL ${PNG_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${PNG_HASH}
URL_HASH SHA256=${PNG_HASH}
PREFIX ${BUILD_DIR}/png
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/png ${DEFAULT_CMAKE_FLAGS} ${PNG_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/png

View File

@@ -24,7 +24,7 @@ if(WIN32)
set(PTHREAD_CPPFLAGS "/I. /DHAVE_CONFIG_H ")
endif()
set(PTHREADS_BUILD cd ${BUILD_DIR}/pthreads/src/external_pthreads/ && cd && nmake VC-static /e CPPFLAGS=${PTHREAD_CPPFLAGS} /e XLIBS=/NODEFAULTLIB:msvcr)
set(PTHREADS_BUILD cd ${BUILD_DIR}/pthreads/src/external_pthreads/ && cd && nmake VC-static /e CPPFLAGS=${PTHREAD_CPPFLAGS})
ExternalProject_Add(external_pthreads
URL ${PTHREADS_URI}
@@ -32,6 +32,7 @@ if(WIN32)
URL_HASH MD5=${PTHREADS_HASH}
PREFIX ${BUILD_DIR}/pthreads
CONFIGURE_COMMAND echo .
PATCH_COMMAND COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/pthreads/src/external_pthreads < ${PATCH_DIR}/pthreads.diff
BUILD_COMMAND ${PTHREADS_BUILD}
INSTALL_COMMAND COMMAND
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/libpthreadVC3${LIBEXT} ${LIBDIR}/pthreads/lib/pthreadVC3${LIBEXT} &&

View File

@@ -19,17 +19,13 @@
set(PYTHON_POSTFIX)
if(BUILD_MODE STREQUAL Debug)
set(PYTHON_POSTFIX _d)
set(PYTHON_EXTRA_INSTLAL_FLAGS -d)
endif()
if(WIN32)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(SSL_POSTFIX -x64)
else()
set(SSL_POSTFIX)
endif()
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe)
set(PYTHON_BINARY_INTERNAL ${BUILD_DIR}/python/src/external_python/PCBuild/amd64/python${PYTHON_POSTFIX}.exe)
set(PYTHON_BINARY ${LIBDIR}/python/python${PYTHON_POSTFIX}.exe)
set(PYTHON_SRC ${BUILD_DIR}/python/src/external_python/)
macro(cmake_to_dos_path MsysPath ResultingPath)
string(REPLACE "/" "\\" ${ResultingPath} "${MsysPath}")
endmacro()
@@ -40,34 +36,24 @@ if(WIN32)
cmake_to_dos_path(${PYTHON_EXTERNALS_FOLDER} PYTHON_EXTERNALS_FOLDER_DOS)
cmake_to_dos_path(${DOWNLOADS_EXTERNALS_FOLDER} DOWNLOADS_EXTERNALS_FOLDER_DOS)
message("Python externals = ${PYTHON_EXTERNALS_FOLDER}")
message("Python externals_dos = ${PYTHON_EXTERNALS_FOLDER_DOS}")
message("Python DOWNLOADS_EXTERNALS_FOLDER = ${DOWNLOADS_EXTERNALS_FOLDER}")
message("Python DOWNLOADS_EXTERNALS_FOLDER_DOS = ${DOWNLOADS_EXTERNALS_FOLDER_DOS}")
ExternalProject_Add(external_python
URL ${PYTHON_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${PYTHON_HASH}
PREFIX ${BUILD_DIR}/python
PATCH_COMMAND
echo mklink /D "${PYTHON_EXTERNALS_FOLDER_DOS}" "${DOWNLOADS_EXTERNALS_FOLDER_DOS}" &&
mklink /D "${PYTHON_EXTERNALS_FOLDER_DOS}" "${DOWNLOADS_EXTERNALS_FOLDER_DOS}"
CONFIGURE_COMMAND ""
BUILD_COMMAND cd ${BUILD_DIR}/python/src/external_python/pcbuild/ && set IncludeTkinter=false && call build.bat -e -p ${PYTHON_ARCH} -c ${BUILD_MODE}
INSTALL_COMMAND COMMAND
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll &&
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.pdb ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.pdb &&
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib &&
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.exp ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.exp &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/include ${LIBDIR}/python/include/Python${PYTHON_SHORT_VERSION} &&
${CMAKE_COMMAND} -E copy "${BUILD_DIR}/python/src/external_python/PC/pyconfig.h" ${LIBDIR}/python/include/Python${PYTHON_SHORT_VERSION}/pyconfig.h
BUILD_COMMAND cd ${BUILD_DIR}/python/src/external_python/pcbuild/ && set IncludeTkinter=false && call build.bat -e -p x64 -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-venv --include-symbols ${PYTHON_EXTRA_INSTLAL_FLAGS} --copy ${LIBDIR}/python
)
message("PythinRedist = ${BUILD_DIR}/python/src/external_python/redist")
message("POutput = ${PYTHON_OUTPUTDIR}")
else()
if(APPLE)
# disable functions that can be in 10.13 sdk but aren't available on 10.9 target
# Disable functions that can be in 10.13 sdk but aren't available on 10.9 target.
#
# Disable libintl (gettext library) as it might come from Homebrew, which makes
# it so test program compiles, but the Python does not. This is because for Python
# we use isysroot, which seems to forbid using libintl.h.
# The gettext functionality seems to come from CoreFoundation, so should be all fine.
set(PYTHON_FUNC_CONFIGS
export ac_cv_func_futimens=no &&
export ac_cv_func_utimensat=no &&
@@ -79,13 +65,21 @@ else()
export ac_cv_func_getentropy=no &&
export ac_cv_func_mkostemp=no &&
export ac_cv_func_mkostemps=no &&
export ac_cv_func_timingsafe_bcmp=no)
export ac_cv_func_timingsafe_bcmp=no &&
export ac_cv_header_libintl_h=no &&
export ac_cv_lib_intl_textdomain=no
)
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
set(PYTHON_FUNC_CONFIGS ${PYTHON_FUNC_CONFIGS} && export PYTHON_DECIMAL_WITH_MACHINE=ansi64)
endif()
set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV} && ${PYTHON_FUNC_CONFIGS})
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python.exe)
set(PYTHON_PATCH ${PATCH_CMD} --verbose -p1 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_macos.diff)
else()
set(PYTHON_CONFIGURE_ENV ${CONFIGURE_ENV})
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/python)
endif()
set(PYTHON_PATCH ${PATCH_CMD} --verbose -p1 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_linux.diff)
endif()
set(PYTHON_CONFIGURE_EXTRA_ARGS "--with-openssl=${LIBDIR}/ssl")
set(PYTHON_CFLAGS "-I${LIBDIR}/sqlite/include -I${LIBDIR}/bzip2/include -I${LIBDIR}/lzma/include -I${LIBDIR}/zlib/include")
@@ -95,7 +89,6 @@ else()
export CPPFLAGS=${PYTHON_CFLAGS} &&
export LDFLAGS=${PYTHON_LDFLAGS} &&
export PKG_CONFIG_PATH=${LIBDIR}/ffi/lib/pkgconfig)
set(PYTHON_PATCH ${PATCH_CMD} --verbose -p1 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_linux.diff)
ExternalProject_Add(external_python
URL ${PYTHON_URI}
@@ -107,65 +100,6 @@ else()
BUILD_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && make install
INSTALL_DIR ${LIBDIR}/python)
add_custom_target(Make_Python_Environment ALL DEPENDS external_python)
endif()
if(MSVC)
add_custom_command(
OUTPUT ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz
OUTPUT ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/lib ${BUILD_DIR}/python/src/external_python/redist/lib
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_asyncio${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_asyncio${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_bz2${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_bz2${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_contextvars${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_contextvars${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ctypes${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ctypes${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ctypes_test${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ctypes_test${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_decimal${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_decimal${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_distutils_findvs${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_distutils_findvs${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_elementtree${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_elementtree${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_hashlib${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_hashlib${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_lzma${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_lzma${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_msi${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_msi${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_multiprocessing${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_multiprocessing${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_overlapped${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_overlapped${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_queue${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_queue${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_socket${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_socket${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_sqlite3${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_sqlite3${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ssl${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ssl${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testbuffer${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testbuffer${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testcapi${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testcapi${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testimportmultiple${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testimportmultiple${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testmultiphase${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testmultiphase${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/pyexpat${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/pyexpat${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_POSTFIX}.exe" ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/select${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/select${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/unicodedata${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/unicodedata${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/winsound${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/winsound${PYTHON_POSTFIX}.pyd
#xxlimited is an example extension module, we don't need to ship it and debug doesn't build it
#leaving it commented out, so I won't get confused again with the next update.
#COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/xxlimited${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/xxlimited${PYTHON_POSTFIX}.pyd
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/libssl-1_1${SSL_POSTFIX}.dll" ${BUILD_DIR}/python/src/external_python/redist/lib/libssl-1_1${SSL_POSTFIX}.dll
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/libcrypto-1_1${SSL_POSTFIX}.dll" ${BUILD_DIR}/python/src/external_python/redist/lib/libcrypto-1_1${SSL_POSTFIX}.dll
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/sqlite3${PYTHON_POSTFIX}.dll" ${BUILD_DIR}/python/src/external_python/redist/lib/sqlite3${PYTHON_POSTFIX}.dll
COMMAND ${CMAKE_COMMAND} -E chdir "${BUILD_DIR}/python/src/external_python/redist" ${CMAKE_COMMAND} -E tar "cfvz" "${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz" "."
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/python/ ${HARVEST_TARGET}/python/
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz
)
add_custom_target(Package_Python ALL DEPENDS external_python ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe)
add_custom_command(OUTPUT ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/redist ${BUILD_DIR}/python/src/external_python/run
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/include ${BUILD_DIR}/python/src/external_python/run/include
COMMAND ${CMAKE_COMMAND} -E copy "${BUILD_DIR}/python/src/external_python/PC/pyconfig.h" ${BUILD_DIR}/python/src/external_python/run/include/pyconfig.h
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll" ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib" ${BUILD_DIR}/python/src/external_python/run/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.lib #missing postfix on purpose, distutils is not expecting it
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib" ${BUILD_DIR}/python/src/external_python/run/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib #other things like numpy still want it though.
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_POSTFIX}.exe" ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe
COMMAND ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe -m ensurepip --upgrade
)
add_custom_target(Make_Python_Environment ALL DEPENDS ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe Package_Python)
endif()
if(UNIX)

View File

@@ -15,27 +15,16 @@
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
if(WIN32)
set(HARVEST_CMD cmd /C FOR /d /r ${BUILD_DIR}/python/src/external_python/run/lib/site-packages %d IN (__pycache__) DO @IF EXIST "%d" rd /s /q "%d" &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/idna ${HARVEST_TARGET}/Release/site-packages/idna &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/chardet ${HARVEST_TARGET}/Release/site-packages/chardet &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/urllib3 ${HARVEST_TARGET}/Release/site-packages/urllib3 &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/certifi ${HARVEST_TARGET}/Release/site-packages/certifi &&
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/requests ${HARVEST_TARGET}/Release/site-packages/requests
)
else()
set(HARVEST_CMD echo .)
endif()
ExternalProject_Add(external_python_site_packages
DOWNLOAD_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
PREFIX ${BUILD_DIR}/site_packages
INSTALL_COMMAND ${PYTHON_BINARY} -m pip install idna==${IDNA_VERSION} chardet==${CHARDET_VERSION} urllib3==${URLLIB3_VERSION} certifi==${CERTIFI_VERSION} requests==${REQUESTS_VERSION} --no-binary :all: && ${HARVEST_CMD}
INSTALL_COMMAND ${PYTHON_BINARY} -m pip install idna==${IDNA_VERSION} chardet==${CHARDET_VERSION} urllib3==${URLLIB3_VERSION} certifi==${CERTIFI_VERSION} requests==${REQUESTS_VERSION} --no-binary :all:
)
add_dependencies(
external_python_site_packages
Make_Python_Environment
external_python
)

View File

@@ -1,227 +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 *****
####################################################################################################################
# Mingw32 Builds
####################################################################################################################
# This installs mingw32+msys to compile ffmpeg/iconv/libsndfile/lapack/fftw3
####################################################################################################################
message("LIBDIR = ${LIBDIR}")
macro(cmake_to_msys_path MsysPath ResultingPath)
string(REPLACE ":" "" TmpPath "${MsysPath}")
string(SUBSTRING ${TmpPath} 0 1 Drive)
string(SUBSTRING ${TmpPath} 1 255 PathPart)
string(TOLOWER ${Drive} LowerDrive)
string(CONCAT ${ResultingPath} "/" ${LowerDrive} ${PathPart})
endmacro()
cmake_to_msys_path(${LIBDIR} mingw_LIBDIR)
message("mingw_LIBDIR = ${mingw_LIBDIR}")
message("Checking for mingw32")
# download mingw32
if(NOT EXISTS "${DOWNLOAD_DIR}/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z")
message("Downloading mingw32")
file(DOWNLOAD "https://astuteinternet.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.9.4/threads-win32/sjlj/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z" "${DOWNLOAD_DIR}/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z")
endif()
# make mingw root directory
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/mingw
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
endif()
# extract mingw32
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/ming32sh.cmd") AND (EXISTS "${DOWNLOAD_DIR}/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z"))
message("Extracting mingw32")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/i686-4.9.4-release-win32-sjlj-rt_v5-rev0.7z
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw
)
endif()
message("Checking for pkg-config")
if(NOT EXISTS "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
message("Downloading pkg-config")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/pkgconfiglite/0.28-1/pkg-config-lite-0.28-1_bin-win32.zip" "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
endif()
# extract pkgconfig
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/pkg-config.exe") AND (EXISTS "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"))
message("Extracting pkg-config")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1/bin/pkg-config.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/pkg-config.exe"
)
endif()
message("Checking for nasm")
if(NOT EXISTS "${DOWNLOAD_DIR}/nasm-2.13.02-win32.zip")
message("Downloading nasm")
file(DOWNLOAD "http://www.nasm.us/pub/nasm/releasebuilds/2.13.02/win32/nasm-2.13.02-win32.zip" "${DOWNLOAD_DIR}/nasm-2.13.02-win32.zip")
endif()
# extract nasm
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/nasm.exe") AND (EXISTS "${DOWNLOAD_DIR}/nasm-2.13.02-win32.zip"))
message("Extracting nasm")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/nasm-2.13.02-win32.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/nasm-2.13.02/nasm.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/nasm.exe"
)
endif()
SET(NASM_PATH ${DOWNLOAD_DIR}/mingw/mingw32/bin/nasm.exe)
message("Checking for mingwGet")
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
message("Downloading mingw-get")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/Installer/mingw-get/mingw-get-0.6.2-beta-20131004-1/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip" "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
endif()
# extract mingw_get
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get.exe") AND (EXISTS "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"))
message("Extracting mingw-get")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw32/
)
endif()
if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get.exe") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/make.exe"))
message("Installing MSYS")
execute_process(
COMMAND ${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get install msys msys-patch
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw32/bin/
)
endif()
if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get.exe") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/mktemp.exe"))
message("Installing mktemp")
execute_process(
COMMAND ${DOWNLOAD_DIR}/mingw/mingw32/bin/mingw-get install msys msys-mktemp
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw32/bin/
)
endif()
message("Checking for CoreUtils")
# download old core_utils for pr.exe (ffmpeg needs it to build)
if(NOT EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
message("Downloading CoreUtils 5.97")
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/MSYS/Base/msys-core/_obsolete/coreutils-5.97-MSYS-1.0.11-2/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2" "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
endif()
if((EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/pr.exe"))
message("Installing pr from CoreUtils 5.97")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/tmp_coreutils
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${DOWNLOAD_DIR}/tmp_coreutils/coreutils-5.97/bin/pr.exe "${DOWNLOAD_DIR}/mingw/mingw32/msys/1.0/bin/pr.exe"
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
)
endif()
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/ming32sh.cmd")
message("Installing ming32sh.cmd")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/ming32sh.cmd ${DOWNLOAD_DIR}/mingw/mingw32/ming32sh.cmd
)
endif()
message("Checking for perl")
# download perl for libvpx
if(NOT EXISTS "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip")
message("Downloading perl")
file(DOWNLOAD "http://strawberryperl.com/download/5.22.1.3/strawberry-perl-5.22.1.3-32bit-portable.zip" "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip")
endif()
# make perl root directory
if(NOT EXISTS "${DOWNLOAD_DIR}/perl32")
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/perl32
WORKING_DIRECTORY ${DOWNLOAD_DIR}
)
endif()
# extract perl
if((NOT EXISTS "${DOWNLOAD_DIR}/perl32/portable.perl") AND (EXISTS "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip"))
message("Extracting perl")
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-32bit-portable.zip
WORKING_DIRECTORY ${DOWNLOAD_DIR}/perl32
)
endif()
# get yasm for vpx
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/yasm.exe")
message("Downloading yasm")
file(DOWNLOAD "http://www.tortall.net/projects/yasm/releases/yasm-1.3.0-win32.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/yasm.exe")
endif()
message("checking i686-w64-mingw32-strings")
# copy strings.exe to i686-w64-mingw32-strings for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strings.exe")
message("fixing i686-w64-mingw32-strings.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/strings.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strings.exe"
)
endif()
message("checking i686-w64-mingw32-ar.exe")
# copy ar.exe to i686-w64-mingw32-ar.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ar.exe")
message("fixing i686-w64-mingw32-ar.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/ar.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ar.exe"
)
endif()
message("checking i686-w64-mingw32-strip.exe")
# copy strip.exe to i686-w64-mingw32-strip.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strip.exe")
message("fixing i686-w64-mingw32-strip.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/strip.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-strip.exe"
)
endif()
message("checking i686-w64-mingw32-ranlib.exe")
# copy ranlib.exe to i686-w64-mingw32-ranlib.exe for x264
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ranlib.exe")
message("fixing i686-w64-mingw32-ranlib.exe")
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw32/bin/ranlib.exe" "${DOWNLOAD_DIR}/mingw/mingw32/bin/i686-w64-mingw32-ranlib.exe"
)
endif()

View File

@@ -19,7 +19,7 @@
####################################################################################################################
# Mingw64 Builds
####################################################################################################################
# This installs mingw64+msys to compile ffmpeg/iconv/libsndfile/lapack/fftw3
# This installs mingw64+msys to compile ffmpeg/iconv/libsndfile/fftw3
####################################################################################################################
message("LIBDIR = ${LIBDIR}")
@@ -128,6 +128,14 @@ if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get.exe") AND (NOT EXISTS "$
)
endif()
if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get.exe") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/m4.exe"))
message("Installing m4")
execute_process(
COMMAND ${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get install msys msys-m4
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw64/bin/
)
endif()
message("Checking for CoreUtils")
# download old core_utils for pr.exe (ffmpeg needs it to build)
if(NOT EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")

View File

@@ -21,7 +21,7 @@ set(SNDFILE_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/ogg/lib/pkgconfig:${mingw_LIBDIR
if(WIN32)
set(SNDFILE_ENV set ${SNDFILE_ENV} &&)
#shared for windows because static libs will drag in a libgcc dependency.
# Shared for windows because static libs will drag in a libgcc dependency.
set(SNDFILE_OPTIONS --disable-static --enable-shared )
else()
set(SNDFILE_OPTIONS --enable-static --disable-shared )
@@ -60,3 +60,14 @@ if(UNIX)
external_flac
)
endif()
if(BUILD_MODE STREQUAL Release AND WIN32)
ExternalProject_Add_Step(external_sndfile after_install
COMMAND lib /def:${BUILD_DIR}/sndfile/src/external_sndfile/src/libsndfile-1.def /machine:x64 /out:${BUILD_DIR}/sndfile/src/external_sndfile/src/libsndfile-1.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/bin/libsndfile-1.dll ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.dll
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/sndfile/src/external_sndfile/src/libsndfile-1.lib ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/include/sndfile.h ${HARVEST_TARGET}/sndfile/include/sndfile.h
DEPENDEES install
)
endif()

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 \
@@ -49,7 +51,7 @@ ExternalProject_Add(external_sqlite
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA1=${SQLITE_HASH}
PREFIX ${BUILD_DIR}/sqlite
PATCH_COMMAND ${SQLITE_PATCH_CMD}
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/sqlite/src/external_sqlite < ${PATCH_DIR}/sqlite.diff
CONFIGURE_COMMAND ${SQLITE_CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/sqlite ${SQLITE_CONFIGURATION_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sqlite/src/external_sqlite/ && make install

View File

@@ -20,7 +20,7 @@ set(SSL_CONFIGURE_COMMAND ./Configure)
set(SSL_PATCH_CMD echo .)
if(APPLE)
set(SSL_OS_COMPILER "blender-darwin-x86_64")
set(SSL_OS_COMPILER "blender-darwin-${CMAKE_OSX_ARCHITECTURES}")
else()
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(SSL_EXTRA_ARGS enable-ec_nistp_64_gcc_128)

View File

@@ -1,4 +1,4 @@
%targets = (
my %targets = (
"blender-linux-x86" => {
inherit_from => [ "linux-x86" ],
@@ -12,4 +12,9 @@
inherit_from => [ "darwin64-x86_64-cc" ],
cflags => add("-fPIC"),
},
"blender-darwin-arm64" => {
inherit_from => [ "darwin-common" ],
cxxflags => add("-fPIC -arch arm64"),
cflags => add("-fPIC -arch arm64"),
},
);

View File

@@ -15,13 +15,25 @@
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ***** END GPL LICENSE BLOCK *****
set(TBB_EXTRA_ARGS
-DTBB_BUILD_SHARED=Off
-DTBB_BUILD_TBBMALLOC=Off
-DTBB_BUILD_TBBMALLOC_PROXY=Off
-DTBB_BUILD_STATIC=On
)
if(WIN32)
set(TBB_EXTRA_ARGS
-DTBB_BUILD_SHARED=On
-DTBB_BUILD_TBBMALLOC=On
-DTBB_BUILD_TBBMALLOC_PROXY=On
-DTBB_BUILD_STATIC=Off
)
set(TBB_LIBRARY tbb)
set(TBB_STATIC_LIBRARY Off)
else()
set(TBB_EXTRA_ARGS
-DTBB_BUILD_SHARED=Off
-DTBB_BUILD_TBBMALLOC=On
-DTBB_BUILD_TBBMALLOC_PROXY=Off
-DTBB_BUILD_STATIC=On
)
set(TBB_LIBRARY tbb_static)
set(TBB_STATIC_LIBRARY On)
endif()
# CMake script for TBB from https://github.com/wjakob/tbb/blob/master/CMakeLists.txt
ExternalProject_Add(external_tbb
@@ -38,14 +50,34 @@ ExternalProject_Add(external_tbb
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_tbb after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb.lib
# findtbb.cmake in some deps *NEEDS* to find tbb_debug.lib even if they are not going to use it
# to make that test pass, we place a copy with the right name in the lib folder.
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb.lib ${HARVEST_TARGET}/tbb/lib/tbb_debug.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc_debug.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb.dll ${HARVEST_TARGET}/tbb/lib/tbb_debug.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.dll ${HARVEST_TARGET}/tbb/lib/tbbmalloc_debug.dll
# Normal collection of build artifacts
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb.lib ${HARVEST_TARGET}/tbb/lib/tbb.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb.dll ${HARVEST_TARGET}/tbb/lib/tbb.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.dll ${HARVEST_TARGET}/tbb/lib/tbbmalloc.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc_proxy.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy.dll ${HARVEST_TARGET}/tbb/lib/tbbmalloc_proxy.dll
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/tbb/include/ ${HARVEST_TARGET}/tbb/include/
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_tbb after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_static.lib ${HARVEST_TARGET}/tbb/lib/tbb_debug.lib
# findtbb.cmake in some deps *NEEDS* to find tbb.lib even if they are not going to use it
# to make that test pass, we place a copy with the right name in the lib folder.
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_debug.lib ${LIBDIR}/tbb/lib/tbb.lib
# Normal collection of build artifacts
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_debug.lib ${HARVEST_TARGET}/tbb/lib/debug/tbb_debug.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbb_debug.dll ${HARVEST_TARGET}/tbb/lib/debug/tbb_debug.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy.lib ${HARVEST_TARGET}/tbb/lib/tbbmalloc_proxy_debug.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc.dll ${HARVEST_TARGET}/tbb/lib/debug/tbbmalloc.dll
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tbb/lib/tbbmalloc_proxy.dll ${HARVEST_TARGET}/tbb/lib/debug/tbbmalloc_proxy.dll
DEPENDEES install
)
endif()

View File

@@ -16,7 +16,7 @@
#
# ***** END GPL LICENSE BLOCK *****
if (UNIX)
if(UNIX)
set(THEORA_CONFIGURE_ENV ${CONFIGURE_ENV} && export HAVE_PDFLATEX=no)
else()
set(THEORA_CONFIGURE_ENV ${CONFIGURE_ENV})
@@ -27,6 +27,7 @@ ExternalProject_Add(external_theora
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${THEORA_HASH}
PREFIX ${BUILD_DIR}/theora
PATCH_COMMAND ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/theora/src/external_theora < ${PATCH_DIR}/theora.diff
CONFIGURE_COMMAND ${THEORA_CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/theora
--disable-shared
--enable-static

View File

@@ -16,6 +16,12 @@
#
# ***** END GPL LICENSE BLOCK *****
if(WITH_WEBP)
set(WITH_TIFF_WEBP ON)
else()
set(WITH_TIFF_WEBP OFF)
endif()
set(TIFF_EXTRA_ARGS
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include
@@ -23,6 +29,8 @@ set(TIFF_EXTRA_ARGS
-DBUILD_SHARED_LIBS=OFF
-Dlzma=OFF
-Djbig=OFF
-Dzstd=OFF
-Dwebp=${WITH_TIFF_WEBP}
)
ExternalProject_Add(external_tiff

View File

@@ -24,7 +24,7 @@ ExternalProject_Add(external_tinyxml
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${TINYXML_HASH}
PREFIX ${BUILD_DIR}/tinyxml
#patch taken from ocio
# patch taken from ocio
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/tinyxml/src/external_tinyxml < ${PATCH_DIR}/tinyxml.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tinyxml ${DEFAULT_CMAKE_FLAGS} ${TINYXML_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/tinyxml

View File

@@ -0,0 +1,106 @@
# ***** 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
-DBoost_NO_SYSTEM_PATHS=ON
-DBoost_NO_BOOST_CMAKE=ON
-DTBB_INCLUDE_DIRS=${LIBDIR}/tbb/include
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${LIBEXT}
-DTbb_TBB_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${LIBEXT}
# USD wants the tbb debug lib set even when you are doing a release build
# Otherwise it will error out during the cmake configure phase.
-DTBB_LIBRARIES_DEBUG=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${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/usd_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/usd_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

@@ -20,59 +20,55 @@ set(ZLIB_VERSION 1.2.11)
set(ZLIB_URI https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz)
set(ZLIB_HASH 1c9f62f0778697a09d36121ead88e08e)
set(OPENAL_VERSION 1.18.2)
set(OPENAL_VERSION 1.20.1)
set(OPENAL_URI http://openal-soft.org/openal-releases/openal-soft-${OPENAL_VERSION}.tar.bz2)
set(OPENAL_HASH d4eeb0889812e2fdeaa1843523d76190)
set(OPENAL_HASH 556695068ce8375b89986083d810fd35)
set(PNG_VERSION 1.6.35)
set(PNG_VERSION 1.6.37)
set(PNG_URI http://prdownloads.sourceforge.net/libpng/libpng-${PNG_VERSION}.tar.xz)
set(PNG_HASH 678b7e696a62a193ed3503b04bf449d6)
set(PNG_HASH 505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca)
set(JPEG_VERSION 1.5.3)
set(JPEG_VERSION 2.0.4)
set(JPEG_URI https://github.com/libjpeg-turbo/libjpeg-turbo/archive/${JPEG_VERSION}.tar.gz)
set(JPEG_HASH 5b7549d440b86c98a517355c102d155e)
set(JPEG_HASH 44c43e4a9fb352f47090804529317c88)
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.2)
set(FREETYPE_URI http://prdownloads.sourceforge.net/freetype/freetype-${FREETYPE_VERSION}.tar.gz)
set(FREETYPE_HASH 3adb0e35d3c100c456357345ccfa8056)
set(FREETYPE_HASH b1cb620e4c875cd4d1bfa04945400945)
set(GLEW_VERSION 1.13.0)
set(GLEW_URI http://prdownloads.sourceforge.net/glew/glew/${GLEW_VERSION}/glew-${GLEW_VERSION}.tgz)
@@ -82,99 +78,95 @@ set(FREEGLUT_VERSION 3.0.0)
set(FREEGLUT_URI http://pilotfiber.dl.sourceforge.net/project/freeglut/freeglut/${FREEGLUT_VERSION}/freeglut-${FREEGLUT_VERSION}.tar.gz)
set(FREEGLUT_HASH 90c3ca4dd9d51cf32276bc5344ec9754)
set(HDF5_VERSION 1.8.17)
set(HDF5_URI https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-${HDF5_VERSION}/src/hdf5-${HDF5_VERSION}.tar.gz)
set(HDF5_HASH 7d572f8f3b798a628b8245af0391a0ca)
set(ALEMBIC_VERSION 1.7.8)
set(ALEMBIC_VERSION 1.7.12)
set(ALEMBIC_URI https://github.com/alembic/alembic/archive/${ALEMBIC_VERSION}.tar.gz)
set(ALEMBIC_MD5 d095c2feb5e183b824904db7b63c1d30)
set(ALEMBIC_MD5 e2b3777f23c5c09481a008cc6f0f8a40)
## hash is for 3.1.2
# hash is for 3.1.2
set(GLFW_GIT_UID 30306e54705c3adae9fe082c816a3be71963485c)
set(GLFW_URI https://github.com/glfw/glfw/archive/${GLFW_GIT_UID}.zip)
set(GLFW_HASH 20cacb1613da7eeb092f3ac4f6b2b3d0)
#latest uid in git as of 2016-04-01
# latest uid in git as of 2016-04-01
set(CLEW_GIT_UID 277db43f6cafe8b27c6f1055f69dc67da4aeb299)
set(CLEW_URI https://github.com/OpenCLWrangler/clew/archive/${CLEW_GIT_UID}.zip)
set(CLEW_HASH 2c699d10ed78362e71f56fae2a4c5f98)
#latest uid in git as of 2016-04-01
# latest uid in git as of 2016-04-01
set(CUEW_GIT_UID 1744972026de9cf27c8a7dc39cf39cd83d5f922f)
set(CUEW_URI https://github.com/CudaWrangler/cuew/archive/${CUEW_GIT_UID}.zip)
set(CUEW_HASH 86760d62978ebfd96cd93f5aa1abaf4a)
set(OPENSUBDIV_VERSION v3_4_0_RC2)
set(OPENSUBDIV_Hash f6a10ba9efaa82fde86fe65aad346319)
set(OPENSUBDIV_VERSION v3_4_3)
set(OPENSUBDIV_URI https://github.com/PixarAnimationStudios/OpenSubdiv/archive/${OPENSUBDIV_VERSION}.tar.gz)
set(OPENSUBDIV_HASH 7bbfa275d021fb829e521df749160edb)
set(SDL_VERSION 2.0.8)
set(SDL_VERSION 2.0.12)
set(SDL_URI https://www.libsdl.org/release/SDL2-${SDL_VERSION}.tar.gz)
set(SDL_HASH 3800d705cef742c6a634f202c37f263f)
set(SDL_HASH 783b6f2df8ff02b19bb5ce492b99c8ff)
set(OPENCOLLADA_VERSION v1.6.68)
set(OPENCOLLADA_URI https://github.com/KhronosGroup/OpenCOLLADA/archive/${OPENCOLLADA_VERSION}.tar.gz)
set(OPENCOLLADA_HASH ee7dae874019fea7be11613d07567493)
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(OPENCOLORIO_VERSION 1.1.1)
set(OPENCOLORIO_URI https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v${OPENCOLORIO_VERSION}.tar.gz)
set(OPENCOLORIO_HASH 23d8b9ac81599305539a5a8674b94a3d)
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_VERSION 2.1.15.0)
set(OPENIMAGEIO_URI https://github.com/OpenImageIO/oiio/archive/Release-${OPENIMAGEIO_VERSION}.tar.gz)
set(OPENIMAGEIO_HASH f5526c3c9878029ee900d84856683f93)
set(OPENIMAGEIO_HASH f03aa5e3ac4795af04771ee4146e9832)
set(TIFF_VERSION 4.0.9)
set(TIFF_VERSION 4.1.0)
set(TIFF_URI http://download.osgeo.org/libtiff/tiff-${TIFF_VERSION}.tar.gz)
set(TIFF_HASH 54bad211279cc93eb4fca31ba9bfdc79)
set(TIFF_HASH 2165e7aba557463acc0664e71a3ed424)
set(OSL_VERSION 1.9.9)
set(OSL_VERSION 1.10.10)
set(OSL_URI https://github.com/imageworks/OpenShadingLanguage/archive/Release-${OSL_VERSION}.tar.gz)
set(OSL_HASH 44ad511e424965a10fce051a053b0605)
set(OSL_HASH 00dec08a93c8084e53848b9ad047889f)
set(PYTHON_VERSION 3.7.4)
set(PYTHON_VERSION 3.7.7)
set(PYTHON_SHORT_VERSION 3.7)
set(PYTHON_SHORT_VERSION_NO_DOTS 37)
set(PYTHON_URI https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz)
set(PYTHON_HASH d33e4aae66097051c2eca45ee3604803)
set(PYTHON_HASH 172c650156f7bea68ce31b2fd01fa766)
set(TBB_VERSION 2018_U5)
set(TBB_URI https://github.com/01org/tbb/archive/${TBB_VERSION}.tar.gz)
set(TBB_HASH ff3ae09f8c23892fbc3008c39f78288f)
set(TBB_VERSION 2019_U9)
set(TBB_URI https://github.com/oneapi-src/oneTBB/archive/${TBB_VERSION}.tar.gz)
set(TBB_HASH 26263622e9187212ec240dcf01b66207)
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.7)
set(IDNA_VERSION 2.9)
set(CHARDET_VERSION 3.0.4)
set(URLLIB3_VERSION 1.23)
set(CERTIFI_VERSION 2018.8.13)
set(REQUESTS_VERSION 2.19.1)
set(URLLIB3_VERSION 1.25.9)
set(CERTIFI_VERSION 2020.4.5.2)
set(REQUESTS_VERSION 2.23.0)
set(NUMPY_VERSION v1.15.0)
set(NUMPY_SHORT_VERSION 1.15)
set(NUMPY_URI https://files.pythonhosted.org/packages/3a/20/c81632328b1a4e1db65f45c0a1350a9c5341fd4bbb8ea66cdd98da56fe2e/numpy-1.15.0.zip)
set(NUMPY_HASH 20e13185089011116a98e11c9bf8aa07)
set(NUMPY_VERSION 1.17.5)
set(NUMPY_SHORT_VERSION 1.17)
set(NUMPY_URI https://github.com/numpy/numpy/releases/download/v${NUMPY_VERSION}/numpy-${NUMPY_VERSION}.zip)
set(NUMPY_HASH 763a5646fa6eef7a22f4895bca0524f2)
set(LAME_VERSION 3.100)
set(LAME_URI http://downloads.sourceforge.net/project/lame/lame/3.100/lame-${LAME_VERSION}.tar.gz)
set(LAME_HASH 83e260acbe4389b54fe08e0bdbf7cddb)
set(OGG_VERSION 1.3.3)
set(OGG_VERSION 1.3.4)
set(OGG_URI http://downloads.xiph.org/releases/ogg/libogg-${OGG_VERSION}.tar.gz)
set(OGG_HASH c2e8a485110b97550f453226ec644ebac6cb29d1caef2902c007edab4308d985)
set(OGG_HASH fe5670640bd49e828d64d2879c31cb4dde9758681bb664f9bdbf159a01b0c76e)
set(VORBIS_VERSION 1.3.6)
set(VORBIS_URI http://downloads.xiph.org/releases/vorbis/libvorbis-${VORBIS_VERSION}.tar.gz)
@@ -184,55 +176,49 @@ set(THEORA_VERSION 1.1.1)
set(THEORA_URI http://downloads.xiph.org/releases/theora/libtheora-${THEORA_VERSION}.tar.bz2)
set(THEORA_HASH b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc)
set(FLAC_VERSION 1.3.2)
set(FLAC_VERSION 1.3.3)
set(FLAC_URI http://downloads.xiph.org/releases/flac/flac-${FLAC_VERSION}.tar.xz)
set(FLAC_HASH 91cfc3ed61dc40f47f050a109b08610667d73477af6ef36dcad31c31a4a8d53f)
set(FLAC_HASH 213e82bd716c9de6db2f98bcadbc4c24c7e2efe8c75939a1a84e28539c4e1748)
set(VPX_VERSION 1.7.0)
set(VPX_VERSION 1.8.2)
set(VPX_URI https://github.com/webmproject/libvpx/archive/v${VPX_VERSION}/libvpx-v${VPX_VERSION}.tar.gz)
set(VPX_HASH 1fec931eb5c94279ad219a5b6e0202358e94a93a90cfb1603578c326abfc1238)
set(VPX_HASH 8735d9fcd1a781ae6917f28f239a8aa358ce4864ba113ea18af4bb2dc8b474ac)
set(X264_URI http://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20180811-2245-stable.tar.bz2)
set(X264_HASH ae8a868a0e236a348b35d79f3ee80294b169d1195408b689f9851383661ed7aa)
set(OPUS_VERSION 1.3.1)
set(OPUS_URI https://archive.mozilla.org/pub/opus/opus-${OPUS_VERSION}.tar.gz)
set(OPUS_HASH 65b58e1e25b2a114157014736a3d9dfeaad8d41be1c8179866f144a2fb44ff9d)
set(XVIDCORE_VERSION 1.3.5)
set(XVIDCORE_URI http://downloads.xvid.org/downloads/xvidcore-${XVIDCORE_VERSION}.tar.gz)
set(XVIDCORE_HASH 165ba6a2a447a8375f7b06db5a3c91810181f2898166e7c8137401d7fc894cf0)
set(X264_URI https://code.videolan.org/videolan/x264/-/archive/33f9e1474613f59392be5ab6a7e7abf60fa63622/x264-33f9e1474613f59392be5ab6a7e7abf60fa63622.tar.gz)
set(X264_HASH 5456450ee1ae02cd2328be3157367a232a0ab73315e8c8f80dab80469524f525)
#this has to be in sync with the version in blenders /extern folder
set(OPENJPEG_VERSION 2.3.0)
set(XVIDCORE_VERSION 1.3.7)
set(XVIDCORE_URI https://downloads.xvid.com/downloads/xvidcore-${XVIDCORE_VERSION}.tar.gz)
set(XVIDCORE_HASH abbdcbd39555691dd1c9b4d08f0a031376a3b211652c0d8b3b8aa9be1303ce2d)
set(OPENJPEG_VERSION 2.3.1)
set(OPENJPEG_SHORT_VERSION 2.3)
# Use slightly newer commit after release which includes a cmake fix
set(OPENJPEG_URI https://github.com/uclouvain/openjpeg/archive/66297f07a43.zip)
set(OPENJPEG_HASH 8242b18d908c7c42174e4231a741cfa7ce7c26b6ed5c9644feb9df7b3054310b)
set(OPENJPEG_URI https://github.com/uclouvain/openjpeg/archive/v${OPENJPEG_VERSION}.tar.gz)
set(OPENJPEG_HASH 63f5a4713ecafc86de51bfad89cc07bb788e9bba24ebbf0c4ca637621aadb6a9)
set(FAAD_VERSION 2-2.8.8)
set(FAAD_URI http://downloads.sourceforge.net/faac/faad${FAAD_VERSION}.tar.gz)
set(FAAD_HASH 28f6116efdbe9378269f8a6221767d1f)
set(FFMPEG_VERSION 4.0.2)
set(FFMPEG_VERSION 4.2.3)
set(FFMPEG_URI http://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2)
set(FFMPEG_HASH 5576e8a22f80b6a336db39808f427cfb)
set(FFMPEG_HASH 695fad11f3baf27784e24cb0e977b65a)
set(FFTW_VERSION 3.3.8)
set(FFTW_URI http://www.fftw.org/fftw-${FFTW_VERSION}.tar.gz)
set(FFTW_HASH 8aac833c943d8e90d51b697b27d4384d)
set(ICONV_VERSION 1.15)
set(ICONV_VERSION 1.16)
set(ICONV_URI http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar.gz)
set(ICONV_HASH ace8b5f2db42f7b3b3057585e80d9808)
set(LAPACK_VERSION 3.6.0)
set(LAPACK_URI http://www.netlib.org/lapack/lapack-${LAPACK_VERSION}.tgz)
set(LAPACK_HASH f2f6c67134e851fe189bb3ca1fbb5101)
set(ICONV_HASH 7d2a800b952942bb2880efb00cfd524c)
set(SNDFILE_VERSION 1.0.28)
set(SNDFILE_URI http://www.mega-nerd.com/libsndfile/files/libsndfile-${SNDFILE_VERSION}.tar.gz)
set(SNDFILE_HASH 646b5f98ce89ac60cdb060fcd398247c)
#set(HIDAPI_VERSION 0.8.0-rc1)
#set(HIDAPI_URI https://github.com/signal11/hidapi/archive/hidapi-${HIDAPI_VERSION}.tar.gz)
#set(HIDAPI_HASH 069f9dd746edc37b6b6d0e3656f47199)
# set(HIDAPI_VERSION 0.8.0-rc1)
# set(HIDAPI_URI https://github.com/signal11/hidapi/archive/hidapi-${HIDAPI_VERSION}.tar.gz)
# set(HIDAPI_HASH 069f9dd746edc37b6b6d0e3656f47199)
set(HIDAPI_UID 89a6c75dc6f45ecabd4ddfbd2bf5ba6ad8ba38b5)
set(HIDAPI_URI https://github.com/TheOnlyJoey/hidapi/archive/${HIDAPI_UID}.zip)
@@ -246,30 +232,30 @@ set(SPNAV_VERSION 0.2.3)
set(SPNAV_URI http://downloads.sourceforge.net/project/spacenav/spacenav%20library%20%28SDK%29/libspnav%20${SPNAV_VERSION}/libspnav-${SPNAV_VERSION}.tar.gz)
set(SPNAV_HASH 44d840540d53326d4a119c0f1aa7bf0a)
set(JEMALLOC_VERSION 5.0.1)
set(JEMALLOC_VERSION 5.2.1)
set(JEMALLOC_URI https://github.com/jemalloc/jemalloc/releases/download/${JEMALLOC_VERSION}/jemalloc-${JEMALLOC_VERSION}.tar.bz2)
set(JEMALLOC_HASH 507f7b6b882d868730d644510491d18f)
set(JEMALLOC_HASH 3d41fbf006e6ebffd489bdb304d009ae)
set(XML2_VERSION 2.9.4)
set(XML2_VERSION 2.9.10)
set(XML2_URI http://xmlsoft.org/sources/libxml2-${XML2_VERSION}.tar.gz)
set(XML2_HASH ae249165c173b1ff386ee8ad676815f5)
set(XML2_HASH 10942a1dc23137a8aa07f0639cbfece5)
set(TINYXML_VERSION 2_6_2)
set(TINYXML_VERSION_DOTS 2.6.2)
set(TINYXML_URI https://nchc.dl.sourceforge.net/project/tinyxml/tinyxml/${TINYXML_VERSION_DOTS}/tinyxml_${TINYXML_VERSION}.tar.gz)
set(TINYXML_HASH c1b864c96804a10526540c664ade67f0)
set(YAMLCPP_VERSION 0.6.2)
set(YAMLCPP_VERSION 0.6.3)
set(YAMLCPP_URI https://codeload.github.com/jbeder/yaml-cpp/tar.gz/yaml-cpp-${YAMLCPP_VERSION})
set(YAMLCPP_HASH 5b943e9af0060d0811148b037449ef82)
set(YAMLCPP_HASH b45bf1089a382e81f6b661062c10d0c2)
set(LCMS_VERSION 2.9)
set(LCMS_URI https://nchc.dl.sourceforge.net/project/lcms/lcms/${LCMS_VERSION}/lcms2-${LCMS_VERSION}.tar.gz)
set(LCMS_HASH 8de1b7724f578d2995c8fdfa35c3ad0e)
set(PUGIXML_VERSION 1.9)
set(PUGIXML_URI https://github.com/zeux/pugixml/archive/v1.9.tar.gz)
set(PUGIXML_HASH 9346ca1dce2c48f1748c12fdac41a714)
set(PUGIXML_VERSION 1.10)
set(PUGIXML_URI https://github.com/zeux/pugixml/archive/v${PUGIXML_VERSION}.tar.gz)
set(PUGIXML_HASH 0c208b0664c7fb822bf1b49ad035e8fd)
set(FLEXBISON_VERSION 2.5.5)
set(FLEXBISON_URI http://prdownloads.sourceforge.net/winflexbison//win_flex_bison-2.5.5.zip)
@@ -279,26 +265,58 @@ set(FLEXBISON_HASH d87a3938194520d904013abef3df10ce)
# NOTE: bzip.org domain does no longer belong to BZip 2 project, so we download
# sources from Debian packaging.
set(BZIP2_VERSION 1.0.6)
set(BZIP2_URI http://http.debian.net/debian/pool/main/b/bzip2/bzip2_${BZIP2_VERSION}.orig.tar.bz2)
set(BZIP2_HASH d70a9ccd8bdf47e302d96c69fecd54925f45d9c7b966bb4ef5f56b770960afa7)
set(BZIP2_VERSION 1.0.8)
set(BZIP2_URI http://http.debian.net/debian/pool/main/b/bzip2/bzip2_${BZIP2_VERSION}.orig.tar.gz)
set(BZIP2_HASH ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269)
set(FFI_VERSION 3.2.1)
set(FFI_VERSION 3.3)
set(FFI_URI https://sourceware.org/pub/libffi/libffi-${FFI_VERSION}.tar.gz)
set(FFI_HASH d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37)
set(FFI_HASH 72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056)
set(LZMA_VERSION 5.2.4)
set(LZMA_VERSION 5.2.5)
set(LZMA_URI https://tukaani.org/xz/xz-${LZMA_VERSION}.tar.bz2)
set(LZMA_HASH 3313fd2a95f43d88e44264e6b015e7d03053e681860b0d5d3f9baca79c57b7bf)
set(LZMA_HASH 5117f930900b341493827d63aa910ff5e011e0b994197c3b71c08a20228a42df)
set(SSL_VERSION 1.1.0i)
set(SSL_VERSION 1.1.1g)
set(SSL_URI https://www.openssl.org/source/openssl-${SSL_VERSION}.tar.gz)
set(SSL_HASH ebbfc844a8c8cc0ea5dc10b86c9ce97f401837f3fa08c17b2cdadc118253cf99)
set(SSL_HASH ddb04774f1e32f0c49751e21b67216ac87852ceb056b75209af2443400636d46)
set(SQLITE_VERSION 3.24.0)
set(SQLITE_VERSION 3.31.1)
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.10.0)
set(EMBREE_URI https://github.com/embree/embree/archive/v${EMBREE_VERSION}.zip)
set(EMBREE_HASH 3d4a1147002ff43939d45140aa9d6fb8)
set(EMBREE_HASH 4bbe29e7eaa46417efc75fc5f1e8eb87)
set(USD_VERSION 20.05)
set(USD_URI https://github.com/PixarAnimationStudios/USD/archive/v${USD_VERSION}.tar.gz)
set(USD_HASH 6d679e739e7f65725d9c029e37dda9fc)
set(OIDN_VERSION 1.2.1)
set(OIDN_URI https://github.com/OpenImageDenoise/oidn/releases/download/v${OIDN_VERSION}/oidn-${OIDN_VERSION}.src.tar.gz)
set(OIDN_HASH cbebc1a25eb6de62af3a59e943063608)
set(LIBGLU_VERSION 9.0.1)
set(LIBGLU_URI ftp://ftp.freedesktop.org/pub/mesa/glu/glu-${LIBGLU_VERSION}.tar.xz)
set(LIBGLU_HASH 151aef599b8259efe9acd599c96ea2a3)
set(MESA_VERSION 18.3.1)
set(MESA_URI ftp://ftp.freedesktop.org/pub/mesa//mesa-${MESA_VERSION}.tar.xz)
set(MESA_HASH d60828056d77bfdbae0970f9b15fb1be)
set(NASM_VERSION 2.15.02)
set(NASM_URI https://www.nasm.us/pub/nasm/releasebuilds/${NASM_VERSION}/nasm-${NASM_VERSION}.tar.xz)
set(NASM_HASH f4fd1329b1713e1ccd34b2fc121c4bcd278c9f91cc4cb205ae8fcd2e4728dd14)
set(XR_OPENXR_SDK_VERSION 1.0.8)
set(XR_OPENXR_SDK_URI https://github.com/KhronosGroup/OpenXR-SDK/archive/release-${XR_OPENXR_SDK_VERSION}.tar.gz)
set(XR_OPENXR_SDK_HASH c6de63d2e0f9029aa58dfa97cad8ce07)
set(ISPC_VERSION v1.13.0)
set(ISPC_URI https://github.com/ispc/ispc/archive/${ISPC_VERSION}.tar.gz)
set(ISPC_HASH 4bf5e8d0020c4b9980faa702c1a6f25f)
set(GMP_VERSION 6.2.0)
set(GMP_URI https://gmplib.org/download/gmp/gmp-${GMP_VERSION}.tar.xz)
set(GMP_HASH a325e3f09e6d91e62101e59f9bda3ec1)

View File

@@ -24,7 +24,11 @@ if(WIN32)
endif()
else()
if(APPLE)
set(VPX_EXTRA_FLAGS --target=x86_64-darwin13-gcc)
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
set(VPX_EXTRA_FLAGS --target=generic-gnu)
else()
set(VPX_EXTRA_FLAGS --target=x86_64-darwin17-gcc)
endif()
else()
set(VPX_EXTRA_FLAGS --target=generic-gnu)
endif()
@@ -49,6 +53,8 @@ ExternalProject_Add(external_vpx
--disable-avx2
--disable-unit-tests
--disable-examples
--enable-vp8
--enable-vp9
${VPX_EXTRA_FLAGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vpx/src/external_vpx/ && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vpx/src/external_vpx/ && make install

View File

@@ -39,3 +39,12 @@ ExternalProject_Add(external_webp
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/webp -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${WEBP_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/webp
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_webp after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/webp ${HARVEST_TARGET}/webp
DEPENDEES install
)
endif()
endif()

View File

@@ -18,19 +18,29 @@
if(WIN32)
set(X264_EXTRA_ARGS --enable-win32thread --cross-prefix=${MINGW_HOST}- --host=${MINGW_HOST})
set(X264_PATCH_CMD ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/x264/src/external_x264 < ${PATCH_DIR}/x264.diff)
else()
set(X264_PATCH_CMD echo .)
endif()
if(APPLE)
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
set(X264_EXTRA_ARGS ${X264_EXTRA_ARGS} "--disable-asm")
set(X264_CONFIGURE_ENV echo .)
else()
set(X264_CONFIGURE_ENV
export AS=${LIBDIR}/nasm/bin/nasm
)
endif()
else()
set(X264_CONFIGURE_ENV echo .)
endif()
ExternalProject_Add(external_x264
URL ${X264_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH SHA256=${X264_HASH}
PREFIX ${BUILD_DIR}/x264
PATCH_COMMAND ${X264_PATCH_CMD}
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/x264
CONFIGURE_COMMAND ${CONFIGURE_ENV} && ${X264_CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ &&
${CONFIGURE_COMMAND} --prefix=${LIBDIR}/x264
--enable-static
--enable-pic
--disable-lavf
@@ -43,3 +53,10 @@ ExternalProject_Add(external_x264
if(MSVC)
set_target_properties(external_x264 PROPERTIES FOLDER Mingw)
endif()
if(APPLE)
add_dependencies(
external_x264
external_nasm
)
endif()

View File

@@ -0,0 +1,60 @@
# ***** 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 *****
# Keep flags in sync with install_deps.sh ones in compile_XR_OpenXR_SDK()
set(XR_OPENXR_SDK_EXTRA_ARGS
-DBUILD_FORCE_GENERATION=OFF
-DBUILD_LOADER=ON
-DDYNAMIC_LOADER=OFF
)
if(UNIX AND NOT APPLE)
list(APPEND XR_OPENXR_SDK_EXTRA_ARGS
-DBUILD_WITH_WAYLAND_HEADERS=OFF
-DBUILD_WITH_XCB_HEADERS=OFF
-DBUILD_WITH_XLIB_HEADERS=ON
-DBUILD_WITH_SYSTEM_JSONCPP=OFF
-DCMAKE_CXX_FLAGS=-DDISABLE_STD_FILESYSTEM=1
)
endif()
ExternalProject_Add(external_xr_openxr_sdk
URL ${XR_OPENXR_SDK_URI}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH MD5=${XR_OPENXR_SDK_HASH}
PREFIX ${BUILD_DIR}/xr_openxr_sdk
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/xr_openxr_sdk ${DEFAULT_CMAKE_FLAGS} ${XR_OPENXR_SDK_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/xr_openxr_sdk
)
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_xr_openxr_sdk after_install
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/xr_openxr_sdk/include/openxr ${HARVEST_TARGET}/xr_openxr_sdk/include/openxr
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/xr_openxr_sdk/lib ${HARVEST_TARGET}/xr_openxr_sdk/lib
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_xr_openxr_sdk after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/xr_openxr_sdk/lib/openxr_loader.lib ${HARVEST_TARGET}/xr_openxr_sdk/lib/openxr_loader_d.lib
DEPENDEES install
)
endif()
endif()

View File

@@ -21,7 +21,7 @@ set(YAMLCPP_EXTRA_ARGS
-DYAML_CPP_BUILD_TESTS=OFF
-DYAML_CPP_BUILD_TOOLS=OFF
-DYAML_CPP_BUILD_CONTRIB=OFF
-DMSVC_SHARED_RT=OFF
-DYAML_MSVC_SHARED_RT=ON
)
ExternalProject_Add(external_yamlcpp

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,122 @@ 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
diff --git a/blosc/shuffle.c b/blosc/shuffle.c
index 84b5095..23053b4 100644
--- a/blosc/shuffle.c
+++ b/blosc/shuffle.c
@@ -490,12 +490,12 @@ void unshuffle(size_t bytesoftype, size_t blocksize,
#else /* no __SSE2__ available */
void shuffle(size_t bytesoftype, size_t blocksize,
- uint8_t* _src, uint8_t* _dest) {
+ const uint8_t* _src, uint8_t* _dest) {
_shuffle(bytesoftype, blocksize, _src, _dest);
}
void unshuffle(size_t bytesoftype, size_t blocksize,
- uint8_t* _src, uint8_t* _dest) {
+ const uint8_t* _src, uint8_t* _dest) {
_unshuffle(bytesoftype, blocksize, _src, _dest);
}
--- a/cmake/FindSSE.cmake
+++ b/cmake/FindSSE.cmake
@@ -49,6 +49,17 @@
set(AVX_FOUND false CACHE BOOL "AVX available on host")
ENDIF (AVX_TRUE)
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
+ execute_process(COMMAND uname -m OUTPUT_VARIABLE ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Detected architecture ${ARCHITECTURE}")
+ IF("${ARCHITECTURE}" STREQUAL "arm64")
+ set(SSE2_FOUND false CACHE BOOL "SSE2 available on host")
+ set(SSE3_FOUND false CACHE BOOL "SSE3 available on host")
+ set(SSSE3_FOUND false CACHE BOOL "SSSE3 available on host")
+ set(SSE4_1_FOUND false CACHE BOOL "SSE4.1 available on host")
+ set(AVX_FOUND false CACHE BOOL "AVX available on host")
+ return()
+ ENDIF()
+
EXEC_PROGRAM("/usr/sbin/sysctl -n machdep.cpu.features" OUTPUT_VARIABLE
CPUINFO)

View File

@@ -0,0 +1,4 @@
using python : @PYTHON_SHORT_VERSION@ : @PYTHON_BINARY@
: @LIBDIR@/python/include @LIBDIR@/python/include/python@PYTHON_SHORT_VERSION@m/
: @LIBDIR@/python/libs
;

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
)
@@ -192,11 +190,11 @@ if(ILMBASE_CUSTOM)
set(IlmBase_Libraries ${ILMBASE_CUSTOM_LIBRARIES})
separate_arguments(IlmBase_Libraries)
else()
#elseif(${ILMBASE_VERSION} VERSION_LESS "2.1")
# elseif(${ILMBASE_VERSION} VERSION_LESS "2.1")
set(IlmBase_Libraries Half Iex Imath IlmThread)
#else()
# string(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _ilmbase_libs_ver ${ILMBASE_VERSION})
# set(IlmBase_Libraries Half Iex-${_ilmbase_libs_ver} Imath-${_ilmbase_libs_ver} IlmThread-${_ilmbase_libs_ver})
# else()
# string(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _ilmbase_libs_ver ${ILMBASE_VERSION})
# set(IlmBase_Libraries Half Iex-${_ilmbase_libs_ver} Imath-${_ilmbase_libs_ver} IlmThread-${_ilmbase_libs_ver})
endif()
@@ -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
)
@@ -188,11 +186,11 @@ if(OPENEXR_CUSTOM)
endif()
set(OpenEXR_Library ${OPENEXR_CUSTOM_LIBRARY})
else()
#elseif(${OPENEXR_VERSION} VERSION_LESS "2.1")
# elseif(${OPENEXR_VERSION} VERSION_LESS "2.1")
set(OpenEXR_Library IlmImf)
#else()
# string(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _openexr_libs_ver ${OPENEXR_VERSION})
# set(OpenEXR_Library IlmImf-${_openexr_libs_ver})
# else()
# string(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _openexr_libs_ver ${OPENEXR_VERSION})
# set(OpenEXR_Library IlmImf-${_openexr_libs_ver})
endif()
# Locate the OpenEXR library
@@ -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

@@ -0,0 +1,22 @@
cmake_minimum_required(VERSION 3.1)
project(libgmpxx)
include_directories(. cxx ${GMP_INCLUDE_DIR})
add_definitions(-D__GMP_WITHIN_GMPXX)
add_library(libgmpxx SHARED
cxx/dummy.cc
cxx/isfuns.cc
cxx/ismpf.cc
cxx/ismpq.cc
cxx/ismpz.cc
cxx/ismpznw.cc
cxx/limits.cc
cxx/osdoprnti.cc
cxx/osfuns.cc
cxx/osmpf.cc
cxx/osmpq.cc
cxx/osmpz.cc
)
target_link_libraries(libgmpxx ${GMP_LIBRARY})
install(TARGETS libgmpxx DESTINATION lib)

View File

@@ -1,20 +0,0 @@
cmake_minimum_required(VERSION 2.8)
project(hidapi)
set(SRC_FILES
windows/hid.c
)
set(HEADER_FILES
hidapi/hidapi.h
)
include_directories(hidapi)
add_definitions(-DHID_API_STATIC)
add_library(hidapi STATIC ${SRC_FILES} ${HEADER_FILES})
install(TARGETS hidapi DESTINATION lib)
INSTALL(FILES hidapi/hidapi.h
DESTINATION "include"
)

View File

@@ -109,6 +109,9 @@ if (WIN32)
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/src/tbbmalloc/${ARCH_PREFIX}-tbbmalloc-export.def
COMMENT "Preprocessing tbbmalloc.def"
)
list(APPEND tbb_src ${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/tbb_resource.rc)
list(APPEND tbbmalloc_src ${CMAKE_CURRENT_SOURCE_DIR}/src/tbbmalloc/tbbmalloc.rc)
list(APPEND tbbmalloc_proxy_src ${CMAKE_CURRENT_SOURCE_DIR}/src/tbbmalloc/tbbmalloc.rc)
else()
add_custom_command(OUTPUT tbb.def
COMMAND ${CMAKE_CXX_COMPILER} -xc++ -E ${CMAKE_CURRENT_SOURCE_DIR}/src/tbb/${ARCH_PREFIX}-tbb-export.def -I ${CMAKE_CURRENT_SOURCE_DIR}/include -o tbb.def
@@ -145,8 +148,12 @@ if (TBB_BUILD_SHARED)
set_property(TARGET tbb APPEND PROPERTY LINK_FLAGS "-Wl,-version-script,${CMAKE_CURRENT_BINARY_DIR}/tbb.def")
elseif(WIN32)
set_property(TARGET tbb APPEND PROPERTY LINK_FLAGS "/DEF:${CMAKE_CURRENT_BINARY_DIR}/tbb.def")
endif()
install(TARGETS tbb DESTINATION lib)
if(WIN32)
set_target_properties(tbb PROPERTIES OUTPUT_NAME "tbb$<$<CONFIG:Debug>:_debug>")
endif()
endif()
if(CMAKE_COMPILER_IS_GNUCC)
@@ -196,7 +203,7 @@ if(TBB_BUILD_TBBMALLOC_PROXY)
add_library(tbbmalloc_proxy SHARED ${tbbmalloc_proxy_src})
set_property(TARGET tbbmalloc_proxy APPEND PROPERTY COMPILE_DEFINITIONS "__TBBMALLOC_BUILD=1")
set_property(TARGET tbbmalloc_proxy APPEND_STRING PROPERTY COMPILE_FLAGS ${DISABLE_RTTI})
link_libraries(tbbmalloc_proxy tbbmalloc)
target_link_libraries(tbbmalloc_proxy tbbmalloc)
install(TARGETS tbbmalloc_proxy DESTINATION lib)
endif()
endif()

View File

@@ -0,0 +1,668 @@
/* config.h. Generated from config.in by configure. */
/* config.in. Generated from configure.ac by autoheader. */
/*
Copyright 1996-2020 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
it under the terms of either:
* the GNU Lesser General Public License as published by the Free
Software Foundation; either version 3 of the License, or (at your
option) any later version.
or
* 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.
or both in parallel, as here.
The GNU MP Library 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 copies of the GNU General Public License and the
GNU Lesser General Public License along with the GNU MP Library. If not,
see https://www.gnu.org/licenses/.
*/
/* Define if building universal (internal helper macro) */
/* #undef AC_APPLE_UNIVERSAL_BUILD */
/* The gmp-mparam.h file (a string) the tune program should suggest updating.
*/
#define GMP_MPARAM_H_SUGGEST "./mpn/x86_64/coreisbr/gmp-mparam.h"
/* Define to 1 if you have the `alarm' function. */
#define HAVE_ALARM 1
/* Define to 1 if alloca() works (via gmp-impl.h). */
#define HAVE_ALLOCA 1
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
*/
/* #undef HAVE_ALLOCA_H */
/* Define to 1 if the compiler accepts gcc style __attribute__ ((const)) */
//#define HAVE_ATTRIBUTE_CONST 1
/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */
//#define HAVE_ATTRIBUTE_MALLOC 1
/* Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX)))
*/
//#define HAVE_ATTRIBUTE_MODE 1
/* Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn)) */
//#define HAVE_ATTRIBUTE_NORETURN 1
/* Define to 1 if you have the `attr_get' function. */
/* #undef HAVE_ATTR_GET */
/* Define to 1 if tests/libtests has calling conventions checking for the CPU
*/
/* #undef HAVE_CALLING_CONVENTIONS */
/* Define to 1 if you have the `clock' function. */
#define HAVE_CLOCK 1
/* Define to 1 if you have the `clock_gettime' function */
/* #undef HAVE_CLOCK_GETTIME */
/* Define to 1 if you have the `cputime' function. */
/* #undef HAVE_CPUTIME */
/* Define to 1 if you have the declaration of `fgetc', and to 0 if you don't.
*/
#define HAVE_DECL_FGETC 1
/* Define to 1 if you have the declaration of `fscanf', and to 0 if you don't.
*/
#define HAVE_DECL_FSCANF 1
/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't.
*/
#define HAVE_DECL_OPTARG 1
/* Define to 1 if you have the declaration of `sys_errlist', and to 0 if you
don't. */
#define HAVE_DECL_SYS_ERRLIST 0
/* Define to 1 if you have the declaration of `sys_nerr', and to 0 if you
don't. */
#define HAVE_DECL_SYS_NERR 0
/* Define to 1 if you have the declaration of `ungetc', and to 0 if you don't.
*/
#define HAVE_DECL_UNGETC 1
/* Define to 1 if you have the declaration of `vfprintf', and to 0 if you
don't. */
#define HAVE_DECL_VFPRINTF 1
/* Define to 1 if you have the <dlfcn.h> header file. */
/* #undef HAVE_DLFCN_H */
/* Define one of the following to 1 for the format of a `double'.
If your format is not among these choices, or you don't know what it is,
then leave all undefined.
IEEE_LITTLE_SWAPPED means little endian, but with the two 4-byte halves
swapped, as used by ARM CPUs in little endian mode. */
/* #undef HAVE_DOUBLE_IEEE_BIG_ENDIAN */
#define HAVE_DOUBLE_IEEE_LITTLE_ENDIAN 1
/* #undef HAVE_DOUBLE_IEEE_LITTLE_SWAPPED */
/* #undef HAVE_DOUBLE_VAX_D */
/* #undef HAVE_DOUBLE_VAX_G */
/* #undef HAVE_DOUBLE_CRAY_CFP */
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define to 1 if you have the <float.h> header file. */
#define HAVE_FLOAT_H 1
/* Define to 1 if you have the `getpagesize' function. */
#define HAVE_GETPAGESIZE 1
/* Define to 1 if you have the `getrusage' function. */
/* #undef HAVE_GETRUSAGE */
/* Define to 1 if you have the `getsysinfo' function. */
/* #undef HAVE_GETSYSINFO */
/* Define to 1 if you have the `gettimeofday' function. */
#define HAVE_GETTIMEOFDAY 1
/* Define to 1 if the compiler accepts gcc style __attribute__ ((visibility))
and __attribute__ ((alias)) */
#define HAVE_HIDDEN_ALIAS 1
/* Define one of these to 1 for the host CPU family.
If your CPU is not in any of these families, leave all undefined.
For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */
/* #undef HAVE_HOST_CPU_FAMILY_alpha */
/* #undef HAVE_HOST_CPU_FAMILY_m68k */
/* #undef HAVE_HOST_CPU_FAMILY_power */
/* #undef HAVE_HOST_CPU_FAMILY_powerpc */
/* #undef HAVE_HOST_CPU_FAMILY_x86 */
#define HAVE_HOST_CPU_FAMILY_x86_64 1
/* Define one of the following to 1 for the host CPU, as per the output of
./config.guess. If your CPU is not listed here, leave all undefined. */
/* #undef HAVE_HOST_CPU_alphaev67 */
/* #undef HAVE_HOST_CPU_alphaev68 */
/* #undef HAVE_HOST_CPU_alphaev7 */
/* #undef HAVE_HOST_CPU_m68020 */
/* #undef HAVE_HOST_CPU_m68030 */
/* #undef HAVE_HOST_CPU_m68040 */
/* #undef HAVE_HOST_CPU_m68060 */
/* #undef HAVE_HOST_CPU_m68360 */
/* #undef HAVE_HOST_CPU_powerpc604 */
/* #undef HAVE_HOST_CPU_powerpc604e */
/* #undef HAVE_HOST_CPU_powerpc750 */
/* #undef HAVE_HOST_CPU_powerpc7400 */
/* #undef HAVE_HOST_CPU_supersparc */
/* #undef HAVE_HOST_CPU_i386 */
/* #undef HAVE_HOST_CPU_i586 */
/* #undef HAVE_HOST_CPU_i686 */
/* #undef HAVE_HOST_CPU_pentium */
/* #undef HAVE_HOST_CPU_pentiummmx */
/* #undef HAVE_HOST_CPU_pentiumpro */
/* #undef HAVE_HOST_CPU_pentium2 */
/* #undef HAVE_HOST_CPU_pentium3 */
/* #undef HAVE_HOST_CPU_pentium4 */
/* #undef HAVE_HOST_CPU_core2 */
/* #undef HAVE_HOST_CPU_nehalem */
/* #undef HAVE_HOST_CPU_westmere */
/* #undef HAVE_HOST_CPU_sandybridge */
#define HAVE_HOST_CPU_ivybridge 1
/* #undef HAVE_HOST_CPU_haswell */
/* #undef HAVE_HOST_CPU_broadwell */
/* #undef HAVE_HOST_CPU_skylake */
/* #undef HAVE_HOST_CPU_silvermont */
/* #undef HAVE_HOST_CPU_goldmont */
/* #undef HAVE_HOST_CPU_k8 */
/* #undef HAVE_HOST_CPU_k10 */
/* #undef HAVE_HOST_CPU_bulldozer */
/* #undef HAVE_HOST_CPU_piledriver */
/* #undef HAVE_HOST_CPU_steamroller */
/* #undef HAVE_HOST_CPU_excavator */
/* #undef HAVE_HOST_CPU_zen */
/* #undef HAVE_HOST_CPU_bobcat */
/* #undef HAVE_HOST_CPU_jaguar */
/* #undef HAVE_HOST_CPU_s390_z900 */
/* #undef HAVE_HOST_CPU_s390_z990 */
/* #undef HAVE_HOST_CPU_s390_z9 */
/* #undef HAVE_HOST_CPU_s390_z10 */
/* #undef HAVE_HOST_CPU_s390_z196 */
/* Define to 1 iff we have a s390 with 64-bit registers. */
/* #undef HAVE_HOST_CPU_s390_zarch */
/* Define to 1 if the system has the type `intmax_t'. */
#define HAVE_INTMAX_T 1
/* Define to 1 if the system has the type `intptr_t'. */
#define HAVE_INTPTR_T 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <invent.h> header file. */
/* #undef HAVE_INVENT_H */
/* Define to 1 if you have the <langinfo.h> header file. */
/* #undef HAVE_LANGINFO_H */
/* Define one of these to 1 for the endianness of `mp_limb_t'.
If the endianness is not a simple big or little, or you don't know what
it is, then leave both undefined. */
/* #undef HAVE_LIMB_BIG_ENDIAN */
#define HAVE_LIMB_LITTLE_ENDIAN 1
/* Define to 1 if you have the `localeconv' function. */
#define HAVE_LOCALECONV 1
/* Define to 1 if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define to 1 if the system has the type `long double'. */
#define HAVE_LONG_DOUBLE 1
/* Define to 1 if the system has the type `long long'. */
#define HAVE_LONG_LONG 1
/* Define to 1 if you have the <machine/hal_sysinfo.h> header file. */
/* #undef HAVE_MACHINE_HAL_SYSINFO_H */
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `memset' function. */
#define HAVE_MEMSET 1
/* Define to 1 if you have the `mmap' function. */
/* #undef HAVE_MMAP */
/* Define to 1 if you have the `mprotect' function. */
#define HAVE_MPROTECT 1
/* Define to 1 each of the following for which a native (ie. CPU specific)
implementation of the corresponding routine exists. */
#define HAVE_NATIVE_mpn_add_n 1
/* #undef HAVE_NATIVE_mpn_add_n_sub_n */
#define HAVE_NATIVE_mpn_add_nc 1
/* #undef HAVE_NATIVE_mpn_addaddmul_1msb0 */
#define HAVE_NATIVE_mpn_addlsh1_n 1
#define HAVE_NATIVE_mpn_addlsh2_n 1
#define HAVE_NATIVE_mpn_addlsh_n 1
#define HAVE_NATIVE_mpn_addlsh1_nc 1
#define HAVE_NATIVE_mpn_addlsh2_nc 1
#define HAVE_NATIVE_mpn_addlsh_nc 1
/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip1 */
/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip1 */
/* #undef HAVE_NATIVE_mpn_addlsh_n_ip1 */
/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip1 */
/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip1 */
/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip1 */
/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip2 */
/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip2 */
/* #undef HAVE_NATIVE_mpn_addlsh_n_ip2 */
/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip2 */
/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip2 */
/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip2 */
/* #undef HAVE_NATIVE_mpn_addmul_1c */
#define HAVE_NATIVE_mpn_addmul_2 1
/* #undef HAVE_NATIVE_mpn_addmul_3 */
/* #undef HAVE_NATIVE_mpn_addmul_4 */
/* #undef HAVE_NATIVE_mpn_addmul_5 */
/* #undef HAVE_NATIVE_mpn_addmul_6 */
/* #undef HAVE_NATIVE_mpn_addmul_7 */
/* #undef HAVE_NATIVE_mpn_addmul_8 */
/* #undef HAVE_NATIVE_mpn_addmul_2s */
#define HAVE_NATIVE_mpn_and_n 1
#define HAVE_NATIVE_mpn_andn_n 1
#define HAVE_NATIVE_mpn_bdiv_dbm1c 1
#define HAVE_NATIVE_mpn_bdiv_q_1 1
#define HAVE_NATIVE_mpn_pi1_bdiv_q_1 1
#define HAVE_NATIVE_mpn_cnd_add_n 1
#define HAVE_NATIVE_mpn_cnd_sub_n 1
#define HAVE_NATIVE_mpn_com 1
#define HAVE_NATIVE_mpn_copyd 1
#define HAVE_NATIVE_mpn_copyi 1
/* #undef HAVE_NATIVE_mpn_div_qr_1n_pi1 */
/* #undef HAVE_NATIVE_mpn_div_qr_2 */
#define HAVE_NATIVE_mpn_divexact_1 1
/* #undef HAVE_NATIVE_mpn_divexact_by3c */
#define HAVE_NATIVE_mpn_divrem_1 1
/* #undef HAVE_NATIVE_mpn_divrem_1c */
#define HAVE_NATIVE_mpn_divrem_2 1
/* #undef HAVE_NATIVE_mpn_gcd_1 */
#define HAVE_NATIVE_mpn_gcd_11 1
/* #undef HAVE_NATIVE_mpn_gcd_22 */
#define HAVE_NATIVE_mpn_hamdist 1
#define HAVE_NATIVE_mpn_invert_limb 1
#define HAVE_NATIVE_mpn_ior_n 1
#define HAVE_NATIVE_mpn_iorn_n 1
#define HAVE_NATIVE_mpn_lshift 1
#define HAVE_NATIVE_mpn_lshiftc 1
/* #undef HAVE_NATIVE_mpn_lshsub_n */
/* #undef HAVE_NATIVE_mpn_mod_1 */
#define HAVE_NATIVE_mpn_mod_1_1p 1
/* #undef HAVE_NATIVE_mpn_mod_1c */
#define HAVE_NATIVE_mpn_mod_1s_2p 1
#define HAVE_NATIVE_mpn_mod_1s_4p 1
#define HAVE_NATIVE_mpn_mod_34lsub1 1
#define HAVE_NATIVE_mpn_modexact_1_odd 1
#define HAVE_NATIVE_mpn_modexact_1c_odd 1
#define HAVE_NATIVE_mpn_mul_1 1
#define HAVE_NATIVE_mpn_mul_1c 1
#define HAVE_NATIVE_mpn_mul_2 1
/* #undef HAVE_NATIVE_mpn_mul_3 */
/* #undef HAVE_NATIVE_mpn_mul_4 */
/* #undef HAVE_NATIVE_mpn_mul_5 */
/* #undef HAVE_NATIVE_mpn_mul_6 */
#define HAVE_NATIVE_mpn_mul_basecase 1
#define HAVE_NATIVE_mpn_mullo_basecase 1
#define HAVE_NATIVE_mpn_nand_n 1
#define HAVE_NATIVE_mpn_nior_n 1
#define HAVE_NATIVE_mpn_popcount 1
#define HAVE_NATIVE_mpn_preinv_divrem_1 1
/* #undef HAVE_NATIVE_mpn_preinv_mod_1 */
#define HAVE_NATIVE_mpn_redc_1 1
/* #undef HAVE_NATIVE_mpn_redc_2 */
#define HAVE_NATIVE_mpn_rsblsh1_n 1
#define HAVE_NATIVE_mpn_rsblsh2_n 1
#define HAVE_NATIVE_mpn_rsblsh_n 1
#define HAVE_NATIVE_mpn_rsblsh1_nc 1
/* #undef HAVE_NATIVE_mpn_rsblsh2_nc */
/* #undef HAVE_NATIVE_mpn_rsblsh_nc */
#define HAVE_NATIVE_mpn_rsh1add_n 1
#define HAVE_NATIVE_mpn_rsh1add_nc 1
#define HAVE_NATIVE_mpn_rsh1sub_n 1
#define HAVE_NATIVE_mpn_rsh1sub_nc 1
#define HAVE_NATIVE_mpn_rshift 1
/* #undef HAVE_NATIVE_mpn_sbpi1_bdiv_r */
#define HAVE_NATIVE_mpn_sqr_basecase 1
/* #undef HAVE_NATIVE_mpn_sqr_diagonal */
#define HAVE_NATIVE_mpn_sqr_diag_addlsh1 1
#define HAVE_NATIVE_mpn_sub_n 1
#define HAVE_NATIVE_mpn_sub_nc 1
#define HAVE_NATIVE_mpn_sublsh1_n 1
#define HAVE_NATIVE_mpn_sublsh2_n 1
/* #undef HAVE_NATIVE_mpn_sublsh_n */
/* #undef HAVE_NATIVE_mpn_sublsh1_nc */
/* #undef HAVE_NATIVE_mpn_sublsh2_nc */
/* #undef HAVE_NATIVE_mpn_sublsh_nc */
/* #undef HAVE_NATIVE_mpn_sublsh1_n_ip1 */
/* #undef HAVE_NATIVE_mpn_sublsh2_n_ip1 */
/* #undef HAVE_NATIVE_mpn_sublsh_n_ip1 */
/* #undef HAVE_NATIVE_mpn_sublsh1_nc_ip1 */
/* #undef HAVE_NATIVE_mpn_sublsh2_nc_ip1 */
/* #undef HAVE_NATIVE_mpn_sublsh_nc_ip1 */
/* #undef HAVE_NATIVE_mpn_submul_1c */
/* #undef HAVE_NATIVE_mpn_tabselect */
/* #undef HAVE_NATIVE_mpn_udiv_qrnnd */
/* #undef HAVE_NATIVE_mpn_udiv_qrnnd_r */
/* #undef HAVE_NATIVE_mpn_umul_ppmm */
/* #undef HAVE_NATIVE_mpn_umul_ppmm_r */
#define HAVE_NATIVE_mpn_xor_n 1
#define HAVE_NATIVE_mpn_xnor_n 1
/* Define to 1 if you have the `nl_langinfo' function. */
/* #undef HAVE_NL_LANGINFO */
/* Define to 1 if you have the <nl_types.h> header file. */
/* #undef HAVE_NL_TYPES_H */
/* Define to 1 if you have the `obstack_vprintf' function. */
/* #undef HAVE_OBSTACK_VPRINTF */
/* Define to 1 if you have the `popen' function. */
#define HAVE_POPEN 1
/* Define to 1 if you have the `processor_info' function. */
/* #undef HAVE_PROCESSOR_INFO */
/* Define to 1 if <sys/pstat.h> `struct pst_processor' exists and contains
`psp_iticksperclktick'. */
/* #undef HAVE_PSP_ITICKSPERCLKTICK */
/* Define to 1 if you have the `pstat_getprocessor' function. */
/* #undef HAVE_PSTAT_GETPROCESSOR */
/* Define to 1 if the system has the type `ptrdiff_t'. */
#define HAVE_PTRDIFF_T 1
/* Define to 1 if the system has the type `quad_t'. */
/* #undef HAVE_QUAD_T */
/* Define to 1 if you have the `raise' function. */
#define HAVE_RAISE 1
/* Define to 1 if you have the `read_real_time' function. */
/* #undef HAVE_READ_REAL_TIME */
/* Define to 1 if you have the `sigaction' function. */
/* #undef HAVE_SIGACTION */
/* Define to 1 if you have the `sigaltstack' function. */
/* #undef HAVE_SIGALTSTACK */
/* Define to 1 if you have the `sigstack' function. */
/* #undef HAVE_SIGSTACK */
/* Tune directory speed_cyclecounter, undef=none, 1=32bits, 2=64bits) */
#define HAVE_SPEED_CYCLECOUNTER 2
/* Define to 1 if you have the <sstream> header file. */
#define HAVE_SSTREAM 1
/* Define to 1 if the system has the type `stack_t'. */
/* #undef HAVE_STACK_T */
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if the system has the type `std::locale'. */
#define HAVE_STD__LOCALE 1
/* Define to 1 if you have the `strchr' function. */
#define HAVE_STRCHR 1
/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the `strnlen' function. */
#define HAVE_STRNLEN 1
/* Define to 1 if you have the `strtol' function. */
#define HAVE_STRTOL 1
/* Define to 1 if you have the `strtoul' function. */
#define HAVE_STRTOUL 1
/* Define to 1 if you have the `sysconf' function. */
/* #undef HAVE_SYSCONF */
/* Define to 1 if you have the `sysctl' function. */
/* #undef HAVE_SYSCTL */
/* Define to 1 if you have the `sysctlbyname' function. */
/* #undef HAVE_SYSCTLBYNAME */
/* Define to 1 if you have the `syssgi' function. */
/* #undef HAVE_SYSSGI */
/* Define to 1 if you have the <sys/attributes.h> header file. */
/* #undef HAVE_SYS_ATTRIBUTES_H */
/* Define to 1 if you have the <sys/iograph.h> header file. */
/* #undef HAVE_SYS_IOGRAPH_H */
/* Define to 1 if you have the <sys/mman.h> header file. */
/* #undef HAVE_SYS_MMAN_H */
/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the <sys/processor.h> header file. */
/* #undef HAVE_SYS_PROCESSOR_H */
/* Define to 1 if you have the <sys/pstat.h> header file. */
/* #undef HAVE_SYS_PSTAT_H */
/* Define to 1 if you have the <sys/resource.h> header file. */
/* #undef HAVE_SYS_RESOURCE_H */
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/sysctl.h> header file. */
/* #undef HAVE_SYS_SYSCTL_H */
/* Define to 1 if you have the <sys/sysinfo.h> header file. */
/* #undef HAVE_SYS_SYSINFO_H */
/* Define to 1 if you have the <sys/syssgi.h> header file. */
/* #undef HAVE_SYS_SYSSGI_H */
/* Define to 1 if you have the <sys/systemcfg.h> header file. */
/* #undef HAVE_SYS_SYSTEMCFG_H */
/* Define to 1 if you have the <sys/times.h> header file. */
/* #undef HAVE_SYS_TIMES_H */
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the `times' function. */
/* #undef HAVE_TIMES */
/* Define to 1 if the system has the type `uint_least32_t'. */
#define HAVE_UINT_LEAST32_T 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the `vsnprintf' function and it works properly. */
/* #undef HAVE_VSNPRINTF */
/* Define to 1 for Windos/64 */
#define HOST_DOS64 1
/* Assembler local label prefix */
#define LSYM_PREFIX "L"
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#define LT_OBJDIR ".libs/"
/* Define to 1 to disable the use of inline assembly */
/* #undef NO_ASM */
/* Name of package */
#define PACKAGE "gmp"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html"
/* Define to the full name of this package. */
#define PACKAGE_NAME "GNU MP"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "GNU MP 6.2.0"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "gmp"
/* Define to the home page for this package. */
#define PACKAGE_URL "http://www.gnu.org/software/gmp/"
/* Define to the version of this package. */
#define PACKAGE_VERSION "6.2.0"
/* Define as the return type of signal handlers (`int' or `void'). */
#define RETSIGTYPE void
/* The size of `mp_limb_t', as computed by sizeof. */
#define SIZEOF_MP_LIMB_T 8
/* The size of `unsigned', as computed by sizeof. */
#define SIZEOF_UNSIGNED 4
/* The size of `unsigned long', as computed by sizeof. */
#define SIZEOF_UNSIGNED_LONG 4
/* The size of `unsigned short', as computed by sizeof. */
#define SIZEOF_UNSIGNED_SHORT 2
/* The size of `void *', as computed by sizeof. */
#define SIZEOF_VOID_P 8
/* Define to 1 if sscanf requires writable inputs */
/* #undef SSCANF_WRITABLE_INPUT */
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1
/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */
/* #undef TUNE_SQR_TOOM2_MAX */
/* Version number of package */
#define VERSION "6.2.0"
/* Define to 1 to enable ASSERT checking, per --enable-assert */
/* #undef WANT_ASSERT */
/* Define to 1 to enable GMP_CPU_TYPE faking cpuid, per --enable-fake-cpuid */
/* #undef WANT_FAKE_CPUID */
/* Define to 1 when building a fat binary. */
/* #undef WANT_FAT_BINARY */
/* Define to 1 to enable FFTs for multiplication, per --enable-fft */
#define WANT_FFT 1
/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per
--enable-old-fft-full */
/* #undef WANT_OLD_FFT_FULL */
/* Define to 1 if --enable-profiling=gprof */
/* #undef WANT_PROFILING_GPROF */
/* Define to 1 if --enable-profiling=instrument */
/* #undef WANT_PROFILING_INSTRUMENT */
/* Define to 1 if --enable-profiling=prof */
/* #undef WANT_PROFILING_PROF */
/* Define one of these to 1 for the desired temporary memory allocation
method, per --enable-alloca. */
#define WANT_TMP_ALLOCA 1
/* #undef WANT_TMP_REENTRANT */
/* #undef WANT_TMP_NOTREENTRANT */
/* #undef WANT_TMP_DEBUG */
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
/* # undef WORDS_BIGENDIAN */
# endif
#endif
/* Define to 1 if the assembler understands the mulx instruction */
/* #undef X86_ASM_MULX */
/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
`char[]'. */
/* #undef YYTEXT_POINTER */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
/* Define to the equivalent of the C99 'restrict' keyword, or to
nothing if this is not supported. Do not define if restrict is
supported directly. */
#define restrict __restrict
/* Work around a bug in Sun C++: it does not support _Restrict or
__restrict__, even though the corresponding Sun C compiler ends up with
"#define restrict _Restrict" or "#define restrict __restrict__" in the
previous line. Perhaps some future version of Sun C++ will work with
restrict; if so, hopefully it defines __RESTRICT like Sun C does. */
#if defined __SUNPRO_CC && !defined __RESTRICT
# define _Restrict
# define __restrict__
#endif
/* Define to empty if the keyword `volatile' does not work. Warning: valid
code using `volatile' can become incorrect without. Disable with care. */
/* #undef volatile */

View File

@@ -0,0 +1,14 @@
diff -Naur orig/common/sys/platform.h external_embree/common/sys/platform.h
--- orig/common/sys/platform.h 2020-05-13 23:08:53 -0600
+++ external_embree/common/sys/platform.h 2020-06-13 17:40:26 -0600
@@ -84,8 +84,8 @@
////////////////////////////////////////////////////////////////////////////////
#ifdef __WIN32__
-#define dll_export __declspec(dllexport)
-#define dll_import __declspec(dllimport)
+#define dll_export
+#define dll_import
#else
#define dll_export __attribute__ ((visibility ("default")))
#define dll_import

View File

@@ -9,3 +9,62 @@
enabled libopenmpt && require_pkg_config libopenmpt "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create -lstdc++ && append libopenmpt_extralibs "-lstdc++"
enabled libopus && {
enabled libopus_decoder && {
--- a/libavcodec/cfhddata.c
+++ b/libavcodec/cfhddata.c
@@ -276,10 +276,10 @@
av_cold int ff_cfhd_init_vlcs(CFHDContext *s)
{
int i, j, ret = 0;
- uint32_t new_cfhd_vlc_bits[NB_VLC_TABLE_18 * 2];
- uint8_t new_cfhd_vlc_len[NB_VLC_TABLE_18 * 2];
- uint16_t new_cfhd_vlc_run[NB_VLC_TABLE_18 * 2];
- int16_t new_cfhd_vlc_level[NB_VLC_TABLE_18 * 2];
+ uint32_t *new_cfhd_vlc_bits = av_calloc(sizeof(uint32_t), NB_VLC_TABLE_18 * 2);
+ uint8_t *new_cfhd_vlc_len = av_calloc(sizeof(uint8_t), NB_VLC_TABLE_18 * 2);
+ uint16_t *new_cfhd_vlc_run = av_calloc(sizeof(uint16_t), NB_VLC_TABLE_18 * 2);
+ int16_t *new_cfhd_vlc_level = av_calloc(sizeof(int16_t), NB_VLC_TABLE_18 * 2);
/** Similar to dv.c, generate signed VLC tables **/
@@ -305,8 +305,13 @@
ret = init_vlc(&s->vlc_9, VLC_BITS, j, new_cfhd_vlc_len,
1, 1, new_cfhd_vlc_bits, 4, 4, 0);
- if (ret < 0)
+ if (ret < 0) {
+ av_free(new_cfhd_vlc_bits);
+ av_free(new_cfhd_vlc_len);
+ av_free(new_cfhd_vlc_run);
+ av_free(new_cfhd_vlc_level);
return ret;
+ }
for (i = 0; i < s->vlc_9.table_size; i++) {
int code = s->vlc_9.table[i][0];
int len = s->vlc_9.table[i][1];
@@ -346,8 +351,14 @@
ret = init_vlc(&s->vlc_18, VLC_BITS, j, new_cfhd_vlc_len,
1, 1, new_cfhd_vlc_bits, 4, 4, 0);
- if (ret < 0)
+ if (ret < 0) {
+ av_free(new_cfhd_vlc_bits);
+ av_free(new_cfhd_vlc_len);
+ av_free(new_cfhd_vlc_run);
+ av_free(new_cfhd_vlc_level);
return ret;
+ }
+
av_assert0(s->vlc_18.table_size == 4572);
for (i = 0; i < s->vlc_18.table_size; i++) {
@@ -367,5 +378,10 @@
s->table_18_rl_vlc[i].run = run;
}
+ av_free(new_cfhd_vlc_bits);
+ av_free(new_cfhd_vlc_len);
+ av_free(new_cfhd_vlc_run);
+ av_free(new_cfhd_vlc_level);
+
return ret;
}

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

@@ -1,11 +0,0 @@
--- UserMacros.cmake
+++ UserMacros.cmake
@@ -16,6 +16,8 @@
if (BUILD_USER_DEFINED_LIBS)
MACRO_USER_DEFINED_LIBS ()
endif (BUILD_USER_DEFINED_LIBS)
+
+include(Config/cmake/usermacros/windows_mt.cmake)
#-----------------------------------------------------------------------------
#------------------- E X A M P L E E N D -----------------------------------
#-----------------------------------------------------------------------------

View File

@@ -1,15 +0,0 @@
--- hidapi/hidapi.h 2011-10-25 20:58:16 -0600
+++ hidapi/hidapi.h 2016-11-01 12:05:58 -0600
@@ -30,7 +30,11 @@
#include <wchar.h>
#ifdef _WIN32
- #define HID_API_EXPORT __declspec(dllexport)
+ #ifdef HID_API_STATIC
+ #define HID_API_EXPORT
+ #else
+ #define HID_API_EXPORT __declspec(dllexport)
+ #endif
#define HID_API_CALL
#else
#define HID_API_EXPORT /**< API export macro */

View File

@@ -0,0 +1,85 @@
diff -Naur external_ispc/CMakeLists.txt external_ispc_fixed/CMakeLists.txt
--- external_ispc/CMakeLists.txt 2020-04-23 17:29:06 -0600
+++ external_ispc_fixed/CMakeLists.txt 2020-05-05 09:01:09 -0600
@@ -389,7 +389,7 @@
# Link against Clang libraries
foreach(clangLib ${CLANG_LIBRARY_LIST})
- find_library(${clangLib}Path NAMES ${clangLib} HINTS ${LLVM_LIBRARY_DIRS})
+ find_library(${clangLib}Path NAMES ${clangLib} HINTS ${LLVM_LIBRARY_DIRS} ${CLANG_LIBRARY_DIR})
list(APPEND CLANG_LIBRARY_FULL_PATH_LIST ${${clangLib}Path})
endforeach()
target_link_libraries(${PROJECT_NAME} ${CLANG_LIBRARY_FULL_PATH_LIST})
diff -Naur orig/CMakeLists.txt external_ispc/CMakeLists.txt
--- orig/CMakeLists.txt 2020-05-05 09:19:11 -0600
+++ external_ispc/CMakeLists.txt 2020-05-05 09:26:44 -0600
@@ -333,7 +333,7 @@
# Include directories
target_include_directories(${PROJECT_NAME} PRIVATE
- ${LLVM_INCLUDE_DIRS}
+ ${LLVM_INCLUDE_DIRS} ${CLANG_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/src
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR})
# Compile options
diff -Naur orig/cmake/GenerateBuiltins.cmake.txt external_ispc/cmake/GenerateBuiltins.cmake.txt
+++ orig/cmake/GenerateBuiltins.cmake 2020-05-25 13:32:40.830803821 +0200
+++ external_ispc/cmake/GenerateBuiltins.cmake 2020-05-25 13:32:40.830803821 +0200
@@ -97,6 +97,8 @@
if ("${bit}" STREQUAL "32" AND ${arch} STREQUAL "x86")
set(target_arch "i386")
+ # Blender: disable 32bit due to build issues on Linux and being unnecessary.
+ set(SKIP ON)
elseif ("${bit}" STREQUAL "64" AND ${arch} STREQUAL "x86")
set(target_arch "x86_64")
elseif ("${bit}" STREQUAL "32" AND ${arch} STREQUAL "arm")
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 46a8db8..f53beef 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -36,8 +36,12 @@
cmake_minimum_required(VERSION 3.13)
if (UNIX)
- set(CMAKE_C_COMPILER "clang")
- set(CMAKE_CXX_COMPILER "clang++")
+ if (NOT CMAKE_C_COMPILER)
+ set(CMAKE_C_COMPILER "clang")
+ endif()
+ if (NOT CMAKE_CXX_COMPILER)
+ set(CMAKE_CXX_COMPILER "clang++")
+ endif()
endif()
set(PROJECT_NAME ispc)
@@ -412,6 +416,29 @@ else()
endif()
endif()
+# Link against libstdc++.a which must be provided to the linker after
+# LLVM and CLang libraries.
+# This is needed because some of LLVM/CLang dependencies are using
+# std::make_shared, which is defined in one of those:
+# - libclang-cpp.so
+# - libstdc++.a
+# Using the former one is tricky because then generated binary depends
+# on a library which is outside of the LD_LIBRARY_PATH.
+#
+# Hence, using C++ implementation from G++ which seems to work just fine.
+# In fact, from investigation seems that libclang-cpp.so itself is pulling
+# std::_Sp_make_shared_tag from G++'s libstdc++.a.
+if(UNIX AND NOT APPLE)
+ execute_process(
+ COMMAND g++ --print-file-name libstdc++.a
+ OUTPUT_VARIABLE GCC_LIBSTDCXX_A
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ if(GCC_LIBSTDCXX_A AND EXISTS ${GCC_LIBSTDCXX_A})
+ target_link_libraries(${PROJECT_NAME} ${GCC_LIBSTDCXX_A})
+ endif()
+endif()
+
# Build target for utility checking host ISA
if (ISPC_INCLUDE_UTILS)
add_executable(check_isa "")

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

@@ -0,0 +1,129 @@
diff --git a/output/macho.h b/output/macho.h
index 538c531e..fd5e8849 100644
--- a/output/macho.h
+++ b/output/macho.h
@@ -60,6 +60,8 @@
#define LC_SEGMENT 0x1
#define LC_SEGMENT_64 0x19
#define LC_SYMTAB 0x2
+#define LC_VERSION_MIN_MACOSX 0x24
+#define LC_BUILD_VERSION 0x32
/* Symbol type bits */
#define N_STAB 0xe0
diff --git a/output/outmacho.c b/output/outmacho.c
index 08147883..de6ec902 100644
--- a/output/outmacho.c
+++ b/output/outmacho.c
@@ -38,6 +38,8 @@
#include "compiler.h"
+#include <stdlib.h>
+
#include "nctype.h"
#include "nasm.h"
@@ -64,6 +66,8 @@
#define MACHO_SYMCMD_SIZE 24
#define MACHO_NLIST_SIZE 12
#define MACHO_RELINFO_SIZE 8
+#define MACHO_BUILD_VERSION_SIZE 24
+#define MACHO_VERSION_MIN_MACOSX_SIZE 16
#define MACHO_HEADER64_SIZE 32
#define MACHO_SEGCMD64_SIZE 72
@@ -1224,6 +1228,46 @@ static void macho_layout_symbols (uint32_t *numsyms,
}
}
+static bool get_full_version_from_env (const char *variable_name,
+ int *r_major,
+ int *r_minor,
+ int *r_patch) {
+ *r_major = 0;
+ *r_minor = 0;
+ *r_patch = 0;
+
+ const char *value = getenv(variable_name);
+ if (value == NULL || value[0] == '\0') {
+ return false;
+ }
+
+ const char *current_value = value;
+ const char *end_value = value + strlen(value);
+
+ char *endptr;
+
+ *r_major = strtol(current_value, &endptr, 10);
+ if (endptr >= end_value) {
+ return true;
+ }
+ current_value = endptr + 1;
+
+ *r_minor = strtol(current_value, &endptr, 10);
+ if (endptr >= end_value) {
+ return true;
+ }
+ current_value = endptr + 1;
+
+ *r_patch = strtol(current_value, &endptr, 10);
+
+ return true;
+}
+
+static bool need_version_min_macosx_command (void) {
+ return getenv("MACOSX_DEPLOYMENT_TARGET") &&
+ getenv("MACOSX_SDK_VERSION");
+}
+
/* Calculate some values we'll need for writing later. */
static void macho_calculate_sizes (void)
@@ -1270,6 +1314,12 @@ static void macho_calculate_sizes (void)
head_sizeofcmds += fmt.segcmd_size + seg_nsects * fmt.sectcmd_size;
}
+ /* LC_VERSION_MIN_MACOSX */
+ if (need_version_min_macosx_command()) {
+ ++head_ncmds;
+ head_sizeofcmds += MACHO_VERSION_MIN_MACOSX_SIZE;
+ }
+
if (nsyms > 0) {
++head_ncmds;
head_sizeofcmds += MACHO_SYMCMD_SIZE;
@@ -1653,6 +1703,33 @@ static void macho_write (void)
else
nasm_warn(WARN_OTHER, "no sections?");
+#define ENCODE_BUILD_VERSION(major, minor, patch) \
+ (((major) << 16) | ((minor) << 8) | (patch))
+
+ if (0) {
+ fwriteint32_t(LC_BUILD_VERSION, ofile); /* cmd == LC_BUILD_VERSION */
+ fwriteint32_t(MACHO_BUILD_VERSION_SIZE, ofile); /* size of load command */
+ fwriteint32_t(1, ofile); /* platform */
+ fwriteint32_t(ENCODE_BUILD_VERSION(10, 13, 0), ofile); /* minos, X.Y.Z is encoded in nibbles xxxx.yy.zz */
+ fwriteint32_t(ENCODE_BUILD_VERSION(10, 15, 4), ofile); /* sdk, X.Y.Z is encoded in nibbles xxxx.yy.zz */
+ fwriteint32_t(0, ofile); /* number of tool entries following this */
+ }
+
+ if (need_version_min_macosx_command()) {
+ int sdk_major, sdk_minor, sdk_patch;
+ get_full_version_from_env("MACOSX_SDK_VERSION", &sdk_major, &sdk_minor, &sdk_patch);
+
+ int version_major, version_minor, version_patch;
+ get_full_version_from_env("MACOSX_DEPLOYMENT_TARGET", &version_major, &version_minor, &version_patch);
+
+ fwriteint32_t(LC_VERSION_MIN_MACOSX, ofile); /* cmd == LC_VERSION_MIN_MACOSX */
+ fwriteint32_t(MACHO_VERSION_MIN_MACOSX_SIZE, ofile); /* size of load command */
+ fwriteint32_t(ENCODE_BUILD_VERSION(version_major, version_minor, version_patch), ofile); /* minos, X.Y.Z is encoded in nibbles xxxx.yy.zz */
+ fwriteint32_t(ENCODE_BUILD_VERSION(sdk_major, sdk_minor, sdk_patch), ofile); /* sdk, X.Y.Z is encoded in nibbles xxxx.yy.zz */
+ }
+
+#undef ENCODE_BUILD_VERSION
+
if (nsyms > 0) {
/* write out symbol command */
fwriteint32_t(LC_SYMTAB, ofile); /* cmd == LC_SYMTAB */

View File

@@ -0,0 +1,27 @@
diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py
index ba2b1f4..b10f7df 100644
--- a/numpy/distutils/system_info.py
+++ b/numpy/distutils/system_info.py
@@ -2164,8 +2164,8 @@ class accelerate_info(system_info):
'accelerate' in libraries):
if intel:
args.extend(['-msse3'])
- else:
- args.extend(['-faltivec'])
+# else:
+# args.extend(['-faltivec'])
args.extend([
'-I/System/Library/Frameworks/vecLib.framework/Headers'])
link_args.extend(['-Wl,-framework', '-Wl,Accelerate'])
@@ -2174,8 +2174,8 @@ class accelerate_info(system_info):
'veclib' in libraries):
if intel:
args.extend(['-msse3'])
- else:
- args.extend(['-faltivec'])
+# else:
+# args.extend(['-faltivec'])
args.extend([
'-I/System/Library/Frameworks/vecLib.framework/Headers'])
link_args.extend(['-Wl,-framework', '-Wl,vecLib'])

View File

@@ -0,0 +1,12 @@
diff --git a/include/ogg/os_types.h b/include/ogg/os_types.h
index eb8a322..6f73b72 100644
--- a/include/ogg/os_types.h
+++ b/include/ogg/os_types.h
@@ -71,6 +71,7 @@
#elif (defined(__APPLE__) && defined(__MACH__)) /* MacOS X Framework build */
# include <sys/types.h>
+# include <stdint.h>
typedef int16_t ogg_int16_t;
typedef uint16_t ogg_uint16_t;
typedef int32_t ogg_int32_t;

View File

@@ -1,13 +0,0 @@
diff -Naur external_openal_original/CMakeLists.txt external_openal/CMakeLists.txt
--- external_openal_original/CMakeLists.txt 2016-01-24 20:12:39 -0700
+++ external_openal/CMakeLists.txt 2018-06-02 12:16:52 -0600
@@ -885,7 +885,8 @@
OPTION(ALSOFT_REQUIRE_MMDEVAPI "Require MMDevApi backend" OFF)
IF(HAVE_WINDOWS_H)
# Check MMSystem backend
- CHECK_INCLUDE_FILES("windows.h;mmsystem.h" HAVE_MMSYSTEM_H -D_WIN32_WINNT=0x0502)
+ set(CMAKE_REQUIRED_FLAGS "-D_WIN32_WINNT=0x0502")
+ CHECK_INCLUDE_FILES("windows.h;mmsystem.h" HAVE_MMSYSTEM_H)
IF(HAVE_MMSYSTEM_H)
CHECK_SHARED_FUNCTION_EXISTS(waveOutOpen "windows.h;mmsystem.h" winmm "" HAVE_LIBWINMM)
IF(HAVE_LIBWINMM)

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,6 +43,36 @@ index 7a69c32..defb315 100644
# if defined(_MSC_VER) && defined(_DEBUG)
# pragma warning(disable:4548)
# endif
diff --git a/DAEValidator/library/src/ArgumentParser.cpp b/DAEValidator/library/src/ArgumentParser.cpp
index 897e4dc..98a69ff 100644
--- a/DAEValidator/library/src/ArgumentParser.cpp
+++ b/DAEValidator/library/src/ArgumentParser.cpp
@@ -6,10 +6,10 @@
using namespace std;
-#ifdef _MSC_VER
-#define NOEXCEPT _NOEXCEPT
-#else
+#ifndef _NOEXCEPT
#define NOEXCEPT noexcept
+#else
+#define NOEXCEPT _NOEXCEPT
#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
@@ -43,3 +86,47 @@ index 1f9a3ee..d151e9a 100644
return isnan( value );
#else
return std::isnan(value);
diff --git a/DAEValidator/library/src/Dae.cpp b/DAEValidator/library/src/Dae.cpp
index 9256ee1..241ad67 100644
--- a/DAEValidator/library/src/Dae.cpp
+++ b/DAEValidator/library/src/Dae.cpp
@@ -304,7 +304,7 @@ namespace opencollada
if (auto root_node = root())
{
const auto & nodes = root_node.selectNodes("//*[@id]");
- for (const auto & node : nodes)
+ for (const auto node : nodes)
{
string id = node.attribute("id").value();
mIdCache.insert(id);
@@ -312,4 +312,4 @@ namespace opencollada
}
}
}
-}
\ No newline at end of file
+}
diff --git a/DAEValidator/library/src/DaeValidator.cpp b/DAEValidator/library/src/DaeValidator.cpp
index 715d903..24423ce 100644
--- a/DAEValidator/library/src/DaeValidator.cpp
+++ b/DAEValidator/library/src/DaeValidator.cpp
@@ -162,7 +162,7 @@ namespace opencollada
// Find xsi:schemaLocation attributes in dae and try to validate against specified xsd documents
const auto & elements = dae.root().selectNodes("//*[@xsi:schemaLocation]");
- for (const auto & element : elements)
+ for (const auto element : elements)
{
if (auto schemaLocation = element.attribute("schemaLocation"))
{
@@ -274,7 +274,7 @@ namespace opencollada
int result = 0;
map<string, size_t> ids;
const auto & nodes = dae.root().selectNodes("//*[@id]");
- for (const auto & node : nodes)
+ for (const auto node : nodes)
{
string id = node.attribute("id").value();
size_t line = node.line();

View File

@@ -0,0 +1,36 @@
diff -Naur orig/CMakeLists.txt external_openimageio/CMakeLists.txt
--- orig/CMakeLists.txt 2020-05-10 21:43:52 -0600
+++ external_openimageio/CMakeLists.txt 2020-05-13 17:03:35 -0600
@@ -170,7 +170,7 @@
add_subdirectory (src/iinfo)
add_subdirectory (src/maketx)
add_subdirectory (src/oiiotool)
- add_subdirectory (src/testtex)
+ #add_subdirectory (src/testtex)
add_subdirectory (src/iv)
endif ()
diff -Naur orig/src/cmake/compiler.cmake external_openimageio/src/cmake/compiler.cmake
--- orig/src/cmake/compiler.cmake 2020-05-10 21:43:52 -0600
+++ external_openimageio/src/cmake/compiler.cmake 2020-05-13 17:02:54 -0600
@@ -172,6 +172,7 @@
add_definitions (-D_CRT_NONSTDC_NO_WARNINGS)
add_definitions (-D_SCL_SECURE_NO_WARNINGS)
add_definitions (-DJAS_WIN_MSVC_BUILD)
+ add_definitions (-DOPJ_STATIC)
endif (MSVC)
if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD"
diff -Naur orig/src/include/OpenImageIO/platform.h external_openimageio/src/include/OpenImageIO/platform.h
--- orig/src/include/OpenImageIO/platform.h 2020-05-10 21:43:52 -0600
+++ external_openimageio/src/include/OpenImageIO/platform.h 2020-05-13 17:04:36 -0600
@@ -41,6 +41,9 @@
# ifndef NOMINMAX
# define NOMINMAX
# endif
+# ifndef NOGDI
+# define NOGDI
+# endif
# include <windows.h>
#endif

View File

@@ -1,26 +0,0 @@
Index: OpenImageIO/osdep.h
===================================================================
--- OpenImageIO/osdep.h (revision 61595)
+++ OpenImageIO/osdep.h (working copy)
@@ -34,6 +34,7 @@
# define WIN32_LEAN_AND_MEAN
# define VC_EXTRALEAN
# define NOMINMAX
+# define NOGDI
# include <windows.h>
#endif
Index: OpenImageIO/platform.h
===================================================================
--- OpenImageIO/platform.h (revision 61595)
+++ OpenImageIO/platform.h (working copy)
@@ -77,6 +77,9 @@
# ifndef NOMINMAX
# define NOMINMAX
# endif
+# ifndef NOGDI
+# define NOGDI
+# endif
# include <windows.h>
#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,22 +0,0 @@
diff -Naur external_openimageio.orig/src/cmake/compiler.cmake external_openimageio/src/cmake/compiler.cmake
--- external_openimageio.orig/src/cmake/compiler.cmake 2018-07-31 23:45:19 -0600
+++ external_openimageio/src/cmake/compiler.cmake 2018-08-16 12:50:12 -0600
@@ -152,6 +152,7 @@
add_definitions (-D_CRT_NONSTDC_NO_WARNINGS)
add_definitions (-D_SCL_SECURE_NO_WARNINGS)
add_definitions (-DJAS_WIN_MSVC_BUILD)
+ add_definitions (-DOPJ_STATIC)
endif (MSVC)
# Use ccache if found
--- external_openimageio.orig/CMakeLists.txt 2018-07-31 23:45:19 -0600
+++ external_openimageio/CMakeLists.txt 2018-08-17 15:22:56 -0600
@@ -169,7 +169,7 @@
add_subdirectory (src/iinfo)
add_subdirectory (src/maketx)
add_subdirectory (src/oiiotool)
- add_subdirectory (src/testtex)
+# add_subdirectory (src/testtex)
add_subdirectory (src/iv)
endif ()

View File

@@ -0,0 +1,23 @@
diff --git a/runtime/src/z_Linux_asm.S b/runtime/src/z_Linux_asm.S
index 0d8885e..42aa5ad 100644
--- a/runtime/src/z_Linux_asm.S
+++ b/runtime/src/z_Linux_asm.S
@@ -1540,10 +1540,12 @@ __kmp_unnamed_critical_addr:
.comm .gomp_critical_user_,32,8
.data
.align 8
- .global __kmp_unnamed_critical_addr
-__kmp_unnamed_critical_addr:
+ .global ___kmp_unnamed_critical_addr
+___kmp_unnamed_critical_addr:
.8byte .gomp_critical_user_
- .size __kmp_unnamed_critical_addr,8
+# if !(KMP_OS_DARWIN)
+ .size ___kmp_unnamed_critical_addr,8
+# endif
#endif /* KMP_ARCH_PPC64 || KMP_ARCH_AARCH64 */
#if KMP_OS_LINUX

Some files were not shown because too many files have changed in this diff Show More