Age | Commit message (Collapse) | Author |
|
Along some other typos in comments or variable names.
|
|
It's generally considered a better codestyle to check conditions early
and exit early when they are not met, over having most logic of a
function within a big `if`-block. Otherwise people have to go over the
entire block to see if there's possibly an `else` somewhere, or any
followup logic.
|
|
There's the old and ugly hack where the `uiBut.poin` points to the
button itself. When reallocating the button we have to update that
pointer of course.
|
|
Those two functions had `BKE_` prefix, were defined in BKE headers, but
implemented in ED code, yuck.
Moved everything to ED area for now, since those do not look fondamental
enough to belong to BKE, and none of their usages requires it currently.
|
|
As noted by @lichtwerk (thanks), one can have a local object and/or
material using a linked image data-block, this case needs some different
handling to prevent painting on such linked image.
For now, tweak `BKE_paint_proj_mesh_data_check` (eeeek, that name
prefix!) to consider paintslots with linked image as 'non-existing'.
|
|
|
|
The function this was in already checks the conditions under which it
can operate (as it should). No need to force the caller to do these
(quite specific) checks, the function can just do nothing if the button
doesn't need these operations.
Otherwise we'd have to always execute these checks before calling, which
makes calling it a hassle, makes the code harder to follow and generally
harder to maintain (what if the conditions change?).
|
|
Do a proper check to see if the button supports Ctrl+Mousewheel cycling.
See T80659.
|
|
Error introduced in {rBf9fcb25d521d}.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D8964
|
|
Similar to D8823.
|
|
Allows scripters to store additional information in the marker itself instead
of using work-around approach based on marker names and such.
Differential Revision: https://developer.blender.org/D8944
|
|
Originally was noticed when transforming mesh created by
object.to_mesh() from an object without modifier, in which case the
result references CustomData layers used by the object itself.
The issue goes a bit deeper: mesh.transform() should never modify
referenced layers, hence it should duplicate referenced layers.
This fix changes one specific aspect of the reported behavior. The
case where vertices coordinates are modified manually will still have
affect on the source mesh (as no referenced CustomData layers are being
duplicated). Proper fix for this case is not yet clear to me.
Differential Revision: https://developer.blender.org/D8939
|
|
The incorrect view was setup so it was drawn in pixel space. This patch
changes it to use UV space.
|
|
There is just no reason to support that kind of useless behavior.
Some remote TODO could be to define a process based on liboverride and
layers.
|
|
The issue was that the pointcache was not storing dead particles,
even though they are displayed. This lead to the rendering issue,
because only alive particles can be read from the point cache in
the frame that is rendered.
This also fixes an issue unrelated to rendering: when dead particles
are displayed, their position is incorrect when some frames are
skipped during playback.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D8907
|
|
Mainly use false/true for bool, but also a few others.
No change in behavior expected.
|
|
|
|
IMAGE_DEPTH is used for bit depth.
|
|
|
|
Keep braces balanced where possible, even with ifdef's as it avoids
confusions with editors calculating correct indentation level &
finding matching brackets.
|
|
We need to check for the property editor's runtime struct
before duplicating it.
|
|
Usual issue of win32 not following POSIX standards.
|
|
Since at least MSVC2010 there is a `SSIZE_T` available for windows, use
it to typedef `ssize_t` on this platform.
|
|
This patch tries to sanitize the types of our size parameters across our read
and write code, which is currently fairly inconsistent (using `int`, `uint`,
`size_t`...), by using `size_t` everywhere. Since in Blender file themselves
we can only store chunk of size `MAX_INT`, added some asserts to ensure that
as well.
See {T79561} for details.
Differential Revision: https://developer.blender.org/D8672
|
|
Collections of liboverride data only support insertion of new items (and
deleting or moving those around). No operation on existing items from linked
data is allowed.
Reflect that in RNA functions used to edit py-defined RNA collections.
Note that this is not ideal currently, it does the job but feedback to
user is rather poor. Ideally add-ons should implement higher-level
checks for override cases in their operators.
|
|
|
|
This will allow add-ons to define Collection properties that support
item insertion in library override context.
|
|
Supporting IDProperty-based data storage here in a generic way is fairly
simple, unlike actual RNA data (DNA-based), for which getting a proper
generic way to duplicate them from within RNA is currently not really
possible.
Part of T79562.
|
|
both item pointer and its index in the collection.
|
|
|
|
For gradient, put the parameter below both colors.
|
|
It's better keep this parameter here instead to put it at the end of the panel.
|
|
|
|
Regression in f7829787da5c64b3fa715a042c2a45ecd4314676
|
|
The slider should be inactive when the setting is turned off like
the wireframe slider.
|
|
|
|
|
|
The bevel type is a more useful check for graying out this property
because its effects will be apparent before choosing an object. Before,
the fill type property would only gray out with a bevel object selected.
|
|
Warp & weight vertex-group editing modifiers miscalculated vertex weight
inversion, the weights were multiplied before being subtracted from 1.
Ref D8241
|
|
Build modifiers linked or copied to objects from the outliner would not
animate until the file was saved and reopened due to a missing depsgraph
relations tag.
|
|
We don't use the other variables in the sorting struct,
so we might as well use the panels directly.
|
|
Light rotation is supported both in world and view light orientation in
lookdev, so no reason to disable it.
Reviewed By: Blendify
Differential Revision: https://developer.blender.org/D8958
|
|
|
|
|
|
Following the most widely used convention for including todo's in
the code, that is: `TODO(name):`, `FIXME(name)` ... etc.
|
|
|
|
Expanded objects with children immediately after a colored collection
would have the color applied to their hierarchy lines as well. The fix
is to reset the collection color to `COLLECTION_COLOR_NONE` for each
open subtree.
|
|
Oversight that should have been in rB6f3c279d9e70
|
|
Based on http://jcgt.org/published/0008/01/03/
This is a simple trick that does *not* have a huge performance impact but
does work pretty well. It just modifies the Fresnel term to account for
the multibounce energy loss (coloration).
However this makes the shader variations count double. To avoid this we
use a uniform and pass the multiscatter use flag inside the sign of f90.
This is a bit hacky but avoids many code duplication.
This uses the simplification proposed by McAuley in
A Journey Through Implementing Multiscattering BRDFs and Area Lights
This does not handle area light differently than the IBL case but that's
already an issue in current implementation.
This is related to T68460.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D8912
|
|
This add basic null safe handling for this operation.
|