Commit Graph

67431 Commits

Author SHA1 Message Date
Sergey Sharybin
7eda267df1 Subdiv: Reset evaluator creation statistics
Makes it more clear to see what was exactly happening at
the last invocation of subsurf modifier.
2019-01-16 11:00:43 +01:00
Sergey Sharybin
b0c6c65e7b Subdiv: Initial implementation of topology cache
This commit makes it so OpenSubdiv's topology refiner is kept
in memory and reused for until topology changes. There are the
following modifications which causes topology refiner to become
invalid:

- Change in a mesh topology (for example, vertices, edges, and
  faces connectivity).
- Change in UV islands (adding new islands, merging them and
  so on),
- Change in UV smoothing options.
- Change in creases.
- Change in Catmull-Clark / Simple subdivisions.

The following limitations are known:

- CPU evaluator is not yet cached.
- UV islands topology is not checked.

The UV limitation is currently a stopper for making this cache
enabled by default.
2019-01-16 11:00:43 +01:00
Sergey Sharybin
4347879c43 Subdiv: Cleanup, pass mesh by const pointer 2019-01-16 11:00:42 +01:00
Sergey Sharybin
6c196248be Subdiv: Cleanup, comments 2019-01-16 11:00:42 +01:00
Sybren A. Stüvel
3d4e92eb96 Alembic: C++11 doesn't need the space between '> >'
C++11 doesn't need the space between '> >' in a nested templated
declaration, so instead of `std::vector<std::pair<a, b> >` we can now
write `std::vector<std::pair<a, b> >`.
2019-01-16 10:59:22 +01:00
Sybren A. Stüvel
3ce9bcee70 Alembic export: write curve/NURBS as mesh
It's now possible to export curves and NURBS as mesh data to Alembic.
This allows artists to do any crazy thing on curves and export the
visual result to Alembic for interoperability with other software (or
caching for later use, etc.). It's an often-requested feature.

This works around T60503 and the fixes export part of T51311.

Note that exporting zero-width curves is currently not supported, as
exporting a faceless mesh (e.g. just edges and vertices) is not
supported by the mesh writer at all.

To test, create a curve with thickness (for example extruded), export to
Alembic and check the 'Curves to Mesh' checkbox in the export options.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D4213
2019-01-16 10:44:39 +01:00
Sybren A. Stüvel
2bb6028d1a Alembic export: separated "writing Alembic mesh" from "writing mesh object"
I moved most of the `AbcMeshWriter` code to a new class
`AbcGenericMeshWriter`. The latter is an abstract class and does not
make any assumptions about the type of Blender object being written.
This makes it possible to write metaballs, curves, nurbs surfaces, etc.
as mesh to Alembic files.

The `AbcMeshWriter` class now is the concrete implementation of
`AbcGenericMeshWriter` for writing mesh objects.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D4213
2019-01-16 10:43:45 +01:00
Campbell Barton
45042f6a03 Fix uninitialized cursor w/ setting object origin 2019-01-16 19:57:58 +11:00
Campbell Barton
735653cda8 Fix T52354: Origin to Geometry uses Bounds w/ Median Center is set 2019-01-16 18:32:09 +11:00
Campbell Barton
c383d74228 Logging: add '--log-show-timestamp' option.
Part of D4214 by @sobakasu w/ edits.
2019-01-16 16:33:05 +11:00
Campbell Barton
7c4803367f BMesh: prevent weld-verts bmop creating selected+hidden verts/edges
Related to error exposed by T59640
Would have fixed crash too, but we want to ignore hidden verts.
2019-01-16 15:31:54 +11:00
Campbell Barton
beaa66bb13 Fix T59640: Transform w/ auto-merge & hidden verts crashes 2019-01-16 15:03:17 +11:00
Campbell Barton
6299d84e10 Fix uninitialized variable use w/ kdopbvh ray projection
Snapping verts for eg would use these values uninitialized.
2019-01-16 15:02:58 +11:00
Campbell Barton
5861e1fa28 Object: avoid calling operators in ED_editors_init
Don't call operator when entering sculpt modes.
2019-01-16 11:49:19 +11:00
Campbell Barton
976917e8cf Cleanup: de-duplicate rotation mode enum 2019-01-16 11:17:13 +11:00
Campbell Barton
f027cbeeb9 Cleanup: use max frame define 2019-01-16 11:09:51 +11:00
Antonioya
d844271aef GP: Use weight in noise modifier for all types
The weight was used only for position.
2019-01-15 20:24:07 +01:00
Brecht Van Lommel
b1fa2a8fbb Fix T59826: grease pencil crash with empty material slot. 2019-01-15 18:54:11 +01:00
Jacques Lucke
a0df26f004 Fix T60383: mesh merge type callback returned NULL 2019-01-15 18:27:21 +01:00
Brecht Van Lommel
e4c78436c6 Fix T60246: crash with Cycles baking while in edit mode. 2019-01-15 16:53:42 +01:00
Sybren A. Stüvel
2f2272f71a Alembic: removed declaration of non-existing functions
Removed AbcMeshWriter::getMeshInfo() and AbcMeshWriter::getMaterialIndices().
2019-01-15 16:21:04 +01:00
Sybren A. Stüvel
f16b9dc750 Marked TODOs with the actual string TODO
There are some things that need to be done in Alembic for Blender 2.8 to
make all the 'visible/renderable/selected only' options work.
2019-01-15 16:21:04 +01:00
Sybren A. Stüvel
9fed39c7b0 Alembic export: fixed memory leak
If the triangulated mesh was in itself a new mesh that should be freed this
should happen before the function returns (as it only returns a single mesh,
and thus the caller can only free one).
2019-01-15 16:21:04 +01:00
Campbell Barton
88a80fcec8 Cleanup: commas at the end of enums
Without this clang-format may wrap them onto a single line.
2019-01-16 00:03:03 +11:00
Campbell Barton
2d98dce7ee Cleanup: rename BASE_FROMDUPLI -> BASE_FROM_DUPLI
Matches `BASE_FROM_SET`.
2019-01-15 23:30:31 +11:00
Campbell Barton
b8e8c0e325 Cleanup: comment line length (editors)
Prevents clang-format wrapping text before comments.
2019-01-15 23:30:31 +11:00
Campbell Barton
4226ee0b71 Cleanup: comment line length (blenlib)
Prevents clang-format wrapping text before comments.
2019-01-15 23:30:31 +11:00
Campbell Barton
30c3852ffd Cleanup: comment line length (creator)
Prevents clang-format wrapping text before comments.
2019-01-15 23:30:31 +11:00
Campbell Barton
328a0f975b Cleanup: comment line length (DNA)
Prevents clang-format wrapping text before comments.
2019-01-15 23:15:35 +11:00
Brecht Van Lommel
39acbebe46 Fix T60498: Auto IK doesn't work immediately. 2019-01-15 12:07:22 +01:00
Brecht Van Lommel
48f38f850b Fix T60497: wrong statusbar keymap display with MMB emulation. 2019-01-15 11:42:08 +01:00
Campbell Barton
0b9a65151d Fix T60410: Crash adjusting torus w/ enter edit-mode preference 2019-01-15 21:36:50 +11:00
Campbell Barton
e375685e06 Cleanup: pass main instead of context w/ ED_editors_exit/flush_edits
Useful for calling from lower level code.
2019-01-15 21:36:50 +11:00
Bastien Montagne
01029c68d2 Cleanup: rename BKE_libblock_delete to BKE_id_delete. 2019-01-15 11:09:16 +01:00
Bastien Montagne
f55a178db0 Cleanup: rename BKE_libblock_free_us to BKE_id_free_us. 2019-01-15 11:09:16 +01:00
Bastien Montagne
f52d315c35 Cleanup: removed disabled 'slow but safer' piece of code in make_local process.
Has been disabled for nearly two years now, think we can safely assume
new, quicker code is working properly now. :)
2019-01-15 11:09:16 +01:00
Bastien Montagne
c710ca8933 Cleanup: Remove deprecated BKE_libblock_free(_ex) functions, document BKE_id_free(_ex) ones. 2019-01-15 11:09:16 +01:00
Bastien Montagne
cae3750ff9 Cleanup: replace usages of deprecated BKE_libblock_free_ex by BKE_id_free_ex. 2019-01-15 11:09:16 +01:00
Bastien Montagne
6af97b84df Cleanup: replace usages of deprecated BKE_libblock_free by BKE_id_free. 2019-01-15 11:09:16 +01:00
Bastien Montagne
2f39ca3843 Cleanup BKE_id_free_ex().
Add 'missing' bpy code from BKE_libblock_free_ex(), now both functions
do exactly the same thing, only the later is less flexible (fewer
'exotic' behaviors supported, like handling IDs outside of bmain etc.).

Next step: nuke usages of BKE_libblock_free functions, makes no sense to
have twice the same code around!
2019-01-15 11:09:16 +01:00
Campbell Barton
93867cfafc Correct last commit 2019-01-15 18:56:53 +11:00
Campbell Barton
b3791d59f6 Fix T60507: Constrained transform shows all axes
Regression in 579c01da60

Move values_modal_offset use out of applyMouseInput
to resolve order of initialization issue.
2019-01-15 18:40:31 +11:00
Campbell Barton
dde4375d5c Fix T60504: Armature wire draw type hidden when unselected 2019-01-15 14:02:13 +11:00
Campbell Barton
745311ed4c Fix T60506: Menu toggle clicks pass through to area 2019-01-15 11:42:07 +11:00
Campbell Barton
07541052a0 Fix T60512: Weight paint brushes show weight when unused 2019-01-15 11:06:36 +11:00
Campbell Barton
62ac0996e7 Cleanup: use BrushCapabilities prefix for RNA types 2019-01-15 10:54:35 +11:00
Campbell Barton
8c3bd1eda1 Cleanup: style 2019-01-15 10:36:52 +11:00
Clément Foucault
ee0c2e9b87 Edit Mesh: Improve selected double vertices visibility
The issue is that the edge fix geometry goes on top of the actual drawn
points.

This commit reduce the edge fix size to the strict minimum but does not
get rid of it.

Related to T60139
2019-01-14 23:43:17 +01:00
Clément Foucault
21fedfbca0 Fix T59482: Creating 2 Particle systems breaks the app 2019-01-14 23:43:17 +01:00
Harley Acheson
84c06e996a UI: indent subpanel headers more.
Differential Revision: https://developer.blender.org/D4206
2019-01-14 20:48:15 +01:00