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-08Fix VSE: Effect strip flickers when moving left handleRichard Antalik
The issue was caused by refactoring, see 7afcfe111aacc8bc. Function `SEQ_transform_fix_single_image_seq_offsets` modified offsets after handle was moved, but this was not done correctly. Remove function mentioned above and move strip start when moving left handle of strips that have only single frame of content by design (image, text, color, ...).
2022-10-07Cleanup: redundant parenthesisCampbell Barton
2022-09-07Cleanup: Tweak naming for recently added mesh accessorsHans Goudey
Use `verts` instead of `vertices` and `polys` instead of `polygons` in the API added in 05952aa94d33eeb50. This aligns better with existing naming where the shorter names are much more common.
2022-09-05Mesh: Remove redundant custom data pointersHans Goudey
For copy-on-write, we want to share attribute arrays between meshes where possible. Mutable pointers like `Mesh.mvert` make that difficult by making ownership vague. They also make code more complex by adding redundancy. The simplest solution is just removing them and retrieving layers from `CustomData` as needed. Similar changes have already been applied to curves and point clouds (e9f82d3dc7ee, 410a6efb747f). Removing use of the pointers generally makes code more obvious and more reusable. Mesh data is now accessed with a C++ API (`Mesh::edges()` or `Mesh::edges_for_write()`), and a C API (`BKE_mesh_edges(mesh)`). The CoW changes this commit makes possible are described in T95845 and T95842, and started in D14139 and D14140. The change also simplifies the ongoing mesh struct-of-array refactors from T95965. **RNA/Python Access Performance** Theoretically, accessing mesh elements with the RNA API may become slower, since the layer needs to be found on every random access. However, overhead is already high enough that this doesn't make a noticible differenc, and performance is actually improved in some cases. Random access can be up to 10% faster, but other situations might be a bit slower. Generally using `foreach_get/set` are the best way to improve performance. See the differential revision for more discussion about Python performance. Cycles has been updated to use raw pointers and the internal Blender mesh types, mostly because there is no sense in having this overhead when it's already compiled with Blender. In my tests this roughly halves the Cycles mesh creation time (0.19s to 0.10s for a 1 million face grid). Differential Revision: https://developer.blender.org/D15488
2022-08-12Cleanup: replace magic number with flagCampbell Barton
2022-08-04Cleanup: spelling, code-blocksCampbell Barton
2022-07-20IDManagement: Speedup ID unique name assignment by tracking used ↵Aras Pranckevicius
names/basenames/suffixes An implementation of T73412, roughly as outlined there: Track the names that are in use, as well as base names (before numeric suffix) plus a bit map for each base name, indicating which numeric suffixes are already used. This is done per-Main/Library, per-object-type. Timings (Windows, VS2022 Release build, AMD Ryzen 5950X): - Scene with 10k cubes, Shift+D to duplicate them all: 8.7s -> 1.9s. Name map memory usage for resulting 20k objects: 4.3MB. - Importing a 2.5GB .obj file of exported Blender 3.0 splash scene (24k objects), using the new C++ importer: 34.2s-> 22.0s. Name map memory usage for resulting scene: 8.6MB. - Importing Disney Moana USD scene (almost half a million objects): 56min -> 10min. Name map usage: ~100MB. Blender crashes later on when trying to render it, in the same place in both cases, but that's for another day. Reviewed By: Bastien Montagne Differential Revision: https://developer.blender.org/D14162
2022-07-01Fix sequencer transform test failing.Richard Antalik
Issue was caused by using function `SEQ_render_give_stripelem` to obtain first `StripElem`, but this function now takes retiming into account. Since first element was meant to be obtained, point to it directly by using `seq->strip->stripdata`.
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-07Cleanup: spelling in comments, additional white spaceCampbell Barton
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-27GPU: Remove cached full/scaled image texture.Jeroen Bakker
full scaled image isn't used anymore. It was added to use a different scale when displaying an image in the image editor. This was replaced by the image engine redesign. This change will reduce complexity of {T98375}.
2022-05-18Cleanup: Move strip handle manipulation to time sectionRichard Antalik
2022-03-19Make Format ChangesHarley Acheson
Only formatting changes found by running "make format", no functional changes Committed without review, but with verbal approval by Hans Goudey
2022-03-16Geometry Nodes: Remove legacy node codeHans Goudey
This commit removes the implementations of legacy nodes, their type definitions, and related code that becomes unused. Now that we have two releases that included the legacy nodes, there is not much reason to include them still. Removing the code means refactoring will be easier, and old code doesn't have to be tested and maintained. After this commit, the legacy nodes will be undefined in the UI, so 3.0 or 3.1 should be used to convert files to the fields system. The net change is 12184 lines removed! The tooltip for legacy nodes mentioned that we would remove them before 4.0, which was purposefully a bit vague to allow us this flexibility. In a poll in a devtalk post showed that the majority of people were okay with removing the nodes. https://devtalk.blender.org/t/geometry-nodes-backward-compatibility-poll/20199 Differential Revision: https://developer.blender.org/D14353
2022-03-11Cleanup: use enum for local versioning enumCampbell 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-07Curves: Rename "Hair" types, variables, and functions to "Curves"Hans Goudey
Based on discussions from T95355 and T94193, the plan is to use the name "Curves" to describe the data-block container for multiple curves. Eventually this will replace the existing "Curve" data-block. However, it will be a while before the curve data-block can be replaced so in order to distinguish the two curve types in the UI, "Hair Curves" will be used, but eventually changed back to "Curves". This patch renames "hair-related" files, functions, types, and variable names to this convention. A deep rename is preferred to keep code consistent and to avoid any "hair" terminology from leaking, since the new data-block is meant for all curve types, not just hair use cases. The downside of this naming is that the difference between "Curve" and "Curves" has become important. That was considered during design discussons and deemed acceptable, especially given the non-permanent nature of the somewhat common conflict. Some points of interest: - All DNA compatibility is lost, just like rBf59767ff9729. - I renamed `ID_HA` to `ID_CV` so there is no complete mismatch. - `hair_curves` is used where necessary to distinguish from the existing "curves" plural. - I didn't rename any of the cycles/rendering code function names, since that is also used by the old hair particle system. Differential Revision: https://developer.blender.org/D14007
2022-02-03Curves: Changes to the new curves data-blockHans Goudey
This patch refactors the "Hair" data-block, which will soon be renamed to "Curves". The larger change is switching from an array of `HairCurve` to find indices in the points array to simply storing an array of offsets. Using a single integer instead of two halves the amount of memory for that particular array. Besides that, there are some other changes in this patch: - Split the data-structure to a separate `CurveGeometry` DNA struct so it is usable for grease pencil too. - Update naming to be more aligned with newer code and the style guide. - Add direct access to some arrays in RNA -- Radius is now retrieved as a regular attribute in Cycles. -- `HairPoint` has been renamed to `CurvePoint` -- `HairCurve` has been renamed to `CurveSlice` - Add comments to the struct in DNA. The next steps are renaming `Hair` -> `Curves`, and adding support for other curve types: Bezier, Poly, and NURBS. Ref T95355 Differential Revision: https://developer.blender.org/D13987
2021-11-18Fix T92442: undo removal of Eevee cryptomatte accurate mode optionBrecht Van Lommel
The Cycles accurate mode was removed, but the Eevee option for this has a different meaning and should not have been removed. The Eevee accurate makes cryptomatte accumulate for every sample, which Cycles has always done regardless of any option.
2021-11-01Cleanup: extract versioning code for remapping node socket animationSybren A. Stüvel
When node input sockets are animated, they target the socket by index. As a result, animation data needs to be updated whenever new sockets are added (except when they're added at the end of the list). The code for this is now extracted into its own versioning function, so that it can be used for other versioning steps as well. No functional changes.
2021-10-26Geometry Nodes: Handle multiple grids in the volume to mesh nodeHans Goudey
In future use cases, a volume can contain many grids that represent the density information. In this case, it's better if the volume to mesh node creates a mesh based on all of the grids in the volume. This is also a benefit to share-ability, since one doesn't have to specify the grid name in the node. Instead, in the future we can have a way to split particular grids into separate volumes, if only one grid should be considered. The code changes are relatively simple: - Move the old volume to mesh node to the legacy folder. - Run the volume to mesh node on all instance geometry, like elsewhere. - Make the blenkernel's volume to mesh API a bit more specific. Differential Revision: https://developer.blender.org/D12997
2021-10-14Geometry Nodes: Rename Nodes ID Names + Menu OrgJohnny Matthews
Re-alphabetize the main add menu. Rename Node ID Names: FloatCompare => CompareFloats AttributeCapture => CaptureAttribute Boolean => MeshBoolean CurveFill => FillCurve CurveFillet => FilletCurve CurveReverse => ReverseCurve CurveSample => SampleCurve CurveResmaple => ResampleCurve CurveSubdivide => SubdivideCurve CurveTrim => TrimCurve MaterialReplace => ReplaceMaterial MeshSubdivide => SubdivideMesh EdgeSplit => SplitEdges Differential Revision: https://developer.blender.org/D12865
2021-09-24Geometry Nodes: Random Value NodeJohnny Matthews
This node replaces the deprecated Attribute Randomize node, populating a vector, float, integer or boolean field with random values. Vector, float, and integer have min/max settings, which are also field aware. The boolean type has a probability value for controlling what portion of the output should be true. All four types have a field seed input which is implicitly driven by the index, otherwise, all values would be the same "random" value. The Random Float node is now deprecated like other nodes, since it is redundant with this node. Differential Revision: https://developer.blender.org/D12603
2021-09-21Cycles: merge of cycles-x branch, a major update to the rendererBrecht Van Lommel
This includes much improved GPU rendering performance, viewport interactivity, new shadow catcher, revamped sampling settings, subsurface scattering anisotropy, new GPU volume sampling, improved PMJ sampling pattern, and more. Some features have also been removed or changed, breaking backwards compatibility. Including the removal of the OpenCL backend, for which alternatives are under development. Release notes and code docs: https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles https://wiki.blender.org/wiki/Source/Render/Cycles Credits: * Sergey Sharybin * Brecht Van Lommel * Patrick Mours (OptiX backend) * Christophe Hery (subsurface scattering anisotropy) * William Leeson (PMJ sampling pattern) * Alaska (various fixes and tweaks) * Thomas Dinges (various fixes) For the full commit history, see the cycles-x branch. This squashes together all the changes since intermediate changes would often fail building or tests. Ref T87839, T87837, T87836 Fixes T90734, T89353, T80267, T80267, T77185, T69800
2021-09-20Cleanup: Refactor VSE overlay settingsRichard Antalik
Move overlay flags into SequencerPreviewOverlay and SequencerTimelineOverlay structs. Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D12569
2021-09-10Geometry Nodes: Add versioning to change legacy node ID namesHans Goudey
Recently we have decided to avoid fancier versioning for nodes with string inputs for attribute names when updating the attribute workflow for 3.0. In that case we would just duplicate any node that will have an updated version to work with fields. We want to be able to use the "proper" ID names for the new versions of the nodes though, so this patch adds "Legacy" to the IDs of all nodes that will be replaced in 3.0. This commit also removes the nodes from the add menu when the fields experimental preference is enabled, in order to make it clear what has been updated and what hasn't. Nodes in the "Maybe" categories in versioning_300.c can be renamed later if necessary. For now it's probably better to be conservative, and to keep the list complete. Differential Revision: https://developer.blender.org/D12420
2021-09-10Modifiers: export motion blur velocity through attributeBrecht Van Lommel
Previously fluid simulation and Alembic modifiers had a dedicated function to query the velocity for motion blur. Now use a more generic system where those modifiers output a velocity attribute. Advantages: * Geometry and particle nodes can output velocity through the same mechanism, or read the attribute coming from earlier modifiers. * The velocity can be preserved through modifiers like subdivision surface or auto smooth. * USD and Alembic previously only output velocity from fluid simulation, now they work with velocity from other sources too. * Simplifies the code for renderers like Cycles and exporters like Alembic and USD. This breaks compatibility: * External renderers and exporters accessing these velocities through the Python API now need to use the attribute instead. * Existing modifier node setups that create an attribute named "velocity" will render differently with motion blur. Differential Revision: https://developer.blender.org/D12305
2021-09-07Cleanup: Move function to versioning_common.ccHans Goudey
2021-09-02Cleanup: remove redundant alloc argument to SEQ_editing_getCampbell Barton
Callers that require lazy initialization can use SEQ_editing_ensure.
2021-08-04Cleanup: use C comments for descriptive textCampbell Barton
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-06-16Fix T88263: Incorrect image offset from old fileRichard Antalik
Versioning code for converting strip offset property doesn't work, when property was animated and disabled or when crop was used. When offset property is animated and offset is enabled, animation is converted to be used with new transform design. When offset is disabled, animation is left untouched. New transform design doesn't have option to disable offset, and therefore old unconverted animation is used instead of converted static value. Remove animation from propery if it was unused. Another issue was that both X and Y offset animation was being corrected by factor caluclated for X channel. Reviewed By: sergey Differential Revision: https://developer.blender.org/D11370
2021-06-15Cleanup: Add files for version independent versioning helpersJulian Eisel
Adds `source/blender/blendloader/intern/versioning_common.cc` and `versioning_common.h` for version independent versioning functions. I only placed `do_versions_add_region_if_not_found()` in there for now. `blo_do_version_old_trackto_to_constraints()` could also be added, but that's so old, I prefer keeping that in `versioning_legacy.c`.
2021-05-20Fix T87854: Add clamp option to Path AnimationSebastian Parborg
Previously, the "follow path constraint" and "follow parented curve" were clamped. This restriction was lifted in rBcf2baa585cc8 Add back an option to get the old behavior in the "Path animation" settings. Reviewed By: Sybren Differential Revision: http://developer.blender.org/D11263
2021-05-04Fix T87489: Text Data-Blocks get deleted on Recursive PurgeSebastian Parborg
Text data block were not considered special in the recursive purge function. So they would get deleted if they had no actual users. To fix this we instead make text data block use "fake user" so that addon authors can specify script files that should be removed if nothing is using it anymore. Per default, new text object have "fake user" set. So functionality wise, the user has to explicitly specify that they want the text object to be purge-able. Reviewed By: Bastien Differential Revision: http://developer.blender.org/D10983
2021-04-22Fix T85051: Add bisect distance as a parameter to the mirror modifierFalk David
The `bisect_distance` in the mirror modifier was hard-coded to `0.001`. This would result in some unexpected behavior like vertices close to the mirror plane being deleted or merged. The fix now adds a parameter to the mirror modifier to expose the bisect distance to the user. The default is set to the previous hard-coded value to not "change" previous files. Ref D10201
2021-04-16Fix T87010: VSE: adding strips crashes in certain filesPhilipp Oeser
Caused by {rB571362642201} where versioning code for new sequencer tool settings was only done for scenes already having sequencer scene->ed. If scene->ed was not present, sequencer tool settings were never initalized for this scene [if the VSE was then used later], leading to crashes in some places. Now just use the versioning code to initalize sequencer tool settings for all scenes not having them yet. Maniphest Tasks: T87010 Differential Revision: https://developer.blender.org/D10996
2021-04-15Bump subversion before starting the next release cycleDalai Felinto
2021-04-15Spreadsheet: breadcrumbs and node pinningJacques Lucke
This introduces a context path to the spreadsheet editor, which contains information about what data is shown in the spreadsheet. The context path (breadcrumbs) can reference a specific node in a node group hierarchy. During object evaluation, the geometry nodes modifier checks what data is currently requested by visible spreadsheets and stores the corresponding geometry sets separately for later access. The context path can be updated by the user explicitely, by clicking on the new icon in the header of nodes. Under some circumstances, the context path is updated automatically based on Blender's context. This patch also consolidates the "Node" and "Final" object evaluation mode to just "Evaluated". Based on the current context path, either the final geometry set of an object will be displayed, or the data at a specific node. The new preview icon in geometry nodes now behaves more like a toggle. It can be clicked again to clear the context path in an open spreadsheet editor. Previously, only an object could be pinned in the spreadsheet editor. Now it is possible to pin the entire context path. That allows two different spreadsheets to display geometry data from two different nodes. The breadcrumbs in the spreadsheet header can be collapsed by clicking on the arrow icons. It's not ideal but works well for now. This might be changed again, if we get a data set region on the left. Differential Revision: https://developer.blender.org/D10931
2021-04-08Fix T87274: Curve 2D resets to 3D on reloadGermano Cavalcante
This code is incompatible with .blend files from subversion 16 and 17. The ideal would be to create a new subversion when landed rBf674976edd88. But for now, due to the delay, moving the code to the previous subversion can solve it.
2021-04-02Geometry Nodes: Separate grid primitive X and Y sizeHans Goudey
Since you can already specify a separate size for X and Y with the grid node, it makes sense to be able to specify the size separately for each axis also. This also avoids some awkward math with a Transform node afterwards when you want a specific size for each direction. Versioning (except for animation and drivers) is handled in this commit. Differential Revision: https://developer.blender.org/D10834
2021-04-01Curve: Remove 'CU_2D' flag used for nurbsGermano Cavalcante
This fixes T86440 As the CU_2D flag is set for nurbs, a Curve can have 2D nurbs mixed with 3D. But the UI does not allow this mixing. It updates all nurbs to 2D or 3D when set. So remove this specific flag for nurbs. This may break old files, since 2D curves with mixed 3D are now set as 3D. Differential Revision: https://developer.blender.org/D10738
2021-04-01Nodes: separate node name and display name in bNodeTreePathJacques Lucke
Previously, `node_name` was rarely actually a name of a node. It is set correctly as node name in `ED_node_tree_push`. However, later on it was overwritten by the name of an id data block in `node_draw_space`. Now, the node_name stays the name of the "parent" node. Whereas display_name is the name that will be displayed in the breadcrumbs. With this change, the `node_name` can be used to reconstruct the actual path from the root node tree to the currently visible tree. Differential Revision: https://developer.blender.org/D10874
2021-04-01Cycles: add a spread setting for area lightsMatteo Falduto
This simulates the effect of a honeycomb or grid placed in front of a softbox. In practice, it works by attenuating rays coming off-angle as a function of the provided spread angle parameter. Setting the parameter to 180 degrees poses no restrictions to the rays, making the light behave the same way as before this patch. The total light power is normalized based on the spread angle, so that the light strength remains the same. Differential Revision: https://developer.blender.org/D10594
2021-04-01Fix: incorrect versioning code for lights propertiesBrecht Van Lommel
Due to T64791 we must still use the old Lamp name rather than Light, work around that for now.
2021-03-31Geometry Nodes: Rename "Grid" to "Density"Hans Goudey
For other "Attribute Name" fields we usually give a more specific name that relates to what the attribute is actually used for, like "Mask" in the point separate node. This is a similar situation, and would also be consistent with the naming planned in D10506.
2021-03-30Armature: Add Display Axis OffsetScott Wilson
Display the bone axes at the head (root) of the bone by default, instead of the tail (tip), and add a slider so that it's possible to adjust this position. Versioning code is in place to ensure existing files behave the same (axes shown at tail), whereas new Armatures will be using the new default (axes shown at head). Reviewed By: #animation_rigging, #user_interface, Severin, Sybren Differential Revision: https://developer.blender.org/D7685
2021-03-26Geometry Nodes: Rename "Plane" primitive to "Grid"Hans Goudey
Although "Grid" may not be techincally correct since a grid could be 3D, it was decided to rename the "Plane" primtive to "Grid". The primitive node allows subdivisions, so the name is more consistent with the operator in the 3D view. Ref T86819 This commit includes a file subversion bump for the versioning.