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-03-23Cleanup: move documentation to headers, other minor correctionsCampbell Barton
2022-03-16Cleanup: rename cnt to countCampbell Barton
Follow naming from T85728.
2022-03-15Fix T96263: command line rendering affected by current scene subframeBrecht Van Lommel
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-03-02Fix potential crash during proxy buildingRichard Antalik
Last step of proxy building caused crash due to thread race contition when acessing ed->seqbase. Looking at code, it seems that calling IMB_close_anim_proxies on original strips is unnecessary so this code was removed to resolve this issue. Locking seqbase data may be possible, but it's not very practical as many functions access this data on demand which can easily cause program to freeze. Reviewed By: sergey Differential Revision: https://developer.blender.org/D14210
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-10Cleanup: copyright in headers, spelling in commentsCampbell Barton
- Order year consistently. - Minor consistency (case, double-spacing). - Correct typos.
2022-02-09Cleanup: simplify copyright headers for sequence & imbufCampbell Barton
2022-02-07VSE: Add filter method to strip transformDimitry Kaplin
Previously, nearest interpolation filter was used for preview, because it offered good performance and bilinear was used for rendering. This is not always desirable behavior, so filter method can now be chosen by user. Chosen method will be used for preview and for rendering. Reviewed By: ISS Differential Revision: https://developer.blender.org/D12807
2022-02-02Cleanup: spelling in commentsCampbell Barton
2022-02-01Fix compile error with audaspace disabledJulian Eisel
Argument was removed in a recent commit.
2022-02-01Fix T94287: gaps between strips when adding moviesRichard Antalik
Currently, audio and video strips are synchronized based on data from media stream, which is nice, but this causes gaps between strips. This synchronization was implemented by moving movie strip position relative to sound, which doesn't make much sense for user which is mostly interested in editing video. Code was bit hard to read, so it has been simplified. Ideally video stream time would be easily accessible so synchronization could be done at any time, but this is not necessary at this point. Reviewed By: zeddb Differential Revision: https://developer.blender.org/D13948
2022-01-26Fix T94149: Incorrect sound strip lengthRichard Antalik
Fix formula in function `SEQ_sound_update_length`. Formula for sound strip length was changed in commit ded68fb1027, when strip is added to timeline, but it was not changed in function mentioned above.
2022-01-26VSE: Build proxies only for slow moviesRichard Antalik
This change applies only for automatic proxy building, when strip is added to timeline. Manual building process is not affected. Don't build proxy file if movie is already fast enough to seek. To determine seek performance, check if whole GOP can be decoded in 100 milliseconds. To consider some variation in GOP size, large number of packets are read, assuming that each packet will produce 1 frame. While this is not technically correct, it does give quite accurate estimate of maximum GOP size. This test will ensure consistent performance on wide array of machines. Check should be done in order of few milliseconds. Reviewed By: sergey Differential Revision: https://developer.blender.org/D11671
2022-01-25VSE: Use timecodes by defaultRichard Antalik
Movies with variable frame rate can cause mismatch of displayed frame when proxies are used. Since proxies are not used for rendering, this means, that output may be different than expected. This problem can be avoided when timecodes are used. Set used timecode to Record Run. Timecodes are built with proxies at the same time, therefore if proxies are built and used this will resolve possible mismatch of output. Record run is chosen, because it will show frames based on time they were encoded by encoder and should match behavior as if movie was played back at normal speed. This change is done only for new strips in order to not overwrite user defined settings. Other minor changes: - When proxies are enabled, size 25% is no longer set by default. It was mostly annoying anyway. - Silence warning when timecode file is not present. This was introduced in 4adbe31e2fc98f982aed3d97505513750ec348d4. Previously use of timecodes was hard-coded in sequencer and this error would spam console if timecodes would be enabled by default and proxies would be never built. ref: T95093 Reviewed By: sergey Differential Revision: https://developer.blender.org/D13905
2022-01-24Cleanup: sort struct forward declarationsCampbell Barton
2022-01-19VSE: Support copy-pasting strips with animationRichard Antalik
When copying strips between 2 scenes, it wasn't possible to copy animation curves along with strips. In this patch curves are copied into clipboard `ListBase`. When pasted, original curves are moved into temporary `ListBase` and curves in clipboard are moved into scene action. This is because when strips from clipboard have to be renamed, function `SEQ_ensure_unique_name()` does fix RNA paths of curves, but this is done globally for all curves within action. After strips are renamed, restore original curves from backup. Note: This patch handles only fcurves. Drivers and actions are currently not handled anywhere in VSE. Fixes T77530 Reviewed By: sergey Differential Revision: https://developer.blender.org/D13845
2022-01-19Cleanup: VSE animation handlingRichard Antalik
- Move functions that handle animation to own file - `animation.c` - Refactor `SEQ_offset_animdata` and `SEQ_free_animdata` functions - Add function `SEQ_fcurves_by_strip_get` to provide more granular and explicit way for operators to handle animation - Remove function `SEQ_dupe_animdata`, do curve duplication explicitly in operator code, which makes more sense to do. Further this function was also used for renaming strips which makes no sense. - Refactor usage of function `SEQ_free_animdata` and remove XXX comment. Now this functiuon is no longer called when `Sequence` data is freed implicitly, it is done explicitly in high level function `SEQ_edit_remove_flagged_sequences` Reviewed By: sergey Differential Revision: https://developer.blender.org/D13852
2022-01-12DNA: Add space clip editor defaultsSimon Lenz
This is my attempt of adding defaults for the space clip editor struct (in line with https://developer.blender.org/T80164). It adds the default allocation for `SpaceClip` and `node_composite_movieclip.cc`. This also solves the error below (for C++ files using the DNA_default_alloc), which was put forward by Sergey Sharybin. Differential Revision: https://developer.blender.org/D13367 Reviewed by: Julian Eisel
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
2022-01-11Fix T94768: Crash in VSE prefetchingRichard Antalik
If timeline contains scene strip outside of edited meta strip, this will cause crash. This is because prefetchin ignored meta strips being edited when rendering, but did check for scene strips only inside edited meta strip. Change active seqbase pointer when entering meta strip. This makes it possible to prefetch only content that is being presented to user.
2022-01-07Cleanup: remove redundant const qualifiers for POD typesCampbell Barton
MSVC used to warn about const mismatch for arguments passed by value. Remove these as newer versions of MSVC no longer show this warning.
2022-01-06Cleanup: spelling in commentsCampbell 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-21Fix T94280: Crash when splitting meta stripRichard Antalik
This happens because in `SEQ_time_update_sequence` function `SEQ_get_meta_by_seqbase` returns uninitialized value. This isn't nice, but it shouldn't happen in first place. Problem is, that `SEQ_edit_strip_split` does move strips into detached `ListBase`, so other functions can't see them anymore. Detached `ListBase` is used solely to preserve relationships during duplication. Move strips to original `ListBase` immediately after duplication and return `NULL` if `SEQ_get_meta_by_seqbase` can't find meta strip. Splitting itself can still rely on fact, that number of original and duplicated strips is same and they are placed next to each other in exactly same order at the end of original `ListBase`.
2021-12-20Fix T94254: Crash using view_all operator in VSERichard Antalik
Caused by `NULL` dereference in `SEQ_meta_stack_active_get()`. Check if `Editing` is `NULL` before accessing meta stack.
2021-12-20Fix: Meta strip not created with alpha over blend modeRichard Antalik
Meta add function wasn't updated. All strips now use alpha over blending, so set it in `SEQ_sequence_alloc()`.
2021-12-14Cleanup: correct unbalanced doxygen groupsCampbell Barton
Also add groups in some files.
2021-12-14Fix T93844: High memory usage during VSE previewRichard Antalik
Since 88c02bf826df FFmpeg handles are freed if image is not displayed. This change did not work correctly if strips are inside meta strip, because overlap did not consider meta strip boundary, only strips inside of meta strip. Pass frame range to `sequencer_all_free_anim_ibufs`, if strip is inside of meta strip, frame range is reduced to fit meta strip boundary, but if meta strip is being edited, range must be set to +/-`MAXFRAME`, otherwise playback performance would be too bad.
2021-12-13Cleanup: use "filepath" term for Main, BlendFileData & FileGlobalCampbell Barton
Use "filepath" which is the current convention for naming full paths. - Main use "name" which isn't obviously a file path. - BlendFileData & FileGlobal used "filename" which is often used for the name component of a path (without the directory).
2021-12-10Cleanup: move public doc-strings into headers for various API'sCampbell Barton
Some doc-strings were skipped because of blank-lines between the doc-string and the symbol and needed to be moved manually. - Added space below non doc-string comments to make it clear these aren't comments for the symbols directly below them. - Use doxy sections for some headers. Ref T92709
2021-12-08Cleanup: move public doc-strings into headers for 'sequencer'Campbell Barton
Ref T92709
2021-12-06VSE: Fix strip with mask modifier not blendingRichard Antalik
Set `ibuf->planes` to `R_IMF_PLANES_RGBA` because mask modifier adds transparent areas to image.
2021-12-03ImBuf: Made Wrapping and Cropping optional in IMB_transform.Jeroen Bakker
`IMB_transform` is used in VSE. It had a required crop parameter for cropping the source buffer. This is not always needed. In the image engine we want to use the use the `IMB_transform` with wrap repeat. Both options are mutual exclusive and due to performance reasons the wrap repeat is only available when performing a nearest interpolation.
2021-12-01Cleanup: Remove seq->tmp_flag DNA memberRichard Antalik
Commit f0d20198b290 used this field to flag rendered strips which were queried by `SEQ_query_rendered_strips()`. Then operators iterate all strips and checks state of `seq->tmp_flag`. Use collection returned by `SEQ_query_rendered_strips` directly. There should be no functional changes. This commit adds functions `all_strips_from_context` and `selected_strips_from_context` that provide collection of strips based on context. Most operators can use this collection directly. There is already `seq->tmp` DNA field, but is should not be used unless absolutely necessary. Better option is to use human readable flag. Best is to not use DNA fields for temporary storage in runtime.
2021-11-30Fix T93442: Crash when proxy building is cancelledRichard Antalik
If strip is removed while proxy is built, this causes crash when building is finished. This happens because proxy anims are freed in `SEQ_proxy_rebuild_finish()`. Iterate over available strips and check if original strip still exists by comparing `SessionUUID`. Reviewed By: sergey Differential Revision: https://developer.blender.org/D13408
2021-11-30Cleanup: capitalize NOTE tagCampbell Barton
2021-11-29Fix T93417: Strip outline not aligned with imageRichard Antalik
When using non-uniform aspect ratio, strip outline is not aligned correctly. Apply pixel aspect ratio to image quad and origin.
2021-11-18VSE: Add meta.separate() Python API functionFélix
This function can be used to "dissolve" meta strip anywhere in strip hierarchy. This has same effect as `meta_separate` operator. Reviewed By: ISS Differential Revision: https://developer.blender.org/T91005
2021-11-18Merge branch 'blender-v3.0-release'Richard Antalik
2021-11-18Fix T93166: Division by zero when drawing thumbnailsRichard Antalik
Caused by incorrect step calculation fo too short strips. For these, step should be equal to strip length not 0.