Age | Commit message (Collapse) | Author |
|
|
|
Avoids calculating the visible part of a region whenever
on-screen overlays are drawn.
|
|
|
|
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
|
|
panel
Reviewers: brecht
Maniphest Tasks: T66414
Differential Revision: https://developer.blender.org/D5181
|
|
render-preview
Since we are now using the full framebuffer (color+depth) inside the image
editor, we need to disable the depth test by default.
|
|
Use depth buffer to order the uv edges correctly to always draw selected
edges on top.
We still use the double drawing workaround for points to keep the smooth
antialiased display.
|
|
|
|
The legacy keymap now activates on press.
|
|
|
|
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
|
|
Masks were not really covered by Copy-on-Write due to mistake
in the dependency graph. After correcting that mistake a lot
of tools became broken, so majority of the patch is related
on making it so access to evaluated/tessellated masks is done.
When accessing evaluated mask state make sure access to an
evaluated dependency graph is done. This solves possible
access to NULL data on redo.
Fixes T64899: Re-doing new point addition causes crash
Reviewers: brecht
Reviewed By: brecht
Maniphest Tasks: T64899
Differential Revision: https://developer.blender.org/D4918
|
|
We will use this for saving images along with the .blend file.
Ref D4861
|
|
|
|
Internally tool settings have been moved to the 3D view.
Added the ability for to draw panels from another space/region
so they can be mirrored in the properties editor.
|
|
Own error in 928becec60d16, move cursor drawing to single location.
|
|
|
|
In 2.7x UV sculpt was a kind of sub-mode
(a toggle with it's own key-map & drawing code).
Move this to an operator that uses the tool-system,
this simplifies internal logic, especially brush selection
which now matches sculpt and other paint modes.
- Remove toggle used to enable uv sculpt.
- Expose the brush, which was already used but there was no way to
select different brushes.
- Make UV sculpt use paint paint tool slots
(using brushes how all other paint mode currently do).
- Move UV Sculpt keymap to the tools keymap.
- Remove Q to toggle UV sculpt mode,
S/P/G keys to switch tools.
|
|
- Move painting brush panels into the image side-bar.
- Add active tool panel to the image side-bar.
|
|
Prepare for enabling ReflowComments.
|
|
This is a continuation of rB7fdffd735ff24, where I separated the
e.g. frame number drawing from scrollers internally.
This patch changes the API, so that space draw handlers
have to draw these numbers explicitely.
This greatly simplifies the scrollers API for all spaces
that just need scrollers without any frame numbers.
Reviewers: campbellbarton
Differential Revision: https://developer.blender.org/D4747
|
|
This hides the top-bar by default for everything
besides paint/sculpt workspaces.
- Use the top-bar mainly for active tool settings &
popovers panel options.
(transform / snap settings are an exception for this convention).
- Only show the top-bar (by default)
in paint work-spaces (sculpt / texture-paint / grease-pencil).
- Add an active-tool panel to the sidebar.
- Split 3D view tabs into (Item / Tool / View).
D4721 with minor changes.
Further work is needed for the top-bar and image-editor.
|
|
Previously only a fixed bounding box could be used.
This was not flexible enough.
T63193 will benefit from this refactor.
Reviewers: brecht, campbellbarton
|
|
Currently this is only in the 3D viewport however all spaces
that use the tool-system will have this region added.
D4680 by @brecht with own updates.
|
|
|
|
|
|
Each space had separate operators, duplicating logic.
Use RNA properties instead so adding the ability to toggle other
region types (floating redo region for eg) doesn't need to have an
extra operator per space type.
It's also nicer to show a check-box for something which can be toggled.
|
|
|
|
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
|
|
|
|
When manually selecting a different image, this image will become pinned and
continue to show. The material node is not automatically modified as it was in
old Blender versions, only the image displayed in the UV editor.
Fixes T61239: confusing behavior when unwrapping non-square images. By showing
the relevant image by default it's more clear why it does aspect correction.
|
|
Add getter callback support for 'WM_HANDLER_TYPE_KEYMAP' type handlers
this is needed for key-maps which change based on the active tool.
Replaces 'sneaky_handler' hack which temporarily inserted a handler.
|
|
The dependency graph now handles updating image users to point to the current
frame, and tags images to be refreshed on the GPU. The image editor user is
still updated outside of the dependency graph.
We still do not support multiple image users using a different current frame
in the same image, same as 2.7. This may require adding a GPU image texture
cache to keep memory usage under control. Things like rendering an animation
while the viewport stays fixed at the current frame works though.
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
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.
|
|
Scopes were moved to properties area, so need to adjust
the optimization part of tagging.
Ideally, tagging will always happen (and happen for free)
and then drawing code will update scopes when they are
actually displayed. But this is outside of the scope of
this fix since requires some design changes.
|
|
|
|
|
|
There were two problems:
1. The scopes were only updated when the "Scopes" category is active,
but this category has been removed in Blender 2.8.
2. The scopes moved from the TOOLS to the UI region.
However the update-code still searched for the "Scopes" category
in the TOOLS region.
Both problems are fixed with this commit:
1. Scopes have there own category again.
2. The update code is in the correct draw function now.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D4245
|
|
Prevents clang-format wrapping text before comments.
|
|
This is in order to use batch cache directly without using tricks like
batch presets reseting the VAOs.
Note: For now it also create a depth buffer for this area which is not
needed. We could get rid of this to lower VRAM usage.
|
|
Sets the header position for newly created windows with few exceptions
(preferences is always bottom, file-selector is always top).
|
|
|
|
Add keymap flag to the gizmo handler so events can be handled
on the UI level and not get over-ridden by grease pencil.
|
|
This should be purely an implementation change,
for end users there should be no functional difference.
The entire key configuration is in one file with ~5000 lines of code.
Mostly avoiding code duplication and preserve comments and utility
functions from the C code.
It's a bit long but for searching and editing it's also convenient to
have it all in one file.
Notes:
- Actual keymap is shared by blender / blender_legacy
and stored in `keymap_data/blender_default.py`
This only generates JSON-like data to be passed into
`keyconfig_import_from_data`, allowing other presets to load and
manipulate the default keymap.
- Each preset defines 'keyconfig_data'
which can be shared between presets.
- Some of the utility functions for generating keymap items still
need to be ported over to Python.
- Some keymap items can be made into loops (marked as TODO).
See: D3907
|
|
Makes it simpler to make some changes...
Also fix order of some includes (use alphabetical please).
|
|
Instead of showing the transform handles for all selections,
move this functionality into a tool as done for the 3D view.
|
|
Image toolbar now starts with a single column width
and snaps to button increments.
|
|
Pivot is now period key, orientation is comma key.
|