Age | Commit message (Collapse) | Author |
|
|
|
|
|
It was a stupid mistake with the wrong pointer being referenced.
It was a serious problem because the memory leak was considerable.
|
|
There isn't anything specific to text data with these functions.
|
|
|
|
Nearly all byte-color functions use 'uchar'
causing casts when then colors were passed in.
Declare as uchar to remove the need for casts.
|
|
enabled.
Code in modifier stack ensuring requested CDLayers are provided was not
working very well for polynors in several cases:
* We cannot share the orig mesh if we have to generate pnors/lnors;
* Generating pnors without lnors was not possible.
|
|
|
|
It's common to select a block of code and comment it
which may already contains some comments.
Now only un-comment blocks which are completely commented
(ignoring white-space).
Makes toggle comments behave more usefully, resolves T68060.
|
|
This should have been removed in 2.80 as the functionality was removed.
This feature now does not do anything and can be removed.
Differential Revision: https://developer.blender.org/D5411
|
|
|
|
|
|
Does not make sense in the use-cases of that function, especially since
we don't know whether it is actually due to an error, or some glitch
(like an empty curve).
Think we always want to get a mesh when using either operator
conversion, or the `bpy.data.meshes.new_from_object` function.
Note that an assert was also added to ensure we do try to convert from a
valid 'geometry' object type.
|
|
|
|
|
|
Thanks to @sybren for pointing out issue from 299ff91ea1fe5
|
|
This function will be used for new operators.
|
|
followup to rB8dd95abb2ff9 (which fixed this for the Compositor node),
turns out this was also wrong for the VSE modifier and in vertex color
operator.
- also adjust min/max for VSE modifier
- also guard against division by zero
Reviewers: brecht
Maniphest Tasks: T67808
Differential Revision: https://developer.blender.org/D5398
|
|
This commit adds the frame to deformStroke Callback as a preparation for new modifiers that will need this variable.
Actually, the existing modifiers are not using the frame.
|
|
|
|
|
|
given, instead of ignoring it.
Brings behavior of those options in line with the VGroup editing
modifiers ones e.g.
|
|
FFmpeg expects Blender to feed it pixels in the output pixel format. If
the output pixel format is different than Blender's RGBA, a conversion
is needed (via FFmpeg's `sws_scale()` function). There were a few issues
with this conversion (and surrounding code) that are fixed in this
commit:
- When conversion was necessary a temporary buffer was allocated and
deallocated for every frame. This is now allocated once and re-used.
- Copying data to the buffer was done byte-for-byte. On little-endian
machines it is now done line-by-line using `memcpy` for a little speedup.
- The decision whether pixel format conversion is necessary is now
correctly done based on the pixel format Blender is actually using.
- The pixel format of the buffer sent to FFmpeg is no longer hard-coded
incorrectly to a fixed pixel format, but uses the actual output pixel
format. This is fixes T53058 properly, making RGB QTRLE export possible.
- I added some comments to make it clear which pixel format is referred
to (either Blender's internal format or the FFmpeg output format).
Combined these improvements not only correct a bug (T53058) but also
results in approximately 5% speed improvement (tested with a 117-frame
shot from Spring, loaded as PNGs in the VSE, encoding to h.264 with
preset 'realtime').
Reviewed By: brecht, sergey
Differential Revision: https://developer.blender.org/D5174
|
|
|
|
T68045 by @luzpaz
|
|
|
|
User preferences from the startup.blend was still being used,
fixing this exposed missing theme initialization, now fixed.
|
|
T68035 by @luzpaz
|
|
|
|
|
|
Reviewers: brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D4222
|
|
This adds a space between a value and its short unit name except for foot, inch, degree, arcminute, arcsecond
Differential Revision: https://developer.blender.org/D5051
Reviewed by Brecht Van Lommel
|
|
Reviewers: campbellbarton, brecht
Reviewed By: brecht
Subscribers: brecht
Differential Revision: https://developer.blender.org/D4991
|
|
Was a nice looking invention, but is obviously wrong.
Is likely no function changes, since -false is like -0
which is 0 and which false. And -true is like -<non-zero> which
is non-zero as well.
Spotted by Sybren, thanks!
|
|
The `BKE_material_clear_id()` didn't call `test_all_objects_materials()`,
which caused the object and mesh material slot count to go out of sync.
|
|
This change ensures that operators which needs access to evaluated data
first makes sure there is a dependency graph.
Other accesses to the dependency graph made it more explicit about
whether they just need a valid dependency graph pointer or whether they
expect the graph to be already evaluated.
This replaces OPTYPE_USE_EVAL_DATA which is now removed.
Some general rules about usage of accessors:
- Drawing is expected to happen from a fully evaluated dependency graph.
There is now a function to access it, which will in the future control
that dependency graph is actually evaluated.
This check is not yet done because there are some things to be taken
care about first: for example, post-update hooks might leave scene in
a state where something is still tagged for update.
- All operators which needs to access evaluated state must use
CTX_data_ensure_evaluated_depsgraph().
This function replaces OPTYPE_USE_EVAL_DATA.
The call is generally to be done in the very beginning of the
operator, prior other logic (unless this is some comprehensive
operator which might or might not need access to an evaluated state).
This call is never to be used from a loop.
If some utility function requires evaluated state of dependency graph
the graph is to be passed as an explicit argument. This way it is
clear that no evaluation happens in a loop or something like this.
- All cases which needs to know dependency graph pointer, but which
doesn't want to actually evaluate it can use old-style function
CTX_data_depsgraph_pointer(), assuming that underlying code will
ensure dependency graph is evaluated prior to accessing it.
- The new functions are replacing OPTYPE_USE_EVAL_DATA, so now it is
explicit and local about where dependency graph is being ensured.
This commit also contains some fixes of wrong usage of evaluation
functions on original objects. Ideally should be split out, but in
reality with all the APIs being renamed is quite tricky.
Fixes T67454: Blender crash on rapid undo and select
Speculation here is that sometimes undo and selection operators are
sometimes handled in the same event loop iteration, which leaves
non-evaluated dependency graph.
Fixes T67973: Crash on Fix Deforms operator
Fixes T67902: Crash when undo a loop cut
Reviewers: brecht
Reviewed By: brecht
Subscribers: lichtwerk
Maniphest Tasks: T67454
Differential Revision: https://developer.blender.org/D5343
|
|
node_groups don't remain active
Unlike `fill_texpaint_slots_recursive`, `rna_Material_active_paint_texture_index_update` did not search for texture nodes that are inside node groups.
Reviewers: sergey, psy-fi, zeddb, brecht
Subscribers: brecht
Differential Revision: https://developer.blender.org/D5338
|
|
font_to_curve code was not handling properly the case where it has nop
object to check for mat indices validity. Check should just not happen
then, not reset mat indices of chars to default 0 value.
|
|
This fixes an incompatibility with Visual Studio 2019 introduced in
631d5026c7bb34320c5d9b60afa5bc44b40fc5e4. It is likely caused by using
`# ifdef` inside the use of the `ELEM()` macro.
|
|
Use explicit boolean flag to indicate whether flush to original data
is needed or not. Makes it possible to avoid confusion on whether an
evaluated or any depsgraph can be passed to the API.
Allows to remove depsgraph from bAnimContext as well.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D5379
|
|
Differential Revision: https://developer.blender.org/D3744
|
|
Add include & initialize variable.
|
|
Merge into BKE_blendfile_userdef_from_defaults
|
|
Simplify preferences by removing the ability to load them from
either the startup.blend or userpref.blend.
Also simplifies updating default preferences by moving
them to a struct definition.
|
|
This patch introduces the same presets that are used for proportional editing in the brush falloff menu. The user can select any of these presets or use the regular custom falloff curve. The presets are hardcoded formulas, so the falloff curve is not used when they are active.
This change improves the general feeling of the brushes and it is more convenient and simpler to use. The CUSTOM curve option should now be used in the case that an unusual deformation is needed, in other cases, the hardcoded curve presets should be the default.
The smooth curve presets is a must in the grab brush, as it fixes the deformation issue with the current custom curve setting. The user may try to adjust the deformation by tweaking the curve, but it is nearly impossible to replicate this desired behavior.
{F7636217}
Other brushes that are included in the sculpt branch also rely on this as they need specific hardcoded falloffs to produce the desired effect.
Reviewers: brecht, billreynish
Reviewed By: brecht
Subscribers: JulienKaspar
Differential Revision: https://developer.blender.org/D5367
|
|
This function makes it possible to clear/remove/nuke all the geometry in
a mesh, allowing functions like `Mesh.from_python()` to construct a new
mesh in its place. Without this function, code like in T67627 have to
allocate a new Mesh datablock, fill that, and swap out the old Mesh for
the new one. This introduces issues when exporting, as the new mesh
could be seen by an exporter as unrelated to the old one.
Shape keys are not freed by this function. Freeing those would require
tagging the depsgraph for relations update, which is an expensive
operation. They should be removed explicitly if necessary.
Material slots are also not cleared by this function, in the same way
that they are not cleared when manually removing all geometry from a
mesh.
The `BKE_mesh_clear_geometry()` function is available in Python as
`mesh.clear_geometry()`.
Reviewed by: mont29, brecht
Differential Revision: https://developer.blender.org/D5373
|
|
This commit adds support for the WebM container. Previously we only
supported the WebM/VP9 video codec, but still required that it was
stored in a Matroska, MP4, or other compatible container format.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5156
|
|
The VP9 video codec supports writing alpha values; now this is available
in Blender too.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5156
|
|
Simplified `BKE_ffmpeg_alpha_channel_is_supported()` to use `ELEM()`
instead of a row consecutive `if`-statements.
No functional changes.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5156
|
|
|