Age | Commit message (Collapse) | Author |
|
Replace `typedef` with `using` in C++ code.
In the case of `typedef struct SomeName { ... } SomeName;` I removed the
`typedef` altogether, as this is unnecessary in C++. Such cases have been
rewritten to `struct SomeName { ... };`
No functional changes.
|
|
No functional changes.
|
|
During revision of {D8952} one of the comments was to make a function that converts the render percentage to a factor. This to avoid code duplication. However the duplicated code was already all over the compositor code. So in order to avoid this code duplication for {D8952} I propose to first cleanup the duplicated code and build patch {D8952} based on this clean up.
The method that converts the render percentage to a factor is put in the CompositorContext. Why? The CompositorContext keeps DNA information like the renderdata. DNA, and thus the CompositorContext, keeps the size of the render resolution in percentage (user oriented). The compositor needs the size of the render resolution as a factor. So the CompositorContext seems like the obvious place to have this conversion method.
Why not in de NodeBase? The method could've been added to the nodebase, but I wanted to keep the nodebase as clean as possible and not put simple "conversion" methods into this base class. Also I didn't really like the call flow: you'd always have to get the renderdata size from the context and then convert.
Putting it in the CompositorContext avoids this extra invoke of a call.
Why not in the Converter? See nodebase. And the Converter seems more like a class for "structural" and complex node tree conversions. Not the simple conversions.
Reviewed By: Sergey Sharybin
Differential Revision: https://developer.blender.org/D9566
|
|
The formula did not change. The only side effect of this change should be
that the compositor node now does not divide by zero in some cases.
|
|
Don't refresh the list of sockets, so that when the .blend file is restored the
links remain valid. Also display such nodes in red to indicate an error, same
as when the node type info is missing.
|
|
Standard deviation formula wasn't being applied correctly when selecting
R G B cases. Issue is there since Blender 2.64 as it was incorrectly
ported over from the previous compositor.
Reviewed By: Sergey Sharybin, Jeroen Bakker
Differential Revision: https://developer.blender.org/D9384
|
|
|
|
|
|
|
|
Replace `NULL` with `nullptr` in C++ code.
No functional changes.
|
|
|
|
Move headers files from `render/extern/` to `render/`
Part of T73586
|
|
|
|
|
|
|
|
|
|
Historically the result of the keying node was violating alpha
pre-multiplication rules in Blender: it was simply overriding
the alpha channel of input.
This change makes it so keying node mixes alpha into the input,
which solves the following issues:
- The result is properly pre-multiplied, no need in separate
alpha-convert node anymore.
- Allows to more easily stack keying nodes.
This usecase was never really investigated, but since previously
alpha is always overwritten it was never possible to easily stack
nodes. Now it is at something to be tried.
Unfortunately, this breaks compatibility with existing files, where
alpha-convert node is to be manually removed.
From implementation side this is done as a dedicated operation since
there was no ready-to-use operation. Maybe in the future it might
be replaced with some sort of vector math node.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D9211
|
|
Corrects 34 miscellaneous misspelled words.
Differential Revision: https://developer.blender.org/D9248
Reviewed by Campbell Barton
|
|
Corrects incorrect usage of contraction for 'it is', when possessive 'its' was required.
Differential Revision: https://developer.blender.org/D9250
Reviewed by Campbell Barton
|
|
|
|
Follow our code style guide by using C-comments for text descriptions.
|
|
Generic ID management code can now do those local temp copy handling, so
no need for duplicated own code for that.
No behavioral changes expected here.
|
|
Cleanup old tracker task format to the new. e.g: [#34039] to T34039
Ref D8718
|
|
This is already the most widely used convention.
Use this so `make check_spelling_c` will ignore all email addresses.
|
|
|
|
This project moves the current UV/Image editor drawing to the draw manager.
Why would we do this:
**Performance**:
Current implementation would draw each texel per time. Multiple texels could be
drawn per pixel what would overwrite the previous result. You can notice this
when working with large textures. Repeat image drawing made this visible by
drawing for a small period of time and stop drawing the rest. Now the rendering
is fast and all repeated images are drawn.
**Alpha drawing**:
Current implementation would draw directly in display space. Giving incorrect
results when displaying alpha transparent images.
This addresses {T52680}, {T74709}, {T79518}
The image editor now can show emission only colors. See {D8234} for
examples.
**Current Limitations**
Using images that are larger than supported by your GPU are resized (eg larger
than 16000x16000 are resized to 8k). This leaves some blurring artifacts. It is
a low priority to add support back of displaying individual pixels of huge
images. There is a design task {T80113} with more detail.
**Implementation overview**
Introduced an Image Engine in the draw module. this engine is responsible for
drawing the texture in the main area of the UV/Image editor. The overlay engine
has a edit_uv overlay which is responsible to draw the UV's, shadows and
overlays specifically for the UV Image editor. The background + checker pattern
is drawn by the overlay_background.
The patch will allow us to share overlays between the 3d viewport and UV/Image
editor more easily. In most cases we just need to switch the `pos` with the `u`
attribute in the vertex shader.
The project can be activated in the user preferences as experimental features.
In a later commit this will be reversed.
Reviewed By: Clément Foucault
Differential Revision: https://developer.blender.org/D8234
|
|
|
|
No functional changes
|
|
Should cause no noticeable difference.
|
|
No functional changes.
|
|
Remove redundantly nested `#if` and `#ifdef` statements.
One nested `#if 0` block was left untouched, as it's in particle code
that's no longer maintained. Furthermore, that block also has some
explanation as to the differences between the enabled & disabled parts.
One nested `#if 0` construct was completely removed, leaving only the
actually used bit of code. There was no explanation as to the usefulness
of the disabled code, and it hasn't been touched in years.
No functional changes.
|
|
|
|
|
|
Is not only the values of translation/scale/rotation which are to be inverted,
but also the order of operations.
Differential Revision: https://developer.blender.org/D8518
|
|
Also order sizeof(..) first to promote other values to size_t.
|
|
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/compositor` module.
No functional changes.
|
|
|
|
This replaces header include guards with `#pragma once`.
A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`),
because they are used in other places.
This patch has been generated by P1561 followed by `make format`.
Differential Revision: https://developer.blender.org/D8466
|
|
|
|
The abbreviation 'init' is brief, unambiguous and already used
in thousands of places, also initialize is often accidentally
written with British spelling.
|
|
|
|
The final render will use scene resolution in this case.
For example, when Color Input is plugger to preview and composite output
nodes, final render will flood-fill the final image which is a size of
scene resolution with this color. Before this fix the node preview was
empty. After this fix the node preview will be flood-filled with the
color.
Fixes T78586
Differential Revision: https://developer.blender.org/D8263
|
|
Were two issues:
- Divider was calculated in integer domain, causing rounding issues in
general case, and causing singularity in a corner case when input is
smaller than the preview size.
- The resolution was scaled down by 1 pixel for no obvious reason.
|
|
|
|
Clang Tidy reported a couple of false positives. I disabled
those `NOLINTNEXTLINE`.
Differential Revision: https://developer.blender.org/D8199
|
|
For some reason got unnoticed in the original cleanup pass.
|
|
|
|
Reviewers: sergey
Differential Revision: https://developer.blender.org/D8197
|
|
|
|
The issue was caused by wrong conversion happening after some of the
proxies are removed. Easiest solution is to first remove proxies and
then add required converter operations.
Thanks Jeroen for the review!
|