Age | Commit message (Collapse) | Author |
|
Caused by rB7447eb7e7430.
This is just a copy-paste error [previous LISTBASE_FOREACH substitution
of marco loop in that file has a different starting point which is not
appropriate here]
Maniphest Tasks: T83851
Differential Revision: https://developer.blender.org/D9872
|
|
This patch does two things:
* Introduce a Seed to the random distribution method
* Bring in a new distribution method for the point scattering node
Patch Review: https://developer.blender.org/D9787
Note: This commit doesn't not handle doversion. Which means that users
need to manually update their files that were using the Point Distribute
node and reconnect inputs to the "Maximum Density" socket.
Original patch by Sebastian Parborg, with changes to not rely on the cy
libraries and overall cleanup.
Patch review by Jacques Lucke, besides help with the new "heap" system
that was required for this algorithm.
Based on Cem Yuksel. 2015. Sample Elimination for Generating Poisson Disk
Sample. Sets. Computer Graphics Forum 34, 2 (May 2015), 25-32
http://www.cemyuksel.com/research/sampleelimination/
|
|
This tool implements smearing for multires displacement over the limit
surface, similar to how smearing for colors and topology slide works.
When used the displacement values of the vertices "slide" over the
topology, creating the effect of smearing the surface detail.
As the brush just modifies displacement values instead of coordinates,
the total displacement of the affected area doesn't change. This means
that this smearing effect can be used multiple times over the same area
without generating any artifacts in the topology.
When the brush is used with the pinch or expand smear modes,
displacement differences are pushed into the same area, creating hard
surface effects without pinching the topology.
As any other brush that relies on the limit surface (like displacement
erasers), this will work better after using apply base.
Reviewed By: sergey, JulienKaspar, dbystedt
Differential Revision: https://developer.blender.org/D9659
|
|
The `crop` field was used by Blender Internal to do an overscan per
tile and merge it back to the render result.
|
|
Otherwise it would just show empty space where the icon is supposed to
be.
Unfortunately this icon is upscaled quite a bit and doesn't look too
great. Would be good to improve but not a high priority.
|
|
No icon should be created if the preview doesn't exist.
|
|
Casting pointers from one type to another does change the
value of the pointer in some cases. Therefore, casting a span
that contains pointers of one type to a span that contains
pointers of another type, is not generally safe. In practice, this
issue mainly comes up when dealing with classes that have a
vtable.
There are some special cases that are still allowed. For example,
adding const to the pointer does not change the address.
Also, casting to a void pointer is fine.
In cases where implicit conversion is disabled, but one is sure
that the cast is valid, an explicit call of `span.cast<NewType>()`
can be used.
|
|
When doing a debug build on windows, blender will
start with the following warning:
"Unable to find the python binary, the multiprocessing
module may not be functional!"
The root cause for this issue is: for a debug build
the python binary is called python_d.exe rather than
just python.exe
This change fixes BKE_appdir_program_python_search
to look for the _d suffix for debug builds on windows
Differential Revision: https://developer.blender.org/D9775
Reviewed by: Campbell Barton
|
|
We do not generate overrides for missing data-blocks (aka placeholder
ones) anymore, and properly delete the remaining old overrides of those
during the resync process.
This should prevent constant 'missing data-blocks' messages when opening
blend files with overrides whose libraries have beed edited.
Issue reported by @andy from Blender studio, thanks.
|
|
ratio
Caused by rB4eda60c2d82d.
T83801 reported not moving in pixel space, but even without that toggle
above commit caused the translation to not take apsect ratio into
account properly [a translation of 1 on the x axis for example on an
image with non 1:1 aspect ration caused the UVs to not end up in the
same place on the next 'tile']
Above commit removed 'removeAspectRatio()' [the counterpart of
applyAspectRatio -- which does the pixel coord correction internally]
from 'applyTranslation()'.
This was also reported in T83352 [which was closed by rBf3b08af24c9f --
but that only solved the displax in header, not the actual
transformation]
Now bring back 'removeAspectRatio()'.
Maniphest Tasks: T83801
Differential Revision: https://developer.blender.org/D9869
|
|
Issue was related that the draw manager didn't invoked the draw handlers
for image editors.
|
|
Fix T83415: 3D View is red when using stereo
The red view was caused by SRGB not being enabled for an SRGB texture attached to the framebuffer.
Currently, when configuring a framebuffer, the first texture attachment needs to be an SRGB format in order for the framebuffer to be binded with SRGB enabled.
Thus, simply changing the SRGB texture attachment as the first texture attachment removes the red color in the view.
Reviewed By: #eevee_viewport, jbakker
Maniphest Tasks: T83415
Differential Revision: https://developer.blender.org/D9845
|
|
Issue was that not all code paths were taken to determine if
the GPU Texture was premultiplied or not. In this case the result
was set to unpremultiplied what is incorrect.
This fixes broken test case image alpha blend from image_colorspace.
|
|
Previously, the node was called Random Attribute. For consistency reasons,
we move the "Attribute" part of the name to the front.
|
|
This data structure adds priority queue functionality to an existing array.
The underlying array is not changed. Instead, the priority queue maintains
indices into the original array.
Changing priorities of elements dynamically is supported, but the priority
queue has to be informed of such changes.
This data structure is needed for D9787.
|
|
This change is a simple null check on the ID provided to icon_set_image() which
appears to be a legitimate value for the ID when used by some addins
(discovered with PowerSave shortly after syncing to main).
Differential Revision: https://developer.blender.org/D9866
Reviewed by: Julian Eisel
|
|
It's useful to easily see which data-blocks are assets and which not. So just
like we usually show the library linking/override icons, we show the asset icon
there (these are mutually exclusive data-block states).
Uses the `'MAT_SPHERE_SKY` icon, which wasn't used before (except by an
add-on!) and is sorta fitting, but not quite. We should either change this one
or add an own asset icon. Meanwhile this isn't too bad :)
Also adds an internal macro to check if a data-block is an asset, consistent to
how we do it for libraries and library overrides.
|
|
This makes it possible to trigger a refresh of the data-block preview,
available next to the preview in the Asset Browser sidebar. The previews get
easily outdated and automatically refreshing it all the time is not an option
because it would be a consistently running, quite expensive process. So a
button to cause a refresh should be reasonable.
This button can also be used to switch back from a custom preview to a
generated one. Although that may not be clear, and we should probably think of
a way to explain that better.
Addresses T82719.
|
|
This is the same name we use elsewhere for the focused/active ID context
member, so this should follow it.
|
|
Motivated by `std::string_view` being usable in
const (compile-time) context.
One functional change was needed for StringRef:
`std::char_traits<char>::length(str)` instead of `strlen`.
Reviewed By: JacquesLucke, LazyDodo
Differential Revision: https://developer.blender.org/D9788
|
|
|
|
|
|
|
|
|
|
|
|
Add panels with overlay settings for strips and preview and overlay
enable/disable button.
Entries from the View menus moved to the overlay panels, which will
simplify cluttered View menus.
Additional options have been added:
- Strip Name
- Strip Source(ex. path)
- Strip Duration
So users can now select what info they need to see on the strips. When
No text is displayed, waveforms are drawn in full height.
Reviewed By: ISS, HooglyBoogly, pablovazquez
Differential Revision: https://developer.blender.org/D9751
|
|
Paste copied strips after playhead, because this is more intuitive.
Previous functionality is still available by enabling "Keep Offset"
property, or under shortcut Ctrl+Shift+V.
Reviewed By: ISS
Differential Revision: https://developer.blender.org/D9734
|
|
Use the BKE_gpencil_stroke_uniform_subdivide function to subdivide strokes
before interpolation. When the target/source stroke is smaller than the other
stroke, it is subdivided until the lengths match. This improves the overall quality
of the interpolation of different sized strokes.
Before/After video:
{F9511779}
Reviewed By: #grease_pencil, antoniov, pepeland, mendio
Differential Revision: https://developer.blender.org/D9839
|
|
This patch adds the option to make the random scaling from the grease pencil array modifier uniform.
The current settings allow a separate value for each of the 3 scaling axis. The modifier also creates different seed values for each axis so there is no way to keep the random scaling uniform.
This patch creates 1 random seed value and applies it to each of the scaling axis.
Here is a demonstration of the previous behavior and the new optional behavior.
{F9485973}
{F9485981}
{F9485798}
Reviewed By: #grease_pencil, antoniov, pepeland
Differential Revision: https://developer.blender.org/D9764
|
|
Logic was broken into finding gaps and ofsetting strips.
Functions were modified so they work on explicitly defined seqbase,
so they can be used as python API functions.
Functional changes:
- Improve performance by calculating gap length and offseting strips
at once. Previously strips were offset by one frame.
- Calculate gap from start frame. Previously gap was considered only
inbetween strips.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D9730
|
|
If Preferences > Interface > Temporary Editors > File Browser is set to
"Maximized Area", "Load Custom Preview" in the Asset Browser would crash
after selecting the file.
1e799dd26ec1e848 was important to get this issue fixed. This commit just
ensures the file-list is recreated correctly after closing the temporary
File Browser, so the custom preview operator can execute on valid
context.
|
|
If Preferences > Interface > Temporary Editors > File Browser is set to
"Maximized Area", opening a File Browser from a File or Asset Browser as
regular editor would cause some issues. For example after closing the
temporary File Browser, the regular browser would take over the file
path and display settings from the temporary one. This is because they
used to share the same area data.
Some similar issues may have happend with temporary image editors.
Now, this commit finally separates the space data of temporary maximized
editors from the regular ones. So the editor data is entirely
independent now, as it should be.
|
|
This implements a mesh fairing algorithm and implements the fair
operations for Face Set edit. This edit operations create a smooth as
possible geometry patch in the area of the selected Face Set.
The mesh fairing algorithm is designed by Brett Fedack for the addon
"Mesh Fairing": https://github.com/fedackb/mesh-fairing, with some
modifications:
- The main fairing function in BKE_mesh_fair.h does not triangulate
the mesh. For the test I did in sculpt mode results are good enough
without triangulating the topology. Depending on the use and the
result quality needed for a particular tool, the mesh can be
triangulate in the affected area before starting fairing.
- Cotangents loop weights are not implemented yet. The idea is to
also expose the vertex and loop weights in a different function in
case a tool needs to set up custom weights.
This algorithm will also be used to solve the limitations of line
project and implement the Lasso Project and Polyline Project tools.
It can also be used in tools in other areas of Blender, like Edit Mode
or future retopology tools.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D9603
|
|
The boolean solver crashes when there is no geometry in the mesh. Also,
using the trimming tools without a valid intersection in the PBVH will
make the orientation and position functionality of the trimming shape
not work, so this is the safer solution.
Reviewed By: mont29
Maniphest Tasks: T83504
Differential Revision: https://developer.blender.org/D9777
|
|
The if statement of the dynamic area mode branch should be an else if.
When using local mode, this was running both the local and global code.
I moved this code to sculpt_cloth and refactored it to use a switch case
to prevent this from happening again.
Reviewed By: mont29
Maniphest Tasks: T83201
Differential Revision: https://developer.blender.org/D9762
|
|
It makes sense to support writing double arrays just like floats.
This is just split from a patch (D9697) to slim it down some.
|
|
|
|
|
|
This was reported for duplicating particle systems, then using F9 to
enable the 'Duplicate Settings' option (see T83317).
In this case, the operator gets the particle_system from (buttons)
context and if none can get found will duplicate all settings instead.
The reason why none gets found here is that buttons_context() doesnt
have a valid path when called from F9/SCREEN_OT_redo_last, path is
cleared when global undo does a file-read which clears the path (see
lib_link_workspace_layout_restore). It can be recomputed though to be
valid even from redo_last (at least when in the Properties Editor).
This was likely causing other operators (relying on buttons context)
from the Properties Editor to fail as well.
Fixes T83317
Maniphest Tasks: T83317
Differential Revision: https://developer.blender.org/D9825
|
|
If Preferences > Interface > Temporary Editors > File Browser is set to
"Maximized Area", opening a File Browser from an Asset Browser would
cause the new maximized editor to be an Asset Browser. Exiting it again
would crash.
This fixes the wrong behavior and the crash. There's still an issue with
exiting the editor again, it stays a File Browser then and doesn't go
back to being an Asset Browser. That's to be fixed separately.
|
|
`blf_dir_search` BLF util would not properly handle relative fonts not
found in pre-defined 'system fonts' directoriesi stored in
`global_font_dir` global variable.
Now it rebases relative paths to current .blend file location as
expected.
Note: the fact that VSE is setting font ptaths relative by default is
probably not actually desired, but this is another issue really. See
`BKE_sequencer_text_font_load` code.
|
|
Function was declared twice (caused by merge conflicts) which GCC would
rightfully complain about.
|
|
Storing the asset library reference by name wasn't a good idea, I thought it
would work with a careful fallback, but it's easier to just use the index
instead. So change to using indices, make sure fallback methods work reliable
and make sure the file list is updated when asset libraries are removed.
I added a new notifier type for the latter, I prefer not using file notifiers
in asset-library/preferences code. We have more than enough values for
notifiers left.
|
|
The `!BKE_previewimg_is_finished()` in `icon_preview_startjob_all_sizes()`
would fail.
Caused by 990bd9acf243ae. We have to be more picky about tagging previews as
unfinished after file read. But we also have to consider files stored in old
versions and set the unfinished tag as needed.
|
|
When the Asset Browser was showing the "Current File" repository and the
sidebar was open, undoing could crash, because the context API returned freed
data.
Don't let context return anything if a refresh is pending due to data changes
like undo/redo.
|
|
In D9722 we agreed on using `[home-directory]/Documents/Blender/Assets` for
the default asset library. I just forgot to do the change before committing.
(The default repository is just a named path, it's *not* a default library with
bundled assets.)
|
|
Previews would be flagged as unfinished when reading. Instead clear the flag
and always consider them finished upon reading. If we wouldn't do this, the
File Browser would keep running the preview updating to wait for the preview to
finish. It could be smarter and also check if there's actually a preview job
running.
Instead, I think it will just display an unfilled buffer for now. Up until
today we wouldn't even know if a stored preview is finished or not, so it would
always assume they are finished. We do the same now, but have the option to
make it smarter.
|
|
This introduces the User Interface part of the Asset Browser, based on the
design in T54642.
Additions:
* New Asset Browser (internally a sub-editor of the File Browser).
* Navigation region showing asset categories.
* Main region showing the assets of the selected asset library with previews.
The assets may be stored over multiple .blends in the directory that's
"mounted" as asset library in the Preferences. They will all be shown in this
list.
* Header with an asset library dropdown, allowing to choose the active asset
library to show. Options are the "Current File" as asset library and all
custom libraries.
* Display popover, filter popover and search box (partially dummies, see
T82680).
* Sidebar showing the metadata of the currently active file (name, preview,
description and tags), which can be edited for assets in the "Current File"
asset library. (For others it will reset on reload.)
* The sidebar includes a button to load a custom preview image from a file.
* Make asset files draggable (with preview image).
* If a library with invalid path is selected, a message is drawn in the main
region to help the user understand what's wrong.
* Operators to add and remove asset tags. Exposed in the sidebar.
* "Only Assets" option for Link/Append.
* Internal utilities for asset UI scripts.
For screenshots or demo videos, please see D9725. Or the 2.92 release notes.
Note that there are many things to be tweaked and polished in the Asset Browser
UI still. For example, the filter and display popovers are mostly dummies. See
T82680.
Part of the first Asset Browser milestone. Check the #asset_browser_milestone_1
project milestone on developer.blender.org.
Differential Revision: https://developer.blender.org/D9725
Reviewed by: Brecht Van Lommel, Hans Goudey
|
|
The Asset Browser will be a sub-editor of the File Browser. This prepares the
File Browser code for that.
**File-Lists**
* Support loading assets with metadata read from external files into the
file-list.
* New main based file-list type, for the "Current File" asset library.
* Refresh file-list when switching between browse modes or asset libraries.
* Support empty file-lists (asset library with no assets).
* Store file previews as icons, so scripts can reference them via icon-id. See
previous commit.
**Space Data**
* Introduce "browse mode" to differeniate between file and asset browsing.
* Add `FileAssetSelectParams` to `SpaceFile`, with `FileSelectParams` as base.
Makes sure data is separated between asset and file browsing when switching
between them. The active params can be obtained through
`ED_fileselect_get_active_params()`.
* `FileAssetSelectParams` stores the currently visible asset library ID.
* Introduce file history abstraction so file and asset browsing can keep a
separate history (previous and next directories).
**General**
* Option to only show asset data-blocks while file browsing (not exposed here).
* Add "active_file" context member, so scripts can get and display info about
the active file.
* Add "active_id" context member, so `ED_OT_lib_id_load_custom_preview` can set
a custom ID preview. (Only for "Current File" asset library)
* Expose some of `FileDirEntry` in RNA as (non-editable). That way scripts can
obtain name, preview icon and asset-data.
Part of the first Asset Browser milestone. Check the #asset_browser_milestone_1
project milestone on developer.blender.org.
Differential Revision: https://developer.blender.org/D9724
Reviewed by: Bastien Montagne
|
|
One of the core design aspects of the Asset Browser is that users can "mount"
custom asset libraries via the Preferences. Currently an asset library is just
a directory with one or more .blend files in it. We could easily support a
single .blend file as asset library as well (rather than a directory). It's
just disabled currently.
Note that in earlier designs, asset libraries were called repositories.
Idea is simple: In Preferences > File Paths, you can create custom libraries,
by setting a name and selecting a path. The name is ensured to be unique. If
the name or path are empty, the Asset Browser will not show it in the list of
available asset libraries.
The library path is not checked for validity, the Asset Browser will allow
selecting invalid libraries, but show a message instead of the file list, to
help the user understand what's going on.
Of course the actual Asset Browser UI is not part of this commit, it's in one
of the following ones.
{F9497950}
Part of the first Asset Browser milestone. Check the #asset_browser_milestone_1
project milestone on developer.blender.org.
Differential Revision: https://developer.blender.org/D9722
Reviewed by: Brecht Van Lommel, Hans Goudey
|