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-06UndoType: Refactor: replace `use_context` boolean by a bitflag.Bastien Montagne
We will soon need more options here, sinmpler and cleaner to use a bitflag then.
2021-01-06Undo: Further tweak/fixes the 'use context' flag of undo types.Bastien Montagne
Note that this is fairly fragile still, especially in cases like paint cureve undo, which actually does not use context in most cases (and can be called with a NULL context), but do need it in one case. This will need a proper rework at some point.
2021-01-06Cleanup/refactor: UndoType: Clarify `use_context` variable.Bastien Montagne
Rename it to mark it is only for `encode` callbacks, fix `encode` callback of text undo to early fail in case it gets a NULL context, add an assert to `BKE_undosys_step_push_with_type` that context is not NULL when undotype requires a valid one. Note that in practice this should not change anything, currently it seems that we always get a valid context in `BKE_undosys_step_push_with_type`?
2021-01-04Cleanup: redundant code, minor inconsistenciesCampbell Barton
- Remove ternary operators when both values are the same. - Remove break after return. - Remove redundant NULL checks for code which handles those cases immediately beforehand.
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-12-13UI: Remove Unused 'U.wheellinescroll' PropertyYevgeny Makarov
Remove 'U.wheellinescroll' preference, currently hidden and unused. Differential Revision: https://developer.blender.org/D9616 Reviewed by Brecht Van Lommel
2020-12-10Cleanup: Remove unused c popup menu for text editorAaron Carlisle
This code hase been usused for 10 years and the right click menu is now in python.
2020-12-03Cleanup: view-port --> 2D/3D ViewportAaron Carlisle
2020-11-23Fix T82849: Assert When Unlinking "Edit Source" Text Data-block.Bastien Montagne
Simplify and sanitize handling of usercounts for Text IDs generated trhough `BKE_text_load_ex`.
2020-11-06Cleanup: use ELEM macro (>2 args)Campbell Barton
2020-11-06Cleanup: use ELEM macroCampbell Barton
2020-11-03Fix C operators can't set default display or sort type for File BrowserJulian Eisel
`WM_operator_properties_filesel()` allows C operators to set a display or sort type for the File Browser to use. But the File Browser would always override that because of an invalid `_is_set()` check. (The operators don't actually set the value, they only set the property's default value.) The only operator affected by this is "Recover Auto Save". It is supposed to show a vertical list ordered chronologically. It used settings from the previous File Browser usage before this patch. Operators using the File Browser should generally use `FILE_DEFAULTDISPLAY`/`FILE_SORT_DEFAULT` now, except if they have a reason not to. See comments at their definition. ---- This makes it so operators that set a different display or sort type don't change the sort or display type for the next File Browser operation. So using "Recover Auto Save" entirely isolates display and sort type from other operations. Differential Revision: https://developer.blender.org/D8598 Reviewed by: Bastien Montagne
2020-10-30Text: support "Text to 3D Object" for read-only dataCampbell Barton
Add poll function for read-only text data, for operators that don't require the text to be editable.
2020-10-29UI: use "Save As" when saving un-saved image/text filesYevgeny Makarov
Now the behaviors are consistent for blend, image and text files: - If the file is not writable, will report it. - If the file is new (without a path), save as will be used. - If the file was deleted, will try to recreate it. Ref D6755
2020-10-24UI: Capitalization CorrectionsYevgeny Makarov
Approximately 141 changes of capitalization to conform to MLA title style. Differential Revision: https://developer.blender.org/D8392 Reviewed by Julian Eisel
2020-10-19Spelling: It's Versus ItsHarley Acheson
Corrects incorrect usage of contraction for 'it is', when possessive 'its' was required. Differential Revision: https://developer.blender.org/D9250 Reviewed by Campbell Barton
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
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 text editor auto-complete refinement featureCampbell Barton
Left/right arrow keys can refine the completion, this wasn't redrawing and there was an off-by-one error checking the next character.
2020-10-02Fix text editor auto-complete mouse interactionCampbell Barton
- Remove MMB for activating an auto-complete item (use LMB instead). - Update on cursor motion.
2020-09-12Cleanup: Remove GLEW dependencies outside of GL moduleClément Foucault
2020-09-09Cleanup: reduce variable scopeJacques Lucke
2020-09-09Cleanup: spellingCampbell Barton
2020-09-04Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fixSebastian Parborg
No functional changes
2020-08-28Fix for T75369: Text Editor Line ColorHarley Acheson
Use correct text color when syntax highlighting is off but line numbers are on. Differential Revision: https://developer.blender.org/D7337 Reviewed by Hans Goudey
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-18Cleanup: GPUState: remove double GPU_blend callsClément Foucault
2020-08-18GPUState: GPU_blend final API renamingClément Foucault
We now use GPU_blend for enabling / disabling blending and explicitly set the blend equation.
2020-08-18Cleanup: GPUState: Replace blend func separate by enumClément Foucault
2020-08-17Cleanup: move Python script execution into BPY_extern_run.hCampbell Barton
This commit renames 'execute' to 'run' because: - This follows Python's "PyRun" which these functions wrap. - Execution functions can use either exec/eval modes, making naming awkward (for future API refactoring).
2020-08-07Cleanup: declare arrays arrays where possibleCampbell Barton
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/Space/Text, 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/space_text` module. No functional changes.
2020-06-27Docs: correct invalid doxygen params & referencesCampbell Barton
2020-06-24Text: add replace all operatorCampbell Barton
D8032 by @Poulpator with minor edits
2020-06-23Cleanup: move text.c comments to the struct/flag declarationsCampbell Barton
Also update/correct some of the comments.
2020-06-23Cleanup: rename 'name' to 'filepath' for DNA typesCampbell Barton
Using 'name' for the full path of a file reads badly, especially when id.name is used in related code.
2020-06-22UI: report when reloading unsaved textCampbell Barton
Address confusion from T78114.
2020-06-11UI: Adjust names for Find/Replace Set SelectionAaron Carlisle
This is really doing two operation so using the ampersand makes more sense. Also selection sounds better than selected. This also adjusts the name in the text Edit menu which was an issue raised in T68738
2020-04-14Cleanup: remove text editor 'select' option that did nothingCampbell Barton
2020-04-14Revert "Cleanup: remove unused text.selection_set select option"Campbell Barton
This reverts commit 9af0cdcd9349b6c0fd1cc0e57a58254e21e1bd3b. Removed this feature because of confusion caused by incorrect description.
2020-04-05Cleanup: macro hygiene, parenthesize argumentsCampbell 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-04-03Cleanup: use abbreviated names for unsigned types in editorsCampbell Barton
2020-03-25Cleanup: use 'r_' prefix for output argumentsCampbell Barton
Also pass some args as 'const'.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-18Cleanup: Resolve HKEY conflictRay Molenkamp
Both the MS headers and blender headers define the HKEY which gives all kind of inclusion order issues. This diff renames all *KEY constants to EVT_*KEY to resolve this conflict. Reviewed By: brecht , dfelinto Differential Revision: http://developer.blender.org/D7164
2020-03-15Cleanup: redundant checksCampbell Barton
In some cases moved the checks into asserts, to ensure changes in the future don't cause the checks to become necessary again.