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-20GPUState: Use explicit depth test enumClé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: GPU: Replace Batch uniform by shader uniform using macroClément Foucault
This is a first step into removing uniforms from GPU_batch and Imm.
2020-08-11Cleanup: rename variables 'gizmo_snap' to 'snap_gizmo'Germano Cavalcante
And a minor fix when there is no `USE_SNAP_DETECT_FROM_KEYMAP_HACK`.
2020-08-07Cleanup: declare arrays arrays where possibleCampbell Barton
2020-08-07Merge branch 'blender-v2.90-release' into masterJacques Lucke
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-08-01Cleanup: use term init instead of initialize/initialiseCampbell Barton
The abbreviation 'init' is brief, unambiguous and already used in thousands of places, also initialize is often accidentally written with British spelling.
2020-07-26Cleanup: GPU: Remove GPU_glew.h outside of GPU moduleClément Foucault
Remove use of GL* constants and types inside the codebase. There is still a few occurence to get rid of.
2020-07-18Cleanup: GPU: Encapsulate Backface cullingClément Foucault
2020-07-16Cleanup: Gizmo: Remove non matched glDisableClément Foucault
We use the polyline shader for drawing the rotation gizmo now. This shader supports clipping without hardware clip planes.
2020-07-15Cleanup: spellingCampbell Barton
2020-07-14Cleanup: spellingCampbell Barton
2020-07-07Fix T77455: Blender Freezes when using the 3d Scale GizmoJeroen Bakker
Issue is reported on Linux ith Intel HD6xx iGPU. Inside `gpu_select_sample_query.c` the call to `glGetQueryObjectuiv` froze. After bisecting this lead to the polyline shader. When using a 3d color shader in stead of the polyline shader during selection seems to fix the issue. Other parts of blender might also be effective, but I wasn't able to freeze blender in these areas. When it does, we might want to add a similar work-around to button2d, cage2d, cage3d & move3d, navigate. Backport this patch to 2.83. Reviewed By: Clément Foucault Differential Revision: https://developer.blender.org/D8217
2020-07-03Cleanup: Editors, 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` module. No functional changes.
2020-06-02Fix snap3d crash (missing NULL check)Campbell Barton
2020-05-30Cleanup: Initialize gizmo snap keymap before usingGermano Cavalcante
2020-05-29Gizmo: fix crash in recent snap gizmo additionCampbell Barton
2020-05-28Object: new add object tool, currently for primitive typesCampbell Barton
- Interactively adding primitives with two clicks. - Scene orientation used for new objects. - Depth [view-plane, axis-plane, surface] - Origin [base, center] - Primitive types [cube, cylinder, cone, uv-sphere, ico-sphere ] - Settings for object types in the top-bar. Shortcuts: - Snapping (Ctrl). - Constrain 1:1 aspect (Shift). - Toggle center (Alt). Part of T57210 design task.
2020-05-27Ruler: Remove highlight hackGermano Cavalcante
2020-05-27Cleanup: remove unused Main struct from snap contextCampbell Barton
2020-05-27Gizmo: lazy initialize snap contextCampbell Barton
ED_gizmotypes_snap_3d_context_get could have returned NULL, rename _get(..) to _ensure(..) and initialize the snap context in this function.
2020-05-27Gizmo Library: New Snap GizmoGermano Cavalcante
Generic snap gizmo to be used for different tools. The Gizmo can be configured initially by the following properties: - `"snap_elements_force"`, `"prev_point"` The following properties can be read as return: - `"location"`, `"normal"`, `"snap_elem_index"` This property can be linked to another (tool_setting.snap_elements): - `"snap_elements"` And this 3 extra utilities have been added: - `ED_gizmotypes_snap_3d_draw_util`, - `ED_gizmotypes_snap_3d_context_get`, - `ED_gizmotypes_snap_3d_update`. Differential Revision: https://developer.blender.org/D7071
2020-05-14Fix T76413 Gizmos: Trackball's preselection highlighting is too brightClément Foucault
This was caused by the sRGB viewport changes. The fix is to modify the alpha values manually.
2020-05-08Fix T76045 Gizmo: line_width does not work in latest versionClément Foucault
2020-05-08Fix T76393 Gizmo: Crash on assert(batch->program_in_use == 0)Clément Foucault
This also fix line width support for button2D shape batch
2020-04-24GPU: Add Polyline shader (wide line emulation)Clément Foucault
This new shader is able to emulate smooth wide lines drawing using a geometry shader. This shader needs viewportSize and lineWidth uniforms to be set. There is multiple variants to replace the usage of wide lines for most shaders. This patch only fix the gizmo_types files and the navigation gizmo. Other areas could be fixed afterward, I just limited the patch size. Fix T57570. Reviewed By: billreynish Differential Revision: https://developer.blender.org/D7487
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-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-12Fix move-3D gizmo in use 2D spacesCampbell Barton
This fixes node corner-pin and sun-beam gizmo's cursor offsets.
2020-03-09Cleanup: Replace ABS/SQUARE/CUBE with function callsSergey Sharybin
While it might be handy to have type-less functionality which is similar to how C++ math is implemented it can not be easily achieved with just preprocessor in a way which does not have side-effects on wrong usage. There macros where often used on a non-trivial expression, and there was at least one usage where it was causing an actual side effect/bug on Windows (see change around square_f(sh[index++]) in studiolight.c). For such cases it is handy to have a function which is guaranteed to have zero side-effects. The motivation behind actually removing the macros is that there is already a way to do similar calculation. Also, not having such macros is a way to guarantee that its usage is not changed in a way which have side-effects and that it's not used as an inspiration for cases where it should not be used. Differential Revision: https://developer.blender.org/D7051
2020-03-09Transform Snap Object: Remove depsgraph when creating contextGermano Cavalcante
Currently, this change does not bring functional changes. But it is necessary to extend the use of the snap system for gizmos, since, after a Undo, the `depsgraph` pointed by the `snap_context` has its memory invalidated. Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D7013
2020-03-06Cleanup: Rename ARegion variables from ar to regionJulian Eisel
The old convention was easy to confuse with ScrArea. Part of https://developer.blender.org/T74432. This is mostly a batch rename with some manual fixing. Only single word variable names are changed, no prefixed/suffixed names. Brecht van Lommel and Campbell Barton both gave me a green light for this convention change. Also ran clan clang format on affected files.
2020-03-06Cleanup: Reduce context usage in UI functionsJulian Eisel
Part of https://developer.blender.org/T74429. There's a chance that this causes some issues becaue in some cases we change from getting the window from context to getting it from somewhere else.
2020-03-02Fix T74278: Light, Image Object, and Compositor Backdrop Viewer NodePhilipp Oeser
gizmos are too big Caused by rB9cac5fa681c5 which fixed the handles for the camera border gizmo (being much too small)-- which in turn was broken by rB98e4fbc7cc9e. Camera border gizmo sets up its matrix_space a bit differently [this is why we are getting very small values in gizmo_calc_rect_view_scale -- needs more investigation], but instead of breaking it for Light, Image and Compositor Backdrop, lets just compensate by scaling the Camera Border Gizmo for now. Maniphest Tasks: T74278 Differential Revision: https://developer.blender.org/D6991
2020-02-28Fix camera border gizmo sizeCampbell Barton
2020-02-15Cleanup: remove various unused definesCampbell Barton
2020-02-14UI: Allow gizmo-only redraw taggingJulian Eisel
NOTE: This change shouldn't have any visible effect. It's just the first (easiest) step towards decoupling gizmo redraws from viewport redraws. We currently redraw the entire region whenever a gizmo needs redrawing, which would be nice to avoid in the future, see T73198. The first step towards this would be having a separate tag for them, which is what this patch implements. The term "editor-overlays" was chosen because for the forseeable future, we'll also have to redraw non-gizmo overlays in-between drawing 3D and 2D gizmos. Namely annotations. Reviewed By: brecht Differential Revision: https://developer.blender.org/D6838
2020-01-17Gizmo: draw dial arc only over one rotation to avoid artifactsDavid
There were some visual artifacts when the spin gizmo had a rotation greater than 360 degrees. Avoids this by drawing the arc over the span of one rotation only and adjusting the background color based on the rotation count.
2020-01-14Fix T70273: Auto-keyframe ignored by gizmosCampbell Barton
2020-01-09Gizmo: improve 2D arrow select detectionCampbell Barton
Fixes issue where UV transform circle was being masked by the arrows.
2020-01-06Cleanup: remove unused 2D arrow gizmoCampbell Barton
It's simpler to support a single gizmo type for 2D/3D.
2020-01-06Gizmo: support 3D arrow gizmos in 2D spacesCampbell Barton
Allows 2D arrows to be removed, since they work slightly differently and don't support offset matrices. Use these in the UV editor.
2020-01-06Gizmo: use compatible scale values between 2D/3D gizmosCampbell Barton
Make the UV editor gizmos the same size as the 3D view.
2019-12-13Gizmo: add gizmos for UV transform translate/rotate/scaleCampbell Barton
2019-12-13Gizmo: fix button 2D hotspot sizeCampbell Barton
Happened when used in 2D view.
2019-12-06Gizmo: add optional background alpha for 2D button gizmoCampbell Barton
This allows using the gizmo for a screen circle with a hollow area in the center, useful for general dragging gizmos.
2019-11-22Gizmo: support drawing contrasting shapes a generic backdropCampbell Barton
Previously the only way to draw polygon shapes from buttons was to use a polygon that included the circular outline with negative space for the un-filled areas. This didn't always have visibility, especially when the gizmo was overlaying colors that didn't contrast much. Support drawing a generic backdrop with a polygon shape over it.
2019-11-21Cleanup: remove unused value2d gizmoCampbell Barton