Commit Graph

28 Commits

Author SHA1 Message Date
6bc2d57235 Fix #35449: image sequences to drive e.g. particle length or used in modifiers
were no properly updating when rendering animations.

The render engine was only updating the image user current frame on images used
by material textures. Now moved the function that updates all from the editors
to blenkernel level and do it on all frame changes.
2013-05-22 22:17:07 +00:00
37e73aa368 code cleanup: use BKE naming conventions for functions in BKE_editmesh.h and BKE_editmesh_bvh.h 2013-04-16 05:59:48 +00:00
6da961775f code cleanup: rename BKE_tessmesh -> BKE_editmesh, rename EditDerivedBMesh.tc -> em. ('tc' is odd name which isn't used elsewhere). 2013-04-13 20:31:52 +00:00
e364c94c7b fix [#33580] Masking keyframes disappear from dope sheet when using undo. 2012-12-18 08:41:38 +00:00
dbe158f0bb Fix #33525: Mask points are add offset for the mouse when adding on viewer node with aspect != 1
It was strange logic in code from 2010 which forced image aspect to be 1 for
viewer nodes and render results.

Not sure why it's needed, was only used for unwrapping aspect correction,
but render result/viewer images are already handled differently there.
2012-12-14 09:19:13 +00:00
5c6f6301b0 Image thread safe improvements
This commit makes BKE_image_acquire_ibuf referencing result, which means once
some area requested for image buffer, it'll be guaranteed this buffer wouldn't
be freed by image signal.

To de-reference buffer BKE_image_release_ibuf should now always be used.

To make referencing working correct we can not rely on result of
image_get_ibuf_threadsafe called outside from thread lock. This is so because
we need to guarantee getting image buffer from list of loaded buffers and it's
referencing happens atomic. Without lock here it is possible that between call
of image_get_ibuf_threadsafe and referencing the buffer IMA_SIGNAL_FREE would
be called. Image signal handling too is blocking now to prevent such a
situation.

Threads are locking by spinlock, which are faster than mutexes. There were some
slowdown reports in the past about render slowdown when using OSX on Xeon CPU.
It shouldn't happen with spin locks, but more tests on different hardware would
be really welcome. So far can not see speed regressions on own computers.

This commit also removes BKE_image_get_ibuf, because it was not so intuitive
when get_ibuf and acquire_ibuf should be used.

Thanks to Ton and Brecht for discussion/review :)
2012-11-15 15:59:58 +00:00
9fc95bd7ee use min/max inline functions where MIN2/MAX2 were doing type conversion. 2012-10-27 11:18:54 +00:00
2a08c0dc56 Code cleanup: fix some clang checker warnings. 2012-10-04 20:11:54 +00:00
701e57e11d fix for issue where you could easily make zero user datablocks (especially with masks which default to fake user).
- Make mask
- assign to image editor
- disable fake user

This would make the image space reference a zero user mask datablock which wouldn't be saved.

solve the bug by making mask and image assignments check the real usercount of the ID block (not taking into account fake user).
2012-09-24 00:05:02 +00:00
232571c61a code cleanup: replace macro for BLI_rect size/center with inline functions. 2012-09-15 11:48:20 +00:00
888c4fd253 Fix #32547: unwrap on default cube got broken in recent commit. 2012-09-13 13:29:10 +00:00
05755d307a fix [#31946] Masking doesn't respect pixel ratio 2012-09-13 05:29:38 +00:00
c92ab5c3ef code cleanup: use rect size macros 2012-08-21 20:34:05 +00:00
77f47799dd code cleanup: use BLI_RCT_SIZE macro 2012-08-20 23:06:17 +00:00
9e742ffc2b style cleanup: also correct some doxy comments 2012-08-18 13:07:48 +00:00
28ab27a49a allow editing masks in an image space when there is no image.
also simplify image listener.
2012-08-03 22:33:45 +00:00
72a3fb15d7 changes to mask editing
- use Alt to modify all mask feather at once while dragging.
- copying a multi-user mask from the interface works now.
- show masks when UV editing isnt used, rather then checking editmode (would give some odd/annoying image space header).
- add a fake mask user by default.
- moving points with LMB drag no longer selects them.
2012-07-31 17:31:34 +00:00
c42d0189e5 resolve glitch in the image space where mask editing and UVs would conflict.
now UV editing overrides mask.
2012-07-31 14:16:27 +00:00
f1acd6ac3e code cleanup: pass mouse position as int[2] rather then wmEvent 2012-07-27 15:15:55 +00:00
f39a21c36f add ED_space_image_get_size_fl, ED_space_clip_get_size_fl 2012-07-26 11:47:47 +00:00
77e7ca6aa8 mask/image editor now works for border select and lasso 2012-07-26 09:54:52 +00:00
2b133b14ab mask/image viewer now works with non 1:1 image aspect, editing masks in the image viewer should be generally usable now though still some TODO's left. 2012-07-25 20:39:49 +00:00
927af4ccc9 mask transform now works in the image space 2012-07-25 19:36:59 +00:00
7fba5779ed match function names for clip/image spaces 2012-07-25 16:30:53 +00:00
62187c386e mask UI for space image 2012-07-25 12:15:22 +00:00
e771e07fe8 image space now has a mode for view/paint/mask editing. 2012-07-25 11:25:10 +00:00
c3a8894f57 wip mask/image commit, mostly internal function & added some TODO's 2012-07-25 10:39:54 +00:00
f2d9e2410c move ED_image functions into their own file. 2012-07-25 10:15:24 +00:00