Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
This patch contains the work that I did during my week at the Code Quest - adding support for tiled images to Blender.
With this patch, images now contain a list of tiles. By default, this just contains one tile, but if the source type is set to Tiled, the user can add additional tiles. When acquiring an ImBuf, the tile to be loaded is specified in the ImageUser.
Therefore, code that is not yet aware of tiles will just access the default tile as usual.
The filenames of the additional tiles are derived from the original filename according to the UDIM naming scheme - the filename contains an index that is calculated as (1001 + 10*<y coordinate of the tile> + <x coordinate of the tile>), where the x coordinate never goes above 9.
Internally, the various tiles are stored in a cache just like sequences. When acquired for the first time, the code will try to load the corresponding file from disk. Alternatively, a new operator can be used to initialize the tile similar to the New Image operator.
The following features are supported so far:
- Automatic detection and loading of all tiles when opening the first tile (1001)
- Saving all tiles
- Adding and removing tiles
- Filling tiles with generated images
- Drawing all tiles in the Image Editor
- Viewing a tiled grid even if no image is selected
- Rendering tiled images in Eevee
- Rendering tiled images in Cycles (in SVM mode)
- Automatically skipping loading of unused tiles in Cycles
- 2D texture painting (also across tiles)
- 3D texture painting (also across tiles, only limitation: individual faces can not cross tile borders)
- Assigning custom labels to individual tiles (drawn in the Image Editor instead of the ID)
- Different resolutions between tiles
There still are some missing features that will be added later (see T72390):
- Workbench engine support
- Packing/Unpacking support
- Baking support
- Cycles OSL support
- many other Blender features that rely on images
Thanks to Brecht for the review and to all who tested the intermediate versions!
Differential Revision: https://developer.blender.org/D3509
|
|
Adds a `text` parameter to `bpy.types.uiLayout.template_ID()` which
causes a label to be added, as usual. Adding the label also makes the
template respect the `bpy.types.uiLayout.use_property_split` option.
Also fixes wrong layout being used in the template-ID, although I think
that didn't cause issues in practice.
Sergey requested this for usage in the Movie Clip Editor.
|
|
Avoid mixing up pixel/tile location.
|
|
Error from 151cc02b6f823
|
|
flipped to bottom
While flipping the header to bottom works in the MCE (because MCE doesnt
allow overlapping UI) we need to take the regions visible rect into
account for the Image Editor.
Also correct clickable scubbing area (poll for frame_change) in the
Image Editor and the MovieClip Editor not taking UI_DPI_FAC into
account.
Maniphest Tasks: T70905
Differential Revision: https://developer.blender.org/D6090
|
|
This also resolves the (unlikely) issue of undo having uninitialized
zbuf data, now it's cleared instead.
|