Age | Commit message (Collapse) | Author |
|
|
|
Also pass some args as 'const'.
|
|
When using the image editor the display channels attribute can become
invalid when selecting another image/buffer. This patch will check what
display channels are valid and when an invalid channel is selected it
will fall back to the color channel.
To de-duplicate the code it also introduces a
`ED_space_image_get_display_channel_mask` function that will determine
the valid bitflags for the display channel of a given `ImBuf`.
|
|
Contributed by luzpaz.
Differential Revision: https://developer.blender.org/D7133
|
|
|
|
Stereoscopic viewport didn't support Color Manangement due recent
changes in the color management pipeline. In order to solve the issue we
will migrate the strereo rendering into the GPUViewport. This will share
some textures and reduce required GPU memory.
Reviewed By: fclem, dfelinto
Differential Revision: https://developer.blender.org/D6922
|
|
Both the MS headers and blender headers define the HKEY
which gives all kind of inclusion order issues.
This diff renames all *KEY constants to EVT_*KEY to resolve
this conflict.
Reviewed By: brecht , dfelinto
Differential Revision: http://developer.blender.org/D7164
|
|
|
|
Adding a set of larger icons for use in informational dialogs.
Differential Revision: https://developer.blender.org/D6859
Reviewed by Campbell Barton
|
|
Reviewers: brecht, Severin
Differential Revision: https://developer.blender.org/D7024
|
|
Caused by the introduction of UDIM (rBc30d6571bb47).
We need to make sure the tiles ImageUser is set up correctly [especially
the framenr], otherwise BKE_image_acquire_ibuf() and friends will fail
to find the correct ImBuf.
Also instead of initializing a minimal BKE_imageuser_default, now use
an appropriate ImageUser if avaliable and pass this around (instead of
just the tile_number). 2D painting can reuse the Image Editor ImageUser,
for 3D painting we still rely on a default ImageUser in most places, but
at least set the framenr correctly].
This also fixes crashes when doing image operations such as inverting or
resizing on images in a sequence in the Image Editor.
This also fixes color sampling (S) from the 3DView going wrong for image
sequences (would fallback to OpenGL sampling because an ImBuf could not
be found).
Maniphest Tasks: T74425
Differential Revision: https://developer.blender.org/D7022
|
|
While it might be handy to have type-less functionality which is
similar to how C++ math is implemented it can not be easily achieved
with just preprocessor in a way which does not have side-effects on
wrong usage.
There macros where often used on a non-trivial expression, and there
was at least one usage where it was causing an actual side effect/bug
on Windows (see change around square_f(sh[index++]) in studiolight.c).
For such cases it is handy to have a function which is guaranteed to
have zero side-effects. The motivation behind actually removing the
macros is that there is already a way to do similar calculation. Also,
not having such macros is a way to guarantee that its usage is not
changed in a way which have side-effects and that it's not used as an
inspiration for cases where it should not be used.
Differential Revision: https://developer.blender.org/D7051
|
|
The old convention was easy to confuse with ScrArea.
Part of https://developer.blender.org/T74432.
This is mostly a batch rename with some manual fixing. Only single word
variable names are changed, no prefixed/suffixed names.
Brecht van Lommel and Campbell Barton both gave me a green light for
this convention change.
Also ran clan clang format on affected files.
|
|
Part of https://developer.blender.org/T74429.
There's a chance that this causes some issues becaue in some cases we
change from getting the window from context to getting it from somewhere
else.
|
|
contect -> context
|
|
|
|
|
|
Addresses T74331
|
|
|
|
|
|
This adds the `Half Float Precision` option in the image property panel.
This option is only available on float textures and is enabled by default.
Adding a flag inside the imbuf (IB_halffloat) on load is done for EXR and PSD formats that can store half floating point (16bits/channels).
The option is then not displayed in this case and forced.
Related task T73086
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D6891
|
|
Both save and save-as share utility functions which
cast from customdata in an error prone way.
Avoid this by passing image format data directly.
|
|
|
|
Alternate fix for T74182, making changes to the save-as operator.
|
|
|
|
|
|
Avoid accessing inline since it's often used multiple times.
In some cases it was already defined.
|
|
`invoke_props_dialog` and `invoke_popup` had a width and a height field. The height field was ignored as the height is determined based on the content. This change removes the field from the BPY + WM_api
Reviewed By: Campbell Barton, Jacques Lucke
Differential Revision: https://developer.blender.org/D6694
|
|
Reviewed By: brecht sergey jbakker
Differential Revision: http://developer.blender.org/D6729
|
|
|
|
Thanks to @dfelinto for spotting this!
|
|
not the textures
The issue here is simple, IMA_SRC_TILED was missing from a check for whether the image should
be saved.
Note that tiled images won't be automatically saved if they have never been saved before.
For single images this is handled by packing them, but packing of tiled images isn't
supported yet.
However, in that case the file closing dialog will at least show a warning now instead of
completely ignoring tiled images.
|
|
Note that `BKE_library.h`/`library.c` were renamed to
`BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here.
Part of T72604.
|
|
- Replace 'unsigned' used on it's own with 'uint'.
- Replace 'unsigned const char' with 'const uchar'.
|
|
Thanks to @dfelinto for spotting this!
|
|
Thanks to @dfelinto for spotting this!
|
|
When using the color picker on a image editor it tries to read the color
from the original image. When there is no original image the code
crashes during the determination of the UDIM tile number.
There are 2 approaches to solve this.
1. Modify `BKE_image_get_tile_from_pos` to support NULL pointers.
2. Modify `ED_space_image_color_sample` with an early exit.
This patch modifies `ED_space_image_color_sample` with an early exit.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D6629
|
|
Also rename struct members to 'launch_event', since it's more
descriptive and was called this in some places.
|
|
|
|
Previously, non-default alpha or float settings had be set manually.
With this change, the Add Tile and Fill Tile operators initialize
width, height, alpha and float from the currently selected tile
if it has a vaild ImBuf, otherwise from the first tile.
|
|
|
|
This resolves a logical problem using tweak as a fallback tool.
See: T66304#828742
The select action would immediately show the gizmo underneath it,
then the tweak would be handled by the gizmo instead of moving the item
under the cursor.
Currently this works by hiding the gizmo until the tweak event ends.
While it's simpler to check if the gizmo received a mouse-down event,
it causes flickering before each drag event which feels like a glitch.
This is optional for each gizmo type because there are cases where this
can be useful to activate the gizmo immediately (mesh rip for example).
|
|
Previously the user had to select the 1001 tile for this to work,
now any tile will work as long as the 1001 tile still exists on disk.
|
|
|
|
Any existing tiles will be skipped.
|
|
|
|
|
|
|
|
|
|
|