Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
This enables an extra layer of control in the sculpt brushes.
For now it is enabled only in Scrape, but it should work in all brushes (like normal radius). In the future it may also be enabled in other brushes.
You can tweak in this property in the scrape brush to achieve a much better behavior when working on curve surfaces and control how much volume you want to trim. In most cases, it also fixes the bug where the brush keeps trimming in the same area without disabling accumulate.
It should be possible to fix some other artifacts in other brushes by tweaking this default property.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D5993
|
|
This patch allow to change the brush tip shape between a square and a
circle using a brush property.
After this change we are no longer testing the distance against a cube
(the Z axis is not used). I did not test this in depth, but if it does
not produce any artifacts I think we can keep it this way instead of
adding more complexity to the code.
In this new distance test the brush falloff is only applied on the
rounded parts of the square to avoid sharp artifacts in the
diagonals. Because of this, the round version is much softer than
the square one. The planned hardness property will fix this, but
this can also be avoided by setting the fallof to a custom curve.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D6165
|
|
The IK chain was using an anchor point by default as it makes sense for
posing, but for creating curved shapes it is useful to be able to
disable it.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D6584
|
|
This brush simulates deforming clay with your fingers, accumulating
material during the stroke. It has a plane that tilts during the stroke
in the front part of the brush to achieve this effect.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D6238
|
|
The code was using brush->alpha directly, so the alpha value from
UnifiedPaintSettings was not used when eneabled.
Reviewed By: brecht
Maniphest Tasks: T73656
Differential Revision: https://developer.blender.org/D6804
|
|
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D6788
|
|
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D6792
|
|
|
|
Regression from c30d6571bb477
|
|
|
|
|
|
This reverts commit 394b48029c5335381f774f83524ad6ee5cb986da.
Leaving this here does not affect performance in any significant way and it may be useful in the future.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D6688
|
|
In some situations the symmetry point may be behind the camera, so the
projection is inverted and it looks wrong. This avoids drawing points in
screen space when they are behind the camera.
Reviewed By: jbakker
Maniphest Tasks: T72690
Differential Revision: https://developer.blender.org/D6487
|
|
Note that `BKE_library.h`/`library.c` were renamed to
`BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here.
Part of T72604.
|
|
The user has preference to select the center point for alignment.
But in this case, it was not available for selection.
Also prioritizes selection of the middle point over the handles.
Reviewed By: #user_interface, brecht
Differential Revision: https://developer.blender.org/D6780
|
|
|
|
- Replace 'unsigned' used on it's own with 'uint'.
- Replace 'unsigned const char' with 'const uchar'.
|
|
Old Name New Name
========= =========
init_def_material BKE_materials_init
BKE_material_gpencil_default_free BKE_materials_exit
test_object_materials BKE_object_materials_test
test_all_objects_materials BKE_objects_materials_test_all
give_matarar BKE_object_material_array
give_totcolp BKE_object_material_num
give_current_material_p BKE_object_material_get_p
give_current_material BKE_object_material_get
assign_material BKE_object_material_assign
assign_matarar BKE_object_material_array_assign
give_matarar_id BKE_id_material_array
give_totcolp_id BKE_id_material_num
assign_material_id BKE_id_material_assign
clear_matcopybuf BKE_material_copybuf_clear
free_matcopybuf BKE_material_copybuf_free
copy_matcopybuf BKE_material_copybuf_copy
paste_matcopybuf BKE_material_copybuf_paste
BKE_material_init_gpencil_settings BKE_gpencil_material_attr_init
BKE_material_add_gpencil BKE_gpencil_material_add
BKE_material_gpencil_get BKE_gpencil_material
BKE_material_gpencil_default_get BKE_gpencil_material_default
BKE_material_gpencil_settings_get BKE_gpencil_material_settings
|
|
|
|
The code removed was left there from an early prototype and it was not
doing anything.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D6741
|
|
Currently the UI for Symmetrize is confusing, for a few reasons:
- It exists as a sub-panel to the Dyntopo panel, even though it doesn't require Dyntopo to work
- It is inside a panel called Remesh, which is confusing because we now have a different Remesh panel
Changes:
- Put the Symmetrize controls in the Symmetry panel
- Rename Optimize to Rebuild BVH and move to the Sculpt menu
- Change the poll function - apparently it doesn't require Dyntopo
Differential Revision: https://developer.blender.org/D6735
Reviewed by Pablo Dobarro
|
|
|
|
|
|
|
|
|
|
The full name was "Topology Slide/Relax", but it didn't fit in the
toolbar UI. This was causing some problems:
- The mesh filter that does the same thing is called "Relax"
- We may want to add a "Topology Brush" tool in the future that is more
oriented to retopology task (like creating strips of quads), so by doing
this we avoid having two tools with the same name in the UI.
Reviewed By: billreynish
Differential Revision: https://developer.blender.org/D6590
|
|
The 2D paint cursor in the 3D view does not support scene radius in
weight and vertex paint mode. This was also the case in 2.80 with the
old cursor. The option to change the units from view to scene is not
available in the UI in those modes, so I think it makes sense to remove
the support from the code.
The ideal solution could be supporting the new cursor in all paint
modes, but that is going to take more time and it is going to be
problematic in texture paint. After doing this, we can bring this code
back and add the option to change the units to the UI.
Reviewed By: jbakker
Maniphest Tasks: T73080
Differential Revision: https://developer.blender.org/D6586
|
|
Also rename struct members to 'launch_event', since it's more
descriptive and was called this in some places.
|
|
|
|
|
|
We can't use the fast path when the mesh is used by mulitple objects and so
slower sculpting is expected then. But fake users should not affect this. This
also fixes the same type of error in a few other areas.
|
|
when using UDIMS
A more generic approach might be considered in the future (I assume
there are other operators around that need an update in shifting their
uvs) though.
Maniphest Tasks: T72648
Differential Revision: https://developer.blender.org/D6570
|
|
PoseIKChain for example reads as if this is related to armature/pose
when it's a sculpting feature.
|
|
This brush should be added to the set of brushes where we know which
vertices are going to be affected by the brush when starting the stroke.
This way we can limit the automasking only to those vertices instead of
flood filling the whole mesh from the active vertex.
All brushes that are not in this set will automask by flood filling the
mesh when starting the stroke. To improve this and make it work as most
users expect, we need a fast way to calculate topological distances on
high poly meshes.
Reviewed By: jbakker
Maniphest Tasks: T72251
Differential Revision: https://developer.blender.org/D6376
|
|
Before this it was possible to use the operator with Dyntopo sample mode
with a PBVH type GRIDS or FACES, causing a crash. Now we check first if
the PBVH type is correct before calling the sampling function.
We also check if the PBVH exists, which may also cause a crash.
Reviewed By: jbakker
Maniphest Tasks: T72647
Differential Revision: https://developer.blender.org/D6475
|
|
This commits introduces the pose_ik_segments brush property in the Pose Brush. When increasing the IK segments count, the brush generates more segments and weights associations following the topology of the mesh. When moving the brush, these segments are transformed using an IK solver and they are used to deform the mesh.
When pressing Ctrl, the brush controls the segments' roll rotation instead of using the IK solver. The brush falloff controls how much rotation is propagated from the first to the last segment in the chain.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D6389
|
|
This was caused by a missing call to BKE_mesh_flush_hidden_from_verts()
when a SCULP_UNDO_HIDDEN undo step is processed.
Reviewed By: jbakker
Maniphest Tasks: T72700
Differential Revision: https://developer.blender.org/D6488
|
|
Currently the islands are created depending only on the visible UVs.
This can be confusing because compared to Edit Meshes, islands are created based on the selected elements.
T68284 shows a case where this confusion is observed.
Differential Revision: https://developer.blender.org/D6502
|
|
Previously the alpha was hardcoded to 0.7. Now it is possible to control
the cursor alpha by changing the alpha color of the cursor color
property. New alpha default is 0.9. This, with the new saturated colors,
should make the cursor more visible on highdpi screens.
I also removed the cache location preview as it is too visible right now
with the new alpha and color values.
Reviewed By: billreynish
Differential Revision: https://developer.blender.org/D6433
|
|
Partial updates are not currently supported in the Workbench engine, so
we can skip the rect calculation during the stroke.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D6444
|
|
Caused by 14acac0bb7f3
|
|
The UDIM commit accidentally removed the check for whether an ImBuf exists
before trying to paint on it.
|
|
|
|
This was caused by a call to paint_2d_bucket_fill that I missed in the
UDIM changes.
Now, this feature does not only not crash, but it even works with tiled
images!
|
|
This patch contains the work that I did during my week at the Code Quest - adding support for tiled images to Blender.
With this patch, images now contain a list of tiles. By default, this just contains one tile, but if the source type is set to Tiled, the user can add additional tiles. When acquiring an ImBuf, the tile to be loaded is specified in the ImageUser.
Therefore, code that is not yet aware of tiles will just access the default tile as usual.
The filenames of the additional tiles are derived from the original filename according to the UDIM naming scheme - the filename contains an index that is calculated as (1001 + 10*<y coordinate of the tile> + <x coordinate of the tile>), where the x coordinate never goes above 9.
Internally, the various tiles are stored in a cache just like sequences. When acquired for the first time, the code will try to load the corresponding file from disk. Alternatively, a new operator can be used to initialize the tile similar to the New Image operator.
The following features are supported so far:
- Automatic detection and loading of all tiles when opening the first tile (1001)
- Saving all tiles
- Adding and removing tiles
- Filling tiles with generated images
- Drawing all tiles in the Image Editor
- Viewing a tiled grid even if no image is selected
- Rendering tiled images in Eevee
- Rendering tiled images in Cycles (in SVM mode)
- Automatically skipping loading of unused tiles in Cycles
- 2D texture painting (also across tiles)
- 3D texture painting (also across tiles, only limitation: individual faces can not cross tile borders)
- Assigning custom labels to individual tiles (drawn in the Image Editor instead of the ID)
- Different resolutions between tiles
There still are some missing features that will be added later (see T72390):
- Workbench engine support
- Packing/Unpacking support
- Baking support
- Cycles OSL support
- many other Blender features that rely on images
Thanks to Brecht for the review and to all who tested the intermediate versions!
Differential Revision: https://developer.blender.org/D3509
|
|
Viewport: Disable Clipping For EEVEE and External Renderers
Currently it is possible that, when using viewport clipping, the display and tools communicate
different information to the user then the renderer does. The reason is
that the renderer does not support viewport clipping. Both EEVEE and
Cycles do not support it.
This patch will disable the clipping in all the tools and drawing code
when the viewport drawing mode is `Material Preview` or `Rendered`.
This patch introduces a `RV3D_CLIPPING_ENABLED` util that checks if
clipping is enabled for the given `rv3d` and `v3d`. Also in places where
it was needed we added the `ViewContext` as a carrier for the `View3D`
and `RegionView3D`.
There are a few areas in the tooling (select, projection painting) that
still needs to be tackled after this patch.
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D6047
|
|
When size pressure is enabled, the radius may not be enough to sample
any vertices to calculate the area normal. This lead to a vector 0 plane
and a division by 0 when calculating the signed distance to the plane,
which produces a NaN that was being written to the vertex coordinates.
Reviewed By: brecht
Maniphest Tasks: T72006
Differential Revision: https://developer.blender.org/D6326
|