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-10-02Cleanup: Move more files using mesh runtime data to C++Hans Goudey
In preparation for moving mesh runtime data out of DNA.
2022-09-25Cleanup: remove redundant double parenthesisCampbell Barton
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-03-17View 3D: support for select passthrough when picking selected itemsCampbell Barton
Currently this isn't used in the key-map, it will eventually allow the 3D viewports tweak tool to match the behavior of other editors that support tweaking a selection without first de-selecting all other elements.
2022-03-16Fix T96512: Crash selecting an edgeCampbell Barton
Regression in 5e5285baf621.
2022-03-16View 3D: move picking arguments into a struct & minor refactorCampbell Barton
- Add SelectPick_Params struct to make picking logic more straightforward and easier to extend. - Use `eSelectOp` instead of booleans (extend, deselect, toggle) which were used to represent 4 states (which wasn't obvious). - Handle deselect_all when pocking instead of view3d_select_exec, de-duplicate de-selection which was already needed in when replacing the selection in picking functions. - Handle outliner update & notifiers in the picking functions instead of view3d_select_exec. - Fix particle select deselect_all option which did nothing.
2022-03-04Cleanup: spelling in comments, function nameCampbell 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
2022-02-04Fix: Missing translations from operator descriptionsHans Goudey
The strings in the `get_description` functions for operators need translation, they are not found by the translation system automatically, and there is no translation applied afterwards either (as far as I could tell). Some used `N_` before, but most did nothing. Differential Revision: https://developer.blender.org/D14011
2022-02-04Cleanup: Clang tidy, use bracesHans Goudey
Braces missed in b73d3b80fdcb72446
2022-02-04Fix T94334: Area close operator crash in 3D view menuHans Goudey
This fixes the crash by removing the `do_view3d_header_buttons` handler. The code can work at a higher level here, using the operator for setting the select mode, which makes this patch a cleanup as well. The operator now has a description callback to add the custom description used for the behavior in its invoke method. Differential Revision: https://developer.blender.org/D13660
2021-12-08Cleanup: move public doc-strings into headers for 'editors'Campbell Barton
Ref T92709
2021-10-27WM: de-duplicate cursor motion checks for selection pickingCampbell Barton
Replace local static mouse coordinate storage with a single function. also resolve inconsistencies. - Edit-mesh selection used equality check (ignoring `U.move_threshold`). - Motion to clear tooltips checked the value without scaling by the DPI. Also prevent the unlikely case of the previous motion check matching a different area by resetting the value when the active region changes.
2021-08-31Transform: avoid passing the context to extended orientation functionsCampbell Barton
This makes it possible to calculate orientation from functions that don't have the context.
2021-08-03WM: don't store selection properties typically set in the key-mapCampbell Barton
While this was already the case for the most part some selection operators stored common settings for reuse such as "toggle", "extend" & "deselect". Disabling storing these settings for later execution as it means failure to set these options in the key-map re-uses the value of the shortcut that was last called. Skip saving these settings since this is a case where reusing them isn't helpful. Resolves T90275.
2021-07-13Refactor: Move vertex group names to object dataHans Goudey
This commit moves the storage of `bDeformGroup` and the active index to `Mesh`, `Lattice`, and `bGPdata` instead of `Object`. Utility functions are added to allow easy access to the vertex groups given an object or an ID. As explained in T88951, the list of vertex group names is currently stored separately per object, even though vertex group data is stored on the geometry. This tends to complicate code and cause bugs, especially as geometry is created procedurally and tied less closely to an object. The "Copy Vertex Groups to Linked" operator is removed, since they are stored on the geometry anyway. This patch leaves the object-level python API for vertex groups in place. Creating a geometry-level RNA API can be a separate step; the changes in this commit are invasive enough as it is. Note that opening a file saved in 3.0 in an earlier version means the vertex groups will not be available. Differential Revision: https://developer.blender.org/D11689
2021-07-13Cleanup: replace BKE_customdata.h in BKE_editmesh.hCampbell Barton
Only DNA_customdata_types.h is needed for BMEditMesh.
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-07-02Cleanup: spelling in commentsCampbell Barton
2021-06-28Fix edit-mesh random select regression in random seed usePiotr Makal
Fix regression in 9c202281287743494fd7d81a13970053bc8a33b5 that wasn't using the random seed correctly.
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-06-23Fix T89367: Crash running edit-mesh select_linked_pick from PythonCampbell Barton
2021-06-22Cleanup: Spelling MistakesLeon Zandman
This patch fixes many minor spelling mistakes, all in comments or console output. Mostly contractions like can't, won't, don't, its/it's, etc. Differential Revision: https://developer.blender.org/D11663 Reviewed by Harley Acheson
2021-06-21Fix T32214: Wireframe edge select fails with verts behind the viewCampbell Barton
This resolves a long standing bug in edge selection (picking, circle, box & lasso). Now when one of the edges vertices fails to project into screen space, the edge is clipped by the viewport to calculate an on-screen location that can be used instead. This isn't default as it may be important for the on the screen location not to be clipped by the viewport.
2021-06-14Edit Mesh: use params arg for update function, add calc_normals argCampbell Barton
Rename function EDBM_update_generic to EDBM_update, use a parameters argument for better readability. Also add calc_normals argument, which will have benefits when calculating normals and tessellation together is optimized.
2021-05-06Fix memory leak in object.mode_set_with_submodeCampbell Barton
2021-04-06Fix T48167: Mesh select random factor is not accuratePhilipp Oeser
Selecting random percentage would not reliably guarantee the precise percentage of selected elements now randomize an index array instead and use the precise number of elements from this array. Note that this change has only been made to edit-mesh and should be applied to all random selection operators.
2021-04-01Fix compilation error: "too many arguments to function"Germano Cavalcante
Seem on linux. Caused by rB6ec463a4b754bf69baf94ba6b3683655f6834ccd
2021-03-31Cleanup: naming for edit-mesh nearest distance valuesCampbell Barton
- Don't use `r_` prefix for an argument that's also read from (this is meant for return only arguments). - Rename variables to make it clear the distance is pixels, using manhattan length measurement.
2021-03-31Fix T87080: Select shortest path fails in face modeCampbell Barton
Regression in 80cbbd2843c2358879b1a710d81a3b41e1468327. Unfortunately keeping selection picking behavior as well as supporting finding the nearest face within a radius requires an inconsistency between x-ray and back-buffer selection that doesn't work well using the current arguments. Resolve by adding an argument that causes the input distance to be ignored for back-buffer selection. This is used by selection picking but not the knife tool. This changes behavior for path-selection in face mode, which now uses a margin for back-buffer selection. From my own testing this doesn't seem to be a problem like it could be for regular selection picking.
2021-03-29Knife: support vert/edge snapping when not directly over a faceCampbell Barton
Respect the distance argument to EDBM_face_find_nearest, when zero, sample a single pixel, otherwise sample a region. Knife uses the selection-buffer to pick a face when the ray-cast failed. This was meant to allow snapping to nearby faces however as the margin was ignored, it was only used in edge cases where the ray-cast missed but the pixel didn't. Now the face-picking threshold is working as expected. Note that other callers to EDBM_face_find_nearest have been updated so set their distance argument to zero so this only impacts the knife. Regular selection and path select could be modified separately if users prefer this behavior.
2021-03-10Fix T67190: Edge Loop Select doesn't support non-manifold edgesPratik Borhade
- New Walker added `bmw_NonManifoldedgeWalker_type`. - This walks over edges connected with 3 or more faces connected. Ref D10497 with edits.
2021-02-16Cleanup: spellingCampbell Barton
2021-02-05Cleanup: correct spelling in commentsCampbell Barton
2021-01-27UI: Fix incorrect RNA percentage property definitionsHans Goudey
In two cases the percentage property was actually used incorrectly, as pointed out in T82070. The range was [0, 1], but the properties were still displayed as percentages. There is a preference to control whether to display factors or percentages, so it usually doesn't make sense to manually define properties as percentages. Resolves T82070 Differential Revision: https://developer.blender.org/D9344
2020-12-24UI: Cleanup spelling of compound wordsYevgeny Makarov
Approximately 138 changes in the spelling of compound words and proper names like "Light Probe", "Shrink/Fatten", "Face Map". In many cases, hyphens were used where they aren't correct, like "re-fit". Other common changes include: - "Datablock" -> "data-block" - "Floating point" -> "floating-point" - "Ngons" -> "n-gons" These changes help give the language used in the interface a consistent, more professional feel. Differential Revision: https://developer.blender.org/D9923
2020-12-13Cleanup: removing some uses of equal sign in descriptionsYevgeny Makarov
Using 'is/means/equal' words in place of equal sign in descriptions. Differential Revision: https://developer.blender.org/D9799 Reviewed by Hans Goudey
2020-12-03Cleanup: view-port --> 2D/3D ViewportAaron Carlisle
2020-11-17BMesh: support for comparing loops when calculating face-groupsCampbell Barton
Add an optional callback to check source/destination loops for BM_mesh_calc_face_groups. This is needed so it can be used to calculate UV islands.
2020-10-19Spelling: Apart Versus A PartHarley Acheson
Corrects incorrect usages of the fragment 'apart of' when 'a part of' was required. Differential Revision: https://developer.blender.org/D9245 Reviewed by Campbell Barton
2020-10-19Spelling: It's Versus ItsHarley Acheson
Corrects incorrect usage of contraction for 'it is', when possessive 'its' was required. Differential Revision: https://developer.blender.org/D9250 Reviewed by Campbell Barton
2020-10-13Fix T81288:Select Linked fails with multi-object edit modeCampbell Barton
Changing options after using select-linked didn't work when the object being selected wasn't the active object.
2020-09-01Fix T80224: Crash after duplicating and hiding vertices while using X Axis ↵Germano Cavalcante
Mirror The mirror map can reference a hidden vertex that is currently ignored in the transformation. Thus the mirror element array is not filled.
2020-08-26Cleanup: simplify edge loop/boundary select cycling logicCampbell Barton
2020-07-28Cleanup: incorrect spelling of 'manhattan'Campbell Barton
2020-07-22UI: use term 'Vertex' instead of 'Vert'Yevgeny Makarov
2020-07-03Cleanup: Editors/Mesh, 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/mesh` module. No functional changes.