Age | Commit message (Collapse) | Author |
|
|
|
Listeners should never dereference this pointer because the object may have
been deleted, it can only be used for comparisons.
|
|
Added function called WM_set_locked_interface which does
two things:
- Prevents event queue from being handled, so no operators
(see below) or values are even possible to run or change.
This prevents any kind of "destructive" action performed
from user while rendering.
- Locks interface refresh for regions which does have lock
set to truth in their template. Currently it's just a 3D
viewport, but in the future more regions could be considered
unsafe, or we could want to lock different parts of
interface when doing different jobs.
This is needed because 3D viewport could be using or changing
the same data as renderer currently uses, leading to threading
conflict.
Notifiers are still allowed to handle, so render progress is
seen on the screen, but would need to doublecheck on this, in
terms some notifiers could be changing the data.
For now interface locking happens for render job only in case
"Lock Interface" checkbox is enabled.
Other tools like backing would also benefit of this option.
It is possible to mark operator as safe to be used in locked
interface mode by adding OPTYPE_ALLOW_LOCKED bit to operator
template flags.
This bit is completely handled by wm_evem_system, not
with operator run routines, so it's still possible to
run operators from drivers and handlers.
Currently allowed image editor navigation and zooming.
Reviewers: brecht, campbellbarton
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D142
|
|
|
|
also remove CDDM_Check, theres no need for it.
|
|
|
|
Allow loading of image sequences in addition to single images in the open image operator
I solved it by adding the possibility to load an image sequence in the Load Image Operator.
The image user is passed in the operator customdata now as well, best solution for now, but general handling of image user still a bit weak. The offset and length of the image sequence is now calculated in the image open operator by storing all found frames in a list and sorting this list.
Reviewed By: campbellbarton, brecht, lukastoenne
Differential Revision: https://developer.blender.org/D209
|
|
|
|
|
|
are on the right side, which is consistent with other editors.
Differential Revision: https://developer.blender.org/D201
|
|
Summary:
Made objects update happening from multiple threads. It is a task-based
scheduling system which uses current dependency graph for spawning new
tasks. This means threading happens on object level, but the system is
flexible enough for higher granularity.
Technical details:
- Uses task scheduler which was recently committed to trunk
(that one which Brecht ported from Cycles).
- Added two utility functions to dependency graph:
* DAG_threaded_update_begin, which is called to initialize threaded
objects update. It will also schedule root DAG node to the queue,
hence starting evaluation process.
Initialization will calculate how much parents are to be evaluation
before current DAG node can be scheduled. This value is used by task
threads for faster detecting which nodes might be scheduled.
* DAG_threaded_update_handle_node_updated which is called from task
thread function when node was fully handled.
This function decreases num_pending_parents of node children and
schedules children with zero valency.
As it might have become clear, task thread receives DAG nodes and
decides which callback to call for it.
Currently only BKE_object_handle_update is called for object nodes.
In the future it'll call node->callback() from Ali's new DAG.
- This required adding some workarounds to the render pipeline.
Mainly to stop using get_object_dm() from modifiers' apply callback.
Such a call was only a workaround for dependency graph glitch when
rendering scene with, say, boolean modifiers before displaying
this scene.
Such change moves workaround from one place to another, so overall
hackentropy remains the same.
- Added paradigm of EvaluaitonContext. Currently it's more like just a
more reliable replacement for G.is_rendering which fails in some
circumstances.
Future idea of this context is to also store all the local data needed
for objects evaluation such as local time, Copy-on-Write data and so.
There're two types of EvaluationContext:
* Context used for viewport updated and owned by Main. In the future
this context might be easily moved to Window or Screen to allo
per-window/per-screen local time.
* Context used by render engines to evaluate objects for render purposes.
Render engine is an owner of this context.
This context is passed to all object update routines.
Reviewers: brecht, campbellbarton
Reviewed By: brecht
CC: lukastoenne
Differential Revision: https://developer.blender.org/D94
|
|
|
|
Using sub-pixel position made the text clip badly sometimes.
|
|
|
|
This was actually a regression after color management re-implementation, need
to copy settings from saved image buffer to an original one since they might
be modified during save.
Also noticed image format planes detection didn't work properly from an image
buffer. Made it so save operator works fine now, but also marked a TODO in
BKE_imbuf_to_image_format() which needs to be investigated further.
|
|
Summary:
Behaves very much the same as cache for Movie Clip datablock:
- Image now have `MovieCache *cache` field which replaced
legacy `ListBase ibufs`.
This allows image datablock to easily keep of image
buffers which are owned by itself. This field isn't
saved to the file and getting restored on undo steps.
However, cache limit is global for movies, sequences
and image datablocks now. So overall cached image buffers
size will not go above cache limit size in user
preferences.
- Image buffers which are marked as BITMAPDIRTY will never
be freed from the cache.
- Added utility function to iterate over image buffers
saved in movie cache.
- Movie cache cleanup check callback now have ImBuf argument
which can be used in a condition of cleanup.
- Added some utility functions which replaces legacy ibufs
iterations with image cache iteration which happens from
inside a lock.
- Fixed `image_mem_size()` which was only counting one of
the buffers if both float and byte buffer present.
Additional notes:
- `BKE_image_get_first_ibuf()` is rather stupid, but direct
access to ibufs->first was also the same stupid idea.
Would consider avoid this function is another project.
- There are some places which doesn't look threadsafe, but
they already were not so much threadsafe anyway before.
So think not a big deal with solving this later.
Finally solves infinite memory usage by image sequences! :)
Reviewers: brecht, campbellbarton
Reviewed By: brecht
CC: sebastian_k
Differential Revision: http://developer.blender.org/D95
|
|
|
|
|
|
an undo if we are in image paint mode and use the paint undo stack. Also added missing GPU update.:
|
|
This also fixes a crash editing buttons longer then UI_MAX_DRAW_STR
|
|
if the user counter has to be decremented and not decrement the counter by hand.
|
|
|
|
new BI image texture.
Fixes this problem:
*Go to the Blender (BI) textures tab and open an existing image.
*Hit on the plus sign next to datablock to create a new image.
*Complete the creation process and switch back to the first (loaded) image.
-> The image user count raises... will raise as often as you hit the plus sign
|
|
Need to mark display buffer as out-of-date.
|
|
The scene pointer used for looking up the appropriate source of render result images in the image editor was always taken from context. This means that render results for a different scene would never be
displayed in the image editor.
To give feedback on running renders, try to get the running render job's scene pointer in the image editor for render result type images. This only happens during rendering, apart from that the regular
context scene result is displayed.
|
|
OPERATOR_CANCELLED.
|
|
We now have openimageio building when cycles builds or when it's
manually set to build.
(I reverted the _IMAGE_ in the define name because I think the closer
the cmake flags match the defines in the software the better, and there
is no reason to rename all the existent WITH_OPENIMAGEIO references in
CMakeLists.txt - which would be the alternative)
|
|
Currently supports only two modes:
- Show alpha channel of the mask
- Multiply footage by the mask, which will give
you final-looking combined image.
TODO: Currently rasterization happens on every
redraw, need to cache rasterized mask
somewhere to make redraw more realtime.
|
|
|
|
broken.
|
|
As per Brecht van Lommel's suggestion.
|
|
operator for opening images in the image editor header, it's easily one
of the most common operations, don't see why it has to be only accessed
from menu.
|
|
We now support the combined layer of Photoshop files (stored as layer 0
in the file). This way users can keep their files as multilayer PSD and
Blender always handle them as flat images.
For perfect alpha this requires an OpenImageIO update:
https://github.com/OpenImageIO/oiio/commit/342cc2633ff590a3bb278481c61ae798c7148361
Photoshop sample files:
https://github.com/OpenImageIO/oiio-images
Brecht has some pending fixes to push for OIIO as well, so we may as
well wait to update our libraries.
What works:
===========
* 8bit images (with or without alpha)
* 16bits images (alpha discarded)
* Photoshop files saved with 'Maximum Compatibility'
* Cycles, Blender internal, BGE (and player)
Known limitations
(due to OIIO dependency):
=========================
* Images with less than 4 channels show a wrong thumbnail (bug may be in OIIO)
* Packed images are not supported
* We do not write PSD files.
Note: old Blenders have support for PSD via Quicktime library. But due
to license issues this was discontinued.
Many thanks for Brecht van Lommel for reviewing the patch, suggesting
multiple improvements and to help solving the alpha issue.
|
|
The SAMPLELINE flag in histogram was set during the BKE_histogram_update_sample_line function. That function in turn is called during every scope update in area draw function, meaning that during render
it constantly gets set. OTOH the operator tries to disable the flag on invoke, which "cancels" the sample line by default. So during render the operator un-setting of the flag has no effect, because the
render job immediatly triggers a redraw, which updates scopes and sets it again.
Moved the flag out of the actual sample line update function into the operator execute. Now only the operator enables/disables overall sample line drawing, while the rest of the update works as before.
|
|
HSV values were calculated from a linear space color, which is
not so much useful and correct. Now RGB(A) buffers will use
color managed color for HSV values.
Still not sure which color to use for HSV when there's only one
channel in a buffer. This part left unchanged for now.
|
|
|
|
follow up)
|
|
editor)
* IMAGE_OT_NEW did not had a notifier yet for some weird reason.
|
|
related functions.
|
|
|
|
Currently only circle and square, might be easily
extended in the future.
New primitives are creating at cursor location.
This also implied adding 2d cursor to space clip.
Also fix set 2D cursor location which didn't work
in image editor's mask mode since 2.67.
TODO: draw_image_cursor better be moved to some
more generic file, but it's not so much
important for now and might be solved later.
Thanks Campbell for the review!
|
|
This mimics the behaviour we have in the Clip Editor.
I personally would prefer if we had no border once in fullscreen
(current border is 5 pixels).
I will consult Sergey Sharybin first to see if we can change that in the clip editor as well (though there I
believe the border is useful - the bottom of the editor is used to indicate 'tracked' frames.
|
|
sizeof() use in BLI_array.h
|
|
NC_OBJECT
|
|
|
|
Issue was caused by operator redo saving values for previous
inverted channels, meaning the same channels will be inverted
next time operator runs.
Don't think it's useful to save operator values here, since
you don;t have visual feedback about which channels were
inverted. So marked all this properties as SKIP_SAVE. Gives
much more predictable results.
|
|
in fact the problem was caused by own previous fix/improvement for a different case, now this works as follows...
- render uses last-saved name, falls back to 'untitled' in blend file path.
- non render uses id-name always, saves into dir of last-saved image, fall back to blend file path.
|
|
|
|
codec specified by the user.
|
|
of the active object in the 3D view. This was due to sharing a global G.moving
flag to indicate that transform is active, now it's only set per transform data
type so different editors don't influence each other.
|