Commit Graph

191 Commits

Author SHA1 Message Date
Jacques Lucke
d9f7cbb8af Cleanup: remove bmain argument from BKE_scene_graph_update_for_newframe
Reviewers: sergey

Differential Revision: https://developer.blender.org/D8613
2020-08-18 15:45:58 +02:00
Campbell Barton
171e77c3c2 Cleanup: use array syntax for sizeof with fixed values
Also order sizeof(..) first to promote other values to size_t.
2020-08-08 13:38:00 +10:00
Campbell Barton
b134434224 Cleanup: declare arrays arrays where possible 2020-08-07 22:37:39 +10:00
Sybren A. Stüvel
c04088fed1 Cleanup: Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule. This should be the final commit of the series of commits that
addresses this particular rule.

No functional changes.
2020-08-07 13:38:07 +02:00
Sybren A. Stüvel
a29686eeb3 Cleanup: Blenlib, Clang-Tidy else-after-return fixes (incomplete)
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/blenlib` module. Not all warnings are
addressed in this commit.

No functional changes.
2020-08-07 11:23:02 +02:00
Jacques Lucke
7283e6fb73 Merge branch 'blender-v2.90-release' into master 2020-08-07 10:04:57 +02:00
Jacques Lucke
91694b9b58 Code Style: use "#pragma once" in source directory
This replaces header include guards with `#pragma once`.
A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`),
because they are used in other places.

This patch has been generated by P1561 followed by `make format`.

Differential Revision: https://developer.blender.org/D8466
2020-08-07 09:50:34 +02:00
Campbell Barton
30d3d4fbc1 Merge branch 'blender-v2.90-release' into master 2020-08-06 22:58:44 +10:00
Campbell Barton
ba20da7214 Cleanup: avoid debug-only includes for BLI_assert.h
Having includes in debug builds makes it possible to accidentally
break release builds.

Avoid this by moving calls to other modules out of BLI_assert.h
into BLI_assert.c
2020-08-06 22:49:28 +10:00
Bastien Montagne
5f621a12c6 Merge branch 'blender-v2.90-release'
Conflicts:
	source/blender/editors/gpencil/gpencil_primitive.c
2020-08-04 13:36:58 +02:00
Bastien Montagne
701a9d3917 Cleanup: typos & co in UI messages (and some other places). 2020-08-04 13:26:58 +02:00
Campbell Barton
901ee66ea1 Cleanup: use term init instead of initialize/initialise
The abbreviation 'init' is brief, unambiguous and already used
in thousands of places, also initialize is often accidentally
written with British spelling.
2020-08-01 13:51:05 +10:00
Antonio Vazquez
a0b0a47d81 GPencil: Scale stroke thickness when use Offset modifier scale 2020-07-27 19:09:44 +02:00
Antonio Vazquez
8e9dd5492a Gpencil: Simplify modifier sample mode minimal vert count fix.
For this mode is possible use strokes of 2 points.

Differential revision: https://developer.blender.org/D8138
2020-07-14 15:59:49 +02:00
Antonio Vazquez
26793d619c GPencil: Cleanup Build modifier and fix potential div by zero errors 2020-07-14 10:26:19 +02:00
Campbell Barton
0fb08b7cc4 Cleanup: sort header, cmake paths 2020-07-14 16:04:18 +10:00
Antonio Vazquez
464aaf2701 Fix T78603: GPencil Noise modifier Vertex Group influence filter missing
This was removed by error during the last refactor of modiifers.
2020-07-04 17:31:15 +02:00
Hans Goudey
a21cb22f8b Cleanup: Deduplicate code for finding context object
Instead of manually checking the pinned object, use the existing
ED_object_active_context function. This requires adding const
to the context in that function.
2020-07-03 11:58:43 -04:00
Philip Holzmann
a07922159d Fix T78527: GPencil Mirror modifier is inconsistent with Mesh Mirror (redo)
Simply the same code the regular mesh mirror modifier uses.

Differential Revision: https://developer.blender.org/D8188
2020-07-02 23:02:02 +02:00
Antonio Vazquez
33f36b453a GPencil: Cleanup - More rename from gp_ to gpencil_ 2020-07-02 20:04:56 +02:00
Antonio Vazquez
a4fe8ef236 Fix T78527: GPencil Mirror modifier is inconsistent with Mesh Mirror
The grease pencil mirror was using the current axis rotation but the mesh modifier doesn't use it.
2020-07-02 16:57:20 +02:00
Hans Goudey
5d2005cbb5 UI: Add shortcuts for grease pencil modifier panels
See rB1fa40c9f8a81 for more details. The implementation is the same.
The only difference to the mesh modifier  commit is a slight rework of
edit_modifier_invoke_properties in order to pass through to check for
other keymap items with the same shortcut.
2020-06-29 21:04:45 -04:00
Campbell Barton
fd5c185beb Cleanup: spelling 2020-06-25 23:14:36 +10:00
Julian Eisel
5726dec0e0 UI: Fix untranslated layout headings 2020-06-22 15:09:54 +02:00
Hans Goudey
ec963d9d7d UI: Grease Pencil Modifier Drag and Drop, Layout Changes
This patch implements the list panel system D7490 for grease pencil
modifiers. It also moves their drawing to a callback in
GpencilModifierTypeInfo in line with the extensible architecture
refactoring goal T75724.

This also adds the "set_error" function for grease pencil modifiers,
which hadn't been copied from mesh modifiers yet.

The implementation is basically exactly the same as for the modifier
patch (9b099c8612).

Thanks to Matias Mendiola (mendio) for providing mockups for many
of the layout changes.

Differential Revision: https://developer.blender.org/D7978
2020-06-19 14:42:08 -04:00
Campbell Barton
c5a0ce1ade Cleanup: naming for lattice deform functions
- BKE_lattice_deform_data_create    was init_latt_deform.
- BKE_lattice_deform_data_destroy   was end_latt_deform.
- BKE_lattice_deform_data_eval_co   was calc_latt_deform.
2020-06-13 15:56:40 +10:00
Campbell Barton
16595b9ea1 Cleanup: split object data deform functions into their own files
Move armature/curve functions into their headers,
they were previously in BKE_lattice.h
2020-06-12 16:27:46 +10:00
Campbell Barton
f79856f9fb Cleanup: minor changes to deform functions
- Use 'float (*)[3]' to avoid casts.
- Remove unnecessary float[3] copy in gpencil_deform_verts.
- Use MEM_SAFE_FREE
- Use const arguments.
2020-06-12 14:39:49 +10:00
Campbell Barton
24d39620fb Cleanup: split deform functions that take target object-data
Prefer meaningful function names over redundant NULL arguments.

Also clarify variable names as it wasn't obvious the object-data
is part of the object target.
2020-06-12 13:53:25 +10:00
Campbell Barton
c02baf8b50 Cleanup: use BKE_ prefix for deform functions 2020-06-12 12:52:24 +10:00
Campbell Barton
ffcb87813b Merge branch 'blender-v2.83-release' 2020-05-25 15:01:01 +10:00
Campbell Barton
31f3e9082a Cleanup: make format 2020-05-25 14:55:48 +10:00
Antonio Vazquez
041e440649 Merge branch 'blender-v2.83-release' 2020-05-23 15:26:24 +02:00
Antonio Vazquez
b4613e0bca GPencil: Fix unreported Noise modifier does not work in axis aligned strokes
If the stroke is totally straight, the normal was not calculated properly.
2020-05-23 15:25:54 +02:00
Campbell Barton
facc9bc878 Merge branch 'blender-v2.83-release' 2020-05-13 23:19:18 +10:00
Campbell Barton
4e32398668 Cleanup: unused arg 2020-05-13 23:14:01 +10:00
Antonio Vazquez
498bd0772e Merge branch 'blender-v2.83-release' 2020-05-13 13:03:55 +02:00
Antonio Vazquez
cbcc15bdaf Fix T65426: GPencil mirror modifier doesn't work as expected
The mirror was not working if the original object had transformations.

Also some code cleanup.
2020-05-13 13:00:24 +02:00
Antonio Vazquez
bdcf2083a3 GPencil: Cleanup unneeded initializations 2020-05-11 16:28:15 +02:00
Antonio Vazquez
d63956d0e5 GPencil: Replace material name with material pointer for Modifiers filter
Before, the material name was used to filter the effect of the stroke, but after the last changes in the ID code, now it's not working.

After talking with @severin, we agreed to replace the material name with a pointer. Also, this fix a design issue when the materials were linked.

Related to T76594

Differential Revision: https://developer.blender.org/D7681  with some minor changes
2020-05-11 16:28:15 +02:00
Antonio Vazquez
267e4d130a Merge branch 'blender-v2.83-release' 2020-05-11 13:55:52 +02:00
Antonio Vazquez
3d3a75fc2a Fix T76598: GPencil - Set a lower limit for Thickness modifier
The old value was too high. Now, the limit of pressure is 0, but anyway, the stroke will be always visible because there is a minimum thickness of 1 pixel.
2020-05-11 13:55:21 +02:00
Antonio Vazquez
a1593fa05b GPencil: New Percentage parameter in Build modifier
Add a factor to determine the percentage affected.

This parameter is used to hide part of the stroke and to have a full control of how the points are displayed and not linked to current scene frame.

{F8526502}

{F8526511}

Reviewed By: mendio, pepeland

Differential Revision: https://developer.blender.org/D7682
2020-05-11 12:57:22 +02:00
Campbell Barton
d06384aa41 Cleanup: spelling 2020-05-09 17:19:28 +10:00
Campbell Barton
00e99959d3 Cleanup: double-spaces in comments 2020-05-09 17:15:43 +10:00
Antonio Vazquez
298356a9c0 GPencil: Fix typo error in previous rename 2020-05-08 11:15:42 +02:00
Antonio Vazquez
a2f4d7b8a3 GPencil: Refactor - Rename modifier and shder functions
This change is to align names with changes in T76498
2020-05-08 10:34:42 +02:00
Campbell Barton
d388c1c524 Cleanup: sort file lists 2020-05-03 13:45:40 +10:00
Antonio Vazquez
cdd980cd56 GPencil: Rename modifier Texture to Texture Mapping 2020-04-28 18:40:18 +02:00
Brecht Van Lommel
1c86912068 Cleanup: clang-format 2020-04-21 13:16:34 +02:00