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-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-07-21UI: Use consistent layout for custom operator UIHans Goudey
Operators are one of the last places in Blender to use older UI designs that don't fit in with recent style conventions. This commit updates these custom operator UI callbacks for consistency and clarity. Some of the code is also simplified a lot. Some of the older operator layouts were much more complex (in terms of code) than they needed to be. See the differential revision for a before and after screenshot of each operator. Differential Revision: https://developer.blender.org/D8326
2020-07-19Cleanup: unused argument warningCampbell Barton
2020-07-18UI: Status Bar Statistics and Other OptionsHarley Acheson
Status Bar can show scene statistics, memory usage, version, etc set by context menu. Part two of T75672. Differential Revision: https://developer.blender.org/D7557 Reviewed by Julian Eisel
2020-07-18Cleanup: GPU: Encapsulate scissor testClément Foucault
2020-07-18Cleanup: GPU: Wrap GL_UNPACK_ROW_LENGTH in GPU_stateClément Foucault
Also go back to default value of 0 after usage.
2020-07-18Cleanup: glutil: Use GPUTexture in immDrawPixelsTexScaled_clippingClément Foucault
This also cleanup the code for readability.
2020-07-18Cleanup: GPU: rename bglPolygonOffset to GPU_polygon_offsetClément Foucault
And move it to GPU module.
2020-07-18Cleanup: GPU: Replace glBlendFunc by GPU equivalentClément Foucault
2020-07-16Cleanup: Port glClear calls to GPU module functionsClément Foucault
2020-07-15Revert "Cleanup: remove public unused function."Campbell Barton
This reverts commit 03c8b048a166584a72ceff08432401cd7047648c. This commit re-introduced T76837. While there is a comment explaining why this function is needed, the naming of the poll function does make this confusing. The API could be changed to avoid confusion here.
2020-07-13LibOverride: add more polling checks to operators not supposed to work on ↵Bastien Montagne
overrides. This is long work, we are still likely missing a lot of cases...
2020-07-13Cleanup: remove public unused function.Bastien Montagne
2020-07-03Cleanup: Editors/Screen, 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/screen` module. No functional changes.
2020-07-03Cleanup: Explicit return in each `else if` block in `ed_screen_context()`Sybren A. Stüvel
The `ed_screen_context()` function is approximately 700 lines long, and its main structure is a huge chain of `else if` statements. Some of the bodies did not return, but rather fell through and relied on the `return -1;` at the bottom of the function. This means that in order to truly understand what is going on in one of those `else if` blocks, it could be required to scroll past all the following `else if` blocks, double-checking that they all had an `else`, and then see what happens below. By adding explicit `return -1;` everywhere this happened, this is all avoided, increasing local understandability of the code. Furthermore, it makes the upcoming cleanup with the Clang-Tidy rule `readability-else-after-return` a lot easier to do. No functional changes.
2020-07-02GPUOffScreen: Remove the sample parameterClément Foucault
This is because the DRW module is no longer compatible with drawing using MSAA. This also change the Python API.
2020-07-01LibOverride: Tweak more poll functions to prevent illegal operations.Bastien Montagne
We are likely still missing a lot of things, but most operators that should not be allowed on liboverrides should now be properly disabled.
2020-07-01UI: use term 'Current Frame' instead of 'Playhead'Campbell Barton
Keep terminology consistent, 'Current Frame' is used nearly everywhere.
2020-07-01Cleanup: spellingCampbell Barton
2020-06-29Fix T78229: Playhead not refreshing when area is maximizedJeroen Bakker
No other areas were tagged for redraw.
2020-06-27Docs: correct invalid doxygen params & referencesCampbell Barton
2020-06-24Fix T78112: VSE Sequencer/Preview crash after fullscreenJulian Eisel
The region refresh callback wasn't called, which in the VSE ensures valid region sizes and removes handlers of invisible regions.
2020-06-24Cleanup: clang-formatCampbell Barton
2020-06-23Animation: Only update timeline header during playbackJeroen Bakker
The header of all SPACE_ACTIONs are tagged for redraw. Only when the action editor is showing the timeline it is needed. No noticeable performance increase. But better to save some CPU cycles. Reviewed By: Sybren Stüvel Differential Revision: https://developer.blender.org/D8074
2020-06-23Cleanup: renamed `do_draw_overlay` to `do_draw_paintcursor`Jeroen Bakker
To make a better distinction with region overlay.
2020-06-23Performance: Draw play head as an overlayJeroen Bakker
When playing back animations a playhead is updated in all the animation editors. The drawing of the playhead is part of the drawing of the main region `RGN_TYPE_WINDOW` that redraws the whole region. This change will draw the play head and window scrollers when updating the screen. This affects the Action editor, Timeline, Graph editor, NLA editor and Sequence editor. There is noticeable speedup when using complex animation files. Spring 02_020_A.anim.blend fps went from 11.8 to 12.5 when showing a timeline and a action editor on a Ryzen 1700. * When playing back animation the markers don't jump up/down when near the frame. This could be added back. Reviewed By: Brecht van Lommel Differential Revision: https://developer.blender.org/D8066
2020-06-22Refactoring: View2DScrollers memory allocationJeroen Bakker
View2DScrollers used the memory manager to allocate memory. This isn't a problem but in a upcoming change the scrollers will be drawn more often than it used to (See {D8066}). To limit the number of allocations and frees this patch will use the stack for allocation. Reviewed By: Campbell Barton Differential Revision: https://developer.blender.org/D8076
2020-06-19UI: Avoid rebuilding outliner tree when changing area sizeJulian Eisel
In big files, ie typical production files, resizing the outliner area would be very slow. The outliner tree would be rebuilt then, which can easily be avoided.
2020-06-19Performance: Never draw channels region during playbackJeroen Bakker
Channels aren't visually changed by playing back an animation so there is no need to do this. As rendering channels is using a lot of logic (filtering animation data, converting fcurves to samples etc) it has an noticeable overhead. This change has no functional limitation. Users are still able to do everything during animation playback. There are other mechanisms in place that take care of that. Spring 02_020_A.anim.blend went from 11.8 to 12.0 on a Ryzen 1700. I didn't test with scenes but it should be more noticeable with more complex scenes. Reviewed By: Brecht van Lommel Differential Revision: https://developer.blender.org/D8073
2020-06-19Cleanup: SPACE_ACTION does not have a RGB_TYPE_TOOL_HEADERJeroen Bakker
So no need to check this specific case.
2020-06-19Cleanup: use bool and enums in `match_region_with_redraws`Jeroen Bakker
Function used int for everything.
2020-06-18Cleanup: redundant parenthesisCampbell Barton
2020-06-10Fix T77599 Image UV editor use linear interpolationClément Foucault
2020-06-05Code Cleanup: fcurve function namingJeroen Bakker
2020-06-03Object: refactor mode switchingCampbell Barton
Functionality here has become confusing over time, this removes duplicate, similar functions, preferring to set the mode instead of toggle, enter, exit. Mode switching utility function behaved differently regarding undo, 'ED_object_mode_toggle' for example didn't skip the undo push where 'ED_object_mode_set' did. Some callers chose these functions based on the intended undo behavior, even when toggling didn't make sense. There was also ED_object_mode_generic_enter which was similar to ED_object_mode_set, instead of the reverse of ED_object_mode_generic_exit. Simplify object mode switching internals: - Replace ED_object_mode_generic_enter with ED_object_mode_set. - Remove ED_object_mode_toggle as nearly all callers needed to check the current mode so toggling would set the mode argument correctly. - Use ED_object_mode_set for the object mode switching operator to simplify logic. - Add ED_object_mode_set_ex which has an argument to disable undo, needed when loading undo data needs to set the mode. - Remove unused ED_object_mode_exit.
2020-06-02Cleanup: GPU: Remove GPU_shaderinterface_uniform_ensureClément Foucault
2020-05-28Fix for T77111: Joins Areas Without Creating Invalid EdgesHarley Acheson
Properly align every involved edge when performing 'tolerant' area joins. Differential Revision: https://developer.blender.org/D7859 Reviewed by Brecht Van Lommel
2020-05-26UI: List Panel SystemHans Goudey
This implements a general system to implement drag and drop, subpanels, and UI animation for the stack UIs in Blender. There are NO functional changes in this patch, but it makes it relatively trivial to implement these features for stacks. The biggest complication to using panels to implement the UI for lists is that there can be multiple modifiers of the same type. Currently there is an assumed 1 to 1 relationship between every panel and its type, but there can be multiple list items of the same type, so we have to break this relationship. The mapping between panels and their data is stored with an index in the panel's runtime struct. To make use the system for a list like modifiers, four components must be added: 1. A panel type defined and registered for each list data type, with a known mapping between list data types and panel idnames. 1. A function called by interface code to build the add the panel layouts with the provided helper functions. - UI_panel_list_matches_data will check if the panel list needs to be rebuilt. - UI_panels_free_instanced will remove the existing list panels - UI_panel_add_instanced adds a list panel of a given type. 3. An expand flag for the list data and implementations of get_list_data_expand_flag and set_list_data_expand_flag. 4. For reordering, the panel type's reorder callback. This is called when the instanced panels are drag-dropped. This requires implementing a "move to index" operator for the list data. Reviewed By: Severin, brecht Differential Revision: https://developer.blender.org/D7490
2020-05-26Cleanup/refactor: Workspace API, boilerplate code, early exitJulian Eisel
* Simplify workspace API a bit * Comment on behavior of workspace-layout relations where exposed in API * Remove annoying getters/setters * Avoid lookups if we can early exit * A NULL check is removed in `direct_link_workspace()` that I don't see a need for. Am not 100% sure though, fingers crossed. In general these changes should improve readability and make things easier to reason about.
2020-05-26Cleanup: Remove uneeded NULL checks on ed_screen_contextDalai Felinto
view_layer should never be NULL.
2020-05-26Improved Area Border Selection and DraggingHarley Acheson
Allow use of the full width of visible borders when dragging to resize areas. Differential Revision: https://developer.blender.org/D7823 Reviewed by Brecht Van Lommel
2020-05-24Fix T77000: Preferences window can not be opened from script operatorJulian Eisel
The operators to open the Preferences, Driver Editor, or Info Log window did not work when executed from another operator or the Python console. Should work for all of these now. I considered using operator properties instead, so the position could be set by a script, with some fallback (e.g. current window center). But decided that's not really worth the boilerplate and decreased code readability. Can still be done if there's a need for it.
2020-05-18Merge branch 'blender-v2.83-release'Campbell Barton
2020-05-18Merge branch 'blender-v2.83-release'Campbell Barton
2020-05-18Cleanup: unused warning in last commitCampbell Barton
2020-05-18Cleanup: remove NULL checks from object mode switching take #2Campbell Barton
Re-apply changes from 54ea3562406c633dc69f59697cca3cd1cded3bcd, with a poll function that uses the same active object as the operator, matching other mode switching functions.
2020-05-14Merge branch 'blender-v2.83-release'Clément Foucault
2020-05-14UI: Fix Unreported missing background for azone arrowClément Foucault
This was caused by the sRGB viewport changes. The fix is to modify the alpha values manually. The shader was also missing a srgb fix.
2020-05-14Cleanup: sync clang-format with masterCampbell Barton
Avoid noisy diff's & conflicts.
2020-05-12Merge branch 'blender-v2.83-release'Clément Foucault