Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-11-10Cleanup: formatCampbell Barton
2022-11-09Fix T102256: Gamma Cross blend mode causes stripesRichard Antalik
Function `do_gammacross_effect_float` processed one color channel per loop iteration instead of whole pixel.
2022-09-26Cleanup: use 'u' prefixed integer types for brevity in C codeCampbell Barton
This also simplifies using function style casts when moving to C++.
2022-09-25Cleanup: use 'u' prefixed integer types for brevity & cast styleCampbell Barton
To use function style cast '(unsigned char)x' can't be replaced by 'unsigned char(x)'.
2022-09-24BLF: Refactor of DPIHarley Acheson
Correction of U.dpi to hold actual monitor DPI. Simplify font sizing by omitting DPI as API argument, always using 72 internally. See D15961 for more details. Differential Revision: https://developer.blender.org/D15961 Reviewed by Campbell Barton
2022-07-08Fix T99494: Transition effects not working correctlyRichard Antalik
This was caused by strip content length and start position being incorrect. Previously this was set from strip boundary by update function, but it was removed. Add back code to set effect strip start and length. Previously content length was always 1 for effects, but now it must correspond to strip length. Because of this workaround for speed effect to get this apparent content length was removed.
2022-06-30Fix missing argument, avoid instancing function call in macroCampbell Barton
2022-06-30Fix T99133:animating multiply factor on video strips crashes blenderRichard Antalik
Crash caused by `effect_seq->len` being 0, so frame map was not built. Get length in timeline using handle positions.
2022-06-29VSE: Improved Retiming systemRichard Antalik
Patch implements better way to control playback speed than it is possible to do with speed effect. Speed factor property can be set in Time panel. There are 2 layers of control: Option to retime movie to match scene FPS rate. Custom speed factor to control playback rate. Since playback rate is strip property, it is now possible to manipulate strip as normal one even if it is retimed. To facilitate manipulation, some functions need to consider speed factor and apply necessary corrections to strip offset or strip start. These corrections may need to be float numbers, so start and offsets must be float as well. Sound strips now use speed factor instead of pitch. This means, that strips will change length to match usable length. In addition, it is possible to group movie and sound strip and change speed of meta strip.
2022-06-02VSE: Make time operations self-containedRichard Antalik
This patch makes it possible to manipulate strips without need to use update functions to recalculate effect and meta strips. Prior to this change function `SEQ_time_update_sequence` had to be used to update mainly effects and meta strips. This was implemented in a way that relied on sorted list of strips, which can't always be done and in rare cases this approach failed. In case of meta strips, `seqbase` had to be passed and compared with "active" one to determine whether meta strip should be updated or not. This is especially weak system that is prone to bugs when functions are used by python API functions. Finally, other strip types had startdisp` and `enddisp` fields updated by this function and a lot of code relied on these fields even if strip start, length and offsets are available. This is completely unnecessary. Implemented changes: All effects and meta strips are updated when strip handles are moved or strip is translated, without need to call any update function. Function `SEQ_time_update_sequence` has been split to `SEQ_time_update_meta_strip_range` and `seq_time_update_effects_strip_range`. These functions should be only used within sequencer module code. Meta update is used for versioning, which is only reason for it not being declared internally. Sequence fields `startdisp` and `enddisp` are now only used for effects to store strip start and end points. These fields should be used only internally within sequencer module code. Use function `SEQ_time_*_handle_frame_get` to get strip start and end points. To update effects and meta strips with reasonable performance, cache for "parent" meta strip and attached effects is added to `SequenceLookup` cache, so it shares invalidation mechanisms. All caches are populated during single iteration. There should be no functional changes. Differential Revision: https://developer.blender.org/D14990
2022-05-03Fix T97744: Speed effect causes memory leakRichard Antalik
Leak was caused because output image buffer was initialized twice. Once in speed effect strip and then by cross effect strip used for interpolation feature.
2022-05-03Fix T97507: Crash when deleting adjustment layerRichard Antalik
Issue was not properly fixed in 3cef9ebaf81 due to oversight. `SEQ_get_channels_by_seq` returned pointer to `seqbase` instead of `channels`.
2022-04-21Fix T97356: Crash when adding adjustment layer stripRichard Antalik
Crash was caused by incorrectly assuming, that rendered strip is meta when editing code in bulk, but this wasn't true and strip had no channels initialized, which caused crash on NULL dereference. Correct approach is to find list of channels where on same level as rendered strip, similar to how `SEQ_get_seqbase_by_seq` function works for list of strips.
2022-04-13Cleanup: avoid redundant float/int conversions in BLFCampbell Barton
Internally many offsets for BLF were integers but exposed as floats, since these are used in pixel-space, many callers were converging them back to integers. Simplify logic by using ints.
2022-04-04VSE: Add channel headersRichard Antalik
This patch adds channel region to VSE timeline area for drawing channel headers. It is synchronizedwith timeline region. 3 basic features are implemented - channel visibility, locking and name. Channel data is stored in `SeqTimelineChannel` which can be top-level owned by `Editing`, or it is owned by meta strip to support nesting. Strip properties are completely independent and channel properties are applied on top of particular strip property, thus overriding it. Implementation is separate from channel regions in other editors. This is mainly because style and topology is quite different in VSE. But also code seems to be much more readable this way. Currently channels use functions similar to VSE timeline to draw background to provide illusion of transparency, but only for background and sfra/efra regions. Great portion of this patch is change from using strip visibility and lock status to include channel state - this is facilitated by functions `SEQ_transform_is_locked` and `SEQ_render_is_muted` Originally this included changes in D14263, but patch was split for easier review. Reviewed By: fsiddi, Severin Differential Revision: https://developer.blender.org/D13836
2022-03-29Fix T96582: Wipe effect not workingRichard Antalik
Caused by oversight in 0e38002dd5dd. Constant x/y value was used to calculate transition instead of pixel x/y coords.
2022-03-16Cleanup: rename cnt to countCampbell Barton
Follow naming from T85728.
2022-03-14Auto-generate RNA-structs declarations in `RNA_prototypes.h`Julian Eisel
So far it was needed to declare a new RNA struct to `RNA_access.h` manually. Since 9b298cf3dbec we generate a `RNA_prototypes.h` for RNA property declarations. Now this also includes the RNA struct declarations, so they don't have to be added manually anymore. Differential Revision: https://developer.blender.org/D13862 Reviewed by: brecht, campbellbarton
2022-03-08Cleanup: spelling in comments, use C++ comments for disabled codeCampbell Barton
2022-03-07Cleanup: use doxy-sections for pipeline, text_drag & effectsCampbell Barton
Also improve on the doc-string for RE_RenderFrame & RE_RenderAnim.
2022-02-23Cleanup: Remove repeated word in commentsCampbell Barton
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2022-02-09Cleanup: simplify copyright headers for sequence & imbufCampbell Barton
2022-01-12Revert "BLI: Refactor vector types & functions to use templates"Clément Foucault
Includes unwanted changes This reverts commit 46e049d0ce2bce2f53ddc41a0dbbea2969d00a5d.
2022-01-12BLI: Refactor vector types & functions to use templatesClment Foucault
This patch implements the vector types (i.e:`float2`) by making heavy usage of templating. All vector functions are now outside of the vector classes (inside the `blender::math` namespace) and are not vector size dependent for the most part. In the ongoing effort to make shaders less GL centric, we are aiming to share more code between GLSL and C++ to avoid code duplication. ####Motivations: - We are aiming to share UBO and SSBO structures between GLSL and C++. This means we will use many of the existing vector types and others we currently don't have (uintX, intX). All these variations were asking for many more code duplication. - Deduplicate existing code which is duplicated for each vector size. - We also want to share small functions. Which means that vector functions should be static and not in the class namespace. - Reduce friction to use these types in new projects due to their incompleteness. - The current state of the `BLI_(float|double|mpq)(2|3|4).hh` is a bit of a let down. Most clases are incomplete, out of sync with each others with different codestyles, and some functions that should be static are not (i.e: `float3::reflect()`). ####Upsides: - Still support `.x, .y, .z, .w` for readability. - Compact, readable and easilly extendable. - All of the vector functions are available for all the vectors types and can be restricted to certain types. Also template specialization let us define exception for special class (like mpq). - With optimization ON, the compiler unroll the loops and performance is the same. ####Downsides: - Might impact debugability. Though I would arge that the bugs are rarelly caused by the vector class itself (since the operations are quite trivial) but by the type conversions. - Might impact compile time. I did not saw a significant impact since the usage is not really widespread. - Functions needs to be rewritten to support arbitrary vector length. For instance, one can't call `len_squared_v3v3` in `math::length_squared()` and call it a day. - Type cast does not work with the template version of the `math::` vector functions. Meaning you need to manually cast `float *` and `(float *)[3]` to `float3` for the function calls. i.e: `math::distance_squared(float3(nearest.co), positions[i]);` - Some parts might loose in readability: `float3::dot(v1.normalized(), v2.normalized())` becoming `math::dot(math::normalize(v1), math::normalize(v2))` But I propose, when appropriate, to use `using namespace blender::math;` on function local or file scope to increase readability. `dot(normalize(v1), normalize(v2))` ####Consideration: - Include back `.length()` method. It is quite handy and is more C++ oriented. - I considered the GLM library as a candidate for replacement. It felt like too much for what we need and would be difficult to extend / modify to our needs. - I used Macros to reduce code in operators declaration and potential copy paste bugs. This could reduce debugability and could be reverted. - This touches `delaunay_2d.cc` and the intersection code. I would like to know @howardt opinion on the matter. - The `noexcept` on the copy constructor of `mpq(2|3)` is being removed. But according to @JacquesLucke it is not a real problem for now. I would like to give a huge thanks to @JacquesLucke who helped during this and pushed me to reduce the duplication further. Reviewed By: brecht, sergey, JacquesLucke Differential Revision: https://developer.blender.org/D13791
2022-01-12Revert "BLI: Refactor vector types & functions to use templates"Clément Foucault
Reverted because the commit removes a lot of commits. This reverts commit a2c1c368af48644fa8995ecbe7138cc0d7900c30.
2022-01-12BLI: Refactor vector types & functions to use templatesClément Foucault
This patch implements the vector types (i.e:float2) by making heavy usage of templating. All vector functions are now outside of the vector classes (inside the blender::math namespace) and are not vector size dependent for the most part. In the ongoing effort to make shaders less GL centric, we are aiming to share more code between GLSL and C++ to avoid code duplication. Motivations: - We are aiming to share UBO and SSBO structures between GLSL and C++. This means we will use many of the existing vector types and others we currently don't have (uintX, intX). All these variations were asking for many more code duplication. - Deduplicate existing code which is duplicated for each vector size. - We also want to share small functions. Which means that vector functions should be static and not in the class namespace. - Reduce friction to use these types in new projects due to their incompleteness. - The current state of the BLI_(float|double|mpq)(2|3|4).hh is a bit of a let down. Most clases are incomplete, out of sync with each others with different codestyles, and some functions that should be static are not (i.e: float3::reflect()). Upsides: - Still support .x, .y, .z, .w for readability. - Compact, readable and easilly extendable. - All of the vector functions are available for all the vectors types and can be restricted to certain types. Also template specialization let us define exception for special class (like mpq). - With optimization ON, the compiler unroll the loops and performance is the same. Downsides: - Might impact debugability. Though I would arge that the bugs are rarelly caused by the vector class itself (since the operations are quite trivial) but by the type conversions. - Might impact compile time. I did not saw a significant impact since the usage is not really widespread. - Functions needs to be rewritten to support arbitrary vector length. For instance, one can't call len_squared_v3v3 in math::length_squared() and call it a day. - Type cast does not work with the template version of the math:: vector functions. Meaning you need to manually cast float * and (float *)[3] to float3 for the function calls. i.e: math::distance_squared(float3(nearest.co), positions[i]); - Some parts might loose in readability: float3::dot(v1.normalized(), v2.normalized()) becoming math::dot(math::normalize(v1), math::normalize(v2)) But I propose, when appropriate, to use using namespace blender::math; on function local or file scope to increase readability. dot(normalize(v1), normalize(v2)) Consideration: - Include back .length() method. It is quite handy and is more C++ oriented. - I considered the GLM library as a candidate for replacement. It felt like too much for what we need and would be difficult to extend / modify to our needs. - I used Macros to reduce code in operators declaration and potential copy paste bugs. This could reduce debugability and could be reverted. - This touches delaunay_2d.cc and the intersection code. I would like to know @Howard Trickey (howardt) opinion on the matter. - The noexcept on the copy constructor of mpq(2|3) is being removed. But according to @Jacques Lucke (JacquesLucke) it is not a real problem for now. I would like to give a huge thanks to @Jacques Lucke (JacquesLucke) who helped during this and pushed me to reduce the duplication further. Reviewed By: brecht, sergey, JacquesLucke Differential Revision: http://developer.blender.org/D13791
2022-01-12BLF: Reduction of use of BLF_DRAW_STR_DUMMY_MAXHarley Acheson
Reduction of the number of uses of the define BLF_DRAW_STR_DUMMY_MAX by using actual sizes of static character arrays. See D13793 for more details. Differential Revision: https://developer.blender.org/D13793 Reviewed by Campbell Barton
2021-12-29Fix: VSE colormix blend factor not workingRichard Antalik
Blend factor was used to adjust alpha of background image, which is not correct. This was done in fdee84fd567a where another change was, that background alpha is copied into result, which is correct. Apply blend factor to foreground image alpha channel.
2021-12-28Cleanup: Loops in VSE effect processingRichard Antalik
Some effect functions looped over alternating lines, previously with different factors. Since only one factor is used, code can be simplified by looping all lines in one for loop. There should be no functional changes.
2021-12-28Cleanup: Factor in VSE effect processingRichard Antalik
2 factor variables were passed to effects, but they were hard coded to have same value. Remove duplicate variable from arguments, rename single argument to `fac`. Inverted factor variables were renamed to `mfac`. Any other factor related variables are prefixed with `temp_`. There should be no functional changes.
2021-12-08Cleanup: move public doc-strings into headers for 'sequencer'Campbell Barton
Ref T92709
2021-11-15VSE: Use early out for aplha over blendingRichard Antalik
When scaling down image, users expect to see background, which doesn't currently happen in VSE. This is because strips use cross blend mode by default, because alpha over is much slower. Reason is, because any area of image can be transparent, and therefore it can't have early out implemented in a way that cross blend mode can. Flag images rendered by codecs that don't support transparency as fully opaque and implement a form of early out for alpha over blend mode. When rendering image stack, 2-input effects are ignored on the "way down". Alpha over needs rendered overlay image to decide whether it will use only overlay or background too. Therefore overlay can be rendered safely before it is used. Image flags can be checked and it can be freed if needed. Freeing doesn't cause any performance degradation, because image is always stored in cache. This feature does not improve blend mode performance. In summary, it only allowes for having alpha over blend mode on background images without suffering from lower performance. Reviewed By: sergey Differential Revision: https://developer.blender.org/D12914
2021-11-13BLF: Use Floats for Font Point SizesHarley Acheson
Allow the use of floating-point values for font point sizes, which allows greater precision and flexibility for text output. See D8960 for more information, details, and justification. Differential Revision: https://developer.blender.org/D8960 Reviewed by Campbell Barton
2021-10-25Fix T90855: Transform effect gives inconsistent outputRichard Antalik
When using downscaled preview size with proxies, transform effect doesn't compensate for fact, that pixels are effectively larger. There was compensation for scene render size already. Use same compensation method as text effect uses for font size.
2021-09-27VSE: Clamp resulting frame in multiply modePeter Fog
The clamp added will ensure immediate speed direction change on changing to/from positive/negative speed factor when using the Speed effect strip's Multiply mode. Reviewed By: ISS, sergey Differential Revision: https://developer.blender.org/D12462
2021-09-06Cleanup: clang-formatAaron Carlisle
2021-08-31Fix T90988: Incorrect speed effect strip mathRichard Antalik
Math implemented in 929d7597b345 was incorrect, but also inconsistent with previous behavior. `SEQ_SPEED_STRETCH` should change length only when right handle is moved. This is now documented in code.
2021-08-27Fix loading packed fonts for sequencer stripsCampbell Barton
2021-08-27Cleanup: use early returnCampbell Barton
2021-08-27Fix sequencer font loading using an unexpected pathCampbell Barton
Reuse the existing font loading function which handles this case.
2021-08-24Cleanup: quiet clang-format warnings, unused argumentCampbell Barton
2021-08-24VSE: Add Sequence.parent_meta() python API functionFélix
This function can be used to find metastrip parent of nested strip. Reviewed By: ISS Differential Revision: https://developer.blender.org/D11985
2021-08-24VSE: Cleanup speed effect mathRichard Antalik
Simplify logic of speed effect frame calculation by using discrete math where possible. Only `SEQ_SPEED_MULTIPLY` mode with animation requires frame map to be built. Frame map building was simplified by removing unused branches. Functional change: Animating strip in negative range will reverse playback. I assume this was limitation of previous system, where each frame map item was limited to be within correct frame range. Now frame map can contain values that point beyond usable range and they are limited by `seq_speed_effect_target_frame_get`. This way it is possible to control playback rate in both directions. Mostly fixes T89120 apart from offset handling. Reviewed By: mano-wii Differential Revision: https://developer.blender.org/D11939
2021-08-06Cleanup: use MEM_SAFE_FREE macroCampbell Barton
2021-07-24Revert "VSE UX: Make Speed Effect strips more user friendly."Germano Cavalcante
This reverts commit 3123f33380b35ae93afee0a30f36bc7181927b28 and a092baa7f90b2d5f13771d46f64ff5cf86cc5a05.
2021-07-24VSE UX: Make Speed Effect strips more user friendly.Germano Cavalcante
**Drawing Changes:** - F-curve drawing for Stretch, Multiply, Length and Frame Number. - Value drawing when no keyframes for Stretch, Length and Frame Numbers. General view of the new drawing for each speed effect mode: {F9796642, size=full} Detail of the horizontal zero (blue) line in the new `Multiply` mode: {F9798520, size=full} Nice to have (but I don't know how): - Auto adjusting of endframe when using Multiply or Boost. Differential Revision: https://developer.blender.org/D6110
2021-07-23Cleanup: code comments punctuation / spacingCampbell Barton
2021-07-22VSE: Speed Effect layout updatesGermano Cavalcante
**Changes:** - New enums correspond to 4 modes: `Stretch`, `Multiply`, `Frame Number` and `Length`. - "`Multiply Factor`" has been removed; - Value corresponding to "`use as speed`" enabled is now the value appended to the `Multiply` enum; - Value corresponding to "`use as speed`" disabled is now the value appended to the `Frame Number` enum; - Value corresponding to "`Scale to Length`" enabled is now the value appended to the `Length` enum; - Except `Stretch` each mode has now its respective control values. Differential Revision: https://developer.blender.org/D11856
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.