Commit Graph

91 Commits

Author SHA1 Message Date
2753959ed7 Cleanup: sort CMake include paths 2019-04-24 14:41:12 +10:00
bba60bb564 Cleanup: style, use braces for gpencil modifiers 2019-04-22 19:48:16 +10:00
e12c08e8d1 ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.

For details on usage and instructions for migrating branches
without conflicts, see:

https://wiki.blender.org/wiki/Tools/ClangFormat
2019-04-17 06:21:24 +02:00
47adab4f99 CMake: prepare for BLENDER_SORTED_LIBS removal
No functional change, this adds LIB definition and args to cmake files.
Without this it's difficult to migrate away from 'BLENDER_SORTED_LIBS'
since there are many platforms/configurations that could break when
changing linking order.

Manually add and enable WITHOUT_SORTED_LIBS to try building
without sorted libs (currently fails since all variables are empty).
This check will eventually be removed.

See T46725.
2019-04-14 15:37:24 +02:00
f55026d468 Cleanup: BKE_gpencil naming
- The ambiguous term 'handle' was used where 'ensure'
  is typically used (get or add when missing).
- Rename `current` to `active`, all `current` functions which were
  also ensuring.
- Clarify what is being operated on, using `BKE_gpencil_object_*` for
  objects, `BKE_gpencil_brush_*` for brushes.
2019-04-09 10:09:13 +02:00
03bd024c07 GPencil: Uses same random seed for render in Noise modifier
As the random seed was calculated in the copy data, the render could be a little different. Now, the data is saved in the original data.
2019-03-30 17:06:49 +01:00
08fe29e52f Fix T62715: Grease Pencil Apply Armature Modifier Issue
@sergey wrote: "The reason it was failing is because md points to an original armature, which doesn't have runtime data needed for deformation. That data is to come from evaluated armature."

Thanks to @sergey for his help.
2019-03-19 16:04:03 +01:00
e7fd6c8f30 Cleanup: comment blocks 2019-03-19 15:17:46 +11:00
35b78d9807 Cleanup: indentation, wrapping
Mostly functions wrapping args, not confirming to our style guide.
2019-03-15 09:54:30 +11:00
aac7d53d58 GPencil: Add basic edit support for Hook and Array modifier
These modifiers were not included in previous commit.
2019-03-08 16:36:11 +01:00
7d3979884c GPencil: Make visible Armature modifier in edit mode
This change displays the stroke in the deformed position, but the edition is done in rest position.

This is no the final solution, but at least we have some visual feedback in edit mode.

The real solution is to create a full system to manage derived strokes in Edit mode, but this needs a lot of work and we haven't resources now to do it.
2019-03-08 16:09:20 +01:00
ab0bc65c24 Refactor CDData masks, to have one mask per mesh elem type.
We already have different storages for cddata of verts, edges etc.,
'simply' do the same for the mask flags we use all around Blender code
to request some data, or limit some operation to some layers, etc.

Reason we need this is that some cddata types (like Normals) are
actually shared between verts/polys/loops, and we don’t want to generate
clnors everytime we request vnors!

As a side note, this also does final fix to T59338, which was the
trigger for this patch (need to request computed loop normals for
another mesh than evaluated one).

Reviewers: brecht, campbellbarton, sergey

Differential Revision: https://developer.blender.org/D4407
2019-03-07 11:29:50 +01:00
e31f0fad97 Cleanup: order of modifiers' headers includes.
BLI should always comes first, before DNA, BKE etc. And
`BLI_utildefines.h` should come before any other BLI (since it's some
sort of system include really, among other things...).

Thisi should help to reduce the noise in patches when adding stuff
like uint64_t members to DNA structs... ;)
2019-02-25 11:39:14 +01:00
de13d0a80c doxygen: add newline after \file
While \file doesn't need an argument, it can't have another doxy
command after it.
2019-02-18 08:22:12 +11:00
48a36ff9e9 Cleanup: manually apply changes missed last commit
Automatic edits failed for indented comment blocks,
removed indentation & adjusted.
2019-02-06 15:52:04 +11:00
eef4077f18 Cleanup: remove redundant doxygen \file argument
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
2019-02-06 15:45:22 +11:00
6cbb4c576a Cleanup: manually remove header text not handled by automation 2019-02-02 01:49:31 +11:00
65ec7ec524 Cleanup: remove redundant, invalid info from headers
BF-admins agree to remove header information that isn't useful,
to reduce noise.

- BEGIN/END license blocks

  Developers should add non license comments as separate comment blocks.
  No need for separator text.

- Contributors

  This is often invalid, outdated or misleading
  especially when splitting files.

  It's more useful to git-blame to find out who has developed the code.

See P901 for script to perform these edits.
2019-02-02 01:36:28 +11:00
293f4d88da Cleanup: style, unused variable 2019-01-31 15:54:37 +11:00
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
1e4aab36c2 Cleanup: remove redundant BKE/BLI/BIF headers 2019-01-26 21:20:25 +11:00
d87e7af1ec T60748 Second try to fix start extreme in Noise modifier
The first point was moving inverted because first vector was inverted. Now, the vector is changed for the first point to get the same direction.
2019-01-25 10:44:46 +01:00
2218bf02dd Cleanup: sort cmake file lists 2019-01-25 08:30:33 +11:00
9ff73e61b1 Fix T60778: Grease pencil Hook modifieronly affects strokes with more than 2 points
Also fixed Lattice and Noise modifier.
2019-01-23 10:37:08 +01:00
6f167ccc79 Fix T60748: Move GP stroke extremes with noise modifier 2019-01-22 16:48:45 +01:00
69240a66e0 GP: Fix mirror modifier with parent object
Still problems when local rotation.

Some cleanup done.
2019-01-20 19:20:09 +01: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
395120ed72 Typo fixes 2019-01-09 01:41:58 +13:00
fdc726eb61 GP: Rename GP_STROKE_RECALC_CACHE to GP_STROKE_RECALC_GEOMETRY
The GP_STROKE_RECALC_CACHE identifier was changed to GP_STROKE_RECALC_GEOMETRY because the previous name was confusing and could be confused with the recalculation of the Draw Manager cache.
2018-12-28 08:48:37 +01:00
c8e37f70dd Fix T59519: Grease Pencil stroke with noise modifier crashes blender
The first point index was wrong calculated.
2018-12-18 10:24:21 +01:00
ea33b90a1b Fix T59446: Grease pencil mirror modifier wrong
The mirror was working different to mesh mirror and the result was not the expected.
2018-12-16 19:53:40 +01: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
e63c947204 GP: Refactor drawing engine to single VBO
This is part of T57829.

Reduce the number of batches used to only one by shader type.  This reduces GPU overhead and increase a lot the FPS. As the number of batches is small, the time to allocate and free memory was reduced in 90% or more.

Also the code has been simplified and all batch management has been removed because this is not necessary. Now, all shading groups are created after all vertex buffer data for all strokes has been created using DRW_shgroup_call_range_add().

All batch cache data has been moved to the Object runtime struct and not as before where some parts (derived data) were saved inside GPD datablock.

For particles, now the code is faster and cleaner and gets better FPS.

Thanks to Clément Foucault for his help and advices to improve speed.
2018-11-20 20:05:37 +01:00
d5e61240ae GP: Set Thickness default to 2
New modifiers have thsi default value.
2018-11-17 19:28:58 +01:00
5ccd60e0e7 GP: Fix Time Offset for frames before range 2018-11-06 11:10:14 +01:00
0f1390c99e GP: Rename variable 2018-11-06 11:10:14 +01:00
46060d54bf GP: Limit internally Time offset to something logic
If the offset is greater than frame range, the offset could gets some unlogic values, so now the value is normalized in the range.
2018-11-05 19:52:51 +01:00
abbe4df301 GP: More tweaks to Time Offset 2018-11-05 19:10:52 +01:00
a120b120ce GP: Fix Time Offset bug when use range
The frames greater than frame range were wrongly calculated.
2018-11-05 18:35:34 +01:00
807b460a11 GP: Time Offset verify range if loop is disabled 2018-11-04 13:27:41 +01:00
0db31c03c6 GP: Fix Time Offset when range frame is 0 2018-11-03 20:27:30 +01:00
d2b4eaa137 GP: New Time Offset custom frame range parameters
These parameters allow to define a frame range for the animation loop and make possible to loop a section while the scene is playing.
2018-11-03 17:11:38 +01:00
1fb9fcb333 Cleanup: indentation 2018-10-31 14:43:25 +11:00
26ed545276 Cleanup: style 2018-10-29 10:24:42 +11:00
39bc44ffc5 GP: Refactor Instance modifier and rename to Array
The old name Instance was logic when the modifier created new object instances, but now works equal to mesh Array modifier, so the old name was not logic and must be Array.

Also added a Object to use as offset similar to mesh Array modifier.
2018-10-28 18:20:50 +01:00
4082502239 GP: Fix compiler warnings 2018-10-24 22:53:28 +02:00
735d6cb8d8 GP: Add new Layer Pass Index filter to modifiers
Now the modifier can be filtered using the new layer index.

Also changed panels to put layers and passes filter always at the end of the panel.
2018-10-24 16:46:35 +02:00
e1a66201da GP: Add layer pass index to time modifier 2018-10-24 11:03:09 +02:00
5af716620a GP: Add new modes to Time Offset modifier 2018-10-24 10:32:03 +02:00
3e9405e26d GP: Add new frame scale parameter to Time modifier
This new parameter allows to increase or decrease the animation speed to break animation patterns when reuse data blocks.
2018-10-23 16:47:09 +02:00