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
2021-01-19Cleanup: use 'const' argument for parameter argumentCampbell Barton
2021-01-19UI Code Quality: Use "params" struct for area and region callbacksHans Goudey
These functions with many arguments can be unwieldy. Aside from the obvious issues with rewriting the list of arguments and the opportunities for error and frustration that presents, the long list of arguments make these systems hard to change. So when an argument should be added, someone might skip that and add some hack instead. So, as proposed in T73586#1037210, this patch instead uses a "params" struct for each of these callbacks. - Use param argument for `ARegionType.listener` - Remove unused window field in region listener - Use param argument for `SpaceType.listener` - Use params struct for `ARegionType.message_subscribe` Differential Revision: https://developer.blender.org/D9750
2020-12-15Asset System: Support dragging assets and appending on dropJulian Eisel
For the Asset Browser, it needs to be possible to drag assets into various editors, which may not come from the current .blend file. In other words, the dragging needs to work with just the asset metadata, without direct access to the data-block itself. Idea is simple: When dragging an asset, store the source file-path and data-block name and when dropping, append the data-block. It uses existing drop operators, but the function to get the dropped data-block is replaced with one that returns the local data-block, or, in case of an external asset, appends the data-block first. The drop operators need to be adjusted to use this new function that respects assets. With this patch it only works for dragging assets into the 3D view. Note that I expect this to be a short-lived change. A refactor like D4071 is needed to make the drag & drop system more future proof for assets and other use cases. Part of the first Asset Browser milestone. Check the #asset_browser_milestone_1 project milestone on developer.blender.org. Differential Revision: https://developer.blender.org/D9721 Reviewed by: Bastien Montagne, Brecht Van Lommel
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-09-12Cleanup: Remove GLEW dependencies outside of GL moduleClément Foucault
2020-08-23Cleanup: GPU: Use explicit clear value in GPU_clear* commandsClément Foucault
This replace `GPU_clear()` by `GPU_clear_color()` and `GPU_clear_depth()`. Since we always set the clear value before clearing, it is unecessary to track the clear color state. Moreover, it makes it clearer what we clear the framebuffer to.
2020-08-07Merge branch 'blender-v2.90-release' into masterJacques Lucke
2020-08-07Code Style: use "#pragma once" in source directoryJacques Lucke
This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466
2020-08-04Refactor: rename SpaceType->new to SpaceType->createJacques Lucke
The data member `new` was conflicting with the `new` keyword when `BKE_screen.h` was included in C++ files. Reviewers: sergey Differential Revision: https://developer.blender.org/D8459
2020-07-03Cleanup: Editors, 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` module. No functional changes.
2020-07-03Clang-Tidy: Enable readability-redundant-control-flowHans Goudey
2020-06-22Refactoring: View2DScrollers memory allocationJeroen Bakker
View2DScrollers used the memory manager to allocate memory. This isn't a problem but in a upcoming change the scrollers will be drawn more often than it used to (See {D8066}). To limit the number of allocations and frees this patch will use the stack for allocation. Reviewed By: Campbell Barton Differential Revision: https://developer.blender.org/D8076
2020-06-18Cleanup: redundant parenthesisCampbell Barton
2020-05-22Fix Python console cursor heightCampbell Barton
2020-05-20Fix T74298: Incorrect cursor position in Python consoleCampbell Barton
2020-04-03Cleanup: Rename ScrArea variables from sa to areaJulian Eisel
Follow up of b2ee1770d4c3 and 10c2254d412d, part of T74432. Now the area and region naming conventions should be less confusing. Mostly a careful batch rename but had to do few smaller fixes. Also ran clang-format on affected files.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-12Cleanup: text view APICampbell Barton
- Use typed enum for line_data callback. - Pass in 'const' arguments where possible. - Use 'r_' prefix for return arguments. - Remove unused return value from line_get callback. - Remove redundant casts.
2020-03-06Cleanup: Rename ARegion variables from ar to regionJulian Eisel
The old convention was easy to confuse with ScrArea. Part of https://developer.blender.org/T74432. This is mostly a batch rename with some manual fixing. Only single word variable names are changed, no prefixed/suffixed names. Brecht van Lommel and Campbell Barton both gave me a green light for this convention change. Also ran clan clang format on affected files.
2020-03-06Cleanup: use MEM_recallocN_idCampbell Barton
2020-02-14Fix console cursor offsetCampbell Barton
Also remove hard coded offsets.
2020-02-14Cleanup: console/info headersCampbell Barton
2020-02-14Cleanup: change textview 'unsigned char' to 'uchar'Campbell Barton
2020-02-14Fix T73784: Python console: incorrect wrapped line cursor positionCampbell Barton
Regression in aa919f3e82020 Remove character margins, it complicated drawing & picking to have one margin in pixels and a second margin in characters. Replace this with an outer pixel-margin for drawing background colors.
2020-02-02Cleanup: clang-formatCampbell Barton
2020-01-29UI: Info Editor Visual ChangesHarley Acheson
Changes to Info Editor making it easier to read. Only visual changes, no functional changes. Differential Revision: https://developer.blender.org/D6491 Reviewed by Julian Eisel
2019-12-03Cleanup: text-view comments, variable names, const argsCampbell Barton
2019-12-03Cleanup: rename textview ymin/maxCampbell Barton
This is used for scrolling which wasn't obvious.
2019-12-03Fix minor errors with text view margins for console/info editorCampbell Barton
- Margins used duplicate define between files. - Cursor selection ignored margins. - Cursor wasn't scaling with DPI. Add a 'draw_rect' member which is the region rect with margins applied to make these checks clearer. This resolves issue pointed out in D6300, which complicated further refactoring.
2019-11-25Fix for the Python console not setting the cursorCampbell Barton
2019-11-24Cleanup: move console scrollback initialization into versioningCampbell Barton
2019-11-22Keymap: use tab key for indent or auto-completeCampbell Barton
Only indent when there aren't characters before the cursor. This resolves the conflict with Ctrl-Space for view maximize. D6239 by @wbrbr for text editor, based console support on this.
2019-09-26WM: clean up cursors constants and codeBrecht Van Lommel
There was a mix of old and new constants. Now have one list of WM_CURSOR_* cursor types, using GHOST standard cursors when available and otherwise falling back to our custom cursors. Ref D5197
2019-09-14Cleanup: use const args, variablesCampbell Barton
2019-08-28Fix T68971: Copy As New Driver from Material node creates a bad reference.Alexander Gavrilov
NodeTree structures of materials and some other data blocks are effectively node group datablock objects that are contained inside the parent block. Thus, direct references to them are only valid while blender is running, and are lost on save. Fix Copy As New Driver to create a reference that goes through the owner datablock, by adding a new ID flag to mark private pseudo-datablocks. Also fix functions that return full paths to structures and properties, e.g. used in python tooltips. Functions for paths from ID to struct or property can't be changed because of Animation Data related code. Reviewers: mont29 Differential Revision: https://developer.blender.org/D5559
2019-08-09UI: expand on console menusCampbell Barton
Some features weren't exposed anywhere in the interface. D5443 by @tintwotin
2019-05-31Cleanup: style, use braces in source/ (include disabled blocks)Campbell Barton
2019-05-01ClangFormat: run with ReflowComments on source/Campbell Barton
Prepare for enabling ReflowComments.
2019-04-30Refactor: Separate scrollers from text drawing in APIJacques Lucke
This is a continuation of rB7fdffd735ff24, where I separated the e.g. frame number drawing from scrollers internally. This patch changes the API, so that space draw handlers have to draw these numbers explicitely. This greatly simplifies the scrollers API for all spaces that just need scrollers without any frame numbers. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D4747
2019-04-24Refactor: allow event handlers to have a poll functionJacques Lucke
Previously only a fixed bounding box could be used. This was not flexible enough. T63193 will benefit from this refactor. Reviewers: brecht, campbellbarton
2019-04-24Cleanup: sort CMake include pathsCampbell Barton
2019-04-17ClangFormat: format '#if 0' code in source/Campbell Barton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-04-16CMake: add library deps to CMakeLists.txtCampbell Barton
Tested to work on Linux and macOS. This will be enabled once all platforms are verified. See D4684
2019-04-14CMake: prepare for BLENDER_SORTED_LIBS removalCampbell Barton
No functional change, this adds LIB definition and args to cmake files. Without this it's difficult to migrate away from 'BLENDER_SORTED_LIBS' since there are many platforms/configurations that could break when changing linking order. Manually add and enable WITHOUT_SORTED_LIBS to try building without sorted libs (currently fails since all variables are empty). This check will eventually be removed. See T46725.
2019-03-26Cleanup: style, use braces for editor/spacesCampbell Barton
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-05Cleanup: remove contributors for CMake filesCampbell Barton
Following removal from C source code. See: 8c68ed6df16d8893
2019-02-03Cleanup: trailing commasCampbell Barton
Needed for clan-format not to wrap onto one line.