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
2022-11-11Add poll messages for marker operatorsColin Basnett
A number of operators were missing poll messages when disabled. These are the following new error messages: 1. "No markers are selected" 2. "Markers are locked" Reviewed By: sybren Differential Revision: https://developer.blender.org/D16403
2022-09-20Animation: Fix operator properties for redo panelRedMser
After the redo panel is added to animation editors in D14960, many operators have now been adjusted to appear and function correctly. A full list of changes is tracked in T98195. This patch only includes actual usability fixes. It does not do any changes for the user's convenience, like adding other helpful properties to operators. This can be done in a follow-up patch. Reviewed By: sybren Maniphest Tasks: T98195 Differential Revision: https://developer.blender.org/D14977
2022-09-20Move workspace.c to C++Jacques Lucke
Differential Revision: https://developer.blender.org/D16020
2022-09-14ViewLayer: Lazy sync of scene data.Monique Dewanchand
When a change happens which invalidates view layers the syncing will be postponed until the first usage. This will improve importing or adding many objects in a single operation/script. `BKE_view_layer_need_resync_tag` is used to tag the view layer to be out of sync. Before accessing `BKE_view_layer_active_base_get`, `BKE_view_layer_active_object_get`, `BKE_view_layer_active_collection` or `BKE_view_layer_object_bases` the caller should call `BKE_view_layer_synced_ensure`. Having two functions ensures that partial syncing could be added as smaller patches in the future. Tagging a view layer out of sync could be replaced with a partial sync. Eventually the number of full resyncs could be reduced. After all tagging has been replaced with partial syncs the ensure_sync could be phased out. This patch has been added to discuss the details and consequences of the current approach. For clarity the call to BKE_view_layer_ensure_sync is placed close to the getters. In the future this could be placed in more strategical places to reduce the number of calls or improve performance. Finding those strategical places isn't that clear. When multiple operations are grouped in a single script you might want to always check for resync. Some areas found that can be improved. This list isn't complete. These areas aren't addressed by this patch as these changes would be hard to detect to the reviewer. The idea is to add changes to these areas as a separate patch. It might be that the initial commit would reduce performance compared to master, but will be fixed by the additional patches. **Object duplication** During object duplication the syncing is temporarily disabled. With this patch this isn't useful as when disabled the view_layer is accessed to locate bases. This can be improved by first locating the source bases, then duplicate and sync and locate the new bases. Will be solved in a separate patch for clarity reasons ({D15886}). **Object add** `BKE_object_add` not only adds a new object, but also selects and activates the new base. This requires the view_layer to be resynced. Some callers reverse the selection and activation (See `get_new_constraint_target`). We should make the selection and activation optional. This would make it possible to add multiple objects without having to resync per object. **Postpone Activate Base** Setting the basact is done in many locations. They follow a rule as after an action find the base and set the basact. Finding the base could require a resync. The idea is to store in the view_layer the object which base will be set in the basact during the next sync, reducing the times resyncing needs to happen. Reviewed By: mont29 Maniphest Tasks: T73411 Differential Revision: https://developer.blender.org/D15885
2022-09-14Adding `const Scene*` parameter in many areas.Monique Dewanchand
Related to {D15885} that requires scene parameter to be added in many places. To speed up the review process the adding of the scene parameter was added in a separate patch. Reviewed By: mont29 Maniphest Tasks: T73411 Differential Revision: https://developer.blender.org/D15930
2022-09-08Cleanup: remove ED_types.h & ACTIVE, DESELECT definitionsCampbell Barton
- ACTIVE flag is no longer in use. - DESELECT was used in some places as an alias for false, even though this could arguably help readability, in practice this was often passed with a selection flag leading to confusing calls such as `select_beztriple(bezt, DESELECT, SELECT, HIDDEN)`. Replace SELECT/DESELECT with true/false in these cases. - Remove ED_types.h. Add a 'SELECT' definition to DNA_anim_types.h, for fcurve_test, we could use a shared DNA header, or remove use of the define entirely in favor of typed enums.
2022-09-08Cleanup: Removed handling of unused flag in TimeMarkersColin Basnett
This removes the defunct handling of the ACTIVE flag in TimeMarker::flags. It's not possible for that flag to be set though normal operation. Differential Revision: https://developer.blender.org/D15828
2022-09-06GPU: remove 'GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR'Germano Cavalcante
The only difference between `GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR` and `GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR` is that in the vertex shader the 2D version uses `vec4(pos, 0.0, 1.0)` and the 3D version uses `vec4(pos, 1.0)`. But VBOs with 2D attributes work perfectly in shaders that use 3D attributes. Components not specified are filled with components from `vec4(0.0, 0.0, 0.0, 1.0)`. So there is no real benefit to having two different shader versions.
2022-09-05GPU: remove 'GPU_SHADER_2D_UNIFORM_COLOR'Germano Cavalcante
The only real difference between `GPU_SHADER_2D_UNIFORM_COLOR` and `GPU_SHADER_3D_UNIFORM_COLOR` is that in the vertex shader the 2D version uses `vec4(pos, 0.0, 1.0)` and the 3D version uses `vec4(pos, 1.0)`. But VBOs with 2D attributes work perfectly in shaders that use 3D attributes. Components not specified are filled with components from `vec4(0.0, 0.0, 0.0, 1.0)`. So there is no real benefit to having two different shader versions. This will simplify porting shaders to python as it will not be necessary to use a 3D and a 2D version of the shaders. In python the new name for '2D_UNIFORM_COLOR'' and '3D_UNIFORM_COLOR' is 'UNIFORM_COLOR', but the old names still work for backward compatibility. Differential Revision: https://developer.blender.org/D15836
2022-08-03Fix: Timeline marker names are not correctly clipped in some casesColin Basnett
Timeline marker names are now correctly clipped instead of messily overlapping each other and being unreadable. This change affects all the animation editors (graph editor, NLA, action editor etc.) as well as the VSE. This also makes a change to when text is elevated. In the previous behavior, a marker's text would be elevated if it was selected or if the current frame was <= 4 frames away from the marker. This seems like a completely arbitrary thing (probably added in to alleviate text overlapping for markers that the user would be interested in). This patch changes the behavior such that the marker's text will be elevated if it is either selected or it is the last marker encountered relative to the current frame.
2022-07-12Markers: Make delete confirmation depend on key usedRedMser
Add a 'Delete Confirmation' operator property to the 'Delete Marker' operator. This determines whether the user is asked to confirm the deletion or not. Defaults so that only {key X} ({key Backspace} for industry compatible keymap) prompts for deletion, whereas {key Del} does not show the confirmation popup. This also makes the default keymap for marker deletion consistent with the common delete operators (such as objects and keyframes). Reviewed By: sybren Differential Revision: https://developer.blender.org/D13818
2022-06-30Cleanup: Remove scene frame macros (`CFRA` et al.)Julian Eisel
Removes the following macros for scene/render frame values: - `CFRA` - `SUBFRA` - `SFRA` - `EFRA` These macros don't add much, other than saving a few characters when typing. It's not immediately clear what they refer to, they just hide what they actually access. Just be explicit and clear about that. Plus these macros gave read and write access to the variables, so eyesores like this would be done (eyesore because it looks like assigning to a constant): ``` CFRA = some_frame_nbr; ``` Reviewed By: sergey Differential Revision: https://developer.blender.org/D15311
2022-06-07Marker drawing: don't restore GPU line widthSybren A. Stüvel
Adhere to the documented use of `GPU_line_width()` and don't restore the previously set line width.
2022-05-27Fix T97974: Marker line affected by NLA strip muteColin Basnett
Fix T97974 by having the marker rendering code explicitly set the required line width. Reviewed By: sybren Differential Revision: https://developer.blender.org/D14890
2022-04-14Animation: Select markers before/after current frameColin Basnett
Add operator to select markers left/right of the current frame (including the current frame). `bpy.ops.marker.select_leftright(mode='LEFT', extend=False)` `mode` can be either 'LEFT' or 'RIGHT'. The naming and defaults of the above variables match similar operators (e.g., `bpy.ops.nla.select_leftright`) This also adds a new sub-menu to the Marker menu found in animation editors, exposing both the new `bpy.ops.marker.select_leftright` operator as well as the `bpy.ops.marker.select_all` operator. Despite the name "Before Current Frame" and "After Current Frame", it also selects a marker that falls on the current from for both of the modes. This is to match the behavior found in the `nla.select_leftright` operator. RCS: https://blender.community/c/rightclickselect/OgmG/ Reviewed by: sybren, looch Differential Revision: https://developer.blender.org/D14176
2022-03-15Cleanup: correct unbalanced doxy sectionsCampbell Barton
2022-03-04Cleanup: remove outdated references to tweakCampbell Barton
2022-03-03UI: only wrap cursor motion horizontally when dragging markersCampbell Barton
It's not useful to wrap vertical motion when dragging markers. It was too easy to accidentally wrap the cursor to the top of a region, as markers need to be dragged from the bottom edge of the region.
2022-03-03Cleanup: use doxygen sections for anim_markers.cCampbell Barton
2022-03-03Cleanup: rename misleading variable for marker selection cyclingCampbell Barton
"marker_selected" was the marker after the selected marker and is used for cycling the selection.
2022-03-03Fix timeline marker click-drag arbitrary deselectionCampbell Barton
The logic to cycle selected markers wasn't cycling back to the beginning of the list. The marker after the selected marker at the cursor frame was also used to check if a selection existed, causing dragging to transform all selected markers to de-select all when when dragging the last marker.
2022-03-02Event System: support "Release Confirms" for click-drag eventsCampbell Barton
2022-02-25Cleanup: use flags for wmEvent modifier keysCampbell Barton
Using flags makes checking multiple modifiers at once more convenient and avoids macros/functions such as IS_EVENT_MOD & WM_event_modifier_flag which have been removed. It also simplifies checking if modifier keys have changed.
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2021-12-10Cleanup: move public doc-strings into headers for various API'sCampbell Barton
Some doc-strings were skipped because of blank-lines between the doc-string and the symbol and needed to be moved manually. - Added space below non doc-string comments to make it clear these aren't comments for the symbols directly below them. - Use doxy sections for some headers. Ref T92709
2021-10-20Cleanup: use an array for wmEvent cursor position variablesAaron Carlisle
Use arrays for wmEvent coordinates, this quiets warnings with GCC11. - `x, y` -> `xy`. - `prevx, prevy` -> `prev_xy`. - `prevclickx, prevclicky` -> `prev_click_xy`. There is still some cleanup such as using `copy_v2_v2_int()`, this can be done separately. Reviewed By: campbellbarton, Severin Ref D12901
2021-08-04Cleanup: rename restrict to hide/visibility in Object, Collection, MaskLayerBrecht Van Lommel
This makes the internal naming consistent with the public API. And also gives us a visibility_flag rather than restrictflag that can be extended with more flags.
2021-07-30Cleanup: clang-format (re-run after v12 version bump)Campbell Barton
2021-07-20Cleanup: use single back-tick quoting in commentsCampbell Barton
While doxygen supports both, conform to our style guide. Note that single back-tick's are already used in a majority of comments.
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-03-08Cleanup: use ofs instead of offs as an abbreviation for offsetCampbell Barton
Used for local structs/variables, since `ofs` is by far the most widely used abbreviation.
2021-01-27Fix T85110: moving markers num input confuses time vs framesPhilipp Oeser
Looks like a typo in rB66b84ad1592d. Maniphest Tasks: T85110 Differential Revision: https://developer.blender.org/D10225
2021-01-22Fix marker camera switch + undo crashes in edit-modeCampbell Barton
Selecting markers and cameras could crash when in edit-mode. Only support this in object mode as mode-switching as part of activating cameras doesn't seem like a priority. This has the same root cause as T84920.
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
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-21Implement ID properties support for TimeMarkerSergey Sharybin
Allows scripters to store additional information in the marker itself instead of using work-around approach based on marker names and such. Differential Revision: https://developer.blender.org/D8944
2020-09-18Fix warning printed when duplicating markerJulian Eisel
Steps to reproduce were: * Create a marker in the timeline * With the mouse over the marker region, press Shift+D The function for moving markers was reused and had handling specific to tweak events. This is not relevant in case of duplicating markers.
2020-08-18Cleanup: GPUState: remove double GPU_blend callsClément Foucault
2020-08-18GPUState: GPU_blend final API renamingClément Foucault
We now use GPU_blend for enabling / disabling blending and explicitly set the blend equation.
2020-08-18Cleanup: GPUState: Replace blend func separate by enumClément Foucault
2020-07-13Clang Tidy: enable readability-non-const-parameter warningJacques Lucke
Clang Tidy reported a couple of false positives. I disabled those `NOLINTNEXTLINE`. Differential Revision: https://developer.blender.org/D8199
2020-07-03Cleanup: Editors/Animation, 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/animation` module. No functional changes.
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 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: use abbreviated names for unsigned types in editorsCampbell Barton
2020-03-26Fix crashes from various missing checks in operator poll functionsCampbell Barton
Issues exposed by 'bl_run_operators.py' utility.
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-18Cleanup: Resolve HKEY conflictRay Molenkamp
Both the MS headers and blender headers define the HKEY which gives all kind of inclusion order issues. This diff renames all *KEY constants to EVT_*KEY to resolve this conflict. Reviewed By: brecht , dfelinto Differential Revision: http://developer.blender.org/D7164