Commit Graph

55451 Commits

Author SHA1 Message Date
Campbell Barton
336885beba Use BLI_heap_reinsert for decimate and beautify
Improves performance for high poly meshes,
~70% faster for decimate, only ~10% for beautify.
2017-10-29 05:28:00 +11:00
Campbell Barton
4af1af70ad BLI_hash: add BLI_heap_reinsert
Allows avoiding remove/insert calls.
2017-10-29 04:42:58 +11:00
Joshua Leung
1e07f366e6 Fix T53185: After rendering an animation (Ctrl-F12), pressing F12 no longer renders single frames only 2017-10-29 02:09:57 +13:00
Campbell Barton
fdae9e1e03 BLI_array_store: correct hashing single bytes
The single byte version of hash_data was casting from unsigned char
instead of signed.

This didn't cause any errors since the result of each aren't compared.
Even so, better keep them matching.
2017-10-28 18:28:55 +11:00
Campbell Barton
8ac69ff9dc Cleanup: use uint type in BLI 2017-10-28 17:48:45 +11:00
Campbell Barton
1d409defbf Docs: clarify return value for BVH API 2017-10-27 16:14:24 +11:00
Campbell Barton
282af08fe2 Fix T53131: Incorrect vert-edge angle calculation
Vertex w/ a single edge wasn't detected
2017-10-27 13:10:36 +11:00
Julian Eisel
d245d36074 Remove SCREEN_OT_header_flip, use SCREEN_OT_region_flip instead
Basically reverts rB65c4149f203610 and fixes the issue in a better way.

Keymaps using the removed operator will be affected. Switching header
from top to bottom now has the shortcut F5, just like switching other
regions.
2017-10-26 22:40:24 +02:00
Campbell Barton
81f2e68e20 Event System: check_click was left set
Caused by own change 137586a13c
2017-10-26 16:08:45 +11:00
Sergey Sharybin
8988f383c1 Depsgraph: Cleanup, remove redundant calls to add_component 2017-10-25 14:40:38 +02:00
Sergey Sharybin
50d30cc5fd Depsgraph: Need to tag relations for update after new clip was added 2017-10-25 14:20:20 +02:00
Sergey Sharybin
ea5cf3ff7a Depsgraph: Rework debug relations update function
Make it a tag for relations update function instead, since we will not be able
to easily rebuild relations, and we wouldn't be able to iterate all scenes.

This is a part of mowing depsgraph to be per-workspace/layer in 2.8 branch.
2017-10-25 12:11:49 +02:00
Sergey Sharybin
0bbf2f9554 Depsgraph: Add missing forward struct declarations 2017-10-25 12:11:12 +02:00
Sergey Sharybin
b4ba1068c1 Depsgraph: Cleanup, trailing whitespace and braces 2017-10-25 12:07:51 +02:00
Sergey Sharybin
3fe534eebb Depsgraph: Make depsgraph.debug_stats to return a string
This way we can see result in the python console.
2017-10-25 12:06:56 +02:00
Sergey Sharybin
6ec8344243 Depsgraph: Add missing movie clip dopesheet invalidation 2017-10-25 11:45:31 +02:00
Sergey Sharybin
eb090d0609 Depsgraph: Use explicit opcode for shape key 2017-10-25 11:37:24 +02:00
Sergey Sharybin
a2e22c79cb Depsgraph: Cleanup, use explicit cloth modifier opcode
Avoids use of placeholder operation which also was involving some string
comparisons.
2017-10-25 11:34:41 +02:00
Sergey Sharybin
3997a157e9 Depsgraph: Cleanup, don't call explicit add_id()
This is redundant, adding components will check for ID to exist.
2017-10-25 11:31:22 +02:00
Sergey Sharybin
1bdc687e7a Depsgraph: Use explicit parameters eval operation code
This replaces usage of generic PLACEHOLDEWR with string lookup with more
explicit opcode. This should make it faster to build dependency graph by
avoiding string comparisons when it's not needed.

There should be no user measurable different.
2017-10-25 11:25:10 +02:00
Sergey Sharybin
11d7445905 Depsgraph: Cleanup, use proper style for macro loop 2017-10-25 11:25:10 +02:00
Sergey Sharybin
45329ce319 Depsgraph: Remove unsued node flag 2017-10-25 11:25:10 +02:00
Sergey Sharybin
ea29e4c997 Depsgraph: Make operation codes more obvious
This synchronizes al lrelated changes from blender2.8 branch.
2017-10-25 11:25:10 +02:00
Sergey Sharybin
f29ff14d6e Depsgraph: Remove bunch of debug code
Was never actually used and implementation seems to be slow: we shouldn't be
doing per-node evaluation hash lookups, adds too much overhead. We can instead
store statistics in the node itself, and maybe even group them somehow.

Ideally such a statistics should be user-friendly so riggers and animators
can see exactly what's happening.
2017-10-25 11:25:10 +02:00
Campbell Barton
136f33b09f Fix T53143: Knife Crash after Grid Fill
BM_ELEM_INTERNAL_TAG flag wasn't ensured to be cleared.
2017-10-24 17:21:25 +11:00
Campbell Barton
8661ab12a6 Fix BMesh PyAPI internal flag clearing logic
Would leave the flag set on raising an exception.
2017-10-24 16:52:54 +11:00
Campbell Barton
c93cfcbb61 Fix edge-split bmesh operator giving empty result 2017-10-24 16:31:35 +11:00
Joshua Leung
c71f2f1404 Fix T53130: NLA Tweak (moved) Tracks + Alt+RMB Select does not work in Graph Editor 2017-10-24 16:27:56 +13:00
Campbell Barton
cc96cdd9d4 VSE: draw grid lines at every second
Was hard-coded to 25 frames.

D2893 by @jooert
2017-10-23 22:29:49 +11:00
Campbell Barton
1aa5b63661 Docs: improve bmesh exception message
Suggested in T53131
2017-10-23 21:57:32 +11:00
Campbell Barton
6dfe4cbc6b Polyfill Beautify: half-edge optimization
Was using an edge hash for triangle -> edge lookups,
updating triangle indices for each edge-rotation.

Replace this with half-edge which can rotate edges much more simply,
writing triangles back once the solution has been calculated.

Gives ~33% speedup in own tests.
2017-10-23 01:40:03 +11:00
Julian Eisel
efd70ab78f Move & rename uiLayoutOperatorButs to interface_templates.c 2017-10-21 16:48:42 +02:00
Brecht Van Lommel
c74c72101e Fix compositor node links getting lost on file load for custom render passes. 2017-10-20 14:41:24 +02:00
Joshua Leung
ae72a9206e Fix T46163: NLA properties with drivers aren't displayed as having drivers
While such drivers will generally get evaluated too late to be of much
use during animations, it can still be useful to allow using drivers to
control a whole bunch of NLA strip properties (i.e. syncing NLA strip
timings via a single property/control).

Keyframe insertion however is still not allowed on these properties
(and an error message will now be displayed when trying to do so,
instead of silently failing), as it is useless.
2017-10-20 17:05:50 +13:00
Campbell Barton
959a58da9e Cleanup: redundant casts 2017-10-20 14:03:22 +11:00
Campbell Barton
cb957fd8e0 Cleanup: replace gpencil tri vars w/ array 2017-10-20 09:28:12 +11:00
Campbell Barton
465b6333cc Correct last commit, use WM_exit
Without this temp directory isn't removed.
2017-10-20 00:19:58 +11:00
Campbell Barton
9ee8319cd5 Exit with invalid command line arguments
Loading blender with an unknown name would interpret it as a blend file.

This meant passing `--arg` arguments would end up creating new
blend files which could be confusing if you made a typo on a command
line argument.

Now check the string has a blend file extension,
exiting if it doesn't.
2017-10-20 00:10:40 +11:00
Sergey Sharybin
1cddab18de Allow non-initialized memory to be passed to BKE_id_copy_ex
This only applies when LIB_ID_CREATE_NO_ALLOCATE flag is used and guarantees
that non-memset-zero memory can be used (or, that same memory chunk might be
used over and over again without need to clean it from the calleer).
2017-10-19 13:55:08 +02:00
Bastien Montagne
529d365b4d Add note about handling of root nodetree in ID copydata.
OUr beloved root nodetrees... Had to check again the code to undersand
why we copy them with bmain even though they are not in bmain, so this
is worth a comment. ;)
2017-10-19 12:33:14 +02:00
Campbell Barton
3859f5ec28 Docs: correct descriptions 2017-10-19 11:09:27 +11:00
Bastien Montagne
a2b541bd22 Fix mistake in new ID copy code in 'no allocate' case.
Spotted by @sergey, thanks.
2017-10-18 17:11:29 +02:00
Bastien Montagne
264837cb46 Fix wrong comment (leftover from dev time). 2017-10-18 16:55:33 +02:00
Campbell Barton
ab7ebf2b10 Cleanup: Use const for RNA EnumPropertyItem args
Practically all access to enum data is read-only.
2017-10-18 16:04:07 +11:00
Alexander Gavrilov
1cb884be35 Make auto handle placement aware of cyclic extrapolation.
Cyclic extrapolation is implemented as an f-curve modifier, so this
technically violates abstraction separation and is something of a hack.
However without such behavior achieving smooth looping with cyclic
extrapolation is extremely cumbersome.

The new behavior is applied when the first modifier is Cyclic
extrapolation in Repeat or Repeat with Offset mode without
using influence, repeat count or range restrictions.

This change in behavior means that curve handles have to be updated
when the modifier is added, removed or its options change. Due to the
way code is structured, it seems it requires a helper link to the
containing curve from the modifier object.

Reviewers: aligorith

Differential Revision: https://developer.blender.org/D2783
2017-10-17 19:39:10 +03:00
Campbell Barton
7d3723a54d Fix T52959: Local view looses clip range on exit 2017-10-18 01:41:19 +11:00
Germano
0a435d49ba Fix T53074: Use the pybuffer->itemsize to get the corresponding GLtype
It seems that `typestr` does not always define the final size of the element. And it varies by operating system.

Then use the `typestr` only to know the itemtype is `float` type or not.
2017-10-17 12:06:52 -02:00
Sergey Sharybin
06ff970f27 Fix T53007: OpenSubdiv + transparency = artefact/crashes 2017-10-17 12:12:15 +02:00
Sergey Sharybin
9598bad59c GPU: Report number of compressed texture formats to help nailing crahs down in the future 2017-10-17 11:53:15 +02:00
Sergey Sharybin
b65fecd9a0 GPU: Fix memory corruption in GPU_debug on GTX1080
Number of texture formats is 51, which is greater than allowed size of 32.
2017-10-17 11:52:31 +02:00