Commit Graph

99605 Commits

Author SHA1 Message Date
Hans Goudey 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
Julian Eisel 4330f147d0 Fix unused variable warning on Windows with WITH_INPUT_IME disabled 2020-09-02 17:32:58 +02:00
Ray Molenkamp 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
Ray Molenkamp 1082edfdfd Cleanup: Clang-format 2020-09-02 09:19:14 -06:00
Julian Eisel 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
Julian Eisel 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
Bastien Montagne 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
Sebastian Parborg 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
Jeroen Bakker 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
Campbell Barton d851b38185 Cleanup: improve internal function name in 'ngon_tessellate' 2020-09-02 19:33:47 +10:00
Campbell Barton 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
Campbell Barton 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
Campbell Barton 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
Campbell Barton ddea2f234f Fix crash accessing image space properties without an active window 2020-09-02 12:44:37 +10:00
Campbell Barton 957346694d Cleanup: spelling, rename attachement -> attachment 2020-09-02 10:04:50 +10:00
Campbell Barton 71aa3c864d Cleanup: spelling 2020-09-02 09:58:26 +10:00
Hans Goudey 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
Hans Goudey 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
Germano Cavalcante 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
Aaron Carlisle 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
Clément Foucault d6a9783b71 Cleanup: GLFrameBuffer: Reduce indentation 2020-09-01 18:42:46 +02:00
Clément Foucault 7edd60b35b GLFramebuffer: Avoid calling method on a partially destroyed GLContext
This avoid an ASAN runtime error.
2020-09-01 18:42:37 +02:00
Joerg Mueller 3c54db4a4e Audaspace: port compilation fix from upstream. 2020-09-01 18:12:48 +02:00
Sybren A. Stüvel 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
Sybren A. Stüvel 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
Sybren A. Stüvel 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
Clément Foucault 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
Germano Cavalcante 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
Julian Eisel 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
Philipp Oeser 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
Jacques Lucke 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
Clément Foucault a708cdabe6 Fix T80328 Commit introduced build warnings in Windows 2020-09-01 16:16:48 +02:00
Clément Foucault 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
Clément Foucault 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
Germano Cavalcante 31004ef48e Transform: Keymap: Enable Auto Constraint with Middle Mouse + Shift 2020-09-01 10:59:16 -03:00
Germano Cavalcante 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
Germano Cavalcante 8170c92ed4 Fix constrain plane masking shift event
This prevented transformation with a precision modifier.
2020-09-01 10:38:37 -03:00
Philipp Oeser 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
cb0b0416f454419cd1902434f7dffa2682417a56)
2020-09-01 15:24:26 +02:00
Germano Cavalcante 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
Sybren A. Stüvel 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
Clément Foucault 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
Clément Foucault 991eb5f79c Cleanup: GPUContext: Remove unused functions 2020-09-01 12:03:52 +02:00
Clément Foucault 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
Clément Foucault 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
Clément Foucault 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
Clément Foucault ccf476f8af EEVEE: Volumetric: Fix missing UBO
This is undefined behavior on certain system.
2020-09-01 12:03:52 +02:00