Age | Commit message (Collapse) | Author |
|
As this feature is not supported yet, it's better to hide for grease pencil.
Differential Revision: https://developer.blender.org/D6777
|
|
This works on selected_editable_objects, so no active object mandatory.
After deletion of the active object and using slection tools such as
e.g. box select, the lack of an active object would prevent this
operator from being called without good reason.
Also cannot think of any other existing poll that would really make
sense (Editor type, ...).
ref T68975
Maniphest Tasks: T68975
Differential Revision: https://developer.blender.org/D6773
|
|
- Replace 'unsigned' used on it's own with 'uint'.
- Replace 'unsigned const char' with 'const uchar'.
|
|
|
|
This was caused by a missing tag of the mesh datablock.
|
|
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
|
|
|
|
Resolves T69450
|
|
|
|
This meant a non-active selected object would be skipped based on the
mode last used, mostly an issue with 'Lock Object Modes' disabled.
Other transform operators (such as snap) don't do this.
Partially reverts b8aff064662d5
|
|
|
|
|
|
|
|
Empty objects have no obdata, so we need to check for NULL id...
|
|
|
|
|
|
|
|
|
|
even when target is not a collection
Looks like this was (accidentally) removed in {rBbe9e469ead22}
https://developer.blender.org/
rBbe9e469ead227aee8d4c29b98a125cf599c5c8bb#change-pFg0VUTAHY2q
This could also result in a missing update in
object_handle_update_proxy, see T72083 for an example.
Thx @Macroni investigating!
Maniphest Tasks: T72083
Differential Revision: https://developer.blender.org/D6651
|
|
|
|
This data is only used to get current time/frame value, which is never
mandatory to add a modifier.
Needed by incoming fix to support particles modifiers in liboverrides.
|
|
|
|
|
|
|
|
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.
|
|
Consistent with similar API functions.
|
|
Blender supports locking vertex groups to prevent changes to the
weights. However, as mentioned in comments for D3837, it is hard
to use this because there is no interface for locking in 3D View.
This adds a red shade to bones that are associated with a locked
weight group during weight paint mode, as the first step to adding
such interface. The next step is adding a pie menu for lock/unlock.
Differential Revision: https://developer.blender.org/D6533
|
|
|
|
Once again, am not exactly sure why that was working before, and not
anymore - but in any case, doing that kind of update here is not only
useless (since we have to do it at the end of the whole
collections/objects duplication and remapping anyway), it is also rather
dangerous, as collections are currently in rather invalid states at that
point of the code...
Note that in ideal world, `BKE_main_collection_sync()` & co would be
lazy (setting only a flag, then code actually needing this to be valid
again should call some sort of `BKE_main_collection_sync_ensure()`).
Then we would not have to worry about such things (and we'd get nice
performance improvements in some cases, also in main remapping code,
etc.).
Food for some refactoring, some day...
|
|
Simplify a bit, and remove some now redundant remappings.
As a side note, rBac723db57fd8ba5 actually also fixed some unreported
issues (missing remappings to new objects/collections in new copied
scene, that were not previously handled by the 'custom' code).
There are almost certainly still some missing remappings around,
though...
|
|
rBac723db57fd8ba5 makes proper remapping of all pointers in Scene...
including the object pointers of bases in ViewLayers.
Using `BKE_main_collection_sync_remap()` makes sense here anyway
(compared to `BKE_main_collection_sync()`, it additionally clears caches
in ViewLayers and Collections), this whole code makes a lot of
remapping.
Note that I do not really understand *why* that was working OK
before rBac723db57fd8ba5. I.E. *why* not remapping at all ViewLayers'
base object pointers seemed to be OK...
This whole collection/viewlayer caching is very hard to follow, and
really needs a full rework at some point (just as much as ID copying
code in general, and scene copying code in particular, in fact).
|
|
|
|
### Description of the problem
Until now, it is only possible to correctly add a lightprobe in python via an operator:
`bpy.ops.object.lightprobe_add()`
### Description of the proposed solution
The idea of this patch is to fix the lack of consistency lightprobe creation without operator.
It allow creation of different lightprobe type directly via `bpy.data.lightprobes.new(name, type)` (such as for curves).
In order to make it possible I had to:
1. Add a function `BKE_lightprobe_configure` in charge of lightprobe settings configuration (avoid code redundancy)
2. Allow an object to take lightprobe datablock as data during is initialization.
### A short example of this patch usage
```
lp = bpy.data.lightprobes.new('some_name','PLANAR')
bpy.data.objects.new('toto', lp)
```
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D6396
|
|
In Blender 2.80 Shift + H (`object_hide_view_set(unselected=True)`) used to
(temporarily) hide objects only if their collection was visible in the current
view layer.
This behavior was changed in rB0812949bbc3d7acfd1f20a47087ff973110aa177 (D5992)
by using `BASE_VISIBLE_DEPSGRAPH` for the decision which object's (temporary)
visibility should remain unchanged. Since the view layer visibility and depsgraph
visibility has been decoupled in said commit, the correct condition
to check is `BASE_VISIBLE_VIEWLAYER`.
This patch is a fix for T72302
Differential Revision: https://developer.blender.org/D6583
|
|
Never treat one of those horrorible 'IDs that are not real IDs' as
regular ID, and expect ID management code to do so. Unless there is a
very good reason, one should never explicitely pass those fake IDs to ID
management code directly.
In that specific case, user count is sort of 'disabled' in libquery
code, because master collections are not in bmain (`LIB_TAG_NO_MAIN`).
|
|
This avoids a list lookup in Main (recently added), passing in a mesh
instead of an edit-mesh, since the mesh links to the edit-mesh.
|
|
Previously the default values were left non-zero to avoid having to
update scripts. However, this meant it wasn't possible to setup
non-modal key bindings for smooth & randomize.
Now these operators follow logic of many other operators where setting
the value executes immediately, leaving unset runs modal.
Existing keymaps & scripts will need to be updated.
Addresses issue raised in f4a4ec84255a.
|
|
|
|
Resolves T70410
|
|
|
|
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
|
|
Also corrects the return value, where objects that don't have an
edit-mode returned true, making it seem as if object data was flushed.
|
|
This was an old bug which could be caused by saving after separating.
Changes from 79b703bb635e made this fail reliably.
Update shape key indices when they may be used again later.
|
|
Missed in recent BKE_remesh renaming.
|
|
Resolve linking issues, warnings.
|
|
Also correct some outdated symbol references,
add missing 'name' commands.
|
|
|
|
|
|
The term mirror on it's own is too ambiguous, use BKE_mesh prefix.
|
|
Previously these used a gizmo to redo the operator however this
complicated having on-screen gizmos to access tools (see T66304).
Replace this with a generic way to make an operator that only has an
execute function into a modal operator.
This is used for smooth and randomize tools.
Unlike operator gestures, this handles storing and resetting the data.
Currently this only handles edit-mode data, however it's can be
extended to other kinds of data.
|