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-11-01Fix T92694: Auto Perspective is inconsistent with axis aligned viewsCampbell Barton
Snapping to an axis aligned view with a 45 degree rotation would set the view orthographic without setting it back to perspective when orbiting the view as you would expect with auto-perspective. Now orthographic is only set for views with rotation of 0, 90, 180, -90. Notes: - Partially reverts logic from cebd025e02f1147c48cd658816ad835f94128a4a at the time RegionView3D.view_axis_roll had not been added, so only setting the orthographic with one particular rotation was a bigger limitation than it is now. - Auto-perspective could be supported when snapping the viewport to diagonal angles, however that's a larger project.
2021-10-21Cleanup: Use array utility for cursor eventsAaron Carlisle
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-10-18Snap and Placement Gizmo RefactorGermano Cavalcante
Move most of the gizmo snap and placement code to `view_cursor_snap.c`. Simplify and extend the snap API. Differential Revision: https://developer.blender.org/D12868
2021-10-14Fix reference counting error for world drag & dropCampbell Barton
Error in 986d60490c0694941e27c070780c55f07b7b4842
2021-10-13Cleanup: Snap Context RefactorGermano Cavalcante
Move runtime parameters out of context creation. Not being able to choose another region and v3d limits the use of the snap API.
2021-10-06Cleanup: rename BKE_font.h -> BKE_vfont.hCampbell Barton
Match API naming prefix (BKE_vfont_*) and DNA_vfont_types.h.
2021-09-28Asset Browser: Allow World assets to be drag/dropped onto the viewportJesse Yurkovich
While World data has always been able to be marked as an asset, there was no way to actually use them from the asset browser. This change allows users to drag-drop world assets onto the Viewport and have them appended/linked to their scene. Differential Revision: https://developer.blender.org/D12566
2021-09-27Fix viewport roll working wrongPhilipp Oeser
Mistake in own {rB69893ef27c91}. Was mixing screen on region coordinates.
2021-09-27Cleanup: spelling in commentsCampbell Barton
2021-09-27Cleanup: remove unnecessary use of MEM_SAFE_FREE macroCampbell Barton
2021-09-273DView: ability to cancel out of viewport rollPhilipp Oeser
This adds the ability to cancel out of the roll using ESC or RMB (which is not common for viewops -- but makes sense in the case of roll I think). This resets the view as well as potential locked cameras to the original orientations (but does not remove potential autokeys -- which no transform does on cancel btw.) Maniphest Tasks: T89883 Differential Revision: https://developer.blender.org/D12582
2021-09-273DView: Use "real" angle for viewport rollPhilipp Oeser
Since its introduction in {rB5c569d227b64}, the view roll was based on horizontal movement only. Using a "real" angle not only feels more natural but also has the benefit of getting more precission the further away from the center you are (just like regular rotation, brush/stencil rotation etc.). A similar thing has already been implemented in the Grease Pencil Tools Addon, now make the blender standard roll the same. Since this is not using the transform system, we are still lacking a line in the viewport (this could be added but since this is always based on the center of the view we dont necessarily need this), as well as the additional Shift-extra-precission behavior. Fixes T89883 Maniphest Tasks: T89883 Differential Revision: https://developer.blender.org/D12582
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-27Fix "toggle shading" op not updating VR viewPeter Kim
Reason was that the notifier did not set the NS_VIEW3D_SHADING subtype, which the VR view listens for for a shading update. In the case of "toggle xray", a notifier was absent altogether.
2021-08-06Cleanup: use MEM_SAFE_FREE macroCampbell Barton
2021-07-05Cleanup: update comment formattingCampbell Barton
- Replace '[mce]' with "Mike Erwin". - Remove references to turn-table author as it isn't useful information, the author was credited in the commit message.
2021-07-05Cleanup: spelling in commentsCampbell Barton
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell 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-21Refactor: Do not keep a copy of depth buffer in RegionView3DGermano Cavalcante
The depth cache (located in `RegionView3D::depths`) is used for quick and simple occlusion testing in: - particle selection, - "Draw Curve" operator and - "Interactive Light Track to Cursor" operator, However, keeping a texture buffer in cache is not a recommended practice. For displays with high resolution like 8k this represents something around 132MB. Also, currently, each call to `ED_view3d_depth_override` invalidates the depth cache. So that depth is never reused in multiple calls from an operator (this was not the case in blender 2.79). This commit allows to create a depth cache and release it in the same operator. Thus, the buffer is kept in cache for a short time, freeing up space. No functional changes.
2021-06-01GPU: add 2D projection functionCampbell Barton
When projecting into screen space Z value isn't always needed. Add 2D projection functions, renaming them to avoid accidents happening again. - Add GPU_matrix_project_2fv - Add ED_view3d_project_v2 - Rename ED_view3d_project to ED_view3d_project_v3 - Use the 2D versions of these functions when the Z value isn't used.
2021-04-28Cleanup: Fix inconcistent array lengths in function declarationsHans Goudey
In some cases functions were defined with arguments of different array lengths in headers vs. implementations. This commit fixes some of the cases I ran into, but probably not all of them.
2021-04-17Transform Snap Refactor: Use enum for cage snap optionsGermano Cavalcante
This allows the addition of the `SNAP_GEOM_CAGE` option. Currently unused.
2021-03-30Cleanup/Refactor: Unify functions that redraw the depth bufferGermano Cavalcante
Now `ED_view3d_backbuf_depth_validate`, `ED_view3d_draw_depth` and `ED_view3d_draw_depth_gpencil` are unified in `ED_view3d_depth_override`. This new function replaces `ED_view3d_autodist_init`. Also, since `ED_view3d_depth_update` depends on the render context, and changing the context is a slow operation, that function also was removed, and the depth buffer cached is now updated inside the new unified drawing function when the "bool update_cache" parameter is true. Finally `V3D_INVALID_BACKBUF` flag has been renamed and moved to `runtime.flag`. Differential revision: https://developer.blender.org/D10678
2021-02-24UI: Cleanup and fix labels and descriptions in various placesYevgeny Makarov
Changes include using proper and consistent grammar, simplifying phrasing, using correct terminology, and not including python API identifiers in tooltips. Differential Revision: https://developer.blender.org/D9924
2021-02-14Cleanup: remove commented logic for Alt-Pad0 to use previous cameraCampbell Barton
While this could be useful, it's been removed since 2.4x, keeping this here doesn't help add it back since it would need to be re-implemented.
2021-02-05Cleanup: outdated/unhelpful commentsCampbell Barton
2021-02-05Cleanup: rename USER_ZOOM_{CONT->CONTINUE} improve commentsCampbell Barton
USER_ZOOM_CONT only had comments saying this was 'oldstyle', remove these comments, add brief explanations of the zoom style in the enum.
2021-02-05Cleanup: correct spelling in commentsCampbell Barton
2021-01-31Fix T85236: "Zoom to Mouse Position" inverts "Dolly View" directionCampbell Barton
2021-01-04Cleanup: spelling (use 'gimbal' instead of 'gimble')Campbell Barton
2020-12-24Cleanup: Fix capitalization in various UI stringsYevgeny Makarov
Approximately 195 changes of capitalization to conform to MLA title style. UI labels and property names should use MLA title case, while descriptions should be capitalized like regular prose, generally with only the start of a sentence capitalized. Differential Revision: https://developer.blender.org/D9922
2020-12-18UI: Don't use abbreviations in label textYevgeny Makarov
Expand abbreviations for words like "Bright" (instead of "Brightness"), "Premul", "Lib", "Dir", etc. Differential Revision: https://developer.blender.org/D9862
2020-12-03Cleanup: view-port --> 2D/3D ViewportAaron Carlisle
2020-11-09macOS: follow system preference for natural trackpad scroll directionYevgeny Makarov
And remove Blender preference, which was expected to be set to match the system preference for correct behavior. Instead just handle this automatically. Differential Revision: https://developer.blender.org/D9402
2020-11-07View3D: take clipping into account for Frame AllCampbell Barton
Clamp the min/max used for Frame All/Selected by the clipping region if it's set. Resolve T81050
2020-11-06Cleanup: use ELEM macroCampbell Barton
2020-11-03Fix C operators can't set default display or sort type for File BrowserJulian Eisel
`WM_operator_properties_filesel()` allows C operators to set a display or sort type for the File Browser to use. But the File Browser would always override that because of an invalid `_is_set()` check. (The operators don't actually set the value, they only set the property's default value.) The only operator affected by this is "Recover Auto Save". It is supposed to show a vertical list ordered chronologically. It used settings from the previous File Browser usage before this patch. Operators using the File Browser should generally use `FILE_DEFAULTDISPLAY`/`FILE_SORT_DEFAULT` now, except if they have a reason not to. See comments at their definition. ---- This makes it so operators that set a different display or sort type don't change the sort or display type for the next File Browser operation. So using "Recover Auto Save" entirely isolates display and sort type from other operations. Differential Revision: https://developer.blender.org/D8598 Reviewed by: Bastien Montagne
2020-10-29Fix 3D smooth-view ignoring lens when exiting camera viewErik Abrahamsson
Add NULL checks for `sview->ofs`, while it's currently never NULL when a camera is set. The API allows for each member to be set independently.
2020-10-27Fix T80819: Border zoom is isn't accurate in perspective viewErik Abrahamsson
Improved user experience by using viewport focal length to calculate the new camera distance. Also resizing the border to the same aspect ratio as the window will help not zooming in more than expected. Ref D9341
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-07UI: Fix capitalization in various placesYevgeny Makarov
Follow the MLA style, agreed upon in T79589. This means "from" within UI labels should be lowercase. Differential Revision: https://developer.blender.org/D8345
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-15Fix T80796: Frame all ignores geometry from instancesCampbell Barton
Make "Frame All" share functionality with "Frame Selected", accounting for duplis when calculating the bounds.
2020-09-14Fix T80704: bpy.ops.transform.rotate() ignores orient_typeGermano Cavalcante
Remove the condition preventing orientation from being obtained out of the 3d View context. Also pass the `ob` and `obedit` arguments obtained from the caller.
2020-09-14Cleanup: Use 'r_' prefix for return valueGermano Cavalcante
Make it obvious which values are written to.
2020-09-09Cleanup: reduce variable scopeJacques Lucke
2020-09-04Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fixSebastian Parborg
No functional changes