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-10-04Cleanup: replace UNUSED macro with commented args in C++ codeHans Goudey
This is the conventional way of dealing with unused arguments in C++, since it works on all compilers. Regex find and replace: `UNUSED\((\w+)\)` -> `/*$1*/`
2022-09-25Cleanup: replace C-style casts with functional casts for numeric typesCampbell Barton
2022-09-19Nodes: Add node group assets to search menusHans Goudey
Currently node group assets are supported, but using them by dragging from the asset browser is cumbersome. This patch adds all node group assets from user asset libraries and the current file libraries to the add node search menu and the link drag search menu. Node groups added through the search will have their "options" hidden, meaning the data-block selector is displayed. This helps keep the UI clean, and the selector shouldn't be necessary anyway. To make that possible, metadata like the node tree type and its inputs and outputs has to be saved in the file. This requires re-saving the files that contain the assets with the patch applied. The node add search operator is moved from Python to C++ to ease development and allow more flexibility. It supports a tooltip that gives the description of assets. Currently the node groups are added with the asset system's existing "Append & Reuse" behavior. It's likely that linking should be possible in the future too, but for now the idea is to use the more foolproof option that doesn't create dependencies between files. Because loading assets can potentially take a long time, the search menu refreshes its items as new assets are loaded. However, changing the search field is necessary to see the update. Differential Revision: https://developer.blender.org/D15568
2022-08-04Cleanup: spelling, code-blocksCampbell Barton
2022-07-31Cleanup: Move interface_region_tooltip.c and header to C++Hans Goudey
2022-06-17Fix T93446: search box active result does not reset when typingPatrick Huang
Whenever the user edits the query in a search box, the active (highlighted) result resets to the first. Previously, it would remain at the last highlighted result, jumping around as the results update. This is better than the previous behavior. If a user highlights a choice either on purpose or by accidental mouse movement and continues to type, it is likely that they are not looking for the currently highlighted choice, so setting it to the top search result is more useful. Differential Revision: https://developer.blender.org/D15211
2022-05-21UI Code Quality: Resolve frankenstein bit-flag usage for widget drawingJulian Eisel
Previously we would pass button state and draw information to widget draw callbacks in a rather hacky way. Some specific flags from `uiBut.flag` were masked out, so their bits could be reused for also passing `uiBut.drawflag` in the same int. Instead this commit introduces a state-info struct that can properly hold all the relevant data. This has the advantage that it's now easier to introduce new state data that needs to be accessible in the widget callbacks. Since we are running out of button flags, we plan to reorganize button flags, and split them up into multiple bitfields. In the widget drawing code, this would have been a hassle earlier. Also had to add a new widget callback to draw blocks as widgets (popup backgrounds), since that would pass block flags where we would usually pass button flags. This wasn't nice, now it's separated more clearly.
2022-05-12Revert commits to increase button flag bitfield sizeJulian Eisel
This reverts the commits 8d9d5da13706b668b9bd0d631e00c9b00b73f3ea, 59cd616534b46ab85b4324a0886bd9eb8876a48b and 98a04ed4524234b1840dc039c2f356db5ac57f26. The commits are causing issues with MSVC, see D14926. I'm working on a different solution, but that will need some work.
2022-05-11UI: Update rest of UI code for increased button flag bitfieldJulian Eisel
Needed after 98a04ed45242.
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-25Cleanup: use new c++ guarded allocator APIAaron Carlisle
API added in rBa3ad5abf2fe85d623f9e78fefc34e27bdc14632e
2021-12-09Fix T93519: handle prefix names in autocompletesAzeem Bande-Ali
Autocomplete entires keep track of the length of the prefix in `name_prefix_offset`. However, the name matching logic was comparing the string including the prefix which resulted in tab-completion not working (when the user didn't also type in the prefix, typically two whitespaces). This is fixed by passing in a char pointer after the end of the prefix. Additionally, some searchbox logic is moved. Previously, `ui_searchbox_apply` would clear the entry which would mean that `ui_searchbox_find_index` would never succeed. Now the search box is only cleared if no match was found. Differential Revision: https://developer.blender.org/D13483
2021-12-08Cleanup: move public doc-strings into headers for 'editors'Campbell Barton
Ref T92709
2021-12-08Cleanup: Clang-Tidy modernize-redundant-void-argAaron Carlisle
2021-11-11Cleanup: Move interface_region_search.c to C++Hans Goudey
This will be helpful for solving a bug with search during animation playback, T89313. I tested this on all platforms on the buildbot.