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-07Refactor `BKE_id_copy` to return the new ID pointer.Bastien Montagne
No reasons to keep the new ID pointer as parameter here. Part of T71219.
2020-10-07Refactor `BKE_id_copy_ex` to return the new ID pointer.Bastien Montagne
Note that possibility to pass the new ID pointer as parameter was kept, as this is needed for some rather specific cases (like in depsgraph/COW, when copying into already allocated memory). Part of T71219.
2020-10-07Python API: add volume.grids.save(filepath) to save grids and metadata to diskBrecht Van Lommel
Particularly useful now that we can dynamically generate volume using modifiers. Not exposed in the user interface currently, but it can be used by add-ons that need to export an entire scene including volumes.
2020-10-07CleanUp: Introduce `eMeshBatchDirtyMode` enumJeroen Bakker
It used to be an `int mode`.
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-07Cleanup: improve integer typesJacques Lucke
Reviewers: mont29, brecht Differential Revision: https://developer.blender.org/D9135
2020-10-07IDTypeInfo: add flag to indicate that ID has no animation dataJacques Lucke
This is part of T75724. Reviewers: mont29 Differential Revision: https://developer.blender.org/D9134
2020-10-07Cleanup: add commentJacques Lucke
2020-10-07Refactor: Remove `BKE_XXX_localize()`, in favor of using regular ID copying ↵Bastien Montagne
code. Besides the NodeTree case (which remains unchanged), the localize code is only used in one place (to generate previews of shading data-blocks). This commit introduces a new `LIB_ID_CREATE_LOCAL` option for ID creation/copying, which essentially implements the behavior of the removed `BKE_XXX_localize()` functions into regular mainstream ID copy code. When this option is set: - new ID is tagged with `LIB_TAG_LOCALIZED`; - Some ID copying callbacks have specific behaviors, mainly the root nodetree of shading IDs gets duplicated with specialized `ntreeLocalize()` function. Note that I would not consider getting rid of `ntreeLocalize` for now, this function is recursive, which should ideally never happen within ID management copying code (this introduces all kind of complications). No behavioral change expected from this commit.
2020-10-07Cleanup: IDManagement: Localize: tweak to flags.Bastien Montagne
Add a specific flag for nodetree deep-copy special localization code. And add a new `LIB_ID_CREATE_LOCALIZE` flag, similar to `LIB_ID_COPY_LOCALIZE`, for creation purposes. No behavioral changes expected here.
2020-10-07Silence CLOG error about usercount of deprecated IPO IDs.Bastien Montagne
2020-10-07Fix T81272: Crash on opening old files where nodetrees had no name.Bastien Montagne
This code gets called before do_version can fix that, so we have to work around it for now.
2020-10-05Fix T81392: subdivision surface poor shading without limit surfacePiotr Ostrowski
When the limit surface is disabled OpenSubdiv generates a set of linear patches which are only C0 continuous, not C1. This makes it impossible to evaluate derivatives at vertices which, in this mode, are by definition put at boundaries of patches. Normals are calculated from those derivatives. Solution is to disable normal calculation and let it be done downstream, as for other modifiers. This limitation is also the reason that non feature adaptive subdivision is badly suited for GPU evaluation. Differential Revision: https://developer.blender.org/D9103
2020-10-05GPencil: Fix unreported Layer SOLO mode brokenAntonio Vazquez
During the refactor, this feature was removed by error. When this option is enabled, only the frames with a keyframe are displayed in Draw mode. This is used when fill an animation to paint only in the frames with real drawing.
2020-10-05Insert keyframes while preserving shape of curveSybren A. Stüvel
Apply the De Casteljau algorithm to split the Bèzier curve at the X coordinate where the new key is inserted, and uses the result to update both the newly inserted and surrounding handles. For curves that use Auto keyframes this has been largely addressed by the new algorithm from D2884. This commit extends this to non-auto handles. This code is heavily based on D3172 by Alexander Gavrilov (@angavrilov). Manifest Task: https://developer.blender.org/T81353
2020-10-05Fix building without OPENVDBCampbell Barton
2020-10-05Volumes: more generic way to handle different openvdb typesJacques Lucke
Reviewers: brecht Differential Revision: https://developer.blender.org/D9093
2020-10-05Move sequencer sources from blenkernelRichard Antalik
This is first step of refactoring task T77580. Next step will be breaking up files into smaller ones. Reviewed By: sergey, brecht Differential Revision: https://developer.blender.org/D8492
2020-10-05Rename eSpaceSeq_Proxy_RenderSize membersRichard Antalik
Remove word proxy from eSpaceSeq_Proxy_RenderSize members if proxy is not used with that item. Otherwise this can be a bit confusing. Reviewed By: brecht Differential Revision: https://developer.blender.org/D8861
2020-10-05Cleanup: simplify tempdir_session_createCampbell Barton
Remove the need for a temporary allocated path.
2020-10-05Correct last commit (where_is_temp refactor)Campbell Barton
Changes didn't account the case when mkdtemp failed. Previously the copying the string wasn't needed in this case.
2020-10-04Cleanup: refactor where_is_tempCampbell Barton
Functionality was hard to follow as the meaning of fullname depended on basename being NULL or not. - where_is_temp is now only responsible for finding the temp directory. - Split out tempdir_session_create into it's own function that wraps mkdtemp. - Rename basename to tempdir, fullname to tempdir_session.
2020-10-04Cleanup: BKE_appdir store static values in a struct, clarify namesCampbell Barton
Avoid multiple static variables with odd names, instead keep them all in one struct, expand their names for clarity.
2020-10-04Fix error in last commit printing NULL stringsCampbell Barton
While this works with GCC, printing NULL strings is undefined behavior.
2020-10-04BKE_appdir: log details about path lookupsCampbell Barton
These were printf's, disabled by a define that could be uncommented. Use logging since this can be useful when investigating any issue with paths not being found at the expected location. Without this any problem finding app-templates, Python's installation, icons ... etc are quite difficult to troubleshoot especially on systems without access to system-call tracing. To use this run: blender --log "bke.appdir" --log-level 3
2020-10-04Fix color-management ignoring the data-path command line valueCampbell Barton
Initialize ImBuf (and color-management) after passing arguments that set environment variables such as `--env-system-datapath` This also fixes a bug where BKE_appdir logging failed since it was called before the `--log` argument was passed. Add asserts so this doesn't happen again.
2020-10-04Cleanup: clarify names in appdirCampbell Barton
- ver -> version. - env -> env_path.
2020-10-04Cleanup: BKE_appdir left paths set even when not foundCampbell Barton
Internally appdir functions would test if a path exists, returning false if it doesn't, leaving the string set instead of clearing it. This is error prone as invalid paths could be used accidentally. Since BKE_appdir_folder_id_user_notest & BKE_appdir_folder_id_version depend on this, add a 'check_is_dir' argument so the path can be used even when the directory can't be found.
2020-10-03Cleanup: use BLI_path_join in appdir.c to simplify logicCampbell Barton
Change `test_path` function so: - Joining paths calls a function instead of being performed inline. - Optional NULL paths must always be ordered last (easier to follow). Other minor changes: - Remove FIXME comment is it's handled properly by BLI_path_join. - The wrong size was being used copying into `targetpath`.
2020-10-03Cleanup: Remove/replace C standard library assert() and header usagesJulian Eisel
We have our own assert implementation, `BLI_assert()` that is prefered over the C standard library one. Its output is more consistent across compilers and makes termination on assert failure optional (through `WITH_ASSERT_ABORT`). In many places we'd include the C library header without ever accessing it.
2020-10-03Cleanup: use doxy sections for appdir.cCampbell Barton
Keep related functionality grouped.
2020-10-03Cleanup: comments for appdirCampbell Barton
Use doxy syntax & minor improvements.
2020-10-03Cleanup: move temp directory environment checks into a loopCampbell Barton
Minimizes ifdef'd code for WIN32.
2020-10-03Preferences: remove temp directory initialization for WIN32Campbell Barton
Revert 76b1a27f96ffe1ec8c5351f34bcc2b9733b4483e since there is no reason windows should behave differently to other platforms. This was added so Windows users wouldn't see "/tmp/" in the UI. Since then the default temporary directory is a blank string, leave blank on all systems as Python script authors may accidentally use this instead of `bpy.app.tempdir`.
2020-10-03Cleanup: remove unused temp directory initializationCampbell Barton
This last worked in v2.27 (2003) where all paths were initialized to "/" which was still checked to initialize the temp directory. This hasn't been the case since 932e9e831647604e0b129b55e5ab035 where it changed to "/tmp/", then an empty string (current default).
2020-10-03Cleanup: remove unused code in blend file loadingCampbell Barton
v2.4x could cancel loading files that warned of being a newer, unsupported version. Remove this logic since it's no longer in use.
2020-10-03readfile: always run setup_app_data after updating defaultsCampbell Barton
When blend files were loaded with app-templates, setup_app_data was running before defaults were updated. This is likely to cause problems with order of initialization so always update the startup file beforehand.
2020-10-02Fix non-thread safe code in view layer object hashBrecht Van Lommel
Found as part of D8324, multithreaded Cycles object sync, where it caused a crash on concurrent access to object holdout state.
2020-10-02Cleanup: Use enum for return values in context callbacksSybren A. Stüvel
Define enum `eContextResult` and use its values for returns, instead of just returning 1, 0, or -1 (and always having some comment that explains what -1 means). This also cleans up the mixup between returning `0` and `false`, and `1` and `true`. An inconsistency was discovered during this cleanup, and marked with `TODO(sybren)`. It's not fixed here, as it would consititute a functional change. The enum isn't used everywhere, as enums in C and C++ can have different storage sizes. To prevent issues, callback functions are still declared as returning`int`. To at least make things easier to understand for humans, I marked those with `int /*eContextResult*/`. This is a followup of D9090, and is intended to unify how context callbacks return values. This will make it easier to extend the approach in D9090 to those functions. No functional changes. Differential Revision: https://developer.blender.org/D9095
2020-10-02Fix T81345: part three, armature `free_data` was not handling editbones ↵Bastien Montagne
properly. Armature freeing would not correctly free its editbone IDProperties. Add a utils to free the whole list of edit bones, and properly handle their potential IDProperties.
2020-10-02Fix T81345, part two: crash in depsgraph when freeing COW armature.Bastien Montagne
Freeing of bones' IDproerties from Armature `free_data` callback would always attempt to do user refcounting, which should never be done from that code. This would generate crashes in depsgraph/COW context e.g.
2020-10-02Fix T81345: Part one: Missing handling of ID pointers from EditBone ↵Bastien Montagne
IDProperties. So far data management code would simply fully ignore potential ID pointers in custom properties of edit bones (which are a copy of those from regular `Bone`). This would lead to all kind of issues, among which refcounting inconsistencies, missing clearing of data uppon deletion, etc.
2020-10-02Cleanup: Move `EditBone` structure definition from `ED` to `BKE` area.Bastien Montagne
Access to this structure will be needed in BKE's armature code.
2020-10-02Fix (unreported) assert in texture code when loading some old 2.74 blend file.Bastien Montagne
Trying to open the 2.74 Fishy Cat file would generate endless asserts in customdata code. This commit refactors and cleans up the code of `psys_get_dupli_texture` to avoid useless calls and data access, and validate data before trying to further access it. No behavioral changes expected here (besides getting rid of the assert).
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-02Cleanup: compiler warningsCampbell Barton
2020-10-01Cleanup: Use DNA defaults for cloth modifierHans Goudey
Followup for rB8398050695 This requires moving a few enum definitions to DNA instead of BKE, and adding default definitions for the two structs the cloth modifier where the cloth modifier stores its settings. The defaults are also reordered to be consistent with the order of each item in the struct.
2020-10-01Cleanup: Clang tidy fixesHans Goudey
Fix a redundant return statement at the end of void function and an inconsistent declaration parameter names.
2020-10-01Sculpt: Cloth Simulation Dynamic area modePablo Dobarro
This simulation area mode moves the active area with the brush. When enabled, the cloth brush has no restrictions on stroke length, area or mesh vertex count. In order to work, this enables PBVH nodes dynamically for simulation as the stroke location moves and builds the constraints for new nodes during the stroke. When a node is not inside the simulated area, all the constraints that were created for it and vertex collisions are not computed. The simulation limits falloff areas and constraints tweaking control how the simulated and no simulated nodes blend. Reviewed By: sergey, zeddb Differential Revision: https://developer.blender.org/D8726
2020-10-01Cleanup: typo in commentPhilipp Oeser