Commit Graph

68211 Commits

Author SHA1 Message Date
Campbell Barton
d718338828 WM: move dropbox handler to it's own type 2019-02-19 16:17:21 +11:00
Campbell Barton
f88ea20285 WM: move operator handler to it's own type 2019-02-19 16:17:21 +11:00
Campbell Barton
eae2942474 WM: move UI handler to it's own type 2019-02-19 16:17:21 +11:00
Campbell Barton
55ac296358 WM: move gizmo handler to it's own type 2019-02-19 16:17:21 +11:00
Campbell Barton
0767b63f1b WM: move wmEventHandler.type to a boolean
Currently it's effectively a boolean for file-select handlers.

Prepare for refactoring event handlers into their own types (keymap,
operator, gizmo, ui & dropbox) to help make logic easier to follow.
2019-02-19 16:14:51 +11:00
Campbell Barton
790cb7799d Cleanup: rename parent_origin_eval to parent_display_origin
The term 'eval' is often used by depsgraph result,
where this is just used for drawing.
2019-02-19 11:38:25 +11:00
Campbell Barton
ec57d76db8 Fix edit-curve display for hidden handles
When the first handle was hidden, all others would show as hidden too.
2019-02-19 10:04:15 +11:00
Campbell Barton
53e95a982c Cleanup: remove unused Object.smoothresh 2019-02-19 09:50:00 +11:00
Campbell Barton
53b484d081 DNA: rename select_color -> select_id
The term color is misleading, it's an integer id that happens to be
written to a color in some cases, then converted back to an integer.
2019-02-19 09:45:48 +11:00
Campbell Barton
fc10e89918 DNA: rename Object.col -> color
Was confusing, unrelated to:
colbits, col_mask, col_group, actcol & totcol.
2019-02-19 08:48:15 +11:00
Bastien Montagne
ecdd1864d1 Fix (unreported) broken-by-design code in depsgraph's deg_backup_object_runtime()
Committing this since it does fix broken logic (previously in that
condition obdata would always be set to NULL, since
`BKE_object_runtime_reset()` is called before).

However, this has presumably been broken that way since 05/2018, so
maybe that whole condition is not needed anymore? Or NULL pointer was
working as well here?

@sergey eyes are required here I guess ;)
2019-02-18 18:21:44 +01:00
Bastien Montagne
16a290bb6f Fix Object bbox memleak in depsgraph code.
Caused by rBae2b677dcb5a70f5, Object.runtime has lot of weird specific
handlings in depsgraph...

For now modified `deg_backup_object_runtime()` and
`deg_restore_object_runtime()` to mimic previous behavior regarding
Object bbox (i.e. pass it around, instead of wiping it clean).

Reported in T61660.
2019-02-18 18:15:00 +01:00
Bastien Montagne
49c7b34547 Cleanup some Object's bbox code.
Now that bbox is in runtime, no need to explicitely clear it when we
call BKE_object_runtime_reset() two lines below.
2019-02-18 17:55:44 +01:00
Bastien Montagne
aed631fa47 Fix (unreported) wrong handling of some parameters combination in bpy.data.user_map()
Would add undesired keys...
2019-02-18 17:16:33 +01:00
Bastien Montagne
1414c4496c ID Management Py API: Fix (unreported) crash in some cases.
Would crash when passing some kind of invalid parameters, e.g.:

   >>>D.user_map(key_types={'brush'})
2019-02-18 17:16:33 +01:00
Bastien Montagne
b8ec2c9559 ID management: use FOREACH_MAIN_ID in some places. 2019-02-18 17:16:33 +01:00
Bastien Montagne
b36f78abf4 ID management: use FOREACH_MAIN_ID in some places. 2019-02-18 17:16:33 +01:00
Bastien Montagne
4977321c5a ID management: use FOREACH_MAIN_ID in some places. 2019-02-18 17:16:33 +01:00
Bastien Montagne
ff7165957f ID management: use FOREACH_MAIN_ID in some places. 2019-02-18 17:16:33 +01:00
Bastien Montagne
0951778eba ID management: use FOREACH_MAIN_ID in some places. 2019-02-18 17:16:33 +01:00
Bastien Montagne
00d2e9096f ID management: use FOREACH_MAIN_ID in some places. 2019-02-18 17:16:33 +01:00
Bastien Montagne
4c2330bd53 BKE_main: FOREACH macros: fix shadowing 'i' variable. 2019-02-18 17:16:33 +01:00
Bastien Montagne
614a0a47e5 BKE_main: make FOREACH new macros working when deleting some IDs. 2019-02-18 17:16:33 +01:00
Clément Foucault
28901820a4 Wireframe: Fix selection broken since recent wireframe refactor 2019-02-18 17:03:10 +01:00
Sergey Sharybin
f2a21472c4 Fix T61473: Crash particle system is updating
Original and localized particle settings were sharing some
of the runtime pointers.
2019-02-18 17:00:50 +01:00
Brecht Van Lommel
0e3a2acbfa Fix T57457: animated image sequences not working in Eevee.
The dependency graph now handles updating image users to point to the current
frame, and tags images to be refreshed on the GPU. The image editor user is
still updated outside of the dependency graph.

We still do not support multiple image users using a different current frame
in the same image, same as 2.7. This may require adding a GPU image texture
cache to keep memory usage under control. Things like rendering an animation
while the viewport stays fixed at the current frame works though.
2019-02-18 16:52:01 +01:00
Brecht Van Lommel
286c34b4ab Fix image filepath changes not refreshing all image users. 2019-02-18 16:38:17 +01:00
Brecht Van Lommel
a6443b5d1e Fix BKE_image_walk_all_users not including all image users. 2019-02-18 16:38:17 +01:00
Brecht Van Lommel
8f7ae20f79 Cleanup: rename tpageflag to gpuflag, make it purely runtime data. 2019-02-18 16:38:17 +01:00
mano-wii
c94b3b19a2 Fix T61373: Crash when selecting the edit mode
Some GPUs complain about `error C7011: implicit cast from "int" to "uint"` even if the cast is explicit.
2019-02-18 11:35:17 -03:00
Sergey Sharybin
abb147e609 Fix T61636: Drivers don't update on viewport using curves 2019-02-18 16:35:56 +01:00
Sergey Sharybin
582ae0c122 Fix crash toggling edit mode of curve with animation
The issue was caused by original f-curves being re-allocated
without informing dependency graph about this.

Was reported in T61636#622757
2019-02-18 16:29:04 +01:00
Sergey Sharybin
d02ad52b2d Depsgraph: Make node an owner of its name
The initial idea of using char pointer was to save some
memory since the dependency graph was kind of the one
with the main database.

Nowadays dependency graph should be separatable from the
main database and being self-sustainable.

Other issue which was caused by this pointer is the
re-tagging of operations during relations update: it is
possible to have node which as tagged for update but had
the owner of the name removed (i.e. driver or bone was
removed).
2019-02-18 16:24:51 +01:00
Sergey Sharybin
c3ceefb671 Cleanup: Remove unused field 2019-02-18 16:08:05 +01:00
Clément Foucault
11b8d8a838 DRW: Fix Crash when enabling object wireframe option 2019-02-18 16:02:27 +01:00
Clément Foucault
d62f8a3176 Overlay: Remove extra contour drawing in wireframe mode
This removes the overhead of rendering the object one more time.
2019-02-18 16:02:27 +01:00
Bastien Montagne
5d58b7f073 Fix T61660: Wrong user counter on curves with shared material.
Patch by @sergey.

Note that this is really a bad thing actually, ideally we should never
get that situation (IDs in Main referencing temp IDs outside of it).
That can lead to many possible similar cases...

Fixing that is not trivial though, so for now we'll have to live with
it, until we have migrated *all* of our temp datablocks generation
outside of Main's.
2019-02-18 15:27:29 +01:00
Bastien Montagne
2c12c9b61e ID management: forbid refcount of used IDs when user ID is outside of Main.
This is related to T61660, but actually does not fix that specific issue
(which is even worse - outside-of-Main ID using inside-of-Main IDs... yuck).
2019-02-18 15:27:29 +01:00
Jacques Lucke
a0d0d37ecd Fix T61666: missing NULL_UNIT that stops iteration over units 2019-02-18 14:25:34 +01:00
Sergey Sharybin
7b6da0ace7 Jpeg: Fix write past array boundary
Was happening when image buffer had cryptomatte pass, which can easily
exceed 530 bytes used by the buffer.

Now default buffer is bumped to 1K, and also allowed to be heap-allocated
when really need bigger buffer.

Possible optimization is to allocate buffer once, but in practice those
re-allocations will not happen often, so keeping code simpler is not an
issue. Just something for a rainy day.
2019-02-18 15:25:10 +01:00
Clément Foucault
68d8627104 Edit Mesh: Cleanup 2019-02-18 14:17:57 +01:00
Clément Foucault
9ab99ff26b Sculpt Draw: Add support for wireframe geometry
This introduce the wireframe batches. Creating the indices buffer does
not seems to slow down the sculpt in my testing (but it is kind of hard to
test reliably)

This includes a bit of cleanup in gpu_buffers.c.
2019-02-18 14:17:57 +01:00
Clément Foucault
2cccffd20b Wireframe: Add workaround for osx wide wires 2019-02-18 14:17:57 +01:00
Clément Foucault
0c4334d0bb Cleanup: Remove old wireframe batch cache code 2019-02-18 14:17:57 +01:00
Clément Foucault
7a8a2211d1 Wireframe: Fix Artifacts with MSAA
We blit the depth buffer into the MSAA depth buffer so that wires are
properly occluded. This also makes the "In front" option work with MSAA.
2019-02-18 14:17:57 +01:00
Clément Foucault
9c49c2ef0c GPU: Change multisample resolve shader to output min depth
This will effectively make the AA passes thicker in some cases but it is
required for better AA on wireframes. The trick is to occlude the wire
passes so that they do not output fragment that could be behind actual
geometry.
2019-02-18 14:17:57 +01:00
Clément Foucault
600da00a94 Wireframe: Add depth offset to prevent zfighting of wireframe overlay 2019-02-18 14:17:57 +01:00
Clément Foucault
e49d955541 Wireframe: Refactor to use GL_LINES instead of triangles with alpha blend
This gets rid of the progressive fading of the edges as it does not work
with depth perception (sorting problem with alpha blending).
2019-02-18 14:17:57 +01:00
Alexander Court
253ff57617 Clamp value in sheen calculation to fix fireflies.
Fixes T59784.

Reviewers: fclem

Reviewed By: fclem

Subscribers: brecht

Maniphest Tasks: T59784

Differential Revision: https://developer.blender.org/D4269
2019-02-18 14:05:16 +01:00
Campbell Barton
6e72601b90 Fix T61649: Transform resize from UV editor asserts
Change logic for error checking so it's easier to follow.
2019-02-18 22:03:26 +11:00