Commit Graph

74685 Commits

Author SHA1 Message Date
Brecht Van Lommel
f6d5a95513 Fix T73880: error rendering UDIM in Eevee after recent refactor 2020-02-16 14:07:46 +01:00
mano-wii
0716394423 Cleanup: Transform: Rearrange definitions and declarations 2020-02-15 18:44:11 -03:00
Brecht Van Lommel
322dc72316 Cleanup: refactor GPU material attribute and texture requests 2020-02-15 21:09:29 +01:00
Brecht Van Lommel
007f1b74a6 Cleanup: split off code from gpu_codegen.c into smaller files 2020-02-15 20:33:16 +01:00
Brecht Van Lommel
6701db773e Cleanup: don't perform some GPU shader codegen operations twice 2020-02-15 20:33:15 +01:00
Brecht Van Lommel
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
Brecht Van Lommel
c6928843dc Fix Eevee shader node error when using both RGB and vector curve nodes 2020-02-15 20:31:48 +01:00
Brecht Van Lommel
031dcbf15b Fix crash in some Eevee shader node setups after vector math node changes 2020-02-15 20:31:18 +01:00
mano-wii
b5f17f6b8a Cleanup: Silence warnings 2020-02-15 16:26:18 -03:00
mano-wii
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
mano-wii
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
mano-wii
de9ea94fc6 Transform: Deduplicate time snap code 2020-02-15 12:09:23 -03:00
Brecht Van Lommel
f0c991a380 Cleanup: work around clang-format differences between versions
Ref T73747
2020-02-15 14:03:51 +01:00
Brecht Van Lommel
ff4ffb18d4 Fix T67924: transform right/up arrow keys not working on macOS 2020-02-15 13:44:20 +01:00
Campbell Barton
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
Campbell Barton
57511782cf Cleanup: duplicate calls to add keymap handlers 2020-02-15 18:46:54 +11:00
Campbell Barton
d8d1f66dbc Fix warp modifier invert vertex group duplicate flag 2020-02-15 18:13:54 +11:00
Campbell Barton
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
Campbell Barton
f829fefe8a Cleanup: spelling 2020-02-15 15:58:06 +11:00
Campbell Barton
5192b60e57 Cleanup: comment unused node defines 2020-02-15 15:24:03 +11:00
Campbell Barton
60475b9549 Cleanup: remove various unused defines 2020-02-15 15:24:03 +11:00
Campbell Barton
fa5837c5e8 Cleanup: remove unused RenderData.displaymode 2020-02-15 15:24:03 +11:00
Campbell Barton
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
Campbell Barton
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
Campbell Barton
9c79a21eb0 Cleanup: unused math colorspace defines 2020-02-15 15:24:02 +11:00
Campbell Barton
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
Campbell Barton
fa4ab69abf Cleanup: mixed camel/snake case 2020-02-15 10:45:46 +11:00
Campbell Barton
b2df29e50d Cleanup: clang-format 2020-02-15 10:40:41 +11:00
Campbell Barton
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
Campbell Barton
68a52a7fa9 Cleanup: define use 2020-02-15 10:40:41 +11:00
Campbell Barton
b6c9c9c449 Cleanup: redundant headers 2020-02-15 10:40:41 +11:00
Campbell Barton
38e569cb1f Cleanup: use UI_GetThemeColor3ubv when alpha is ignored 2020-02-15 10:40:41 +11:00
Clément Foucault
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
Clément Foucault
180aff7b74 DRW: Fix viewport render always rendering with transparent background 2020-02-14 18:21:04 +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
Antonio Vazquez
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
mano-wii
8645b73cd8 Cleanup: Rename bonesize transform file
`transform_mode_bonesize.c` --> `transform_mode_bbone_resize.c`
2020-02-14 11:57:56 -03:00
mano-wii
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
Sybren A. Stüvel
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
Sybren A. Stüvel
451bd5fd79 Cleanup: Alembic, removed unused export settings
No functional changes.
2020-02-14 15:41:17 +01:00
Sybren A. Stüvel
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
mano-wii
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
Sebastián Barschkis
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
Brecht Van Lommel
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