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-09-27BLF: Editing Text with Combining CharactersHarley Acheson
Corrections for caret insertion & movement and deletion for text strings that include non-precomposed diacritical marks (Unicode combining characters). See D15659 for more details and examples. Differential Revision: https://developer.blender.org/D15659 Reviewed by Campbell Barton
2022-09-15I18n: disambiguate and extract a few messagesDamien Picard
Disambiguate: - Lower / Upper (case) - Spray (ocean modifier) - Keep Original (clip, grease pencil, object) - Screen [space] (inside some enum items, mostly) - Cast Shadow ("shadow that is cast", not "to cast a shadow") Extract: - Line Art Light Reference Near and Far - Mesh vertex attribute domain: Vertex Reviewed By: mont29 Differential Revision: https://developer.blender.org/D15938
2022-09-14ViewLayer: Lazy sync of scene data.Monique Dewanchand
When a change happens which invalidates view layers the syncing will be postponed until the first usage. This will improve importing or adding many objects in a single operation/script. `BKE_view_layer_need_resync_tag` is used to tag the view layer to be out of sync. Before accessing `BKE_view_layer_active_base_get`, `BKE_view_layer_active_object_get`, `BKE_view_layer_active_collection` or `BKE_view_layer_object_bases` the caller should call `BKE_view_layer_synced_ensure`. Having two functions ensures that partial syncing could be added as smaller patches in the future. Tagging a view layer out of sync could be replaced with a partial sync. Eventually the number of full resyncs could be reduced. After all tagging has been replaced with partial syncs the ensure_sync could be phased out. This patch has been added to discuss the details and consequences of the current approach. For clarity the call to BKE_view_layer_ensure_sync is placed close to the getters. In the future this could be placed in more strategical places to reduce the number of calls or improve performance. Finding those strategical places isn't that clear. When multiple operations are grouped in a single script you might want to always check for resync. Some areas found that can be improved. This list isn't complete. These areas aren't addressed by this patch as these changes would be hard to detect to the reviewer. The idea is to add changes to these areas as a separate patch. It might be that the initial commit would reduce performance compared to master, but will be fixed by the additional patches. **Object duplication** During object duplication the syncing is temporarily disabled. With this patch this isn't useful as when disabled the view_layer is accessed to locate bases. This can be improved by first locating the source bases, then duplicate and sync and locate the new bases. Will be solved in a separate patch for clarity reasons ({D15886}). **Object add** `BKE_object_add` not only adds a new object, but also selects and activates the new base. This requires the view_layer to be resynced. Some callers reverse the selection and activation (See `get_new_constraint_target`). We should make the selection and activation optional. This would make it possible to add multiple objects without having to resync per object. **Postpone Activate Base** Setting the basact is done in many locations. They follow a rule as after an action find the base and set the basact. Finding the base could require a resync. The idea is to store in the view_layer the object which base will be set in the basact during the next sync, reducing the times resyncing needs to happen. Reviewed By: mont29 Maniphest Tasks: T73411 Differential Revision: https://developer.blender.org/D15885
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-07-14Cleanup: remove redundant `event->val` check for 3D text insertionCampbell Barton
2022-07-14Cleanup: simplify 3D text insert, remove checks for ascii escape codesCampbell Barton
3D text included checks for escape codes such as \n\r\b which have not been included in wmEvent.ascii since [0] (2009). Remove these and use more straightforward logic for overriding the events text input. [0] 66437a62a73966de8ccb673473ba69d6c1ed66a3
2022-07-14WM: Remove ASCII members from wmEvent & GHOST_TEventKeyDataCampbell Barton
The `ascii` member was only kept for historic reason as some platforms didn't support utf8 when it was first introduced. Remove the `ascii` struct members since many checks used this as a fall-back for utf8_buf not being set which isn't needed. There are a few cases where it's convenient to access the ASCII value of an event (or nil) so a function has been added to do that. *Details* - WM_event_utf8_to_ascii() has been added for the few cases an events ASCII value needs to be accessed, this just avoids having to do multi-byte character checks in-line. - RNA Event.ascii remains, using utf8_buf[0] for single byte characters. - GHOST_TEventKeyData.ascii has been removed. - To avoid regressions non-ASCII Latin1 characters from GHOST are converted into multi-byte UTF8, when building X11 without XInput & X_HAVE_UTF8_STRING it seems like could still occur.
2022-03-24Cleanup: use "filepath" instead of "filename" for full pathsCampbell Barton
Reserve "filename" when only the name component is used.
2022-03-16View 3D: move picking arguments into a struct & minor refactorCampbell Barton
- Add SelectPick_Params struct to make picking logic more straightforward and easier to extend. - Use `eSelectOp` instead of booleans (extend, deselect, toggle) which were used to represent 4 states (which wasn't obvious). - Handle deselect_all when pocking instead of view3d_select_exec, de-duplicate de-selection which was already needed in when replacing the selection in picking functions. - Handle outliner update & notifiers in the picking functions instead of view3d_select_exec. - Fix particle select deselect_all option which did nothing.
2022-03-16Fix missing update selecting 3D text-boxCampbell Barton
2022-02-25Cleanup: use flags for wmEvent modifier keysCampbell Barton
Using flags makes checking multiple modifiers at once more convenient and avoids macros/functions such as IS_EVENT_MOD & WM_event_modifier_flag which have been removed. It also simplifies checking if modifier keys have changed.
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
2021-12-14Cleanup: correct unbalanced doxygen groupsCampbell Barton
Also add groups in some files.
2021-12-08Cleanup: move public doc-strings into headers for 'editors'Campbell Barton
Ref T92709
2021-10-31UI: Open File Browser with Thumbnails for FontsHarley Acheson
When browsing to open a font file, open File Browser in Thumbnail View and sorting by name, instead of using the last-used states. See D13040 for more details. Differential Revision: https://developer.blender.org/D13040 Reviewed by Julian Eisel
2021-10-06Cleanup: rename BKE_font.h -> BKE_vfont.hCampbell Barton
Match API naming prefix (BKE_vfont_*) and DNA_vfont_types.h.
2021-08-26Fix "Text to Object" creating invisible objectCampbell Barton
Newly created objects would not become visible until another action forced a depsgraph update.
2021-08-23RNA: add length augmented to RNA_string_get_allocCampbell Barton
This was noted as a TODO as it wraps RNA_property_string_get_alloc which takes a length return argument.
2021-08-09Fix text object inserting multiple characters with a selectionYuki Hashimoto
`bpy.ops.font.text_insert(text="multiple characters")` wasn't working. When the text is selected does not correctly insert multiple characters. - When the text was selected from left to right, the cursor only move one position next to the selected text. - When the text is selected from right to left, a part of the selected text remain. Ref D12161
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-09Cleanup: replace 'else if' with 'else'Campbell Barton
2021-01-04Cleanup: spelling (use 'gimbal' instead of 'gimble')Campbell Barton
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-11-06Cleanup: clang-formatCampbell Barton
Missed this last commit.
2020-11-06Cleanup: use ELEM macroCampbell Barton
2020-11-06Cleanup: follow our code style for float literalsCampbell 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-07UI: Fix capitalization in various placesYevgeny Makarov
Follow the MLA style, agreed upon in T79589. This means "from" within UI labels should be lowercase. Differential Revision: https://developer.blender.org/D8345
2020-09-07Cleanup: remove redundant scene argument in BKE_object_addCampbell Barton
2020-08-08Cleanup: remove redundant return parenthesisCampbell Barton
2020-08-07Cleanup: declare arrays arrays where possibleCampbell Barton
2020-07-23Cleanup: replace wchar_t with char32_t 3D text accent inputCampbell Barton
2020-07-23Cleanup: rename Curve.len_wchar to len_char32Campbell Barton
The name was misleading as the length is for char32_t, not wchar_t.
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-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-22Fix error using 'char32_t' as 'wchar_t' on windowsHarley Acheson
FONT_OT_text_insert failed on Windows. This change was missing from D6198.
2020-04-03Cleanup: use abbreviated names for unsigned types in editorsCampbell Barton
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-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-04Cleanup: spellingCampbell Barton
2020-02-10Cleanup/refactor: Rename `BKE_library` files to `BKE_lib`.Bastien Montagne
Note that `BKE_library.h`/`library.c` were renamed to `BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here. Part of T72604.
2019-11-27Text Object: change spacing now operates on selectionDamien Picard
Without this, it's not practical to change spacing on large blocks of text.
2019-11-22Fix T71273: Bad encoding of utf-8 for Text objectsmano-wii
`BLI_strncpy_wchar_from_utf8` internally assumes `wchar_t` is 32 bits which is not the case on windows. The solution is to replace `wchar_t` with `char32_t`. Thanks to @robbott for compatibility on macOS. Differential Revision: https://developer.blender.org/D6198
2019-10-09Fix text edit-mode character info initializationCampbell Barton
Using EditFont.pos before it was set.
2019-09-21Cleanup: unused headers in editorsCampbell Barton
2019-09-18Fix excessive dependency graph evaluation while painting strokesBrecht Van Lommel
Particularly noticeable when vertex painting with a subsurf modifier. In some cases every sculpt or paint stroke step would evaluate the dependency graph. This should only happen for redraws. Now more selectively choose if the dependency graph should be evaluated to initialize the view context. Doing it in the view context evaluation is somewhat hidden, now it's more explicit. Differential Revision: https://developer.blender.org/D5844
2019-08-24Cleanup: use doxy sections for editfontCampbell Barton
2019-08-23RNA: Cleanup PointerRNA structJacques Lucke
The old layout of `PointerRNA` was confusing for historic reasons: ``` typedef struct PointerRNA { struct { void *data; } id; struct StructRNA *type; void *data; } PointerRNA; ``` This patch updates it to: ``` typedef struct PointerRNA { struct ID *owner_id; struct StructRNA *type; void *data; } PointerRNA; ``` Throughout the code base `id.data` was replaced with `owner_id`. Furthermore, many explicit pointer type casts were added which were implicit before. Some type casts to `ID *` were removed. Reviewers: brecht, campbellbarton Differential Revision: https://developer.blender.org/D5558