Commit Graph

67452 Commits

Author SHA1 Message Date
debb68024e PyAPI: add PyC_Err_SetString_Prefix for internal use 2019-01-17 08:38:59 +11:00
8ba86020cc GP: Display Stroke for Fill Alt mode always
When use the Alt mode to draw close strokes, if the color had the stroke diabled, the stroke was not visiblle while drawing.

Now, it's visible while drawing, but it's hidden again when the stoke is finished. To display close strokes, enable stroke mode in material or enter in edit mode.
2019-01-16 20:04:48 +01:00
8102200006 Cleanup/sanitize usages of G.debug_value.
There was no documentation at all, some very bad practices (like using
G.debug_value > 0 as some sort of global debug print switch), and even
an overlapping use of '1' value...

Also, python setter did not check for valid range (since this is a
short, not an int).
2019-01-16 19:43:53 +01:00
feaf846f93 Cleanup: get rid of -666 debug value.
That one was used to allow specifying in system console a new path for
missing libraries, when loading a .blend file.

We now have a much more easy and user-friendly way of repairing missing
linked datablocks/libraries, so this is not needed anymore.
2019-01-16 19:43:53 +01:00
2eec83867b Cleanup: remove dead code in softbody forces evaluation.
This code has been disabled (hidden behind a specific debug value) for
over 10 years now! More than time to get rid of it...
2019-01-16 19:43:53 +01:00
c1762b1a08 Preferences: enable interface translation by default, not just tooltips.
Translation as a whole is still disabled by default as before.
2019-01-16 19:25:17 +01:00
d31ca35c61 Fix outdated user preference descriptions. 2019-01-16 19:25:17 +01:00
69dcdf5e12 Fix broken weight painting colorband in default preferences. 2019-01-16 19:25:17 +01:00
1192fd58a5 GP: Use multiframe falloff in Shear transform 2019-01-16 19:22:20 +01:00
798e67bc9e GP: Use multiframe falloff for Bend transformation 2019-01-16 19:22:13 +01:00
c2dee803e3 Outilner: pass userdata void pointer to outliner_do_object_operation_ex().
Even though it is not used currently, an _ex() func should not ignore
that, it is kind of mandatory for many advanced/complex behaviors.
2019-01-16 17:35:51 +01:00
ece72e15d5 Preferences: remove OpenGL select method preference.
Deprecated GL_SELECT no longer works in OpenGL core profile, so there is no
reason to have this.
2019-01-16 16:16:42 +01:00
49562da98d Preferences: remove unnecessary 16 bit textures preference.
This is a leftover from a time when these were not supported on all GPUs.
2019-01-16 16:16:42 +01:00
a8a89db9c8 Preferences: always do GPU accelerated mipmapping, remove preference.
This setting was added long ago to be cautious in case some GPUs did not
support this propertly, no reason to have it anymore.
2019-01-16 16:16:42 +01:00
0a378b8ebc Fix BKE_id_copy_ex() being able to 'return' garbage in copied ID.
Reported/noted in D4178, it would return immediatly in case of NULL
source ID, without ensuring that return 'copied' ID was properly
initialized.
2019-01-16 16:15:52 +01:00
7d7f5ce19f Multires: Cleanup, comments 2019-01-16 12:20:32 +01:00
514e53bb80 Expose batch IDs deletion in python API.
Follow-up to previous commit.
2019-01-16 12:02:37 +01:00
ce6d20b54e Add experimental batch IDs deletion.
Main idea is to remove IDs to be deleted from Main, to avoid looping on
them to remove other deleted IDs usage (this is the most expensive
process in ID deletion, by far).

Speed improvements when deleting a large amount of IDs from a Main
containing a lot of them is quite significant, some examples for Objects:
* Removing 1k from 10k: 32% quicker (2.5s to 1.7s).
* Removing 10k from 20k: 60% quicker (59s to 23s).
* Removing 20k from 20k: 99.5% quicker (82s to 0.4s)!

Note however that this process is more risky/touchy, since we by-pass
some safety checks from regular ID removal here.
So will only give access to that code from python API for now (in
separate commit), so that it gets really tested. Also still need to
think about how to hook it up in UI (probably mostly for Outliner),
since we often do higher-level operations there...
2019-01-16 12:02:37 +01:00
fcbbfb7789 Fix crash creating new file after modifications
Seems to be caused by cae3750 which changed free() function used
by bmain free to the one which does dependency graph tag. We do
no want to do any tags here.
2019-01-16 11:39:30 +01:00
bcef99d3a7 Cleanup: Spelling in comment 2019-01-16 11:36:54 +01:00
1579dc8c3b Multires: Prepare for cached topology
Note that the actual caching is still disabled, since
more tests is needed with more production-looking files.
2019-01-16 11:00:43 +01:00
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
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
4347879c43 Subdiv: Cleanup, pass mesh by const pointer 2019-01-16 11:00:42 +01:00
6c196248be Subdiv: Cleanup, comments 2019-01-16 11:00:42 +01:00
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
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
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
45042f6a03 Fix uninitialized cursor w/ setting object origin 2019-01-16 19:57:58 +11:00
735653cda8 Fix T52354: Origin to Geometry uses Bounds w/ Median Center is set 2019-01-16 18:32:09 +11:00
c383d74228 Logging: add '--log-show-timestamp' option.
Part of D4214 by @sobakasu w/ edits.
2019-01-16 16:33:05 +11:00
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
beaa66bb13 Fix T59640: Transform w/ auto-merge & hidden verts crashes 2019-01-16 15:03:17 +11:00
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
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
976917e8cf Cleanup: de-duplicate rotation mode enum 2019-01-16 11:17:13 +11:00
f027cbeeb9 Cleanup: use max frame define 2019-01-16 11:09:51 +11:00
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
b1fa2a8fbb Fix T59826: grease pencil crash with empty material slot. 2019-01-15 18:54:11 +01:00
a0df26f004 Fix T60383: mesh merge type callback returned NULL 2019-01-15 18:27:21 +01:00
e4c78436c6 Fix T60246: crash with Cycles baking while in edit mode. 2019-01-15 16:53:42 +01:00
2f2272f71a Alembic: removed declaration of non-existing functions
Removed AbcMeshWriter::getMeshInfo() and AbcMeshWriter::getMaterialIndices().
2019-01-15 16:21:04 +01:00
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
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
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
2d98dce7ee Cleanup: rename BASE_FROMDUPLI -> BASE_FROM_DUPLI
Matches `BASE_FROM_SET`.
2019-01-15 23:30:31 +11:00
b8e8c0e325 Cleanup: comment line length (editors)
Prevents clang-format wrapping text before comments.
2019-01-15 23:30:31 +11:00
4226ee0b71 Cleanup: comment line length (blenlib)
Prevents clang-format wrapping text before comments.
2019-01-15 23:30:31 +11:00
30c3852ffd Cleanup: comment line length (creator)
Prevents clang-format wrapping text before comments.
2019-01-15 23:30:31 +11:00
328a0f975b Cleanup: comment line length (DNA)
Prevents clang-format wrapping text before comments.
2019-01-15 23:15:35 +11:00