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-02-24PyAPI: Fix memory leak of parameters used for python 'draw_callbacks'Germano Cavalcante
When closing the blender, while the callbacks are removed, the reference count of the object used as `customdata` is not decremented. This commit adds two functions that correctly release the python `draw_callbacks` before releasing all `draw_callbacks`. Differential Revision: https://developer.blender.org/D10478
2021-02-21UI: Correct the text alignment in the quick setup (splash screen) dialogYevgeny Makarov
The "quick setup" dialog is actually a 'menu', and the "splash screen" block contains the UI_BLOCK_LOOP flag which causes the buttons' text to align to the left, however, usually regular buttons have centered text. As a workaround, add the UI_BLOCK_QUICK_SETUP flag which prevents the text from being left-aligned. Differential Revision: https://developer.blender.org/D10486 Reviewed by: Julian Eisel
2021-02-19UI: FModifier layout updates, drag and dropHans Goudey
This patch implements the list panel system D7490 for FCurve modifiers. The UI layouts are updated to make use of subpanels and to be consistent with the rest of the interface, and easier to understand. See the differential revision for screenshots. This commit also significantly cleans up the FModifier UI code, and improves, mainly by replacing the old button creation code is with the newer interface API using RNA. In turn there is a bit of complexity added because each FModifier has a separate panel. Although reordering of FModifiers was not implemented before, we get drag and drop basically for free here, so it is also included. As noted in some older to do tasks, FModifiers aren't evaluated in perfect order, which may be a point of improvement for the future. Differential Revision: https://developer.blender.org/D7997
2021-02-18Fix failing "Edit Source" (asserts) while number slider was visibleJulian Eisel
E.g. steps to reproduce: * Enter Vertex Paint mode * In the tool settings, right-click > "Edit Source" When creating a number slider via `layout.prop(..., slider=True)`, the UI code would reallocate the number button to be a number-slider button. That's because we now actually have different button data-structures for these (see e6f0b60c2e911). The edit source code stored data based on the button pointers, which didn't get updated after changing the type. The fix just adds this updating.
2021-02-18Cleanup: sort structs, file-listsCampbell Barton
2021-02-18Cleanup: Use const argument, decrease variable scopeHans Goudey
2021-02-17Cleanup: Return bool instead of intHans Goudey
2021-02-16Cleanup: Compile node_draw.c with C++Hans Goudey
This will allow using C++ data structures to draw node error messages. This required removing a forward declared enum for grease pencil undo. Compiles with clang tidy.
2021-02-14Cleanup: spellingCampbell Barton
2021-02-13Cleanup: spellingCampbell Barton
2021-02-11Merge branch 'blender-v2.92-release'Campbell Barton
2021-02-11Fix T83013: Annotation with hidden object in sculpt mode crashesCampbell Barton
This just avoids the crash, the annotation tool still doesn't work. Larger changes will be needed to resolve this, see T85532.
2021-02-10Merge branch 'blender-v2.92-release'Philipp Oeser
2021-02-10Fix T85395: Texture paint external edit wrong projection on reapplyPhilipp Oeser
Caused by rB5b34d11b55e0. Above commit restored the view matrices in ED_view3d_draw_offscreen _before_ they can be stored in the ImBuff (see ED_view3d_draw_offscreen / texture_paint_image_from_view_exec). Now make restoring the view matrices optional and dont do this in case of reprojection, so the used matrices can still be saved in the ImBuff later. Reviewed By: campbellbarton Maniphest Tasks: T85395 Differential Revision: https://developer.blender.org/D10331
2021-02-09GPencil: Basic block drawing in DopesheetAntonio Vazquez
Add a bar between keyframes to indicate that keyframe is still used. This is part of a change to make the rec button be used by gpencil. Example: Before: {F9592704} After: {F9592702} Reviewed By: #user_interface, #grease_pencil, pepeland, Severin Maniphest Tasks: T85463 Differential Revision: https://developer.blender.org/D10179
2021-02-09GPencil: Fill tool refactor and Multiframe in Draw modeAntonio Vazquez
This commit is a refactor of the fill tool to solve several problems we had since the first version of the tool. Changes: * The filling speed has been improved for each step of the process with the optimization of each algorithm/function. * New `AutoFit` option to fill areas outside of the viewport. When enable, the total size of the frame is calculated to fit the filling area. * New support multiframe filling. Now it is possible to fill multiple similar frames in one go. * New `Stroke Extension` option to create temporary closing strokes. These strokes can be displayed and adjusted dynamically using wheel mouse or PageUp/Down keys. * Parameter `Resolution` now is named `Precision` and has been moved to topbar. * `Resolution` now has decimals and can be lower than 1 to allow quick filling in storyboarding workflows. Maximum value has been set as 5. * Parameter `Simplify` has been moved to Advanced panel. * Improved fill outline detection. In some cases, the outline penetrated the area to be filled with unexpected results. * Fixes some corner case bugs with infinite loops. As a result of this refactor, also these new functionalities has been added. * New support for multiframe in `Draw` mode. Any drawing in active frame is duplicated to all selected frame. * New multiframe display mode. Keyframes before or after of the active frame are displayed using onion colors. This can be disable using Onion overlay options.
2021-02-09Cleanup: move eIconSizes, ID_Type enums into own fileCampbell Barton
This avoids adding DNA_ID.h into other headers, recently changed in cfa48c84d06ca8197f86b6d3ceef8a2c7c311a82 Note that other enums could be moved too, this is a smaller change to avoid indirectly including DNA_ID.h in many places.
2021-02-09Cleanup: Register node property layout callbacks in filesHans Goudey
This commit moves the property layout callbacks for node types to their implementation files from `drawnode.c`. This was proposed a while ago in T75724. **Benefits** - Fewer files need to be changed when adding a new node. - Makes it possible to reuse functions from the node's implementation in the layout code. - Except for RNA, all of the node "inputs" are in the same place. - Code gets shorter overall, avoids the large switch statements. **Downsides** - Requires including two UI headers. - Requires adding an editors dependency to the nodes folder. This commit only changes function nodes and geometry nodes, more can be moved later. Differential Revision: https://developer.blender.org/D10352
2021-02-08Fix for T84038: Improved Report WarningsHarley Acheson
Improved contrast for Status Bar report warning messages. Differential Revision: https://developer.blender.org/D10242 Reviewed by Hans Goudey
2021-02-08Cleanup: Rearrange and name the enums and flags used in the transform codeGermano Cavalcante
Simple change that shows all the enums used in the transform code and helps to better understand the role of the members of the struct TransInfo. It also allows the IDE to show the name of the value represented by the member instead of a number that needs to be consulted. Differential Revision: https://developer.blender.org/D10312
2021-02-08Mask: Use control point position when handle is selectedSebastian Koenig
This is something what comes after an experiment, which makes behavior more desirable. Basically, for Lock-to-Selection functionality always use control point position if any of control point itself or handles are selected. Initial patch from Sebastian, modification from Sergey. Differential Revision: https://developer.blender.org/D10265
2021-02-06UI: Fix Typos in Comments and Docsluzpaz
Approximately 91 spelling corrections, almost all in comments. Differential Revision: https://developer.blender.org/D10288 Reviewed by Harley Acheson
2021-02-05Cleanup: correct spelling in commentsCampbell Barton
2021-02-05Cleanup/refactor: Undosys: Get rid of the magic values for undo direction.Bastien Montagne
Move `eUndoStepDir` to `BKE_undo_system.h` and use its values everywhere. Note that this also introduce the `STEP_INVALID` value in that enum. Finally, kept the matching struct members in some lower-level readfile code as an `int` to avoid having to include `BKE_undo_system.h` in a lot of unrelated files.
2021-01-29Merge branch 'blender-v2.92-release'Brecht Van Lommel
2021-01-29Fix T84717: missing 3D viewport updates when changing shading settingsBrecht Van Lommel
Previously this relied on the dependency graph to detect changes in the screen datablock, which would then notify the renderers. This was rather indirect an not even really by design. Instead use notifiers to tag specific 3D viewports to be updated. Includes changes to BKE_scene_get_depsgraph to accept a const Scene pointer. Testing if this works correctly requires adding back commits 81d444c and 088904d, since those have been temporarily reverted. Differential Revision: https://developer.blender.org/D10235
2021-01-27UI: Tooltip for data-block selector menus, showing full name and library infoJulian Eisel
Long data-block names are clipped to fit into data-block selector menus. For linked data-blocks, there's also a hint indicating the source library, which takes further space and may get clipped too. So this commit adds a tooltip to the menu items, which displays the full, unclipped data-block name and the unclipped library name. Plus, the library path is shown too, which is also useful info. Adds helper functions for search menu item tooltips, so these are easier to add to other search menus in future. Part of T84188.
2021-01-27Cleanup: Use const parameters for active button lookups/testsJulian Eisel
Needed for const-correctness in the following commit.
2021-01-26Fix T84850: "Lock to Selection" causes unwanted jumpsSergey Sharybin
Adding new tracks, mask points, mask primitives, changing selection was causing an unwanted jumps in the view. This change makes it so those operations are preserving view offset. Differential Revision: https://developer.blender.org/D10146
2021-01-25Cleanup: pass 'rctf' rectangle to 2D box drawing functionsCampbell Barton
Passing 4x arguments for the rectangle, mixed in with round-box radius & color wasn't very readable. Instead, pass a `rctf` as the first argument to UI box drawing functions.
2021-01-25UI: Round-box drawing cleanupHarley Acheson
The new GPU_SHADER_2D_WIDGET_BASE shader allows us to draw many complex shapes with anti-aliasing. One thing it can do is draw an opaque rounded rectangle with colors that differ between its interior and outline. In order to do the above in a single pass I recently added an "_ex" version of UI_draw_roundbox that exposes most of that shaders features. This simplifies interface_draw.c by removing redundancy in the calling of this shader by using this new uber "_ex" version. Ref D10189
2021-01-25Cleanup: remove unused UI_draw_roundbox_shade_y functionCampbell Barton
Marked unused 2017 f69678482c849d873b9686cd6068946205db7c2b) Remove since this remains unused, split from D10189 to allow reverting if we ever need it back.
2021-01-24Fix outliner and animation editors exiting multi-object edit-modeCampbell Barton
When multiple objects were in edit-mode, only the active object would exit edit-mode.
2021-01-24UI: Viewport Navigate Gizmo RefactorHarley Acheson
Simplification and changes to the Navigation gizmo. Better indication of negative axes, consistent use of color and size to indicate orientation, ability to be resized. Differential Revision: https://developer.blender.org/D9744 Reviewed by Campbell Barton
2021-01-22Merge branch 'blender-v2.92-release'Campbell Barton
2021-01-22Fix outliner and animation editors exiting multi-object edit-modeCampbell Barton
When multiple objects were in edit-mode, only the active object would exit edit-mode.
2021-01-22Cleanup: spelling, remove outdated/invalid commentsCampbell Barton
2021-01-22Merge branch 'blender-v2.92-release'Campbell Barton
2021-01-22Fix T84920: Crash undoing object activation in the outlinerCampbell Barton
Regression from d8992192e5512380f57433df113f3e3f8b22f7cb The original code relied on having a separate edit-object pointer than the active object. Use a utility function to avoid code duplication as there are other areas that have similar functionality.
2021-01-20Cleanup: remove extra in trailing asteriskCampbell Barton
Comment blocks not conforming to convention.
2021-01-20Cleanup: Store runtime space node variables in a separate structHans Goudey
This commit moves runtime-only variables from the `SpaceNode` DNA struct to a private struct in `node_intern.h`. Before, it was hard to tell which data needed to be saved in files, this should make it more clear. Node that the `edittree` field is basically a runtime variable, since it's set from the `treepath` list on read, but moving it would require some more invasive changes that I don't think are worth it right now. Also, not all of the moved variables were explicitly cleared on read-- `aspect` is set at the start of a redraw, `cursor` is set in a region callback, and `recalc` was used as an update flag. Differential Revision: https://developer.blender.org/D10141
2021-01-19Cleanup: use 'const' argument for parameter argumentCampbell Barton
2021-01-19UI Code Quality: Use "params" struct for area and region callbacksHans Goudey
These functions with many arguments can be unwieldy. Aside from the obvious issues with rewriting the list of arguments and the opportunities for error and frustration that presents, the long list of arguments make these systems hard to change. So when an argument should be added, someone might skip that and add some hack instead. So, as proposed in T73586#1037210, this patch instead uses a "params" struct for each of these callbacks. - Use param argument for `ARegionType.listener` - Remove unused window field in region listener - Use param argument for `SpaceType.listener` - Use params struct for `ARegionType.message_subscribe` Differential Revision: https://developer.blender.org/D9750
2021-01-18Merge branch 'blender-v2.92-release'Bastien Montagne
2021-01-18Fix T84739: Crash with curve brush in sculpt mode.Bastien Montagne
No idea why we did not pass context to `ED_paintcurve_undo_push_end`, it is easily availbale everywhere...
2021-01-16GPencil: Cleanup - Rename ED_gpencil_stroke_color_use to ↵Antonio Vazquez
ED_gpencil_stroke_material_editable
2021-01-16GPencil: Add new parameteres to transform layersAntonio Vazquez
When using grease pencil for drawing Storyboards, it's very common to require a transform of the layers. This transform can be done using the offset modifier, but in some cases, the scene requires a lot of modifiers and makes the file hard to work. This new feature adds a transforms Location, Rotation and Scale at Layer level, and allows to transform the layer without using a modifier, keeping the scene more clean. {F9480695} This feature was suggested by @pepeland after receiving feedback from several artists. Also, done some code cleanup and rename some functions to get a better naming. Maniphest Tasks: T83660 Differential Revision: https://developer.blender.org/D9761
2021-01-16Merge branch 'blender-v2.92-release'Campbell Barton
2021-01-16Add Object Tool: support incremental snappingCampbell Barton
This adds a "Snap to" option that allows using all the scenes snap settings which includes incremental & absolute grid snapping options. This is optional because always following scene snapping would not snap to geometry by default (which seems to be the most useful default).
2021-01-15Cleanup: Add const in various places in node codeHans Goudey
Also includes some various other minor cleanups, like using bool instead of int in a couple places.