Age | Commit message (Collapse) | Author |
|
The problem was the conversion to object space converted the
points to zero.
Now, the new function `zero_axis_bias_m4` is used in order to add
a small bias in the inverse matrix and avoid the zero points.
A known math issue is the stroke can be offsetted if the scale is set to 1
again. In this case apply the scale to reset to 1.
Differential Revision: https://developer.blender.org/D16162
|
|
The check was doing with the original point and
must be the evaluated point.
|
|
The problem was the eval data update only occurs for the
actual frame and in this case must be for all frames.
|
|
There was a memory leak when use inverted fill.
|
|
The problem was the duplicated strokes had wrong pointers
to the original stroke.
|
|
The error occurs only when the layer is empty.
|
|
The default trace can only trace an image or a sequence, but
it was not possible to trace only selected frames in a sequence.
This new parameter allows to define what frame trace.
If the value is 0, the trace is done as before.
The parameter is not exposed in the UI because this is logic
if it is managed by a python API, but it has no sense in the UI.
This feature was included after receiving feedback from Studios
which need to trace videos only for some frames using custom
python scripts.
|
|
The operator was not checking the status of the
Autokey button.
|
|
The property registration was missing in the operator, now fixed.
|
|
A reference to the active brush was kept even when it was freed.
|
|
|
|
Add missing labels, and also add tooltips.
Unfortunately there is no way currently to extract two messages from a
single 'function' call, so unless those type of macros become very
widely used, would keep it as manual tagging.
Also disambiguate `case` in text context, pretty sure English is one of
the very rare languages to use this word for character case too.
|
|
- Keying (keyframe insertion)
- Roughness (particle children)
- New image, collection, text (in menus)
- Parents (particles)
- Wrap (text)
- Light (add menu)
- Empty (volume add menu)
- Empty (empty add menu)
- Cycles (f-curve modifier)
- Drag (workspace tool type)
- Power (light intensity)
- Power (math nodes)
This last change also moves all math operations in nodes to the
ID_nodetree context. It's needed only for some operations, but we
can't be more granular here.
Also...
- Fix context extraction for interpolation mode headers in F-Curves
and GPencil interpolation operator
- Enable new translation: "Slot %d" in image editor
- Fix an English message in the node editor:
"Replace the input image's alpha channels by..." -> channel
Ref. T43295
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D15694
|
|
The offset was applied in stroke mode and this was wrong.
|
|
Regression in b8960267dd51f9108b3b49e9b762e6b4d35ae1dc.
|
|
- batch rename
- keyframe settings
- tool name in Tool properties header
- tool name in Tool properties Drag (fake) enum
- new file templates
- new preset
- new text datablock
- new collection datablock
- new geometry nodes (modifier and node group)
- new grease pencil data (layers and materials)
Ref. T43295
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D15533
|
|
This was a missing feature.
|
|
The stroke was recalculated, but the curve data was not updated.
|
|
Replace verbose ELEM(..) usage, now each kind of mouse event has it's
own macro.
|
|
This was a missing feature and this commit solves this.
|
|
Rename and refactor several F-curve key manipulation functions, and move
them from `editors` to `blenkernel`.
The functions formerly known as `delete_fcurve_key`,
`delete_fcurve_keys`, and `clear_fcurve_keys` have been moved from
`ED_keyframes_edit.h` to `BKE_fcurve.h` and have been renamed according
to hierarchical naming rules.
Below is a table of the naming changes.
| From | To |
| -- | -- |
| `delete_fcurve_key(fcu, index, do_recalc)` | `BKE_fcurve_delete_key(fcu, index)` |
| `delete_fcurve_keys(fcu)` | `BKE_fcurve_delete_keys_selected(fcu)` |
| `clear_fcurve_keys(fcu)` | `BKE_fcurve_delete_keys_all(fcu)` |
| `calchandles_fcurve()` | `BKE_fcurve_handles_recalc()` |
| `calchandles_fcurve_ex()`| `BKE_fcurve_handles_recalc_ex()` |
The function formerly known as `delete_fcurve_key` no longer takes a
`do_fast` parameter, which determined whether or not to call
`calchandles_fcurve`. Now, the responsibility is on the caller to run
the new `BKE_fcurve_handles_recalc` function if they have want to
recalculate the handles.
In addition, there is now a new static private function called
`fcurve_bezt_free` which sets the key count to zero and frees the key
array. This function is now used in couple of instances of functionally
equivalent code. Note that `BKE_fcurve_delete_keys_all` is just a
wrapper around `fcurve_bezt_free`.
This change was initially spurred by the fact that `delete_fcurve_keys`
was improperly named; this was a good opportunity to fix the location
and naming of a few of these functions.
Reviewed By: sybren
Differential Revision: https://developer.blender.org/D15282
|
|
Caused by [0] which made accessing the drag-start require a function
instead of being the value written into the event cursor coordinates.
[0]: b8960267dd51f9108b3b49e9b762e6b4d35ae1dc
|
|
The problem was the last point had the original point, but the previous one not, so the loop ends before checking last point.
The solution is avoid the loop exist if the function is checking the previous point before last one.
|
|
|
|
Removes the following macros for scene/render frame values:
- `CFRA`
- `SUBFRA`
- `SFRA`
- `EFRA`
These macros don't add much, other than saving a few characters when typing.
It's not immediately clear what they refer to, they just hide what they
actually access. Just be explicit and clear about that.
Plus these macros gave read and write access to the variables, so eyesores like
this would be done (eyesore because it looks like assigning to a constant):
```
CFRA = some_frame_nbr;
```
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D15311
|
|
Grease Pencil animation channels are now also shown in the Dopesheet
mode of the Dopesheet editor and in the Timeline.
Grease pencil related events are now listened not only by container
`SACTCONT_GPENCIL` (Grease Pencil Dopesheet), but also
`SACTCONT_DOPESHEET` (main Dopesheet), and `SACTCONT_TIMELINE`
(timeline).
A new Animation Filter flag was added: `ANIMFILTER_FCURVESONLY`. For now
this only filters out Grease Pencil Layer channels.
**Implemented:**
- Preview range set: now only considers selected Grease Pencil keyframes
when `onlySel` parameter is true. Not only this allows the operator to
work with grease pencil keyframes in main dopesheet, but it also fixes
the operator in the Grease Pencil dopesheet.
- Translation: allocation (and freeing) of specific memory for
translation of Grease Pencil keyframes.
- Copy/Paste: call to both Fcurve and GPencil operators, to allow for
mixed selection. Errors are only reported when both the FCurve and
GPencil functions fail to paste anything.
- Keyframe Type change and Insert Keyframe: removed some code here to
unify Grease Pencil dopesheet and main dopesheet code.
- Jump, Snap, Mirror, Select all/box/lasso/circle, Select left/right,
Clickselect: account for Grease Pencil channels within the channels
loop, no need for `ANIMFILTER_FCURVESONLY` there.
**Not Implemented:**
- Graph-related operators. The filter `ANIMFILTER_FCURVESONLY` is
naively added to all graph-related operators, meaning more-or-less all
operators that used `ANIMFILTER_CURVE_VISIBLE`.
- Select linked: is for F-curves channel only
- Select more/less: not yet implemented for grease pencil layers.
- Clean Keys, Sample, Extrapolation, Interpolation, Easing, and Handle
type change: work on Fcurve-channels only, so the
`ANIMFILTER_FCURVESONLY` filter is activated
Graying out these operators (when no fcurve keyframe is selected) can be
done with custom poll functions BUT may affect performance. This is NOT
done in this patch.
**Dopesheet Summary Selection:**
The main summary of the dopesheet now also takes into account Grease
Pencil keyframes, using some nasty copy/pasting of code, as explained
[on devtalk](https://devtalk.blender.org/t/gpencil-layers-integration-in-main-dopesheet-selection-issue/24527).
It works, but may be improved, providing some deeper changes.
Reviewed By: mendio, pepeland, sybren
Maniphest Tasks: T97477
Differential Revision: https://developer.blender.org/D15003
|
|
There were two problems:
1) The checking of the collision was not working with one point only.
2) For one point, the masking was checked always and if the masking was not activated, the stroke was skipped.
|
|
The new layer option must be the first in the menu.
Differential Revision: https://developer.blender.org/D15255
|
|
- Avoid ambiguity which caused these values to be confused, use `mval`
for region relative mouse coordinates, otherwise `event_xy`.
- Pass region relative coordinates to sample_detail_dyntopo &
sample_detail_voxel as there is no reason to use screen-space values.
- Rename invalid use of mval for screen-space coordinates.
|
|
The operator set the color but the factor of the mix value was not updated and as the default value was 0, the color was not vivible and only worked when the stroke was previously painted.
|
|
|
|
|
|
into enums
The transformation snapping code contains a bunch of `#define`s, some ambiguously or incorrectly named attributes. This patch contains refactored code to improve this. This patch does (should) not change functionality of snapping.
Clarified ambiguously / incorrectly named attributes.
- "Target" is used to refer to the part of the source that is to be snapped (Active, Median, Center, Closest), but several other areas of Blender use the term "target" to refer to the thing being snapped to and "source" to refer to the thing getting snapped. Moreover, the implications of the previous terms do not match the descriptions. For example: `SCE_SNAP_TARGET_CENTER` does not snap the grabbed geometry to the center of the target, but instead "Snap transforamtion center onto target".
- "Select" refers to the condition for an object to be a possible target for snapping.
- `SCE_SNAP_MODE_FACE` is renamed to `SCE_SNAP_MODE_FACE_RAYCAST` to better describe its affect and to make way for other face snapping methods (ex: nearest).
Refactored related `#define` into `enum`s. In particular, constants relating to...
- `ToolSettings.snap_flag` are now in `enum eSnapFlag`
- `ToolSettings.snap_mode` are now in `enum eSnapMode`
- `ToolSettings.snap_source` (was `snap_target`) are now in `enum eSnapSourceSelect`
- `ToolSettings.snap_flag` (`SCE_SNAP_NO_SELF`) and `TransSnap.target_select` are now in `enum eSnapTargetSelect`
As the terms became more consistent and the constants were packed together into meaningful enumerations, some of the attribute names seemed ambiguous. For example, it is unclear whether `SnapObjectParams.snap_select` referred to the target or the source. This patch also adds a small amount of clarity.
This patch also swaps out generic types (ex: `char`, `short`, `ushort`) and unclear hard coded numbers (ex: `0`) used with snap-related enumerations with the actual `enum`s and values.
Note: I did leave myself some comments to follow-up with further refactoring. Specifically, using "target" and "source" consistently will mean the Python API will need to change (ex: `ToolSettings.snap_target` is not `ToolSettings.snap_source`). If the API is going to change, it would be good to make sure that the used terms are descriptive enough. For example, `bpy.ops.transform.translate` uses a `snap` argument to determine if snapping should be enabled while transforming. Perhaps `use_snap` might be an improvement that's more consistent with other conventions.
This patch is (mostly) a subset of D14591, as suggested by @mano-wii.
Task T69342 proposes to separate the `Absolute Grid Snap` option out from `Increment` snapping method into its own method. Also, there might be reason to create additional snapping methods or options. (Indeed, D14591 heads in this direction). This patch can work along with these suggestions, as this patch is trying to clarify the snapping code and to prompt more work in this area.
Reviewed By: mano-wii
Differential Revision: https://developer.blender.org/D15037
|
|
|
|
To make it consistent with collections, now it's possible to name the new layer created using the `Move to Layer` option.
Differential Revision: https://developer.blender.org/D15092
|
|
Add the following macros for enums as support for these features wasn't
all that obvious and there were some inconsistencies in their use.
- RNA_ENUM_ITEM_HEADING(name, description)
- RNA_ENUM_ITEM_SEPR
- RNA_ENUM_ITEM_SEPR_COLUMN
|
|
|
|
This bug was introduced in commit https://developer.blender.org/rB5188c14718c56e4d088d3c5bb3ce3ed9ed8b7bdc because the object transform was not applied when baking the object.
Thanks to @frogstomp for the head up.
|
|
The algorithm is not designed to be used with Closed strokes (cyclic) and actually the result is arbitrary. In order to avoid this, now the closed strokes never are merged.
Related to T98235
Feedback by: @mendio
|
|
|
|
Assign get_name functions for select picking and circle select
so modifier keys show the result of holding the modifiers.
|
|
|
|
The problem was the layer transformation was already applied in the layer and if we apply in the bake, we are doing double transformation.
Differential Revision: https://developer.blender.org/D14844
|
|
|
|
|
|
Now it's possible to use auto masking at 3 levels:
* Stroke
* Layer
* Material
The masking options can be combined and allows to limit the effect of the sculpt brush.
Diff Revision: https://developer.blender.org/D14589
|
|
|
|
The type of the key was changed from string to integer in 66da2f537ae8, but
the GSet was still being created for string keys.
As long as the integers stay small enough, this even kind of works on
little-endian systems, but of course it should use an integer hash instead.
|
|
If the layer was transformed the grab brush was not initialized as expected because it was using an untrasformed matrix.
|
|
Calling duplicate operation without selecting anything registers an undo
step. If nothing is selected (keyframe, curve, object, etc.), cancel the
operator execution to prevent undo push.
Patch improves following operators:
- ACTION_OT_duplicate
- GPENCIL_OT_duplicate
- GRAPH_OT_duplicate
- MESH_OT_duplicate
- NODE_OT_duplicate
- OBJECT_OT_duplicate
Reviewed By: campbellbarton
Ref D14511
|