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
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-10-09Fix T81468: Missing NULL check for F-curve rna_path in versionning code.Bastien Montagne
2020-10-08DNA: cleanup endian switching when loading fileJacques Lucke
This patch "modernizes" `DNA_struct_switch_endian` similar to how I updated `DNA_struct_reconstruct` recently. Furthermore, some special case handling have been moved to another place. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D9089
2020-10-07UV/Image Editor: Overlay PopoverJeroen Bakker
The overlay options in the image/uv editor is hidden in side panels and menus. Sometimes this panel is even hidden, while still useful. The goal of this task is to introduce an overlay pop-over just like the overlay-popover of the 3d viewport. Popover has * UV Stretching (only available in the UV mode, when active object mode is a mesh and in OB_EDIT mode) * Display As (only available in the UV mode, when active object mode is a mesh and in OB_EDIT mode) * Show Modified (only available in the UV mode, when active object mode is a mesh and in OB_EDIT mode) * Show UV Edges (including opacity slider; available UV, View, Paint, when active object mode is a mesh and in OB_EDIT mode) * Udim tiles when no image is available. Like the 3d viewport, there will be a editor toggle to enable/disable the overlays For compatibility reasons the RNA properties are added to both the `SpaceImage.uv_editor` amd `SpaceImage.overlay`. On DNA level they are still stored in the SpaceImage. only new properties are added to the SpaceImageOverlay struct. During the next major release we could remove these options from `SpaceImage.uv_editor`. This should be noted in the Python section of release notes. Reviewed By: Julian Eisel, Pablo Vazquez Differential Revision: https://developer.blender.org/D8890
2020-10-07Fix T76595: Indicate the Active Keyframe in Graph EditorHans Goudey
In the graph editor there is a panel that says "Active Keyframe" for numerically editing a keyframe's values, but in the code there is no concept of the "active keyframe." Since this is a useful concept to have for some other features anyway, this commit adds an active keyframe index value to FCurves. It also displays it with a theme color for the active vertex (which didn't exist before) if the FCurve is active. The active keyframe in the graph editor is treated similarly to the active vertex in the 3D view. It is the keyframe most recently selected with a single click, and it is always selected. For now, the only real functional change is that the active keyframe appears in white and it should be more predictable which keyframe is being edited in the sidebar panel. Differential Revision: https://developer.blender.org/D7737
2020-10-03Cleanup: rename main preferences versioning functionCampbell Barton
BLO_version_defaults_userpref_blend -> blo_do_versions_userdef The name was misleading as it was declared along with BLO_update_defaults_startup_blend making it seem these functions were related. In fact preference defaults don't need to be updated as is done for startup.blend since an in-memory blend file isn't used. Rename the function to match other versioning functions called from readfile.c. Also add/update comments on these differences.
2020-10-03Cleanup: run UserDef versioning from readfile.cCampbell Barton
Now versioning UserDef is run in readfile.c, as is done for other Blender data. Previously versioning was mixed with other run-time initialization, so it needed to be called later by the window manager.
2020-10-03Cleanup: centralize versioningCampbell Barton
readfile.c's versioning function was only used for 2 variables. Move versioning into versioning_userdef.c so everything is done in one function. Note: DNA_struct_elem_find checks have been replaced with checks for the next released version. This is harmless, as only old preferences saved between releases can have their values overwritten. Note: userdef versioning should be called from `do_versions_userdef`, this will be done separately.
2020-10-02Experimental Features: More robust way of sanitizing optionsDalai Felinto
2020-10-02Experimental Features: Sanitize missing (latest) optionsDalai Felinto
There was an oversight when adding new experimental user preferences. I can try to overengineer this later to make it more fail-proof. But for now it should be clear what to update when adding a new variable.
2020-10-02Cleanup: remove redundant theme versioningCampbell Barton
All themes older than 2.8x are initialized from the defaults, there is no need to version them.
2020-10-02Cleanup: spellingCampbell Barton
Also correct own correction from 58b8724a4892 thanks @mont29 for raising this.
2020-10-02Fix userpref.blend using version from startup.blendCampbell Barton
Version patching userpref.blend wasn't using the correct version, causing settings not to be properly updated. This seems the likely cause of T70196 and similar bugs.
2020-10-02Cleanup: readfile for workspaces: NULLify non-owned data pointers.Bastien Montagne
`workspace_hook` of wmWindows store pointers for runtime data and to data belonging to other IDs (workspace's layouts). That kind of pointers should always be cleaned up on read, it allows for cleaner segfault crash in case of mistakes in code updating/re-setting them, and avoids potential security issue of accessing random memory address. No behavioral change expected here.
2020-10-02Fix (unreported) design flow in how workspace's relation data are read from ↵Bastien Montagne
.blend file. Relying on pointer addresses across different data-blocks is extremely not recommended (and should be strictly forbidden ideally), in particular in direct_link step of blend file reading. - It assumes a specific order in reading of data, which is not ensured in future, and is in any case a very bad, non explicit, hidden dependency on behaviors of other parts of the codebase. - It is intrinsically unsafe (as in, it makes writing bad code and making mistakes easy, see e.g. fix in rB84b3f6e049b35f9). - It makes advanced handling of data-blocks harder (thinking about partial undo code e.g., even though in this specific case it was not an issue as we do not re-read neither windowmanagers nor worspaces during undo). New code uses windows' `winid` instead as 'anchor' to find again proper workspace hook in windows at read time. As a bonus, it will also cleanup the list of relations from any invalid ones (afaict it was never done previously). Differential Revision: https://developer.blender.org/D9073
2020-10-01Volumes: support lower resolution in viewportJacques Lucke
The adds a new option to simplify volumes in the viewport. The setting can be found in the Simplify panel in the render properties. Volume objects use OpenVDB grids, which are sparse. For rendering, we have to convert sparse grids to dense grids (for now). Those require significantly more memory. Therefore, it's often a good idea to reduce the resolution of volumes in the viewport. Reviewers: brecht Differential Revision: https://developer.blender.org/D9040 Ref T73201.
2020-10-01Fix T81340: UBSan: addition of unsigned offset causes overflowAnkit Meel
The warning: runtime error: addition of unsigned offset to 0x61a0000b22d8 overflowed to 0x61a0000b22b8 Fix T81340 (partially) Reviewed By: campbellbarton Maniphest Tasks: T81340 Differential Revision: https://developer.blender.org/D9063
2020-10-01Cleanup: dna_genfile API for accessing struct member offsetsCampbell Barton
- Rename `find_elem` to `elem_offset` (matching `elem_exists`). - Remove unused `SDNA_StructMember` return argument. - Return an offset instead of a pointer which was being converted back into an offset by one caller, in this case there was no way to tell the difference between and element that doesn't exist and a struct member at the start of the array. Resolves UBSan warning raised in T81340.
2020-09-30Cleanup: Remove unused View2D variables and functionHans Goudey
It looks like this code was left over from tabbed panels in the properties editor. It wasn't used anywhere except for in one line of the horizontally-aligned panel code that was recently removed. Differential Revision: https://developer.blender.org/D8651
2020-09-30Cleanup: convert gforge task ID's to phabricator formatValentin
Cleanup old tracker task format to the new. e.g: [#34039] to T34039 Ref D8718
2020-09-29Fix (unrepported) utterly broken logic in readfile for Workspaces.Bastien Montagne
Remove the attempt to update the active layout pointers of each window from whithin `direct_link_workspace`. This piece of code was a nonsense for at least to critical reasons: * Do not, never, ever, access data from another datablock within the direct_link_... functions. Just don't. Don't try to be smart. * Since it was trying (and failing) to update the active layout of every window for every workspace, it was effectively setting those `act_layout` pointers to NULL (remapping can only ever happen once, trying to remap and already remapped new pointer is bound to fail in any case). Luckily (and funnily), this piece of code was actually harmless, since setting the active layout would be overridden/redone later, in `lib_link_windowmanager`, when updating their `workspace_hook` in `lib_link_workspace_instance_hook`. Note that the similar horror with `WorkSpaceDataRelation->parent` (which points at a window) is kept for now, because that one is needed. Hope to refactor it soon though.
2020-09-29Fix T71981: Alembic vertex interpolation can jumble meshSybren A. Stüvel
Add an option to disable Alembic vertex interpolation. Bump subversion from 5 to 6. Alembic stores mesh samples at specific time keys; when a frame in Blender maps to a timecode between two samples, Blender will interpolate the mesh vertex positions. This interpolation only happens when the mesh has a constant topology, but sometimes this was not detected properly when the vertices change order, but the number of mesh elements remains the same. This would result in a mesh with jumbled up vertices (T71981). With this patch, users have the ability to disable vertex interpolation. An alternative would be to have better detection of topology changes, but that that'll cause a considerable slowdown. Maniphest Tasks: T71981 Differential Revision: https://developer.blender.org/D9041
2020-09-29DNA: optimize struct reconstruction by doing some preprocessingJacques Lucke
When loading large files that are more than a couple weeks old (such that DNA has changed in that time), a significant amount of time is spent in `DNA_struct_reconstruct`. This function takes a struct in the old layout and creates a struct in the new layout from it. This was slow because it was computing the diff between the struct layouts every time a struct is updated. Now the steps for the struct reconstruction is computed only once per struct. This information is then used to actually reconstruct all structs that changed. I measured about 10-20% speedup when loading Spring files. E.g. `10.6s -> 8.7s` for `06_055_A.anim.blend` in BKE_blendfile_read`. This percentage varies a lot based on the number of blocks that have to be reconstructed and how much DNA has changed since they have been written. In none of my tests was the new code slower than the old code. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D8959
2020-09-29DNA: use better type for SDNA->structsJacques Lucke
The data layout remains exactly the same.. This change just gives all the elements in `SDNA->structs` names, making it more comfortable to work with the data. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D8926
2020-09-26Fix T81168: 2.8x Crash when loading 2.79 file.Bastien Montagne
Object in the 2.7x file is on no layer at all, while this is not really expected nor considered valid, better to cope with the case gracefully than crash. To be backported to 2.90 and 2.83.
2020-09-21Implement ID properties support for TimeMarkerSergey Sharybin
Allows scripters to store additional information in the marker itself instead of using work-around approach based on marker names and such. Differential Revision: https://developer.blender.org/D8944
2020-09-21Cleanup: balance braces, spellingCampbell Barton
Keep braces balanced where possible, even with ifdef's as it avoids confusions with editors calculating correct indentation level & finding matching brackets.
2020-09-20Fix broken Windows buiilds after own recent commit in read/write code.Bastien Montagne
Usual issue of win32 not following POSIX standards.
2020-09-20Sanitize type 'size' parameters in our read/write file codeBastien Montagne
This patch tries to sanitize the types of our size parameters across our read and write code, which is currently fairly inconsistent (using `int`, `uint`, `size_t`...), by using `size_t` everywhere. Since in Blender file themselves we can only store chunk of size `MAX_INT`, added some asserts to ensure that as well. See {T79561} for details. Differential Revision: https://developer.blender.org/D8672
2020-09-19Cleanup: spellingCampbell Barton
2020-09-18Unify all XYZ symmetry options using Mesh SymmetryPablo Dobarro
This adds XYZ symmetry as a property of meshes and updates all modes to use the mesh symmetry by default to have a consistent tool behavior between all modes and when switching objects. Reviewed By: brecht, mano-wii, campbellbarton Maniphest Tasks: T79785 Differential Revision: https://developer.blender.org/D8587
2020-09-18Overlay: Fade Inactive GeometryPablo Dobarro
This implements a new overlay that blends the bakground color over the objects that are not in the same mode as the active object, making them fade with the background. This is especially needed for sculpt mode as there is no other overlay or indication in the viewport to display which object is active. This is intended to be used with D7510 in order to have a faster workflow when sculpting models with multiple objects. Reviewed By: fclem Differential Revision: https://developer.blender.org/D8679
2020-09-18Cleanup: change enum usage so types are explicitly listedCampbell Barton
Structure switch statements so new missing items cause warnings.
2020-09-17Add versioning for 2.90 files that may have invalid meshGermano Cavalcante
rBf2d26409e83b fixed a serious problem with invalid mesh after an operation with the extrude manifold. Since BKE_mesh_validate_arrays is a slow operation, the chosen interval between versions is relatively small and also only the mentioned invalid mesh problem is tested. Differential Revision: https://developer.blender.org/D8898
2020-09-17Fix: re-do versioning code for FCurve extremes and Collection colorsSybren A. Stüvel
Bump Blender subversion from 4 to 5, and re-execute some versioning code. Because of a mistake in the versioning code (corrected in rB1a4fc6dcd67b), some of the versioning code didn't run in certain cases. This subversion bump ensures that this code is still run.
2020-09-17Cleanup: use static assert to disable access to preferencesCampbell Barton
Prefer this over an unknown identifier as it gives a useful error.
2020-09-16Curves: Add custom profile bevel supportHans Goudey
This adds support for the same custom bevel profile widget used in the bevel tool and modifier to the geometry generation for curves. This is expecially useful for text and 2D curves with extrusion, as it works much better than a weld & bevel modifier combination. It can also be useful for adding quick detail to pipe-like objects. The curve holds the CurveProfile struct and a new "Bevel Mode" property decides which type of bevel to build, round, object, or custom profile. Although curves can already use another curve to make the bevel geometry, this is a quicker way, and it also defines the profile of just one corner of the bevel, so it isn't redundant. It's also nice to have the same custom profile functionality wherever there is bevel. Differential Revision: https://developer.blender.org/D8402
2020-09-16Fix tests after adding collection color taggingNathan Craddock
Fix a segfault caused by assuming all scenes have a master collection when applying versioning to old files.
2020-09-16Fix versioning code after FCurves versioning not executedJulian Eisel
There must not be any return directly in our versioning patches. It would return from the entire versioning function. Mistake in da95d1d851b4. As a result, when opening old files with animation data, the versioning for the new collection color tagging wouldn't run, and all collections would get the first color assigned.
2020-09-16Fix: add versioning to fix incorrectly written customdataJacques Lucke
Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D8903
2020-09-16Bump file subversion after recent theme-related changesHans Goudey
2020-09-16UI: Add grid-related theme optionsRed Mser
This commit makes grid theming more consistent and capable by adding some new theme colors related to grid rendering. - Add grid theme color for node editor. `UI_view2d_multi_grid_draw` is called with TH_GRID instead of a shaded `TH_BACK`. Also color-blend `TH_NODE_GROUP`. - Make the movie clip editor's clip preview grid respect grid theme color (`ED_region_grid_draw` uses color-blended `TH_GRID`). - Add versioning code to allow fixing existing themes (the resulting themes should visually look the same as before) These changes did cause some inconsistencies in the movie clip editor, even after adjusting the themes accordingly: 1. The alpha slider of the grid color affects the background and not the grid lines themselves. 2. The grids used by graph and dopesheet mode could already be themed in the past. Now that the clip preview's grid can also be themed, two different modes share the same theme color. Differential Revision: https://developer.blender.org/D8699
2020-09-15Collections: Add color taggingNathan Craddock
This adds color tagging to collections. There are 8 color options which are themable in the user preferences, with an additional option for no color tag by default. This adds a new filled collection icon and 8 colored variants of the icon that can be themed in the user preferences. In this commit the only interface to setting the color tags is through Python, and there is nowhere in the interface where the collections are shown colored. Setting and viewing the color tags from the outliner will follow. Manifest Task: https://developer.blender.org/T77777 Differential Revision: https://developer.blender.org/D8622
2020-09-15UI: Single tab property searchHans Goudey
This adds a search bar to the properties editor. The full search for every tab isn't included in this patch, but the interaction with panels, searching behavior, UI, region level, and DNA changes are included here. The block-level search works by iterating over the block's button groups and checking whether they match the search. If they do, they are tagged with a flag, and the block's panel is tagged too. For every update (text edit), the panel's expansion is set to whether the panel has a result or not. The search also checks for matching strings inside enums and in panel labels. One complication to this that isn't immediately apparent is that closed panel's subpanels have to be searched too. This adds some complexity to the area-level panel layout code. Possible Future Improvements: - Use the new fuzzy search in BLI - Reset panels to their expansion before the search started if the user escape out of the text box. - Open all child panels of a panel with expansion. Differential Revision: https://developer.blender.org/D8856
2020-09-15Property Search: Add "search match" theme colorHans Goudey
We will use a highlight on panel headers to convey that they have a search match, so this commit initializes the theme color for the properties editor. Differential Revision: https://developer.blender.org/D8854
2020-09-15Revert "Image Editor: Make Rendering of Pure Emissive Colors Optional"Jeroen Bakker
This reverts commit f492c8d488b7eb2166ca894e10a8128a1678a885.
2020-09-15Fix T75881: Animation, limitation of Bézier HandlesTonyG
Relax limits of FCurve Bézier handles during evaluation. FCurve handles can be scaled down to avoid the curve looping backward in time. This scaling was done correctly but over-carefully, posing unnecessary limitations on the possible slope of FCurves. This commit changes the scaling approach such that the FCurve can become near-vertical. Bump Blender's subversion from 291.0.1 to 291.0.2 to ensure that older animation files are correctly updated. Reviewed By: sybren Differential Revision: https://developer.blender.org/D8752
2020-09-15Cleanup: move versioning code into "until next bump" blockSybren A. Stüvel
A bit of versioning code was not part of the "Versioning code until next subversion bump goes here" block, making the diff of an upcoming bump harder to read. This commit just moves the code to the appropriate spot. No functional changes.
2020-09-15Image Editor: Make Rendering of Pure Emissive Colors OptionalJeroen Bakker
There are some areas that don't handle pure emissive colors well. For example erasing alpha using 2d or 3d painting. Or blurring an image in the compositor. This patch makes the rendering of pure emissive colors optional. In the side panel of the Image editor it can still be enabled when needed. There currently isn't a better place to store it as it is related on how the image (or a layer of the image) is created. A future design needs to make sure that the full workflow is supported.
2020-09-15Cleanup: spellingCampbell Barton