Commit Graph

73846 Commits

Author SHA1 Message Date
Campbell Barton b2d1c4873f Cleanup: remove unnecessary inline header
Caused by lsp/clang applying *fixes* automatically, tsk.
2020-06-05 14:33:59 +10:00
Clément Foucault b168c255aa GPUTexture: Make GPU_texture_unbind_all faster on newer opengl version 2020-06-04 21:28:19 +02:00
Clément Foucault ba5b303c88 DRW: Fix T77370: Redundant anti aliasing/blur effect 2020-06-04 21:28:19 +02:00
Bastien Montagne 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
Bastien Montagne d71f9b9886 LibOverride: cleanup Collection case.
This should not give any real difference, those were already
overridable.
2020-06-04 18:06:47 +02:00
Pablo Dobarro 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
Pablo Dobarro 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
Antonio Vazquez c7a2ed69be GPencil: Fix Lock Frame Dopesheet tooltip
The old tooltip was not clear enough
2020-06-04 16:55:19 +02:00
Antonio Vazquez 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
Campbell Barton 733a3e3a70 Fix T77164: scaling/rotation fails for 3 selected NURB points 2020-06-05 00:40:14 +10:00
Clément Foucault 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
Clément Foucault 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
Clément Foucault 5837de6879 Cleanup: DRW: Add comment and remove bitfields. 2020-06-04 14:17:06 +02:00
Clément Foucault 7534bbfa34 GPUShaderInterface: Add Builtin Uniform blocks query
This makes the query of theses mandatory uniforms faster.
2020-06-04 14:17:06 +02:00
Nathan Craddock 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
Campbell Barton c7c3908b8e Cleanup: split particle & texture paint mode switching into utility functions 2020-06-04 21:36:33 +10:00
Clément Foucault 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
Campbell Barton 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
Campbell Barton 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
Bastien Montagne 1a23b0be97 LibOverride: Make all modifiers properties overridable.
This is second and last part of T77083.
2020-06-04 10:26:05 +02:00
Philipp Oeser 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
Antonio Vazquez 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
Campbell Barton fe13f3db81 UV: use selection for 'Seams from Islands'
Use bmesh connectivity data to simplify logic.
2020-06-04 17:10:45 +10:00
Campbell Barton 67a617e196 Cleanup: move auto-execute operators into userpref_ops.c 2020-06-04 16:23:07 +10:00
Campbell Barton 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
Campbell Barton 67b10fcc22 Fix error in recent fix for T77290 2020-06-04 12:40:17 +10:00
Germano Cavalcante 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
Hans Goudey a4e0bccb87 Cleanup: Use ELEM Macro 2020-06-03 13:34:24 -04:00
Bastien Montagne 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
Bastien Montagne 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
Bastien Montagne fc1bb36668 LibOverride: fix debug timing code. 2020-06-03 18:46:18 +02:00
Antonio Vazquez 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
Campbell Barton 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
Campbell Barton de9c04c287 Cleanup: clang format, warning 2020-06-04 01:18:39 +10:00
Clément Foucault 51cd6d22c5 Cleanup: GPUMaterilal: Texture Node: Remove unused functions 2020-06-03 16:43:31 +02:00
Clément Foucault 15a24f3d7f GPUMaterial: Fix shader compilation when using UDIM textures 2020-06-03 16:42:54 +02:00
Clément Foucault 96eab08755 DRW: Always unbind texture after drawing
This fix issues with the image editor
2020-06-03 16:24:04 +02:00
Clément Foucault 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
Clément Foucault 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
Clément Foucault 47bdb28841 GPUTexture: Fix samplers configuration typo 2020-06-03 16:18:50 +02:00
Clément Foucault 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
Clément Foucault 866e067d65 GPUTexture: Add support for binding textures with custom sampler states 2020-06-03 16:18:50 +02:00
Antonio Vazquez 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
Bastien Montagne 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
Clément Foucault 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
Clément Foucault 75015f27ba Cleanup: DRW: Remove support for builtin matrices 2020-06-03 11:02:56 +02:00
Clément Foucault d4f1efad00 DRW: Remove use of builtin matrices and replace by common_view_lib 2020-06-03 11:02:56 +02:00
Clément Foucault 3e4c8d48aa Cleanup: DRW: Remove builtin 3D only shader usage 2020-06-03 11:02:56 +02:00