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-07-29Clanup: unused returnCampbell Barton
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-05-26Cleanup: Remove uneeded NULL checks on ed_screen_contextDalai Felinto
view_layer should never be NULL.
2020-05-12Fix T76669: Crash when doing right click on channelJacques Lucke
Reviewers: lichtwerk, sybren Differential Revision: https://developer.blender.org/D7702
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: Including "BLI_listbase.h" for LISTBASE_FOREACH macroDalai Felinto
These headers are not needed right away, but will be in the upcoming commit.
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-01Cleanup: clang-formatCampbell Barton
2020-04-01Add a "selected_nla_strips" context memberPhilipp Oeser
Needed for upcomming fix for T66494. ref T66494 / D7281
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-09GPencil: Refactor of Draw Engine, Vertex Paint and all internal functionsAntonio Vazquez
This commit is a full refactor of the grease pencil modules including Draw Engine, Modifiers, VFX, depsgraph update, improvements in operators and conversion of Sculpt and Weight paint tools to real brushes. Also, a huge code cleanup has been done at all levels. Thanks to @fclem for his work and yo @pepeland and @mendio for the testing and help in the development. Differential Revision: https://developer.blender.org/D6293
2020-01-07Annotations: Split annotation operators and pointer functionsAntonio Vazquez
This allows to have annotation panels and grease pencil object panel at the same time. Differential Revision: https://developer.blender.org/D6467
2019-09-21Cleanup: unused headers in editorsCampbell Barton
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-06-16Drivers: fix Variable Copy & Paste in the edit popover.Alexander Gavrilov
Without these buttons the functionality of the popover is incomplete compared to the Graph Editor panel. To support this the operators have to read the active F-Curve from the context, instead of directly scanning animation data. Expanding the context would also help Python operators.
2019-05-22Remove "_base*" from context APIDalai Felinto
We are not exposing RNA_ObjectBase in the 2.80 API. Thus we can't have operators relying on it (e.g, CTX_data_visible_bases, CTX_data_active_base, ...). Otherwise users won't be able to override context for these operators. This commit keep the CTX_data_.*bases() functions around so we don't need to change the operators and potentially break things that late into 2.80. However as far as the Python scripters are concerned there is no base to be overriden, ever. That also simplify the guessing game addon developers have to play when trying to override an operatori context. They still need to find whether an operator requires editables, visibles, selected, ... objects. But at least they don't need to find out whether the operators need base or object.
2019-05-01UV Sculpt: improve tool-system integrationCampbell Barton
In 2.7x UV sculpt was a kind of sub-mode (a toggle with it's own key-map & drawing code). Move this to an operator that uses the tool-system, this simplifies internal logic, especially brush selection which now matches sculpt and other paint modes. - Remove toggle used to enable uv sculpt. - Expose the brush, which was already used but there was no way to select different brushes. - Make UV sculpt use paint paint tool slots (using brushes how all other paint mode currently do). - Move UV Sculpt keymap to the tools keymap. - Remove Q to toggle UV sculpt mode, S/P/G keys to switch tools.
2019-04-22Cleanup: style, use braces for editorsCampbell Barton
2019-04-21Cleanup: comments (long lines) in editorsCampbell Barton
2019-04-18Cleanup: add trailing commas to avoid right shiftCampbell Barton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-03-12Context: add pose_objectCampbell Barton
Needed for UI scripts to detect mixed weight paint + pose mode.
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-16Cleanup: rename SPACE_IPO -> SPACE_GRAPHCampbell Barton
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2019-01-26Cleanup: remove redundant BKE/BLI/BIF headersCampbell Barton
2019-01-15Cleanup: comment line length (editors)Campbell Barton
Prevents clang-format wrapping text before comments.
2019-01-08Fix inconsistent naming and behavior for base visible/selected/editable.Brecht Van Lommel
Fixes T60251.
2019-01-03Fix some inconsistencies in object visibility/selectability tests.Brecht Van Lommel
2018-12-17Context: add objects_in_mode(_unique_data)Campbell Barton
Needed for Python to easily support multi-object edit/pose modes.
2018-12-17Context: remove active_gpencil_brushCampbell Barton
We don't have this for other painting modes, no need for a special case here.
2018-12-01Fix T58412: in weight paint + pose mode certain armature operations crash.Alexander Gavrilov
The cause is that FOREACH_OBJECT_IN_MODE_BEGIN assumed that the active object is in the correct mode, which is wrong in this case. It also only considered objects of the same type as active, which had to be replaced with an explicit type parameter.
2018-11-28Outliner/visibility: revert changes for now until we find better solutions.Brecht Van Lommel
See T57857 for discussion. This reverts: "Outliner: Do not gray out empty collections" 4521d3e7074d2e08ca813e1f4a2297f5000f335b. "Remove eye column from the outliner" fd16b359977c8932ada8db4ff0e43d0402fdc280. Fix/workaround issues in pose and edit mode" 6d2e2e30d50c40f302b62d3601b5742d7c7056c6. "Per view-layer collection visibility" 4de6a210c69fe254518ca8d6c860782c54f03749.
2018-11-28Per view-layer collection visibilityDalai Felinto
We still control this in the viewport collections visibility menu. But now we are actually changing the visibility of the collections, not of the objects. If a collection is indirectly invisible (because one of its parents are invisible) we gray it out. Also if you click directly in the collection names, it "isolates" the collection by hiding all collections, and showing the direct parents and all the children of the selected collection. Development Note: Right now I'm excluding the hidden collections from the depsgraph. Thus the need for tagging relations to update. If this proves to be too slow, we can change.
2018-11-25Local ViewDalai Felinto
Bring back per-viewport localview. This is based on Blender 2.79. We have a limit of 16 different local view viewports. We are using both the numpad /, as well as the regular /. Missing features: * Hack to make sure lights are always visible. * Make rendered mode with external engines to support this as well (probably just need to support this in the RNA iterators). * Support over 16 viewports by taking existing viewports out of local view. The code can use a cleanup pass in the future to unify the test to see if an object is visible (or we can use TESTBASE in more places).
2018-11-12Cleanup: minor gpencil changesCampbell Barton
- Replace BKE_brush_getactive_gpencil -> BKE_paint_brush (no need for per-paint-type brush access). - Rename TOT_GP_EDITBRUSH_TYPES -> GP_EDITBRUSH_TYPE_MAX (avoid sharing prefix w/ unrelated constants). - Rename instances of `GP_EditBrush_Data` to 'gp_brush' (`Brush` is typically called 'brush').
2018-10-19CTX_DATA_BEGIN for active object only (..._from_active_object)Dalai Felinto
For now only `selected_pose_bones_from_active_object`, more options can be added on demand. Discussed this with Campbell Barton. We may need this only for selected pose bones, time will tell.
2018-10-19Image Space: make 'UV Edit' a separate modeCampbell Barton
This is needed for splitting UV into its own editor, see: T54744
2018-10-05Context: add uv_sculpt_objectCampbell Barton
While this may be temporary, it avoids copy-pasting these checks in Python code.
2018-09-25GP: Add const to variableAntonioya
2018-08-07Fix T56252: Selectable Bases includes hidden objectsCampbell Barton
2018-07-31New Grease Pencil object for 2D animationAntonioya
This commit merge the full development done in greasepencil-object branch and include mainly the following features. - New grease pencil object. - New drawing engine. - New grease pencil modes Draw/Sculpt/Edit and Weight Paint. - New brushes for grease pencil. - New modifiers for grease pencil. - New shaders FX. - New material system (replace old palettes and colors). - Split of annotations (old grease pencil) and new grease pencil object. - UI adapted to blender 2.8. You can get more info here: https://code.blender.org/2017/12/drawing-2d-animation-in-blender-2-8/ https://code.blender.org/2018/07/grease-pencil-status-update/ This is the result of nearly two years of development and I want thanks firstly the other members of the grease pencil team: Daniel M. Lara, Matias Mendiola and Joshua Leung for their support, ideas and to keep working in the project all the time, without them this project had been impossible. Also, I want thanks other Blender developers for their help, advices and to be there always to help me, and specially to Clément Foucault, Dalai Felinto, Pablo Vázquez and Campbell Barton.
2018-07-04Workspaces: store view layer per main window, instead of per workspace.Brecht Van Lommel
It was a bit odd that the scene was stored per window but not the view layer. The reasoning was that you would use different view layers for different tasks. This is still possible, but it's more predictable to switch them both explicitly, and with child window support manually syncing the view layers between multiple windows is no longer needed as often.
2018-06-29Merge branch 'master' into blender2.8Campbell Barton
2018-06-29Cleanup: trailing newlinesCampbell Barton
2018-06-25Cleanup: rename object base flags to be more clear.Brecht Van Lommel
2018-06-04Merge branch 'master' into blender2.8Campbell Barton