Age | Commit message (Collapse) | Author |
|
Based on work by Bastien and Brecht in the Node Editor, this adds more
generalized support for selecting items so that click+drag actions on
items (nodes, makers, dopesheet keys, etc.) works as wanted.
Note that this only adds the barebones to support this in other editors,
it's not used yet (will be done in followup commits).
The behavior is supposed to work as follows:
* Clicking an unselected item immediately selects it, and deselects
other items (doesn't wait for release events).
* Click+drag on an unselected item immediately selects it, deselects
others and drags it in one go (don't require selecting it first!).
* Click+drag on a selected item won't change the selection state (and
won't send an undo push) and start dragging all selected items as soon
as the drag event is recognized.
* Clicking on a selected item will still deselect others, but that will
only happen on mouse release, when we know the intention is not to drag
the item.
Included in: https://developer.blender.org/D5979
Reviewed by: Brecht van Lommel, William Reynish
|
|
Reviewed By: brecht
Maniphest Tasks: T70499
Differential Revision: https://developer.blender.org/D5985
|
|
Changing this values should only support horizontal movement as we are no longer trying to match the size of the cursor and the size of the circle preview in the widget.
Reviewed By: brecht
Maniphest Tasks: T70310
Differential Revision: https://developer.blender.org/D5931
|
|
This commit introduces the following changes:
- Invert the direction of the brush strength WM control. It was working in the opposite direction to any other control in Blender. Now dragging to the right increases the strength.
- Increase the alpha of the cursor
- Remove the font shadow of the numbers in the WM control. It was adding too much visual noise when rendered on top of the brush alpha
- Add a second circle to preview the strength in the cursor
- Increase the resolution of the cursor circles. Now they look smooth even when working with large brush sizes.
- Add a line preview to display the brush curve
- Don't offset the cursor preview when changing size and strength
Reviewed By: billreynish, brecht
Differential Revision: https://developer.blender.org/D5889
|
|
Expanding operator names could buffer overrun.
|
|
NodeTree structures of materials and some other data blocks are
effectively node group datablock objects that are contained inside
the parent block. Thus, direct references to them are only valid
while blender is running, and are lost on save.
Fix Copy As New Driver to create a reference that goes through
the owner datablock, by adding a new ID flag to mark private
pseudo-datablocks.
Also fix functions that return full paths to structures and
properties, e.g. used in python tooltips. Functions for paths
from ID to struct or property can't be changed because of
Animation Data related code.
Reviewers: mont29
Differential Revision: https://developer.blender.org/D5559
|
|
Differential Revision: https://developer.blender.org/D5581
|
|
Differential Revision: https://developer.blender.org/D5581
|
|
|
|
The old layout of `PointerRNA` was confusing for historic reasons:
```
typedef struct PointerRNA {
struct {
void *data;
} id;
struct StructRNA *type;
void *data;
} PointerRNA;
```
This patch updates it to:
```
typedef struct PointerRNA {
struct ID *owner_id;
struct StructRNA *type;
void *data;
} PointerRNA;
```
Throughout the code base `id.data` was replaced with `owner_id`.
Furthermore, many explicit pointer type casts were added which
were implicit before. Some type casts to `ID *` were removed.
Reviewers: brecht, campbellbarton
Differential Revision: https://developer.blender.org/D5558
|
|
|
|
|
|
|
|
`wm_operators.c` is mainly for generic operator logic
where as the splash screen is one of a kind.
|
|
Some statements were split across multiple lines because of their
trailing comments.
In most cases it's clearer to put the comments above.
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
Cell fracture redraw option was crashing.
Change operator popup behavior to close the UI before executing
since the operator may perform operations which change/remove the UI.
|
|
Sometimes one may want to nuke all previews altogether, running the
operator for all eight individual ID types would be tedious then...
|
|
|
|
|
|
This also makes `IDP_CopyProperty` the "opposite"
of `IDP_FreeProperty`, which is what I'd expect.
Two refactoring steps:
* rename IDP_FreeProperty to IDP_FreePropertyContent
* new IDP_FreeProperty function that actually frees the property
Reviewers: brecht
Differential Revision: https://developer.blender.org/D4872
|
|
Reviewers: brecht
Differential Revision: https://developer.blender.org/D4858
|
|
The complexity in this patch comes from the fact
that the current operator system does not support
multi-step user interactions well.
More specifically, for this to work, we need to show
a confirm dialog and a file browser afterwards.
We decided that it is easier to keep everything in
a single operator, instead of creating separate
operators that invoke each other.
So, now the `WM_OT_open_mainfile` operator invokes
itself in different states. It implements a simple
finite state machine to manage the states.
The dialog itself is expected to be improved in
a future commit. See D4829 for more details.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D4829
|
|
Previously it was only possible to load factory startup & preferences.
|
|
|
|
Prepare for enabling ReflowComments.
|
|
Differential Revision: https://developer.blender.org/D4674
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
No user visible change.
|
|
While this could already be done from C,
this is now exposed to Python
|
|
|
|
Use a name that related to block bounds calculation
(mx/my are typically used for mouse x,y).
|
|
Convention was not to but after discussion on 918941483f7e we agree its
best to change the convention.
Names now mostly follow RNA.
Some exceptions:
- Use 'nodetrees' instead of 'nodegroups'
since the struct is called NodeTree.
- Use 'gpencils' instead of 'grease_pencil'
since 'gpencil' is a common abbreviation in the C code.
Other exceptions:
- Leave 'wm' as it's a list of one.
- Leave 'ipo' as is for versioning.
|
|
Eventually this should be used to prompt when loading a new file too.
|
|
Remove confirmation popup menu, just exit.
Note that this option is mainly for developers or people reviewing
blend files, see D4406 for discussion on reason for keeping this feature
while simplifying how it works.
|
|
- BKE_lamp -> BKE_light
- Main.lamp -> light
|