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-08-04Cleanup: Move RNA path functions into own C++ fileJulian Eisel
NOTE: This is committed to the 3.3 branch as part of D15606, which we decided should go to this release still (by Bastien, Dalai and me). That is because these are important usability fixes/improvements to have for the LTS release. Adds `rna_path.cc` and `RNA_path.h`. `rna_access.c` is a quite big file, which makes it rather hard and inconvenient to navigate. RNA path functions form a nicely coherent unit that can stand well on it's own, so it makes sense to split them off to mitigate the problem. Moreover, I was looking into refactoring the quite convoluted/overloaded `rna_path_parse()`, and found that some C++ features may help greatly with that. So having that code compile in C++ would be helpful to attempt that. Differential Revision: https://developer.blender.org/D15540 Reviewed by: Brecht Van Lommel, Campbell Barton, Bastien Montagne
2022-02-21Merge remote-tracking branch 'origin/blender-v3.1-release'Sybren A. Stüvel
2022-02-21Fix T95596: Crash in versioning of node animationSybren A. Stüvel
The node animation versioning code passes `nullptr` to the `oldName` and `newName` parameters, but those weren't `NULL`-safe. I added an extra check for this. No functional changes, just a crash fix.
2022-02-11Fix compile warnings.Jeroen Bakker
We should change the API of ntree so we can check with a const. I added this as a todo for now and used a const cast.
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
2021-12-23Cleanup: remove BKE_animdata_driver_path_hackSybren A. Stüvel
The `BKE_animdata_driver_path_hack()` function has had almost no effect since rB51b796ff1528, and basically boils down to: ``` return base_path ? base_path : RNA_path_from_ID_to_property(ptr, prop); ``` Since `base_path` was `NULL` in the majority of cases, it's just been replaced by a direct call to `RNA_path_from_ID_to_property()`. The conditional now just appears in one remaining case. This relates to T91387. Reviewed By: mont29 Differential Revision: https://developer.blender.org/D13646
2021-12-07Cleanup: move public doc-strings into headers for 'blenkernel'Campbell Barton
- 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. - Minor improvements to doc-strings. Ref T92709
2021-10-29LibQuery: Add macro to help break looping when requested.Bastien Montagne
The new `BKE_LIB_FOREACHID_PROCESS_FUNCTION_CALL` execute the given statement and then check status of `LibraryForeachIDData` data, and return in case stop of iteration is requested. This is very similar to the other `BKE_LIB_FOREACHID_PROCESS_` existing macros, and allows us to properly break iteration when a sub-function has requested it. Part of T90922: Fix return policy inconsistency in `scene_foreach_id`.
2021-10-26Cleanup: LibQuery: Rename `BKE_LIB_FOREACHID_PROCESS` to ↵Bastien Montagne
`BKE_LIB_FOREACHID_PROCESS_IDSUPER`. More in-line name with the rest of that macro-based API, especially since this will be extended in the future.
2021-07-09Cleanup: rename BKE_animdata_{add=>ensure}_idCampbell Barton
Use the term `ensure` as existing data is used when present.
2021-07-07Cleanup: spelling in commentsCampbell Barton
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-05-14Cleanup: spelling, rename metas to meta-strips / meta-ballsCampbell Barton
2021-05-04Animation: correct active track/strip pointers after copying NLA tracksSybren A. Stüvel
After copying NLA tracks from one `AnimData` to another, also ensure that the `AnimData::act_track` and `AnimData::actstrip` pointers are pointing to the copy rather than the original. This is a necessary step to allow library overrides on NLA modifiers without crashing Blender. The remapping of the pointers is done by looping over the tracks/strips and comparing pointers. Alternatively, I could update the copy functions themselves to keep track of those pointers and return them, but IMO that would produce more spaghetti (they're also used in cases where this pointer-remapping is not desired).
2021-04-09Cleanup: use our own code style for doxy-gen comment blocksCampbell Barton
2020-12-15Cleanup: reduce indirect DNA header inclusionCampbell Barton
Remove DNA headers, using forward declarations where possible. Also removed duplicate header, header including it's self and unnecessary inclusion of libc system headers from BKE header.
2020-12-10Cleanup: rename BLI_strescape to BLI_str_escapeCampbell Barton
Prepare for `BLI_str_unescape` which doesn't read well without the separator.
2020-10-15Fix T81580: No doversion for Emission StrengthDalai Felinto
The new parameter made so that previously keyed Alpha values were lost and instead the new "Emission Strength" was keyed. Issue introduced with the original commit of Emission Strength: b248ec97769f Note: Files created since the issue (September 17) that keyframed the Emission Strength will have to fix their files manually. Differential Revision: https://developer.blender.org/D9221
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-10-07Refactor: remove `BKE_<id_type>_copy` functions.Bastien Montagne
Those were only shallow wrappers around `BKE_id_copy`, barely used (even fully unused in some cases), and we want to get rid of those ID-specific helpers for the common ID management tasks. Also prevents weird custom behaviors (like `BKE_object_copy`, who was the only basic ID copy function to reset user count of the new copy to zero). Part of 71219.
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-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-01Fix T81267: bad handling of usercount for actions duplicated with some animdata.Bastien Montagne
Those actions are full proper IDs and should therefore not be affected by flags used to duplicate 'owner' ID own data.
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-29Cleanup: spellingCampbell Barton
2020-09-28Fix T81214: Crash on Action constraint without actionSybren A. Stüvel
A `NULL` pointer check was missing.
2020-09-25Animation: set Action `idroot` at assignment instead of just at evaluationSybren A. Stüvel
Actions are either locked to a specific ID type, or "floating". Actions in the floating state are now locked when they are assigned to an ID block. Previously (rB94b99b5d4a7c20cf2) this was done at evaluation time, which caused various problems: - The ID type was set on the evaluated copy, and inconsistently flushed back to the original. - A newly created Action could not be assigned to an Action constraint, unless a depsgraph evaluation was be forced first. This is now resolved by calling `BKE_animdata_set_action()` to set the action (instead of direct assignment) where possible, and calling `BKE_animdata_action_ensure_idroot()` otherwise. Manifest Task: https://developer.blender.org/T80986
2020-09-25Cleanup: animation, deduplicate "can edit action" logicSybren A. Stüvel
Move "action editable" check from RNA code to Blender kernel `BKE_animdata_action_editable()`. No functional changes.
2020-09-25Cleanup: document and simplify `BKE_animdata_set_action()`Sybren A. Stüvel
Simplify `BKE_animdata_set_action()` by flipping some conditions and using early returns, and document which parameters can be `NULL`. No functional changes.
2020-09-24Fix T80874: Actions inside NLA Strips are not copied to buffer/appendSybren A. Stüvel
Restore NLA Action expansion code that was accidentally removed in rBbed634c4f96.
2020-09-19Cleanup: use parenthesis for if statements in macrosCampbell Barton
2020-08-28Cleanup: improve function namesJacques Lucke
With this change, the three .blend read operations: data reading, lib reading and expanding are more grouped together.
2020-08-21Refactor: move animdata code from blenloader to blenkernelJacques Lucke
2020-08-06Fix T79408: ungroup operation update animation data incorrectlyJacques Lucke
Reviewers: sybren, sergey Differential Revision: https://developer.blender.org/D8464
2020-07-09Implement T77959: Never duplicate linked data during deep-copy.Bastien Montagne
Note that this behavior is enforced on user level for now, but on code side it is controlled with a flag, which should make it easy to refine that behavior if needed. Only exception is when we duplicate a linked ID directly (then we assume user wants a local deep-copy of that linked data, and we always also duplicate linked sub-data-blocks). Note that this commit also slightly refactor the handling of actions of animdata, by simplifying `BKE_animdata_copy_id_action()` and adding an explicit new `BKE_animdata_duplicate_id_action()` to be used during ID duplication (deep copy). This also allows us to get rid of the special case for liboverrides.
2020-07-03Cleanup: Blendkernel, Clang-Tidy else-after-return fixes (incomplete)Sybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/blenkernel` module. Not all warnings are addressed in this commit. No functional changes.
2020-06-17ID Duplicate: uniformize Action duplication.Bastien Montagne
Previously, object (and sub-data) actions would be controlled by the user preferences flag, collections actions would never be duplicted, and scenes actions were always duplicated... Now they all follow the user preferences settings.
2020-06-10Enable (deep) copy of overrides.Bastien Montagne
This commit enables basic copy of overrides on generic ID level, as well as from (deep) copy operators for objects and collections. So e.g. if your linked overridden caracter is in a collection, you can now (from the outliner) Duplicate that override collection to get a new overriding copy of the character. We still need operators (new or modifying existing ones) to handle that from 3DView e.g. Note that deep copy code for objects/collections (and incidently animdata) had to be modified to avoid duplicating/making local IDs that remain linked ones being used by overrides ones.
2020-06-05Code Cleanup: fcurve function namingJeroen Bakker
2020-05-26Fix/refactor foreach_id handling of animdata.Bastien Montagne
Now callbacks for animdata, nla strip and fcurve are in their own proper BKE files (mimicking `foreach_id` callback of `IDTypeInfo`). This commit also fixes some missing handling of ID pointers (text ID and IDProperties of script fcurve modifier...).
2020-05-01Cleanup: moved drivers to BKE_fcurve_driver.h / fcurve_driver.cSybren A. Stüvel
All the driver-specific code in `fcurve.c` has been moved into a new file `fcurve_driver.c`. The corresponding declarations have been moved from `BKE_fcurve.h` to `BKE_fcurve_driver.h`. All the `#include "BKE_fcurve.h"` statements have been investigated and replaced with `BKE_fcurve_driver.h` where necessary. No functional changes.
2020-04-20Simulations: Add new simulation data blockJacques Lucke
This data block will be the container for simulation node trees. It will be used for the new particle node system (T73324). The new data block has the type `ID_SIM`. It is not visible to users and other developers by default yet. To enable it, activate the cmake option `WITH_NEW_SIMULATION_TYPE`. New simulation data blocks can be created by running `bpy.data.simulations.new("name")`. Reviewers: brecht Differential Revision: https://developer.blender.org/D7225
2020-04-03Code Quality: Replace for loops with LISTBASE_FOREACHDalai Felinto
Note this only changes cases where the variable was declared inside the for loop. To handle it outside as well is a different challenge. Differential Revision: https://developer.blender.org/D7320
2020-04-03Cleanup: Animation, move AnimData API to `anim_data.c`/`BKE_anim_data.h`Sybren A. Stüvel
The `BKE_animsys.h` and `anim_sys.c` files already had a an "AnimData API" section. The code in that section has now been split off, and placed into `BKE_anim_data.h` and `anim_data.c`. All files that used to include `BKE_animsys.h` have been adjusted to only include the animation headers they need (sometimes none). No functional changes.