Commit Graph

104732 Commits

Author SHA1 Message Date
Jacques Lucke 2e213003b8 Cleanup: add comment
See rBb9cd2f4531ca670c196b0b14b1359d0f375103c2 for more info.
2021-03-22 11:35:19 +01:00
Nikhil Shringarpurey 414596cd83 Cleanup, LineArt: Fix MSVC compiler warnings.
Currently 3 of the printf lines use the format specifier "%lu" for data
of type size_t instead of "%zu". While this works, this creates compiler
warnings.

This diff fixes those warnings by using the correct format specifier.
Tested using MSVC, but should be correct on any compliant compiler.

Reviewed By: Sebastian Parborg

Differential Revision: http://developer.blender.org/D10761
2021-03-22 11:30:36 +01:00
Jacques Lucke a506f87c90 Clang Tidy: disable modernize-raw-string-literal again
This check does not work when gtests are enabled yet.
See rBb9cd2f4531ca670c196b0b14b1359d0f375103c2 for more details.
2021-03-22 11:26:48 +01:00
Bastien Montagne 82d3b0f927 Fix UI (and code!) typos. 2021-03-22 10:56:25 +01:00
Campbell Barton 14caab7257 Cleanup: check the space type instead of the operators poll function
The poll function may fail for reasons other than the space type,
as this menu is selected based on space-type, check this instead.
2021-03-22 20:12:08 +11:00
Campbell Barton a05cbc9914 RNA: rename recently added line-art properties
- Use `use_` prefix for boolean properties.
- Use `_all` instead of `_everything`,
  following existing conventions and the properties UI text.
- Use `object_instances` instead of old term `dupli` / `duplication`.
- Use `clip_plane` instead of `clipping_boundaries`,
  matching the RegionView3D property naming.
2021-03-22 18:09:19 +11:00
Campbell Barton 958e3a8cc1 RNA: use boolean array for transarency masks
There is no need to expose this as multiple properties,
also use `use_` prefix for boolean properties.
2021-03-22 18:04:12 +11:00
Campbell Barton cb521bd37b Cleanup: spelling, expand on comments 2021-03-22 14:48:36 +11:00
Campbell Barton f051146ae6 Cleanup: clang-format 2021-03-22 14:39:39 +11:00
Campbell Barton dfbaf96753 Revert "Disable clang-format for objective-C bits in GHOST."
This reverts commit 1cb9612d73.

We can now rely on the clang-format version as it's distributed
with pre-compiled binaries.
2021-03-22 14:38:45 +11:00
Campbell Barton e6cf74515f Cleanup: disable clang-format for 'intern/libmv/third_party' headers 2021-03-22 14:35:20 +11:00
Campbell Barton 544b3ab1de Cleanup: clang-format, trailing space
Minor manual tweak to prevent wrapping an array into columns.
2021-03-22 14:25:42 +11:00
Hans Goudey 2a06657eca Cleanup: Don't use class method to override equality operator
This won't make a difference in this case, but it's consider better
practice since there is no vagueness about implicit conversion.
2021-03-21 20:21:05 -04:00
Jacques Lucke 54bbaa26de Cleanup: compile errors on macos 2021-03-21 19:49:29 +01:00
Jacques Lucke 4fe8d0419c Functions: refactor virtual array data structures
When a function is executed for many elements (e.g. per point) it is often the case
that some parameters are different for every element and other parameters are
the same (there are some more less common cases). To simplify writing such
functions one can use a "virtual array". This is a data structure that has a value
for every index, but might not be stored as an actual array internally. Instead, it
might be just a single value or is computed on the fly. There are various tradeoffs
involved when using this data structure which are mentioned in `BLI_virtual_array.hh`.
It is called "virtual", because it uses inheritance and virtual methods.

Furthermore, there is a new virtual vector array data structure, which is an array
of vectors. Both these types have corresponding generic variants, which can be used
when the data type is not known at compile time. This is typically the case when
building a somewhat generic execution system. The function system used these virtual
data structures before, but now they are more versatile.

I've done this refactor in preparation for the attribute processor and other features of
geometry nodes. I moved the typed virtual arrays to blenlib, so that they can be used
independent of the function system.

One open question for me is whether all the generic data structures (and `CPPType`)
should be moved to blenlib as well. They are well isolated and don't really contain
any business logic. That can be done later if necessary.
2021-03-21 19:33:13 +01:00
Pablo Vazquez 68c31c41e5 UI: Title case for Proxy Setup and fix typo 2021-03-21 18:40:38 +01:00
Jacques Lucke 2ddbb2c64f Functions: move CPPType creation related code to separate header
This does not need to be included everywhere, because it is only
needed in very few translation units that actually define CPPType's.
2021-03-21 15:33:30 +01:00
Jacques Lucke 9e437aabdb Cleanup: fix compiling with older compiler on macos
We cannot use `std::variant` yet, because not all of the compilers
we support have a working version of it yet. For now, I just replaced
it with multiple `std::option` which is good enough, because currently
`CellValue` is only used for the cells that are actually drawn in
the spreadsheet.
2021-03-21 14:29:26 +01:00
Campbell Barton dcf1a1045d Cleanup: move some headers from MOD_lineart.h to source files 2021-03-21 14:51:37 +11:00
Campbell Barton b8cc8b30ec Cleanup: redundant headers in 'source/blender/gpencil_modifiers' 2021-03-21 14:30:08 +11:00
Campbell Barton 9c0eb1700e Cleanup: correct variable name mixup in BLI_str_quoted_substrN
Also expand doc-string for `BLI_str_escape_find_quote`
2021-03-21 14:22:14 +11:00
Campbell Barton dfefafa814 Fix uninitialized memory use loading movie sequence strips
When the movie wasn't found, uninitialized values would be used for
the original width/height.

Also use int instead of float as the image size is stored as an int.
2021-03-21 14:12:58 +11:00
Campbell Barton fce3e6646e Fix failure to set transform rotate around single
Regression in 201ab7c540
2021-03-21 14:01:41 +11:00
Campbell Barton 87b6283918 Cleanup: remove redundant NULL checks 2021-03-21 14:00:40 +11:00
Campbell Barton bf13a4d3ff Cleanup: unused return statements 2021-03-21 14:00:40 +11:00
Campbell Barton 6d97f9a5c1 Cleanup: use static local variables 2021-03-21 14:00:40 +11:00
Campbell Barton 4abafa2062 Cleanup: remove window manager headers from MOD_lineart
This was only used to return success, which is currently never checked.
2021-03-21 13:47:05 +11:00
Campbell Barton dcd9945ebe Cleanup: replace 'unsigned char' with 'uchar' 2021-03-21 13:25:31 +11:00
Campbell Barton 31e7bc6869 Cleanup: remove redundant casts 2021-03-21 13:24:42 +11:00
Campbell Barton 6db1fb197c Cleanup: spelling, doxygen comment formatting 2021-03-21 13:18:20 +11:00
Harley Acheson b4e96550ce Fix T86643: Win32 Entering Full Screen While Maximized
SetWindowPos must be called after SetWindowLongPtr in order to see changes to window frame style.

Differential Revision: https://developer.blender.org/D10756

Reviewed by Ray Molenkamp
2021-03-20 17:24:06 -07:00
Clément Foucault 9ca67c47a1 Fix T86660 EEVEE: Undefined behaviour in specular_occlusion
Define visibility error to be 1 by default to avoid undefined behaviour.
2021-03-20 22:00:08 +01:00
Howard Trickey 057292e75a Bevel code: add a null pointer check. 2021-03-20 13:03:43 -04:00
Jacques Lucke 90959c2372 Cleanup: quiet warning 2021-03-20 15:54:52 +01:00
Jacques Lucke 98721c8543 BLI: improve support for generic algorithms with c++ containers
Some generic algorithms from the standard library like `std::any_of`
did not work with all container and iterator types. To improve the
situation, this patch adds various type members to containers
and iterators.

Custom iterators for Set, Map and IndexRange now have an iterator
category, which soe algorithms require. IndexRange could become
a random access iterator, but adding all the missing methods can
be done when it is necessary.
2021-03-20 15:42:35 +01:00
Jacques Lucke 59d3ec1eef Cleanup: quiet warning 2021-03-20 15:38:17 +01:00
YimingWu 56da5ae2ac LineArt: Fix blank baking for when source type is object. 2021-03-20 14:07:51 +01:00
Falk David b19bd3692d Fix T86746: Description missing from Quick Liquid
The description was missing from the Quick Liquid operator.

The fix adds the following description:
"Make selected objects liquid"

Reviewed By: sebbas

Maniphest Tasks: T86746

Differential Revision: https://developer.blender.org/D10777
2021-03-20 13:44:36 +01:00
Falk David 95a2549d90 Fix T86745: trace sequence keyframe offset
The offset when creating the keyframes was set to `frame_target + i` but
`i` starts iterating from the current frame number.

The fix uses just `i` as the frame number.

Reviewed By: antoniov

Maniphest Tasks: T86745

Differential Revision: https://developer.blender.org/D10772
2021-03-20 13:43:00 +01:00
YimingWu d0f05bfbcd LineArt: Fixed source selection for nested-instanced collection. 2021-03-20 12:36:35 +01:00
YimingWu 3d5239ff40 Fix T86730: LineArt: keep contour when there's perpendicular faces. 2021-03-20 12:36:27 +01:00
Philipp Oeser d5a705873e Join curves: compensate for different bevel depths
When joining curves, the resulting curve will inherit the bevel depth of
the active curve, but the radii would stay the same which leads to
changed appearance when joining.

Now compensate for this taking the different bevel depths into account
(if present).

Was a feature request here (and I also think we had reports about this
-- which were usually turned down as not-a-bug):
https://blender.community/c/rightclickselect/bhhbbc/

Differential Revision: https://developer.blender.org/D10752
2021-03-20 08:14:49 +01:00
Richard Antalik f65a3172a8 Fix issues introduced strip loading refactoring
- Adding effect strip resulted in strip with no name
 - Adding sound strip attempted to read `fit_method` RNA property,
   that did not exist, causing error messages in console

These issues were introduced in bbb1936411.
2021-03-20 01:53:03 +01:00
Richard Antalik 3433d1b7f4 Fix T86355: Added effect strip has wrong length
SEQ_add_effect_strip used SeqLoadData.image.end_frame to set end
frame. This was mistake introduced in last refactoring patch.

Use effect data, not image data, when adding effect strips.

Reviewed By: sergey

Differential Revision: D10633
2021-03-20 01:40:53 +01:00
Richard Antalik c81dfa2426 Fix T85824: Transition between adjustment regression
When transition effect is placed between 2 adjustment layer strips,
only first adjustment layer was rendered by effect.

Limit timeline_frame range to adjustment strip frame range.

This timeline configuration is technically invalid, because strips
should overlap when using transition effect. This was never restricted
and instead of producing no image, transition effect used first and
last frame of source strip. Many users got used to this "feature" so
I think it make sense to fix this case so it behaves like other strip
types.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D10562
2021-03-20 01:40:53 +01:00
Peter Fog 8b3f5f755e VSE UI: Cleanup scene panel style
- Make properties alligned
 - Add decorate to volume
 - Add heading to Grease Pencil and Transparent

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D10663
2021-03-20 01:40:53 +01:00
Peter Fog 3d9ee83d88 VSE: Preview images when moving strip handles
Add option to override current frame whem transforming strip handles.
Option can be found in View menu of VSE preview, or in timeline when
using backdrop.

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D10424
2021-03-20 01:40:53 +01:00
Peter Fog 1c095203c2 VSE: Text strip improvements
- Position text in center of image
 - Increase default font size so it's more visible
 - Increase font size limit
 - Increase limit for location, so text can be scolled off screen
 - Wrap text by default
 - Tweak default box and shadow color
 - Change text shadow position
 - Text box no longer casts shadow

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D10571
2021-03-20 01:40:53 +01:00
Peter Fog 913b71bb8b VSE: Add bold and italic option for text strip
Bold and italic fonts can be switched quickly by presing corresponding
button.

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D10542
2021-03-20 01:40:53 +01:00
Eitan 7bf977e9f0 Fix T54395: Original image size set incorrectly
`SequenceElement` type `orig_height` and `orig_width` members were
set to incorrect size when using proxies and not set when strip was
added which caused value to be unset.

Since now image dimensions must be read when strip is created,
these members can be initialized. When proxies are used, do not set
original size since it is not guaranteed, that proxies are exact size.

These values are not guaranteed to be up to date or exact. They should
be used for strictly informative purposes.

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D6506
2021-03-20 01:40:53 +01:00