Age | Commit message (Collapse) | Author |
|
extract palette
Also fixed the same error in generate GPencil object from image.
The problem was the Render Result image hasn't ibuf.
|
|
Draw Face Sets does not work in Dyntopo and the sculpt API should be
responsible for that without needing to add checks all over the code,
but it was doing an undo push of type SCULPT_UNDO_FACE_SETS which is not
supported, causing the crash.
Reviewed By: sergey
Maniphest Tasks: T77328
Differential Revision: https://developer.blender.org/D7924
|
|
|
|
|
|
Previously, constraints were added multiple times from different
vertices. This adds a GSet to check that the same constraint is not
being added twice when iterating over the neighbors of two different
vertices.
Reviewed By: zeddb
Differential Revision: https://developer.blender.org/D8007
|
|
The `Toolbar` and `Sidebar` hide the corresponding panel
`VIEW3D_PT_sculpt_dyntopo` by polling for context.sculpt_object and
context.tool_settings.sculpt. In the Active Tool in the Properties
Editor this poll does not return False though, thus the
sample_detail_size is possible from there.
Second security check (the operator poll `SCULPT_mode_poll`) checks the
active object -- that is still valid even if hidden, so we are allowed
to execute the operator. However the active object becomes NULL once the
area is switched in `sample_detail()` -- see `CTX_wm_area_set`), leading
to the crash.
Dont think there is a quick and easy way to do this in the poll from the
Properties Editor, so just check for a valid active abject in the
operator and return OPERATOR_CANCELLED if we dont have it.
Maniphest Tasks: T77047
Differential Revision: https://developer.blender.org/D7832
|
|
This is related to T76659.
This just renames data type names to `CD_PROP_STRING`, `CD_PROP_FLOAT`
and `CD_PROP_INT32`. It makes them a bit more specific and removes
unnecessary abbreviations.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D7980
|
|
This operator performs an edit operation in the active face set defined
by the cursor position and updates the visibility. For now, it has a
Grow and Shrink operations, similar to Select More/Less in edit mode or
to the mask filter Grow/Shrink modes. More operations can be added in
the future.
In multires, this updates the visibility of an entire face from the base
mesh at once, which makes it very convenient to edit the visible area
without manipulating the face set directly.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D7367
|
|
This implements squash and stretch as a deform mode for the Pose Brush.
It is similar to scale, but it applies different scale values in different
axis. To achieve this, the pivot local space of the transform needs to
be aligned to the segment when using this deform mode to apply the scale
in the correct direction.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D7934
|
|
|
|
Applying gravity to this brush does not make much sense and undo/redo
won't work correctly as it uses a different undo type.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D7925
|
|
Instead of accumulating displacement for each vertex into the neighbors, accumulate the opposite displacement from each neighbor into the vertex. I think this is the same and it does not produce artifacts in Multires.
Reviewed By: sergey, brecht
Differential Revision: https://developer.blender.org/D7508
|
|
|
|
Mix up with imapaint.paintcursor & imapaint.paint.paint_cursor
Remove imapaint.paintcursor since it wasn't used.
Also rename paint_cursor_start_explicit() to paint_cursor_start(),
removing the existing paint_cursor_start() since it took the paint
struct from the context, a value that's known by all callers.
|
|
This caused an additional argument when exiting object modes
and many other low level functions which don't need to access context.
This simplifies fixing T77073.
|
|
This was missing from when Face Sets were enabled in Multires, so it was
always considering that all vertices in the grids are visible. This
should also fix other unreported bugs.
Reviewed By: sergey
Maniphest Tasks: T76776
Differential Revision: https://developer.blender.org/D7809
|
|
Previously, the twist rotation was aligned using the stroke location.
This was causing unexpected results when rotating some Face Sets rigs.
Now the intersection with the first Face Set in the flood fill is used,
which produces much better results.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D7900
|
|
The grab delta is not used in do_pose_brush_task_cb_ex, so there is no
reason to add it to SculptThreadedTaskData
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D7901
|
|
This tool is similar to the cloth brush, but it applies the cloth
simulation deformation to the whole mesh in an uniform way. The
simulation can be controlled using the mask to pin vertices and the face
sets to define force action areas.
It uses the same solver as the cloth brush which now no longer depends
on StrokeCache.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D7857
|
|
This Pose Brush origin mode simulates an FK deformation in the entire
model when clicking on the face sets, as they were controls of a fully
rigged character. Combined with the previous Face Sets modes that allow
creating IK chains, the pose brush should now be able to simulate most
of the common rigs deformations.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D7839
|
|
This was returning the wrong face set in cases where the active vertex
has more than one available face set.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D7858
|
|
|
|
|
|
This was propsed in D7059, so I applied it to the rest of the code
Reviewed By: campbellbarton, sergey
Differential Revision: https://developer.blender.org/D7480
|
|
If all vertices in the sculpt are visible create the new face set and
update the default face set. This is the same as disabling the overlay,
so it will not have the extra performance cost of rendering a colored
face set twice that gives no information.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D7530
|
|
|
|
The grab mode was not correctly implemented, so the way it was working
was confusing for users.
- Grab delta was calculated in increments from the last stroke position, so it did not match the behavior of a grab brush. I refactored the grab delta calculation to make this change more explicit.
- Grab displacement was not calculated from the original coordinates
- Grab was using an incorrect strength
Grab is now setting the position of the affected vertices directly and
the constraints solve the rest of the cloth. I also tried to implement
an alternative version based on applying forces to move the vertices to
the grab position, but I think this is more controllable and the grab
falloff can be adjusted by tweaking the simulation falloff.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D7756
|
|
When the brush size is bigger than the entire mesh, fdata.tot_co can be
0, so the pose origin will default to (0,0,0), which does not make much
sense. After this patch, the pose origin will be set to the farthest
vertex from the pose origin, which at least should be in the surface of
the mesh and in most cases in the direction the pose brush was already
detecting the origin.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D7773
|
|
The only possible name for the iterator was ni, this should fix that.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D7774
|
|
The implementation of this function should match the one in
SCULPT_vertex_co_get. This does not solve the issue when sculpting with
modifiers active but I think this code is wrong
Reviewed By: sergey, brecht
Differential Revision: https://developer.blender.org/D7805
|
|
|
|
This is an alternative deformation brush for the Pose Brush intended
quickly change the proportions of the mesh. The regular mode scales
using the segment's origin as a pivot. The inverted mode drags the
entire segment using the grab delta.
The only difference with the regular pose brush is that it is not
compatible with IK, so the option is disabled and set to 1 segment. The
rest of the options should work as expected.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D7374
|
|
clicking Image Aspect
Calculate with positive areas here and ensure stencil_dimension stays
positive.
Maniphest Tasks: T76267
Differential Revision: https://developer.blender.org/D7821
|
|
|
|
This feature was added when Blender used tex-face (per-face images),
but doesn't make as much sense since this was removed.
Removing this from UV edit-mode as this wasn't working in any
of the 2.8x releases, causing UV's to be visible but unselectable.
Resolves issue raised in T76958.
|
|
|
|
|
|
|
|
Caused by rB47da01a4db1d.
Above commit did not change the toolname it was setting when the brush
was actually toggled.
Maniphest Tasks: T75457
Differential Revision: https://developer.blender.org/D7792
|
|
|
|
|
|
|
|
This operation is using the code of the mirror modifier, so no default
is guaranteed to work in all cases. This value matches the defaults of
the mirror modifier.
Reviewed By: jbakker
Maniphest Tasks: T75977
Differential Revision: https://developer.blender.org/D7495
|
|
This helped to go beyond the 4GB limit, but is no longer relevant for 64 bit.
|
|
|
|
Caused by 5159b8e1eadb.
|
|
|
|
|
|
When projection painting a dense mesh a face can be marked
PROJ_FACE_DEGENERATE when it is too small. Degenerative faces are
handled differently and as documented can create incorrect results.
Not sure what these incorrect results are and if there could be a better
solution for handling these results.
This fix would only mark a face degenerative when all the verts are the
same.
Reviewed By: Campbell Barton
Differential Revision: https://developer.blender.org/D7662
|
|
When projection painting a dense mesh a face can be marked
PROJ_FACE_DEGENERATE when it is too small. Degenerative faces are
handled differently and as documented can create incorrect results.
Not sure what these incorrect results are and if there could be a better
solution for handling these results.
This fix would only mark a face degenerative when all the verts are the
same.
Reviewed By: Campbell Barton
Differential Revision: https://developer.blender.org/D7662
|