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-15Fix T76597: Support Keyframe: Copy To SelectedWayde Moss
Reviewed By: Sybren, Luciano Muñoz Sessarego Differential Revision: https://developer.blender.org/D7783
2020-10-13Fix T81674: LibOverride: 'Define Override' UI operation can crash.Bastien Montagne
Case where RNA is not able to generate a proper path for a property was not taken into account properly.
2020-09-02Cleanup: use bool instead of int in various placesJacques Lucke
2020-08-28Fix T80195: crash when invoking tooltips on MacOSGermano Cavalcante
Problem introduced in rBadd48c007428. `UI_but_string_info_get` can change the value of the args.
2020-08-26Cleanup: use const variables in interface codeCampbell Barton
2020-08-19UI Code Quality: Use LISTBASE_FOREACH in interface directoryHans Goudey
I only skipped a few loops in the monstrous ui_handle_menu_event function. Also, I only changed variable names where necessary to prevent redeclarations. Differential Revision: https://developer.blender.org/D8586
2020-08-07UI Code Quality: Use derived structs for search buttons and decoratorsJulian Eisel
The current on-size-fits-all `uiBut` creates quite a mess, where it's hard to reason about which members are free for use, under which conditions they are used and how. `uiBut` also has members that aren't used at times, violating the "don't pay for what you don't use" principle. To address this, we want to move to typed buttons, where `uiBut` is just a base struct and each type extends it as needed. That structures data better and type specific data is only available if it's actually used by a button type. Two trade-offs: * Many casts to the derived type have to be done. * Sometimes we change the button type after it's created. So I had to add logic to reallocate the button for use with the new, possibly derived struct. Ideally that wouldn't be needed, but for now that's what we have. Part of T74432. Differential Revision: https://developer.blender.org/D7610 Reviewed by: Brecht Van Lommel, Campbell Barton
2020-08-06UI: Fixes and small improvements to some labels and UI messagesYevgeny Makarov
Small tweaks to make labels and texts more correct, consistent and polished. Reviewed by: Aaron Carlisle, Julian Eisel Differential Revision: https://developer.blender.org/D8346
2020-07-16LibOverride: Fix getting proper RNA path and ID from embedded ones.Bastien Montagne
Master collections and root node trees should now be working as expected in that regard.
2020-07-03Cleanup: Interface, 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/interface` module. No functional changes.
2020-06-30LibOverride: Add necessary bits in RNA to deal with embedded IDs paths.Bastien Montagne
Note that this code is rather rough and slightly hacky, a proper solution needs to be designed at some point probably, but for now this should work fine. As usual, master collections and root node trees remain TODO for now.
2020-06-30Cleanup: Use unsigned int when for enum values, instead of signed int.Bastien Montagne
2020-06-30Cleanup: LibOverride: Replace raw pointers checks by proper macros.Bastien Montagne
This is cleaner, but also crucial to avoid weird issues when behaviors of those checks are modified...
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-09Fix T77148: Crash changing multiple values for sequencer stripsCampbell Barton
This was caused by assuming all strips were the same type.
2020-05-12Fix T76635: Clicking the text button X in a pop-up doesn't clearJulian Eisel
In this case giving `CTX_wm_menu()` priority over `CTX_wm_region()` is all that's needed and makes sense (since we want exactly the hovered button, not some other active button in the region/menu hierarchy). The situation with pop-ups is still tricky, see T73565. But as a first step it's probably good to let functions be more explicit about what they want when querying UI context. So I added a variation of a UI-context function for cases like this.
2020-05-07Cleanup: split button search callbacks into their own structCampbell Barton
2020-04-03Cleanup: Rename bScreen variables from sc/scr to screenJulian Eisel
Part of T74432. Mostly a careful batch rename but had to do few smaller fixes. Also ran clang-format on affected files.
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: Continue renaming ARegion variables from ar to regionJulian Eisel
Continuation of b2ee1770d4c3, now non-single word variables are also renamed. Part of T74432. Also ran clang-format on affected files.
2020-04-01Fix T66494: Alt+ clicking (assign to all selected) does not work for NLAPhilipp Oeser
strips This uses the new "selected_nla_strips" context member in UI_context_copy_to_selected_list(). bonus: this also makes the "Copy To Selected" button operator [in the button context menu] work for anything NLA Strip related. Maniphest Tasks: T66494 Differential Revision: https://developer.blender.org/D7281
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-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: Reduce context usage in UI functionsJulian Eisel
Part of https://developer.blender.org/T74429. There's a chance that this causes some issues becaue in some cases we change from getting the window from context to getting it from somewhere else.
2020-03-04Fix T74434: Video Sequencer: Alt+ clicking (assign to all selected) doesPhilipp Oeser
not work for unlocking Special case for when we do this on "lock": - locked sequences are not in "selected_editable_sequences" - use "selected_sequences" in that case Maniphest Tasks: T74434 Differential Revision: https://developer.blender.org/D7023
2020-02-25Cleanup: clang-formatBrecht Van Lommel
2020-02-21Fix T74006: Alt+ clicking (assign to all selected) doesn not work forPhilipp Oeser
bone constraints settings 'UI_context_copy_to_selected_list()' was working fine for constraints on objects (would properly get the path and list of selected objects) and also for bone settings (would properly get the path and list of bones). There was no special case for constraints on bones though, so code would work on selected objects (not selected bones). So we now get the right bones and resolve the path to the constraint setting _from the bones_. Maniphest Tasks: T74006 Differential Revision: https://developer.blender.org/D6897
2020-02-10Cleanup: Rename `BKE_library_override_` functions to `BKE_lib_override_library_`Bastien Montagne
pqrt of T72604.
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-12-12Add support for tiled images and the UDIM naming schemeLukas Stockner
This patch contains the work that I did during my week at the Code Quest - adding support for tiled images to Blender. With this patch, images now contain a list of tiles. By default, this just contains one tile, but if the source type is set to Tiled, the user can add additional tiles. When acquiring an ImBuf, the tile to be loaded is specified in the ImageUser. Therefore, code that is not yet aware of tiles will just access the default tile as usual. The filenames of the additional tiles are derived from the original filename according to the UDIM naming scheme - the filename contains an index that is calculated as (1001 + 10*<y coordinate of the tile> + <x coordinate of the tile>), where the x coordinate never goes above 9. Internally, the various tiles are stored in a cache just like sequences. When acquired for the first time, the code will try to load the corresponding file from disk. Alternatively, a new operator can be used to initialize the tile similar to the New Image operator. The following features are supported so far: - Automatic detection and loading of all tiles when opening the first tile (1001) - Saving all tiles - Adding and removing tiles - Filling tiles with generated images - Drawing all tiles in the Image Editor - Viewing a tiled grid even if no image is selected - Rendering tiled images in Eevee - Rendering tiled images in Cycles (in SVM mode) - Automatically skipping loading of unused tiles in Cycles - 2D texture painting (also across tiles) - 3D texture painting (also across tiles, only limitation: individual faces can not cross tile borders) - Assigning custom labels to individual tiles (drawn in the Image Editor instead of the ID) - Different resolutions between tiles There still are some missing features that will be added later (see T72390): - Workbench engine support - Packing/Unpacking support - Baking support - Cycles OSL support - many other Blender features that rely on images Thanks to Brecht for the review and to all who tested the intermediate versions! Differential Revision: https://developer.blender.org/D3509
2019-12-04UI: support Copy To Selected and Alt-Click for PropertyGroup members.Alexander Gavrilov
Rigify uses a property group to contain options of its rigs, so currently it is impossible to use Alt-Click or Copy To Selected to change a setting for multiple rigs at the same time. The main problem here is that there is no efficient way to find which bone the property group belongs to. To maintain performance, implement this by checking the active bone if it is known. Copy Data Path and related features still don't work, as data path calculation can't use context. Differential Revision: https://developer.blender.org/D6264
2019-11-24Cleanup: doxygen commentsCampbell Barton
Also correct some outdated symbol references, add missing 'name' commands.
2019-10-11GPencil: New Eyedropper tool for Material creation.Antonio Vazquez
This patch is only for the eyedropper to create materials. Options: Click: Create Stroke Material Shift+Click: Create Fill Material. Shift+Ctrl+Click: Create Stroke and Fill Material. Toolbar: {F7718606} Reviewed By: brecht, mendio Differential Revision: https://developer.blender.org/D5688
2019-09-20UI: Fix CapitalizationYevgeny Makarov
Differential Revision: https://developer.blender.org/D5716
2019-09-09UI: Refactor and improve buttton extra iconsJulian Eisel
Without this patch there could only be one superimposed icon and the operators were hard coded for the button types. This keeps the previous, sort of predefined extra icons working in a rather generic way, but allows adding specific ones for specific case through `UI_but_extra_operator_icon_set()`. Reviewed by: Campbell Barton Differential Revision: https://developer.blender.org/D5730
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-23LibOverride: Fixed bug in removing override op operator.Bastien Montagne
In case the property is a RNA pointer, `RNA_path_resolve()` will try to resolve it and return that pointer, instead of returning expected container... That is a bad inconsistency in the rNA path API, but no proper way to solve it for now...
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
2019-08-22Revert "Fix T68971: Copy As New Driver from Material node creates a bad ↵Bastien Montagne
reference." This reverts commits 54fd8176d7e91, 4c5becb6b1 and 8f578150e. Those kind of commits must be reviewed and approved by project owners. That one: * Broke Collada building by not properly updating all calls to modified function. * Broke *whole* ID management by not properly updating library_query.c. And in general, I am strongly against backward ID pointers, those are *always* a serious PITA for ID management. Sometimes they cannot be avoided, but in general other ways to get that kind of info should be investigated first.
2019-08-22Fix 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 data block 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 data block, by adding a new runtime field to bNodeTree.
2019-08-19UI: replace "reports to text" operator with showing info logBrecht Van Lommel
This operator only existed to be able to see multiple reports, now instead the info log can be opened and contents can be copy/pasted. Patch by Valentin (Poulpator) Differential Revision: https://developer.blender.org/D5510
2019-08-17Cleanup: spellingCampbell Barton
2019-08-14UI: suppress Copy/Paste/Edit Driver options on whole array property fields.Alexander Gavrilov
When a button represents the whole array (e.g. color picker buttons), these context menu options were available, but didn't really work correctly. Since it's not clear how they could reasonably work without a valid index, it's better to hide them.
2019-08-04Add a new Copy As Driver context menu option for properties.Alexander Gavrilov
It is a very common need to create drivers that set the value of a property to the value of some other property, but it currently requires multiple actions: Copy Data Path on the input property, adding a driver to the output property, selecting the input ID reference, and pasting the path. This adds a new Copy As Driver context menu option, which creates a complete driver in the clipboard that reads the current property, so all that remains is to paste it to the output property. It is also possible to paste just the new driver variable into an existing driver to combine multiple inputs. Reviewers: brecht, billreynish Differential Revision: https://developer.blender.org/D5382
2019-07-17Undo System: replace with simpler binary diffing buffer storageCampbell Barton
Applying/undoing incremental changes didn't fit well when mixed with periodic snapshots from mem-file undo. This moves to a much simpler undo system. - Uses array storage with de-duplication from `BLI_array_store`. - Loads the buffer into existing text data, for better performance on large files. - Has the advantage that Python operators can be supported since we don't depend on hard coded undo operations. Solves T67045, T66695, T65909.
2019-07-01Cleanup: move screen region find into utility functionCampbell Barton
2019-07-01Fix T66246: Key accelerators crashing on save dialogCampbell Barton
2019-06-17Cleanup: comment spellingCampbell Barton
2019-06-15Cleanup: Rename: Static Override -> Library Override.Bastien Montagne
Better to make internal code naming match official/UI naming to some extent, this will reduce confusion in the future. This is 'breaking' scripts and files that would use that feature, but since it is not yet officially supported nor exposed in 2.80, as far as that release is concerned, it is effectively a 'no functional changes' commit.