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-01Refactor: Rename Object->obmat to Object->object_to_worldSergey Sharybin
Motivation is to disambiguate on the naming level what the matrix actually means. It is very easy to understand the meaning backwards, especially since in Python the name goes the opposite way (it is called `world_matrix` in the Python API). It is important to disambiguate the naming without making developers to look into the comment in the header file (which is also not super clear either). Additionally, more clear naming facilitates the unit verification (or, in this case, space validation) when reading an expression. This patch calls the matrix `object_to_world` which makes it clear from the local code what is it exactly going on. This is only done on DNA level, and a lot of local variables still follow the old naming. A DNA rename is setup in a way that there is no change on the file level, so there should be no regressions at all. The possibility is to add `_matrix` or `_mat` suffix to the name to make it explicit that it is a matrix. Although, not sure if it really helps the readability, or is it something redundant. Differential Revision: https://developer.blender.org/D16328
2022-09-14Adding `const Scene*` parameter in many areas.Monique Dewanchand
Related to {D15885} that requires scene parameter to be added in many places. To speed up the review process the adding of the scene parameter was added in a separate patch. Reviewed By: mont29 Maniphest Tasks: T73411 Differential Revision: https://developer.blender.org/D15930
2022-06-23Fix T98871: Drivers not updated when joining an armatureSebastian Parborg
If the some driver had been flagged as "invalid", the flag would not be cleared when joining armatures which could lead to now valid drivers still being flagged as invalid. Now we clear this invalid flag on all drivers to force a recheck after joining the armatures.
2022-06-03Constraints: introduce wrapper functions to access target lists.Alexander Gavrilov
Instead of directly accessing constraint-specific callbacks in code all over blender, introduce two wrappers to retrieve and free the target list. This incidentally revealed a place within the Collada exporter in BCAnimationSampler.cpp that didn't clean up after retrieving the targets, resulting in a small memory leak. Fixing this should be the only functional change in this commit. This was split off from D9732. Differential Revision: https://developer.blender.org/D13844
2022-03-15Fix T96452: Armature corrupted after undoing 'Join' operation.Bastien Montagne
Modified source Armature ID in the join operation was not properly tagged as such for the depsgraph (and therefore memfile undo).. Issue caused/revealed by rBe648e388874a. Should be backported to 3.1 should we make a corrective release.
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-09Cleanup: move file descriptions into doxygen file sectionCampbell Barton
Continuation of 19100aa57d847699d17527b76c2fab1f4ab88885.
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-11-20Cleanup: Else after returnHans Goudey
2021-11-09Cleanup: spelling, C style commentsCampbell Barton
2021-11-09Cleanup: clang-formatCampbell Barton
2021-11-09Armature Make/Clear Parent: Grey out options that don't do anythingDemeter Dzadik
In armature edit mode, the Make/Clear Parent operators don't do anything in various cases, but only one of these cases was previously indicated, and it was indicated by hiding the option completely instead of graying it out. Clear Parent (Alt+P) problems fixed: - "Clear Parent" option always showed up, even when none of the selected bones had a parent. - "Disconnect Bone" option always showed up, even when use_connected on all selected bones was already false. Make Parent (Ctrl+P) problems fixed: - "Keep Offset" option didn't show up when all selected bones' parent was already the active bone. This was correct, and this patch tries to make all behaviours consistent with this. - "Connected" option always showed up, even when all selected bones' parent was already the active bone, and they all had use_connect set to True. With this patch all options show up all the time, but in cases where they would do nothing, they will be grayed out. Reviewed By: sybren Differential Revision: https://developer.blender.org/D6100
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-28Cleanup: repeated terms in code comments & error messagesCampbell Barton
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-03-05Cleanup: Use boolean in WM_cursor_waitAntonio Vazquez
2021-03-02Cleanup: spelling, minor correctionsCampbell Barton
Also use doxygen comments for sculpt functions.
2020-12-24UI: Cleanup spelling of compound wordsYevgeny Makarov
Approximately 138 changes in the spelling of compound words and proper names like "Light Probe", "Shrink/Fatten", "Face Map". In many cases, hyphens were used where they aren't correct, like "re-fit". Other common changes include: - "Datablock" -> "data-block" - "Floating point" -> "floating-point" - "Ngons" -> "n-gons" These changes help give the language used in the interface a consistent, more professional feel. Differential Revision: https://developer.blender.org/D9923
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-08-25Fix T80077: Objects disappear when joining with a zero scaled axisCampbell Barton
Use invert_m4_m4_safe_ortho when joining objects so zero scaled axis doesn't cause all points to be scaled to zero. Instead geometry is left un-scaled on degenerate axes. Report a warning in this case since users may want to adjust the active objects scale.
2020-08-21Fix T79987: Crash when joining objectsJulian Eisel
Mistake in b077de086e14. I did the same fix for a few operators there, but missed the object "Join" one. The joining operator changes the layer content. So it must send a notifier for that. Before b077de086e14 that didn't cause a noticeable issue, because the Outliner happened to listen to other notifiers (active/selection changes) the operator sent and fully rebuilt its tree in response. Now missing these notifiers can be more problematic, since we try to avoid more rebuilds. Added comments to the notifier types to avoid at least this pitfall.
2020-08-04Pose channel: Add session UUIDSergey Sharybin
Allows to identify pose channels more reliably than by the pointer.
2020-07-03Cleanup: Editors/Armature, Clang-Tidy else-after-return fixesSybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/editors/armature` module. No functional changes.
2020-07-01Cleanup: spellingCampbell Barton
2020-06-18Cleanup: redundant parenthesisCampbell Barton
2020-06-17Cleanup: name mesh join functions using ED_{type} prefixCampbell Barton
2020-05-19Merge branch 'blender-v2.83-release'Philipp Oeser
2020-05-19Fix T76689: Armature layers not indicating the existence of bonesSybren A. Stüvel
From what I can see, there are two issues at play in {T76689} and its merged-in report {T76590}: - In Blender ≤ 2.79 the bone layer dots were updated in the draw code. This ensured the info was up to date before drawing. This is no longer possible, as the drawing code uses evaluated objects, and those should not be written to. This has been addressed in rB709f126e8143 by calling the update function explicitly in various places in the code. The problem is that this wasn't added to all necessary spots. - When in edit mode, changes are made to the edit bones but not to the 'actual' bones (this is synced when exiting edit mode). This causes undo to mess up the layer indicators. I think both issues can be addressed by having the dependency graph update the used layer info as part of the armature evaluation. This will make the undo system work properly, and allows the removal of some `BKE_armature_refresh_layer_used()` from various places. There is still the issue that there are two functions (`BKE_armature_refresh_layer_used()` and `ED_armature_edit_refresh_layer_used()`) that are both responsible for updating `bArmature::layer_used`. This is a trickier thing to solve, though, as the definition of the `EditBone` struct resides in the armature editor module. This means that blenkernel can't iterate over edit bones, but on the other hand the dependency graph shouldn't call any editor functions either. This is why I left the `ED_armature_edit_refresh_layer_used()` calls untouched. The downside of recalculating `layer_used` from the dependency graph (at least in the way that I did it now) is that it is called every time a user moves a bone in pose mode. This frequency of updates is not necessary. Differential Revision: https://developer.blender.org/D7709
2020-05-02Merge branch 'blender-v2.83-release'Nathan Craddock
2020-05-02Revert "Outliner: Fix selection sync for various operators"Nathan Craddock
This reverts commit 92d62148bed1cf68ed674b4a9c6ba6440a697ca8. When merging in from blender-v2.83-release the merge was somehow rebased after viewing the log.
2020-05-02Outliner: Fix selection sync for various operatorsNathan Craddock
Add missing outliner selection sync tagging for various non-outliner operators. * Curve separate * Grease Pencil separate * Mesh separate * Make instances real * 3D view paste * Sequencer paste * Armature delete, dissolve, separate, duplicate, subdivide, extrude, click extrude, primitive add * Pose Group select, delete Resolves T71404
2020-05-02Outliner: Fix selection sync for various operatorsNathan Craddock
Add missing outliner selection sync tagging for various non-outliner operators. * Curve separate * Grease Pencil separate * Mesh separate * Make instances real * 3D view paste * Sequencer paste * Armature delete, dissolve, separate, duplicate, subdivide, extrude, click extrude, primitive add * Pose Group select, delete Resolves T71404
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-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.
2020-03-29Cleanup: spelling, commentsCampbell Barton
2020-03-03Cleanup: formatting, spellingCampbell Barton
2020-03-03Separate operators (mesh/curve/armature/gpencil): take user preferencesPhilipp Oeser
into account for duplicating actions Previously actions remained linked after duplication, now this is based on the User Preferences (PreferencesEdit.use_duplicate_action). note: default is ON here, so this changes default behavior of separate operators. First intuition was to respect _all_ preferences here (e.g. also duplicating materials if chosen in the User Preferences) but after consideration this is probably not what the User would expect from such 'modeling' opertions (e.g. separate by loose parts resulting in possibly many duplicate materials) Fixes T71038 Maniphest Tasks: T71038 Differential Revision: https://developer.blender.org/D6120
2020-02-28Fix (unreported) Separate bones creates empty armaturePhilipp Oeser
Fix for fix (rB8bf7ca9fe31c). The fix was not actually working [neither for multi-armature-editing as intended nor for single armatures] and it broke single-armature bone separation completely. More or less indentation issue, move relevant code out of bone loop, do after all bones have been checked, guess this was intended anyways. Differential Revision: https://developer.blender.org/D6949
2019-12-09Cleanup: remove duplicate variablesCampbell Barton
Previous code made it seem as if the original edit-object was re-created after separating.
2019-12-09Edit Armature: match separate selection with meshesCampbell Barton
- Existing objects remain selected. - The content of the armatures is unselected.
2019-12-09Fix separating bones on hidden layersCampbell Barton
2019-12-09Fix T72310: Separate bones creates empty armaturesCampbell Barton
Armatures that didn't contain any selected bones were still creating armatures.
2019-12-02Overlay Engine: Refactor & CleanupClément Foucault
This is the unification of all overlays into one overlay engine as described in T65347. I went over all the code making it more future proof with less hacks and removing old / not relevent parts. Goals / Acheivements: - Remove internal shader usage (only drw shaders) - Remove viewportSize and viewportSizeInv and put them in gloabl ubo - Fixed some drawing issues: Missing probe option and Missing Alt+B clipping of some shader - Remove old (legacy) shaders dependancy (not using view UBO). - Less shader variation (less compilation time at first load and less patching needed for vulkan) - removed some geom shaders when I could - Remove static e_data (except shaders storage where it is OK) - Clear the way to fix some anoying limitations (dithered transparency, background image compositing etc...) - Wireframe drawing now uses the same batching capabilities as workbench & eevee (indirect drawing). - Reduced complexity, removed ~3000 Lines of code in draw (also removed a lot of unused shader in GPU). - Post AA to avoid complexity and cost of MSAA. Remaining issues: - ~~Armature edits, overlay toggles, (... others?) are not refreshing viewport after AA is complete~~ - FXAA is not the best for wires, maybe investigate SMAA - Maybe do something more temporally stable for AA. - ~~Paint overlays are not working with AA.~~ - ~~infront objects are difficult to select.~~ - ~~the infront wires sometimes goes through they solid counterpart (missing clear maybe?) (toggle overlays on-off when using infront+wireframe overlay in solid shading)~~ Note: I made some decision to change slightly the appearance of some objects to simplify their drawing. Namely the empty arrows end (which is now hollow/wire) and distance points of the cameras/spots being done by lines. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6296
2019-08-02Cleanup: doxy sectionsCampbell Barton
2019-07-17Fix T59713: Armature layer dots not updated on changesmano-wii
`layer_used` runtime data, which controls the drawing of dots in the UI was not getting refreshed properly. This used to happen in the drawing code, but was no longer working for reasons explained in: {rB2b09062defa093a243b5fe64b099accb07b440a3} The solution was to update each layer manually in the operators: * ARMATURE_OT_bone_primitive_add * ARMATURE_OT_delete * ARMATURE_OT_dissolve * ARMATURE_OT_fill * ARMATURE_OT_merge * ARMATURE_OT_separate * ARMATURE_OT_bone_layers * POSE_OT_bone_layers Differential Revision: https://developer.blender.org/D5281
2019-07-17Revert "Fix T59713: Moving bones between layers in edit mode doesn't show ↵mano-wii
the dot icon in the layers UI" This commit did not follow the protocol that requires a review first. This reverts commit 580acab1737c726f43e39792dbb75f3ca2089fcb.
2019-07-17Fix T59713: Moving bones between layers in edit mode doesn't show the dot ↵mano-wii
icon in the layers UI
2019-05-11Fix T59627: missing COW update tags when joining armatures.Alexander Gavrilov
Objects that had constraints or drivers referring to the joined armatures weren't tagged, and thus evaluated copies ended up with old bad pointers.
2019-05-02Fix T57099: Parenting between armatures crashesCampbell Barton
Multi-object selection allowed to parent edit-bones across armatures (which isn't supported).