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-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
2019-09-26WM: clean up cursors constants and codeBrecht Van Lommel
There was a mix of old and new constants. Now have one list of WM_CURSOR_* cursor types, using GHOST standard cursors when available and otherwise falling back to our custom cursors. Ref D5197
2019-09-14Cleanup: use const args, variablesCampbell Barton
2019-09-13Cleanup: unused headers (GPU)Campbell Barton
2019-09-07Cleanup: use post increment/decrementCampbell Barton
When the result isn't used, prefer post increment/decrement (already used nearly everywhere in Blender).
2019-08-21Transform: New Snap Option: Edge Perpendicularmano-wii
Part of T66420 Option for snapping to the nearest point of a reference coordinate. The patch also adds Edge Center and Perpendicular snaps to the ruler. {F7675906} Reviewers: campbellbarton, brecht Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D5543
2019-08-16Cleanup: spellingCampbell Barton
2019-07-31Refactor access to dependency graphSergey Sharybin
This change ensures that operators which needs access to evaluated data first makes sure there is a dependency graph. Other accesses to the dependency graph made it more explicit about whether they just need a valid dependency graph pointer or whether they expect the graph to be already evaluated. This replaces OPTYPE_USE_EVAL_DATA which is now removed. Some general rules about usage of accessors: - Drawing is expected to happen from a fully evaluated dependency graph. There is now a function to access it, which will in the future control that dependency graph is actually evaluated. This check is not yet done because there are some things to be taken care about first: for example, post-update hooks might leave scene in a state where something is still tagged for update. - All operators which needs to access evaluated state must use CTX_data_ensure_evaluated_depsgraph(). This function replaces OPTYPE_USE_EVAL_DATA. The call is generally to be done in the very beginning of the operator, prior other logic (unless this is some comprehensive operator which might or might not need access to an evaluated state). This call is never to be used from a loop. If some utility function requires evaluated state of dependency graph the graph is to be passed as an explicit argument. This way it is clear that no evaluation happens in a loop or something like this. - All cases which needs to know dependency graph pointer, but which doesn't want to actually evaluate it can use old-style function CTX_data_depsgraph_pointer(), assuming that underlying code will ensure dependency graph is evaluated prior to accessing it. - The new functions are replacing OPTYPE_USE_EVAL_DATA, so now it is explicit and local about where dependency graph is being ensured. This commit also contains some fixes of wrong usage of evaluation functions on original objects. Ideally should be split out, but in reality with all the APIs being renamed is quite tricky. Fixes T67454: Blender crash on rapid undo and select Speculation here is that sometimes undo and selection operators are sometimes handled in the same event loop iteration, which leaves non-evaluated dependency graph. Fixes T67973: Crash on Fix Deforms operator Fixes T67902: Crash when undo a loop cut Reviewers: brecht Reviewed By: brecht Subscribers: lichtwerk Maniphest Tasks: T67454 Differential Revision: https://developer.blender.org/D5343
2019-07-08Fix T62903: black line in UV editor on 32 bitBrecht Van Lommel
2019-07-01Gizmo: support for filled circle with inner non-zero radiusCampbell Barton
Needed for changes to the scale gizmo.
2019-06-07Keymap: gizmos now use a map that optionally activates on pressCampbell Barton
The legacy keymap now activates on press.
2019-05-30Gizmo: activate some gizmos on drag instead of pressCampbell Barton
Use drag-only keyamp to adjust gizmos which use drag motion to change a value. By default gizmos still activate on press. This allows for left click select to be used with transform without the gizmos getting in the way. Even though this isn't necessary for right click select it allows click events to pass through and be used by tools which can be useful. Resolves T63996
2019-04-24Cleanup: sort CMake include pathsCampbell Barton
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: format '#if 0' code in source/Campbell 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-04-14CMake: prepare for BLENDER_SORTED_LIBS removalCampbell Barton
No functional change, this adds LIB definition and args to cmake files. Without this it's difficult to migrate away from 'BLENDER_SORTED_LIBS' since there are many platforms/configurations that could break when changing linking order. Manually add and enable WITHOUT_SORTED_LIBS to try building without sorted libs (currently fails since all variables are empty). This check will eventually be removed. See T46725.
2019-04-09Cleanup: spellingCampbell Barton
2019-04-02Cleanup: empty expression statement warningCampbell Barton
2019-03-25Gizmo: add option to move & dial gizmos to select as filledCampbell Barton
Draw as an outline while using solid selection.
2019-03-20Cleanup: styleCampbell Barton
2019-03-20Fix T62248: Infinite Hotspot Size Crop NodeJeroen Bakker
When the area of the crop node is zero the hotspot margin becomes infinite. This makes the gizmo by default think the translate mode hotspot is everywhere. This fix will return a state if the INFINITY is detected so we can return the hotspot drawing. The cage2d gizmo is still not usable for sizes of 0 by 0 as now it won't draw anything. the issues of the gizmo should be re-designed so we can mitigate these limitations. But that is out of scope for this fix. Reviewed By: campbellbarton Maniphest Tasks: T62248 Differential Revision: https://developer.blender.org/D4516
2019-03-08Cleanup: spellingCampbell Barton
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-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-03Cleanup: trailing commasCampbell Barton
Needed for clan-format not to wrap onto one line.
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