Commit Graph

2800 Commits

Author SHA1 Message Date
c0f88ed8a8 Cleanup: sort forward declarations of enum & struct
Done using:
  source/tools/utils_maintenance/c_sort_blocks.py
2019-01-28 21:17:58 +11:00
25772c9e1d Fix T59921: RuntimeError:bpy.ops.object.gpencil_modifier_apply()
Thanks to Brecht for his help
2019-01-26 16:19:22 +01:00
f20dbc293f Cleanup: blank lines over doxy headers 2019-01-26 21:43:24 +11:00
1e4aab36c2 Cleanup: remove redundant BKE/BLI/BIF headers 2019-01-26 21:20:25 +11:00
2218bf02dd Cleanup: sort cmake file lists 2019-01-25 08:30:33 +11:00
ac5278b682 Fix T60791: Don't show automatic weights option when not supported
There are probably many more cases in which the menu looks a little different.
However, I don't know them all and it's too easy to break something accidentally here.
Maybe a user could try the different combinations of object types and check if there are entries that should not be there.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4240
2019-01-23 15:21:28 +01:00
a712fbda6a GP: Cleanup previous commit 2019-01-21 18:30:15 +01:00
48149459e4 Fix T60714: Avoid creation of nested objects
In grease pencil is not logic add an object inside other object in edit mode. The object must be created only in Object mode.
2019-01-21 18:29:02 +01:00
0c829e8240 Fix T60709: Apply Object Transform does nothing by default 2019-01-21 13:43:16 +01:00
42ba294235 Fix T55461: [Vertex Group] "Delete all unlocked groups" not working. 2019-01-21 10:36:38 +01:00
c9938ebb00 Fix T60615: Cycles baking not working with some modifiers.
Refactors Cycles mesh export a bit to avoid unnecessary copies and to be in
sync with the Blender baker.
2019-01-18 18:39:43 +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
e4c78436c6 Fix T60246: crash with Cycles baking while in edit mode. 2019-01-15 16:53:42 +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
b8e8c0e325 Cleanup: comment line length (editors)
Prevents clang-format wrapping text before comments.
2019-01-15 23:30:31 +11:00
01029c68d2 Cleanup: rename BKE_libblock_delete to BKE_id_delete. 2019-01-15 11:09:16 +01:00
6af97b84df Cleanup: replace usages of deprecated BKE_libblock_free by BKE_id_free. 2019-01-15 11:09:16 +01:00
11f9938eed Clenaup: remove unused EM_WAITCURSOR 2019-01-10 13:02:07 +11:00
002d0bd344 Cleanup: remove unused copy menu code
Unused since 2.4x.
2019-01-10 12:55:09 +11:00
ae2af46920 Fix inconsistent naming and behavior for base visible/selected/editable.
Fixes T60251.
2019-01-08 18:50:44 +01:00
2c21e3e35f Fix T60132: Convert hair particles to mesh
Needed to port operator to use evaluated particle system.

But also changed interface to always show Convert button when
draw type is set to Path (Hair particle system is forced to
be draws as path). This avoid rather expensive lookup on every
redraw, but will show Convert button for un-baked particle
emitter.

Probably, an acceptable compromise.
2019-01-04 14:30:34 +01:00
a30bdcc142 Fix T60022: Crash when adding grease pencil object to a collection disabled in viewport.
See D4163

Thanks to Habib Gahbiche (@zazizizou) for the fix.
2019-01-03 18:12:25 +01:00
65b4ebbbd5 Fix T60056: Make Duplicates Real with Keep Hierarchy does nothing
Caused by rB36ca072375deea4803df4681716c1d3224095e07
[one instance of `DEG_get_original_object` was neccesary, the other one
breaks getting the parent in `BLI_ghash_lookup`]

Reviewed by: brecht

Differential Revision: https://developer.blender.org/D4154
2019-01-03 12:12:12 +01:00
f15205b93f Fix T60060: Corrective Smooth Modifier binding process is broken.
Same as with the other modifiers' binding ops, those need to be
performed outside of regular depsgraph eval.
2019-01-02 11:26:31 +01:00
1a208f0326 Cleanup: indentation, naming
Use rna naming conventions for unit-settings callbacks.
2019-01-02 17:07:47 +11:00
bcf0c71433 Cleanup: remove non-existing function declarations 2018-12-31 00:58:54 +11:00
65bc931306 Cleanup: argument wrapping indentation 2018-12-20 08:03:48 +11:00
Sebastian Parborg
90e253d974 Fix T59387: Axis target crash 2018-12-20 06:33:55 +11:00
4563849c1b Fixes for particle system and physics
- Silence harmless error print about relation.

  Object with particle system which doesn't use physics will
  not have point cache component.

- Tag relations for update when particle system physics type
  change.

  This ensures correct state of point cache component.

This is all part of T59258.
2018-12-19 15:36:09 +01:00
bc8f2e9ee4 Fix T59500: Weight Smoothing Not Working
Reviewers: brecht, dfelinto

Maniphest Tasks: T59500

Differential Revision: https://developer.blender.org/D4094
2018-12-19 11:51:49 +01:00
d46d8e831c Merge branch 'master' into blender2.8 2018-12-19 10:28:26 +11:00
5c3953010d Cleanup: spelling 2018-12-19 10:18:15 +11:00
4046e55f77 Transform: calculate initial depth for axis-target
While the operator needs a depth to work as intended,
it feels buggy if the initial drag does nothing until a depth is found.

If the cursor isn't over any geometry calculate an initial depth.
2018-12-18 22:43:35 +11:00
787660e15a Gizmo: exclude overlays from origin-set depth
Setting the light orientation would read depth from the light wireframe.
2018-12-18 20:33:16 +11:00
0d511e05d3 Cleanup: Fix typo in comment 2018-12-17 16:34:08 +01:00
780f0f646d GP: Rename CTX and OB modes
Part of T59335.
2018-12-14 16:52:12 +01:00
Dalai Felinto
0e76ff18b5 Fix T58351: Make Single User crashes 2018-12-14 09:20:56 -02:00
Dalai Felinto
dc4c1be1a4 New object API function : BKE_object_eval_reset()
This restores the object->data to a non-modifier evaluated state.

So this allow us to change evaluated object modifier stack directly and
get BKE_mesh_new_from_object() for the evalauted object.
2018-12-14 08:45:54 -02:00
Dalai Felinto
10508338d8 Build fixup for previous commit
Build error introduced on: 285cfef695.
2018-12-14 08:39:53 -02:00
Dalai Felinto
285cfef695 Fixing crash with cycles baking with is_cage and no cage 2018-12-14 08:31:24 -02:00
dd4c87cd04 Merge branch 'master' into blender2.8 2018-12-14 11:09:42 +11:00
aa3c4b4cb6 Missed last commit 2018-12-14 11:06:34 +11:00
aca13040da Cleanup: naming 2018-12-14 10:34:12 +11:00
0835c224ba Cleanup: de-duplicate active item center access 2018-12-13 10:41:03 +11:00
Dalai Felinto
6871402614 Fix Cycles baking active/cage
Basically what we address here is to make sure the active object and the cage
are not interferring with the baking result (e.g., when baking Combined).

To do so, we take advantage of the fact that we create our own depsgraph
for baking. So now we can change the cowed objects, instead of the
original ones.

Note: There is still a way to get a crash. If you try to bake from
selected to active when is_cage, but with no cage object, we get an
assert:

```
BLI_assert failed: //source/blender/blenkernel/intern/DerivedMesh.c
mesh_calc_modifiers(), at
(((Mesh *)ob->data)->id.tag & LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT) == 0
```

We can bypass this by passing ob_low instead of ob_low_eval to
bake_mesh_new_from_object on object_bake_api.c:847 . But then the edge
split modifier change will take no effect.
2018-12-11 21:57:16 -02:00
Dalai Felinto
f40a88a4ba Fix selected to active Cycles Baking
Since we started using looptris we no longer need a triangulation
modifier in the highpoly object. In fact having was causing a bug
where baking would be utterly broken.

This fix normal baking. Combined pass still needs a fix to hide the
objects during baking.
2018-12-07 14:58:37 -02:00
Dalai Felinto
cc61b21dff Partial fix to T58917 - No valid cage
The fix itself simply is to store the cage object as a pointer instead
of a string/name.

That said baking with or without cage is yielding very different results
than in 2.7.
2018-12-07 10:44:19 -02:00
79312c1912 Depsgraph: Remove duplicated sets of recalc/update flags
There were at least three copies of those:

- OB_RECALC* family of flags, which are rudiment of an old
  dependency graph system.
- PSYS_RECALC* which were used by old dependency graph system
  as a separate set since the graph itself did not handle
  particle systems.
- DEG_TAG_* which was used to tag IDs.

Now there is a single set, which defines what can be tagged
and queried for an update. It also has some aggregate flags
to make queries simpler.

Lets once and for all solve the madness of those flags, stick
to a single set, which will not overlap with anything or require
any extra conversion.

Technically, shouldn't be measurable user difference, but some
of the agregate flags for few dependency graph components did
change.

Fixes T58632: Particle don't update rotation settings
2018-12-07 11:37:38 +01:00
989fbff16f Cleanup/refactor binding code for MeshDeform modifier.
We had two different ways of doing it, SurfaceDeform and LaplacianDeform
would do it through a special modifier stack evaluation triggered from
binding operator, while MeshDeform would do it through a regular
depsgraph update/eval (also triggered from its binding op).

This enforces the later to search back for orig modifier data inside
modifier code (to apply binding on that one, and not on useless CoW
one).

Besides the question of safety about modifying orig data from threaded
despgraph (that was *probably* OK, but think it's bad idea in general),
it's much better to have a common way of doing that kind of things.

For now it remains rather dodgy, but at least it's reasonably consistent
and safe now.

This commit also fixes a potential memleak from binding process of
MeshDeform, and does some general cleanup a bit.
2018-12-07 11:22:31 +01:00