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
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-02Cleanup: Move `EditBone` structure definition from `ED` to `BKE` area.Bastien Montagne
Access to this structure will be needed in BKE's armature code.
2020-09-30Cleanup: convert gforge task ID's to phabricator formatValentin
Cleanup old tracker task format to the new. e.g: [#34039] to T34039 Ref D8718
2020-09-25Fix T81161: Bad properties context panel placement loading old filesHans Goudey
These breadcrumbs used to be a panel in 2.79 and 2.80 development. If a file was saved in those versions, and the panels rearranged in a version that didn't have this panel, its sortorder would be changed even though it wasn't visible or even used in that version. A simple fix is to use a new ID name for the new version of this panel in 2.91. "Buttons" is an old name anyway.
2020-09-25Cleanup: Miscellaneous code improvementsHans Goudey
- Declare variables where initialized - Return early in some cases - Use "i" as an iteration index variable - Use bool instead of int where applicable
2020-09-20Fix T80993: Crash duplicating inactive workspaceHans Goudey
We need to check for the property editor's runtime struct before duplicating it.
2020-09-16Cleanup: spellingCampbell Barton
2020-09-15Property Search: Quick start and clear operatorsHans Goudey
`ctrl-F` to start the search is obviously necessary, but the clear operator, `alt-F` requires some of explanation. First, it maps nicely to the paradigm of "key to set, alt-key to clear," which makes it unobtrusive. Second, it can be a quicker way to clear the search than moving the mouse to the top. Finally, in the future, it could a reset the panels to their expansion before the search started. Differential Revision: https://developer.blender.org/D8857
2020-09-15UI: Single tab property searchHans Goudey
This adds a search bar to the properties editor. The full search for every tab isn't included in this patch, but the interaction with panels, searching behavior, UI, region level, and DNA changes are included here. The block-level search works by iterating over the block's button groups and checking whether they match the search. If they do, they are tagged with a flag, and the block's panel is tagged too. For every update (text edit), the panel's expansion is set to whether the panel has a result or not. The search also checks for matching strings inside enums and in panel labels. One complication to this that isn't immediately apparent is that closed panel's subpanels have to be searched too. This adds some complexity to the area-level panel layout code. Possible Future Improvements: - Use the new fuzzy search in BLI - Reset panels to their expansion before the search started if the user escape out of the text box. - Open all child panels of a panel with expansion. Differential Revision: https://developer.blender.org/D8856
2020-09-15Property Search: Move properties context buttons back to a panelHans Goudey
The context path "breadcrumbs" used to be in a panel in 2.79. Although they look a bit better in the header, there isn't enough space for them with the property search field in the header as well. Maybe there will be another solution in the long term to fit both the search field and this panel in the header, but for now, this commit moves these labels back to a header-less panel. Differential Revision: https://developer.blender.org/D8853
2020-09-15Cleanup: Split properties editor layout functionHans Goudey
Getting the string for a specific context is a basic thing that can be its own function. This way it can also be reused in other functions.
2020-09-12Cleanup: Remove GLEW dependencies outside of GL moduleClément Foucault
2020-09-11Cleanup: Remove unused variables and functionHans Goudey
Somehow these changes were lost while pulling the previous commit from the property-search-ui-v2 branch.
2020-09-11UI: Use operator to set property editor's pinned data-blockHans Goudey
This commit removes the custom callback that's currently used to set the property editor's pinned data, replacing it with an operator. This means "pin" button doesn't have to be defined in C. Differential Revision: https://developer.blender.org/D8376
2020-09-10Fix T80651: Material tab disappearsSebastian Parborg
Always return true if the object can have materials. Even if there are not currently any materials assigned to the object.
2020-09-09Cleanup: reduce variable scopeJacques Lucke
2020-09-09Fix material null pointer reference in buttons_context.cSebastian Parborg
ASAN reported null pointer access when converting a mesh to curves. Check if the material is a null pointer before trying to use it.
2020-08-26Merge branch 'blender-v2.90-release' into masterCampbell Barton
2020-08-26Fix T79992: Error calling context.copy() in Properties EditorDalai Felinto
This was an oversight in rB83e3d25bcae3. Basically we still have the "hair" and "point_cloud" entries for the context. However they were ifdef'ed. Note this would mostly happen in 2.90 since we always build without hair and particles there. Differential Revision: https://developer.blender.org/D8712
2020-08-20Cleanup: Remove unused variables for horizontal panelsHans Goudey
Continuing the work of eb9055a572c3, remove remaining unecessary variables and arguments that were related tabbing and horizontal alignment of panels. For example, "vertical" was always true, and removing that exposed other unused variables.
2020-08-18Merge remote-tracking branch 'origin/blender-v2.90-release'Dalai Felinto
2020-08-18Remove (ifdef) RNA for simulation, point cloud and particlesDalai Felinto
For 2.90 release this should not be exposed in the RNA API. In master this needs to be ON by default, that's all. Differential Revision: https://developer.blender.org/D8589
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-04Fix T79234: Material preview does not updateJulian Eisel
When changing the material while the properties editor temporarily isn't visible (e.g. because another editor is in full-screen or a different workspace is active), the preview wouldn't be updated on changes. Always trigger a material preview update on screen layout or editor type changes.
2020-08-04Fix T79234: Material preview does not updateJulian Eisel
When changing the material while the properties editor temporarily isn't visible (e.g. because another editor is in full-screen or a different workspace is active), the preview wouldn't be updated on changes. Always trigger a material preview update on screen layout or editor type changes.
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-30Merge remote-tracking branch 'origin/blender-v2.90-release'Dalai Felinto
2020-07-30Cleanup: Remove pre 2.80 headersValentin
Review: D8341
2020-07-29Cleanup: Doxygen sections, comment formattingHans Goudey
2020-07-28Cleanup: Use bool instead of intHans Goudey
2020-07-26Cleanup: GPU: Remove GPU_glew.h outside of GPU moduleClément Foucault
Remove use of GL* constants and types inside the codebase. There is still a few occurence to get rid of.
2020-07-23UI: Move properties tab list creation from RNA to editorHans Goudey
This is a change I pulled from the property-search-ui branch, where I have to use the list of tabs to search the inactive tabs and it makes more sense to use the array directly. It is also an improvement to have this fundamental code to the properties editor in the editor code rather than an RNA callback. There are no functional changes. Differential Revision: https://developer.blender.org/D8368
2020-07-06Fix T77730: ShaderFx Missing Update NotifierHans Goudey
This adds a notification type for shaderfx so the properties editor can be properly notified to redraw. Another possible solution would be to also redraw the shaderfx tab with a ND_MODIFIER update, but this solution allows us to avoid some unecessary redraws too. There were no existing cases of ND_OBJECT | NC_MODIFIER updates, so those cases were removed from buttons_area_listener. Differential Revision: https://developer.blender.org/D8159
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-03Cleanup: Explicit return in each `else if` block in `buttons_context()`Sybren A. Stüvel
This is a similar change as in rB4283da83cc9. No functional changes.
2020-06-23Preferences: New experimental settings for particle system and hairJacques Lucke
This replaces the cmake options `WITH_NEW_OBJECT_TYPES` and `WITH_NEW_SIMULATION_TYPE` with two experimental userpref settings: * `use_new_particle_system`: Enables the point cloud type and the simulation editor. * `use_new_hair_type`: Only displays the add-operator in the add menu for now. Note, in the current state you can't do anything productive with the new particle system or the new hair type. Features will be added step by step in the upcoming weeks and months. Reviewers: brecht Differential Revision: https://developer.blender.org/D8096
2020-06-19UI: ShaderFx Drag and Drop, Layout UpdatesHans Goudey
This patch implements the list panel system D7490 for grease pencil shader effects. It also moves their drawing to a callback in ShaderFxTypeInfo in line with the extensible architecture refactoring goal T75724. The implementation is basically exactly the same as for the modifier patch (9b099c86123fc82). Thanks to Matias Mendiola (@mendio) for helping to develop the layout changes. Differential Revision: https://developer.blender.org/D7985
2020-06-19UI: Grease Pencil Modifier Drag and Drop, Layout ChangesHans Goudey
This patch implements the list panel system D7490 for grease pencil modifiers. It also moves their drawing to a callback in GpencilModifierTypeInfo in line with the extensible architecture refactoring goal T75724. This also adds the "set_error" function for grease pencil modifiers, which hadn't been copied from mesh modifiers yet. The implementation is basically exactly the same as for the modifier patch (9b099c86123fc82). Thanks to Matias Mendiola (mendio) for providing mockups for many of the layout changes. Differential Revision: https://developer.blender.org/D7978
2020-06-11Fix T77171: File selector doesn't tag preferences to be savedCampbell Barton
2020-06-05UI: Drag and Drop Modifiers, Layout UpdatesHans Goudey
This patch implements the list panel system D7490 for modifiers. It also moves modifier drawing to a callback in ModifierTypeInfo in line with the extensible architecture refactoring goal T75724. This adds a PanelRegister callback and utilities for registering panels and subpanels. It also adds the callbacks for expansion saving and drag and drop reordering described in D7490. These utilities, callbacks, and other common UI elements shared between modifiers live in MOD_ui_common.c. Because modifier buttons are now in panels, we can make use of subpanels for organization. The UI layouts also use the single column layout style consistently used elsewhere in Blender. Additionally, the mode-setting buttons are aligned and ordered consistently with the outliner. However, the large number of UI changes in this patch may mean that additional polishing is required in master. Thanks to William Reynish (@billreynish) who did a fair amount of the layout work and to Julian Eisel (@Severin) for consistent help. Differential Revision: https://developer.blender.org/D7498
2020-06-02Cleanup: Use const context for some UI templatesHans Goudey
- uiTemplateID: Straightforward, just const for the template and the functions it calls - uiTemplateCacheFile: Create a function in rna_ui.c because the generated RNA callback doesn't have const context. Differential Revision: https://developer.blender.org/D7895
2020-05-26Merge branch 'blender-v2.83-release'Philipp Oeser
2020-05-26Fix T76970: Unneccessary update calls viewportJeroen Bakker
Due to recent changes clicks in the node editor would trigger a depsgraph update resulting in too many redraws. This patch limits the updates to when workbench shown in texture mode in any visible screen. There are still cases where too many updates are created. For example when there are a Cycles render viewport and a Workbench texture viewport on the same screen. This fix is meant as a workaround. The actual fix should add a mechanism to the depsgraph and the viewports should check if they need to be redrawn. Reviewed By: Brecht van Lommel Differential Revision: https://developer.blender.org/D7830
2020-05-08GPencil: Refactor - Rename modifier and shder functionsAntonio Vazquez
This change is to align names with changes in T76498
2020-05-08Fix T76498: Refactoring - Rename BKE modifiers funtionsAntonio Vazquez
2020-04-07Cleanup: BLI_path.h function renamingCampbell Barton
Use BLI_path_ prefix, more consistent names: BLI_parent_dir -> BLI_path_parent_dir BLI_parent_dir_until_exists -> BLI_path_parent_dir_until_exists BLI_ensure_filename -> BLI_path_filename_ensure BLI_first_slash -> BLI_path_slash_find BLI_last_slash -> BLI_path_slash_rfind BLI_add_slash -> BLI_path_slash_ensure BLI_del_slash -> BLI_path_slash_rstrip BLI_path_native_slash -> BLI_path_slash_native Rename 'cleanup' to 'normalize', similar to Python's `os.path.normpath`. BLI_cleanup_path -> BLI_path_normalize BLI_cleanup_dir -> BLI_path_normalize_dir BLI_cleanup_unc -> BLI_path_normalize_unc BLI_cleanup_unc16 -> BLI_path_normalize_unc16 Clarify naming for extracting, creating numbered paths: BLI_stringenc -> BLI_path_sequence_encode BLI_stringdec -> BLI_path_sequence_decode Part of T74506 proposal.
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: 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: fix typos in commentsBrecht Van Lommel
Contributed by luzpaz. Differential Revision: https://developer.blender.org/D7133