Commit Graph

67338 Commits

Author SHA1 Message Date
Clément Foucault
9f51fc656e EditUV: Only clear data VBO when selection changes
This is a small optimisation that make UV selection faster.
2019-01-11 20:09:42 +01:00
Bastien Montagne
ee34275e7d Merge branch 'blender2.7' 2019-01-11 20:03:42 +01:00
Bastien Montagne
1ded3d2f7c Fix T55668: Volume Keyframe on Cut-ted Metastrip (re-doing the fix in better way).
Fix T60194: Sequencer cut loses animation data for the right strip.

Fixing the first also fixes the second. First attempt was delaying
uniquename check at a later step of cut process, after everything had
been duplicated. While this fixed first issue, second one became even
more proeminent (it become active for all strips, and not only
video/audio movie strips in meta's).

So instead, passing along the list of (new) sequences, so that duplicated
seqs can be put there immediately, before checking for unique names,
henceforth ensuring even strips inside meta's get properly handled.
2019-01-11 20:01:01 +01:00
Bastien Montagne
c97794520f Revert "Fix T55668: Volume Keyframe on Cut-ted Metastrip."
This partially reverts commit bb98e83b99.
It fixed 'strips having same name' issue, but broke handling of
animation then. Need to find a better way to handle this.
2019-01-11 19:49:06 +01:00
Antonioya
bb9c9d0eaa GP: New Cutter, Constraints and Segment selection
This commit groups a set of new tools that were tested in grease pencil object branch before moving to master. We decide to do all the development in a separated branch because it could break master during days or weeks before the new tools were ready to deploy.

The commit includes:

- New Cutter tool to trim strokes and help cleaning up drawings.

- New set of constraints and guides to draw different types of shapes. All the credits for this development goes to Charlie Jolly (@charlie), thanks for your help!

- Segment selection mode to select strokes between intersections.

- New operator to change strokes cap mode.

- New option to display only keyframed frames. This option is very important when fill strokes with color.

- Multiple small fixes and tweaks.

Thanks to @pepeland and @mendio for their ideas, tests, reviews and support.

Note: Still pending the final icons for Cutter in Toolbar and Segment Selection in Topbar. @billreynish could help us here?
2019-01-11 19:21:56 +01:00
Clément Foucault
6dbfd7f6d6 Fix T57371: Generative modifiers in editmode display vertex group weights ...
... incorrectly (or assert)

Thanks @angavrilov and @lichtwerk for the fix.
2019-01-11 18:56:05 +01:00
Clément Foucault
3a9909f38e Fix T59990: Crash when entering edit mode with skin modifier enabled
The skin modifier does not keep the UV layers.

This just add a safety check when there is no UV layers.
2019-01-11 18:56:05 +01:00
Sergey Sharybin
ff44a9957e Update bundled version of NUMA API library 2019-01-11 17:47:10 +01:00
Antonioya
ba4e6d73af GP: Missing in previous count commit 2019-01-11 17:30:53 +01:00
Brecht Van Lommel
6abbab5b53 Fix T60415: wrong font preview image alpha blending. 2019-01-11 17:26:54 +01:00
Brecht Van Lommel
854485b4b3 Fix T60411: crash in multi-object pose mode, with some armatures in rest pose. 2019-01-11 17:26:54 +01:00
Antonioya
6c056f9ae2 GP: Reduce memory reallocation in multiedit mode
There was a problem counting the number of points for edit points and lines. Now the total size is used allocating the VBO size and not the stroke size.
2019-01-11 16:58:42 +01:00
Clément Foucault
1c91b6ee29 UVEdit: Port texpaint_loop_wire to batch request
This removes code duplication and put an end to the old "create at request"
batch creation.

Also it uses the same vbo as the uv layer used for shading. Reducing VRAM
usage.

Also fixes the modified uv display in uv edit mode.
2019-01-11 16:00:23 +01:00
Clément Foucault
621a6d4a5d UVEdit: Add back uv angle stretch aspect correction
This is now done in shader so that the batches are shared across ImageUV
areas.
2019-01-11 16:00:23 +01:00
Clément Foucault
5f3fdee53a UVEdit: Port batches to batch request
This is in order to allow more spaces to have their batches created at the
same time and sharing the batches.

This is part of the effort fo making the drawing code more optimized. This
commit however should not introduce any difference.

This commit bypass the aspect ratio correction for angle stretch display
but this should be fixed in the next commit.
2019-01-11 16:00:23 +01:00
Clément Foucault
86ec304ffa WM: Use draw manager to draw UV image editor spaces
This is in order to use batch cache directly without using tricks like
batch presets reseting the VAOs.

Note: For now it also create a depth buffer for this area which is not
needed. We could get rid of this to lower VRAM usage.
2019-01-11 16:00:23 +01:00
Clément Foucault
74260a2b6d BMesh: Add BM_face_calc_area_uv 2019-01-11 16:00:23 +01:00
Clément Foucault
b98e6743dc Texture Paint: Add filtering option for texture paint overlay
The overlay should now use the texture interpolation setting in material
mode.

In image mode, there is now a new button to let the user choose the texture
filter. The option is located in the Texture Slots popover and only shows
in Image mode.
2019-01-11 16:00:23 +01:00
Clément Foucault
9177bb33f6 Workbench: Support node texture "closest" interpolation option
This makes it possible to paint pixel art using the workbench.

Cubic interpolation is not supported but could be added if needed.
2019-01-11 16:00:23 +01:00
Clément Foucault
1459a70489 GPUShader: Cleanup Unused shaders 2019-01-11 16:00:23 +01:00
Clément Foucault
a46dc9b234 Mesh Batch Cache: Cleanup Unused 2019-01-11 16:00:23 +01:00
Clément Foucault
44e3fc66c7 Edit Mode Selection: Make Vertices not occluded by edges
Debugging the edit mode selection I realized the vertices are often
occluded by edges with the same depth. Sometime it can be the center
pixel of a vertex point and that can lead to some selection issue.

So I increased the offset a bit for the vertices and it seems to fix it.
2019-01-11 16:00:23 +01:00
Clément Foucault
3bc87227f5 GPUMaterial: Cleanup / optimization 2019-01-11 16:00:23 +01:00
Clément Foucault
55ddb21b7c Mesh Selection: Port to batch cache request
This makes it more future proof and remove baked id offset inside the vbos.
Instead we add the offset as a uniform. This makes it possible to reuse
the vbos instead of discarding them all the time.

Also using batch request may reduce batches creation time.
2019-01-11 16:00:23 +01:00
Clément Foucault
4c0c4e7f9f Mesh Batch Cache: Fix wrong assert 2019-01-11 16:00:23 +01:00
Clément Foucault
9d19ff9076 GPUShader: Add selection id shader
This is to separate id drawing from standard color drawing.
2019-01-11 16:00:23 +01:00
Clément Foucault
943852c0dc Mesh Batch Cache: Put context evaluation out of batch cache
This is in order to be able to call DRW_mesh_batch_cache_create_requested
outside of the draw manager
2019-01-11 16:00:23 +01:00
Clément Foucault
bda2cd8ba5 DRW: Fix texture paint crashing if object has no material slot 2019-01-11 16:00:23 +01:00
Antonioya
5793a84f12 GP: Count all strokes when use multiedit for VBO size
When use multi frame edition, the initial size of the VBO must be bigger than normal edition because the realloc of VBO is very slow.
2019-01-11 11:00:30 +01:00
Campbell Barton
191e812f36 Fix auto-run warning RNA type 2019-01-11 15:43:53 +11:00
Campbell Barton
0434511a40 3D View: fade out dupli-wire color 70% 2019-01-11 15:02:58 +11:00
Campbell Barton
9327013796 3D View: use faded wire for set-scene objects
Matches 2.7x behavior.
2019-01-11 15:02:52 +11:00
Campbell Barton
ee6e02ccf3 3D View: use dupli wire color for shaded wire drawing
Was only working for loose wire.
2019-01-11 15:02:21 +11:00
Campbell Barton
40706b56db Cleanup: blend existing colors 2019-01-11 13:27:49 +11:00
Campbell Barton
45dc53410f Cleanup: avoid repetition versioning theme 2019-01-11 13:23:27 +11:00
Campbell Barton
a33f3cf9b2 startup: view background color wasn't default 2019-01-11 13:15:38 +11:00
Campbell Barton
5c6d5cb863 Fix background color use in 3D view
TH_BACK was being used when drawing the 3D view even though
there was no way to set the color in the preferences.

The color was zero'd when moving to the new 2.8x theme.

Having both gradient and background colors was confusing,
especially having to use 'TH_HIGH_GRAD' for the 3D view, 'TH_BACK' for
other views.

Move the background color back to 'TH_BACK', 'TH_BACK_GRAD' is used
when gradients are enabled.
RNA is unchanged so presets don't need updating.
2019-01-11 12:59:19 +11:00
Campbell Barton
f98e4cbedb Preferences: remove author field
This was only used by collada export metadata.

If metadata like this is needed, we can use per-filetype preferences,
to make it clear when user identifiable information is being used.
2019-01-11 11:00:33 +11:00
Campbell Barton
6439ed844e Cleanup: remove tabs after line start
Allows expanding tabs before running clang-format.
2019-01-11 10:53:21 +11:00
Campbell Barton
b1e286bbfe MSVC: remove compiler __func__ define
No longer needed and exposes a bug in clang-format see: D4185
2019-01-11 09:33:20 +11:00
Campbell Barton
302970b7a5 MSVC: remove compiler __func__ define
No longer needed and exposes a bug in clang-format see: D4185
2019-01-11 09:22:21 +11:00
Trevor Glauz
8b192e1a6a fix D4187: Collada Importer: Material assignment broken after importing Mesh with multiple materials 2019-01-10 20:24:56 +01:00
Brecht Van Lommel
bf7a1ef11e Fix T60266: missing viewport updates after changing scene world datablock. 2019-01-10 20:10:48 +01:00
Brecht Van Lommel
4b0c2152db Fix use of uninitialized GPU context memory in release builds.
Reported by valgrind, not sure it caused any real bugs.
2019-01-10 20:03:05 +01:00
Sergey Sharybin
b207f4e4a2 Subdiv: Fix memory leak
Was visible when mesh had n-gons.
2019-01-10 17:09:48 +01:00
Sergey Sharybin
e551ddf712 Fix T60393: Subdiv gives wrong vertex colors 2019-01-10 17:09:48 +01:00
Bastien Montagne
41b65d9a8e Fix T59631: Crash in Surface Deform modifier Bind when Dynamic Paint is included.
We should *never* prevent copying basic mesh CDLayers (vertices etc.),
that does not make sense.

I guess issue was not in old DM because geometry was duplicated anyway,
and in 'normal' modifier stack eval, probably because bare mesh was
awlays requested? But we should not have to be explicit here about it.
2019-01-10 16:47:41 +01:00
Antonioya
e31a5a4c62 GP: Fix render glitch when have collision with mesh 2019-01-10 16:26:05 +01:00
Sergey Sharybin
0f1775205e Use proper ID to create FModifier RNA pointer
Allows to do simple DEG tag, without extra checks for ID type.

Will solve possible missing updates when modifying f-curve
modifier of a shared action.
2019-01-10 16:22:53 +01:00
Philipp Oeser
ba2b26af31 Support proportional edit scaling on dopesheet keyframes
Fixes T60361

Reviewers: brecht

Maniphest Tasks: T60361

Differential Revision: https://developer.blender.org/D4188
2019-01-10 16:07:47 +01:00