Age | Commit message (Collapse) | Author |
|
|
|
Don't add the radius attribute to point clouds by default, since not
having a radius attribute should be a valid state. The radius is only
set when a radius attribute also exists on curves.
|
|
|
|
|
|
|
|
Needs to go after the assignment to ob->sculpt->pbvh, not before.
|
|
When use the close stroke, the new created points were not addedd to the
selection.
|
|
|
|
Cleaned up Dyntopo original triangle API (which is deprecated):
* BMVerts for original triangles are now stored.
* BKE_pbvh_bmesh_update_topology now handles original triangle
* data properly.
* BKE_pbvh_bmesh_node_save_orig can now initialize the original
coordinates from the current BMLogEntry.
* Ray casting of original data now returns active vertex.
Should fix various random crashes.
Hopefully this will fix a number of bugs.
|
|
Refactor the `recalcData_nla()` function, which takes data from the
transform system and updates NLA strips, such that the actual logic to
change the strip is moved into its own function.
This also moves some generic code (find prev/next strip) from that
function to BKE.
This is to make the code easier to adjust when different transform
operations need to perform different modifications of the strip (i.e. to
fix T101130).
Manifest Task: T101130
Reviewed By: sybren
Differential Revision: https://developer.blender.org/D16181
|
|
Disambiguate:
- "Active Only" (GPencil copy material and layer, add NLA modifier)
- "Clip" (movie clip, image extension mode)
- "Emission" (particles)
- "New" (scene)
- "Tracking" (movie clip)
Extract:
- "ViewLayer", the default view layer name when creating new scene
Ref T43295
Reviewed By: mont29
Maniphest Tasks: T43295
Differential Revision: https://developer.blender.org/D16196
|
|
The attribute node already allows accessing attributes associated
with objects and meshes, which allows changing the behavior of the
same material between different objects or instances. The same idea
can be extended to an even more global level of layers and scenes.
Currently view layers provide an option to replace all materials
with a different one. However, since the same material will be applied
to all objects in the layer, varying the behavior between layers while
preserving distinct materials requires duplicating objects.
Providing access to properties of layers and scenes via the attribute
node enables making materials with built-in switches or settings that
can be controlled globally at the view layer level. This is probably
most useful for complex NPR shading and compositing. Like with objects,
the node can also access built-in scene properties, like render resolution
or FOV of the active camera. Lookup is also attempted in World, similar
to how the Object mode checks the Mesh datablock.
In Cycles this mode is implemented by replacing the attribute node with
the attribute value during sync, allowing constant folding to take the
values into account. This means however that materials that use this
feature have to be re-synced upon any changes to scene, world or camera.
The Eevee version uses a new uniform buffer containing a sorted array
mapping name hashes to values, with binary search lookup. The array
is limited to 512 entries, which is effectively limitless even
considering it is shared by all materials in the scene; it is also
just 16KB of memory so no point trying to optimize further.
The buffer has to be rebuilt when new attributes are detected in a
material, so the draw engine keeps a table of recently seen attribute
names to minimize the chance of extra rebuilds mid-draw.
Differential Revision: https://developer.blender.org/D15941
|
|
|
|
This can improve performance by 3-10x in some simple test cases,
when reading a boolean attribute on a different domain from the
one it's stored on.
Differential Revision: https://developer.blender.org/D16054
|
|
|
|
|
|
The modifier already contained a check to skip complex processing of
vertices that won't produce any deformation due to the vertex group
mask, but this only works for the non-Multi Modifier case. This adds
a similar check for the Multi Modifier mode.
Differential Revision: https://developer.blender.org/D16152
|
|
Functions in vfontdata_freetype.c used static variables instead of
argument parsing. This originates from initial freetype support [0].
This didn't cause problems as callers use a global lock, however it
makes the code more difficult to follow means we can more easily remove
the lock in the future.
[0]: d4f9678b3939a3b480005fee3b82ad8843de51e0
|
|
|
|
Remove redundancy in the testing and loading of VFont fonts. Includes
improved setting of character map for using Wingding and Symbol fonts.
See D16174 for more details.
Differential Revision: https://developer.blender.org/D16174
Reviewed by Campbell Barton
|
|
|
|
|
|
Mesh corners are called "loops" in the code currently. Avoid diverging
naming and just use that convention in some newly added code.
|
|
In preparation for moving mesh runtime data to C++
|
|
Setting pbvh->leaf_limit (the max triangles per node)
too low results in lots of distinct GPU meshes, which
can be slow for even moderately sized sculpt meshes
(starts to be a problem around 100-150k triangles).
|
|
In preparation for moving mesh runtime data to a C++ type
|
|
|
|
SculptAttribute.domain wasn't being set
when creating from an existing CustomData
attribute.
|
|
|
|
Preloading of BFont (default for 3D Text Objects) glyphs will not load
any with a character code greater than 256, resulting in 43 characters
that are inaccessible. This patch corrects that preloading code.
See D16122 for more details
Differential Revision: https://developer.blender.org/D16122
Reviewed by Campbell Barton
|
|
|
|
|
|
Also remove unnecessary struct keywords in C++ files.
|
|
Completely skip the work of interpolating domains for single values
for many to and from combinations. Similar to 535f50e5a6a248b7aa74b59,
but slightly more complex because of the possibility of loose elements
on some mesh domains.
From D16054, with added comments.
|
|
Instead of declaring a typed array inside the static type block.
This generates slightly less code and should have the same performance.
From D16054
|
|
Blender is using more and more temporary Main data-base (historically
for reading linked data, but also now when resyncing liboverrides, for
temp data in asset code, etc.).
This commit aims at making this a bit more formal and defined, by:
* Adding a dedicated flag in Main struct to mark a Main as global.
* Adding some API to replace, or temporarily swap the current global
Main (`G_MAIN`) by another one.
NOTE: Having to temporarily replace `G_MAIN` is a workaround for the
limitation of current RNA, ideally this should be fixed in RNA itself,
but for now at least having an API helps tracking those cases (since
this is potentially risky operation).
This work is also a preparation for more usages of temp mains in the near
future (Asset Brushes and its presets system e.g. will most likely use
temp mains too).
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D15977
|
|
Saving non app-template preferences would use add-ons and other
app-template settings to write the default preferences if there was no
existing user preferences file saved.
|
|
Suppress warning when saving app-template preferences.
Check if the preferences exist before attempting to read them,
while harmless it looked as if something went wrong.
|
|
- Document the behavior of app-template IO for preferences.
- Add doxy-sections for each kind of blend file IO.
- Clarify BKE_blender_userdef_app_template_data_swap doc-string.
|
|
|
|
c3b6e372542f9fb0ff23 change node ID names. Bump the subversion and the
min file subversion so older versions get warnings opening newer files.
|
|
The wrong mesh was used to read the position attribute. Also, there was
always a warning about missing shape keys when that wasn't the case.
|
|
Update to liboverride creation code to add support of keeping active
object forgot to consider case when there is no known/given view layer.
NOTE: due to differences in code, fix for 3.3 will be a bit different.
|
|
Scene and Main.
Similar to existing `BKE_main_collection_sync` and `BKE_scene_collection_sync`,
in some cases code does not have access to a specific view layer,
and/or does not know exactly which view layer needs to be in sync,
or just need the full data to be up to date.
|
|
Rename BKE_appdir_folder_id_version to
BKE_appdir_resource_path_id_with_version because BKE_appdir_folder_id
and BKE_appdir_folder_id_version didn't accept compatible arguments.
Also add notes to GHOST_getSystemDir & GHOST_getUserDir that
BKE_appdir_resource_path_id(..) should be used instead (in most cases).
|
|
Even though individual USER/SYSTEM paths could be set using environment variables,
it wasn't possible to override the USER or SYSTEM paths.
This meant the result of `bpy.utils.resource_path('USER')` &
`bpy.utils.resource_path('SYSTEM')` could still be used by scripts,
making the Blender session potentially the default USER directory
(even when `BLENDER_USER_CONFIG`, `BLENDER_USER_SCRIPTS` &
`BLENDER_USER_DATAFILES` all point elsewhere).
Resolve by adding environment variables:
- BLENDER_USER_RESOURCES
- BLENDER_SYSTEM_RESOURCES
These will be used for `bpy.utils.resource_path('USER')` &
`bpy.utils.resource_path('SYSTEM')`, as well as a basis for user &
system directories, unless those environment variables are
set (`BLENDER_USER_*` or `BLENDER_SYSTEM_*`).
Resolves issue raised by T101389.
Example usage & output:
{P3225}
Reviewed By: brecht
Ref D16111
|
|
* Unhide all is no longer part of face_set_change_visibility.
* Implemented a few visibility API methods for PBVH_BMESH
* Fixed bug with unhide all not freeing all multires grid_hidden
bitmaps.
|
|
This is the conventional way of dealing with unused arguments in C++,
since it works on all compilers.
Regex find and replace: `UNUSED\((\w+)\)` -> `/*$1*/`
|
|
|
|
Rename the node to "Offset Point in Curve"
Since this was committed, more mesh and curve topology nodes have been
committed with a different naming scheme (482d431bb6735e82069). Change
the name of this node to match "Offset Corner in Face". Because the
node was only added recently, it's a full rename, including the ID,
so forward compatibility is broken.
|