Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-03-25Cleanup: use 'r_' prefix for output argumentsCampbell Barton
Also pass some args as 'const'.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2019-12-12Add support for tiled images and the UDIM naming schemeLukas Stockner
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
2019-04-29VSE: Cache rewriteRichard Antalik
This patch implements new cache system. Aim is to give user more control over cache, so it can be maximally utilized. This is done through sequencer timeline side panel in category proxy & cache. Cached images are also visualized in timeline, controled by sequencer timeline view->cache menu Functional changes: - NOT use IMB_moviecache API - refactor names of cached image types - each scene owns 1 sequencer cache - merge preprocess cache into per-sequencer cache - cache links images rendered per frame in order as they are created - add cache content visualization tool - add RNA properties to control the cache More info can be found in design notes in blenkernel/intern/seqcache.c and in https://developer.blender.org/D4443 Reviewed By: brecht Differential Revision: https://developer.blender.org/D4443
2019-04-23Cleanup: style, use braces for imbufCampbell Barton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2018-09-03Spelling fixes in comments and descriptions, patch by luzpaz.Brecht Van Lommel
Differential Revision: https://developer.blender.org/D3668
2018-02-15Cleanup: use '_len' instead of '_size' w/ BLI APICampbell Barton
- When returning the number of items in a collection use BLI_*_len() - Keep _size() for size in bytes. - Keep _count() for data structures that don't store length (hint this isn't a simple getter). See P611 to apply instead of manually resolving conflicts.
2017-09-29Drop platform support for Solaris & AIXCampbell Barton
These platforms didn't see maintenance in years. This commit just removes ifdef's & cmake check.
2015-05-11GHash: avoid redundant castsCampbell Barton
2015-02-06One more crashing instance for hashesAntony Riakiotakis
2015-02-06Fix sequencer crashing after recent GHash refactor.Antony Riakiotakis
Code frees hash element while iterating - I don't think that's a good idea but this should keep things working for now at least.
2015-02-06GHash: no need to malloc iteratorsCampbell Barton
2015-01-08GHash: use reinsert instead of remove/insertCampbell Barton
2015-01-01cleanup: redundant casts & const cast correctnessCampbell Barton
2014-09-25GHash: use bool for comparison (simplify compare)Campbell Barton
2014-04-08Mempool: delay allocating an initial chunk, its not always usedCampbell Barton
2014-04-05Mempool: remove BLI_MEMPOOL_SYSMALLOC, MEM_* allocs are more efficient nowCampbell Barton
2014-04-01Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT defineCampbell Barton
2014-03-25Fix T39395: Switching to "Textured solid" and "GLSL" view will cause the FPS ↵Sergey Sharybin
drop to 0 Issue was caused by the cache limitor which was removing 4k textures from the memory when accessing other images. This is pretty much awful situation and solved by making it so only image sequences and movies ace cache-guarded. Could be optimized further so images used by viewport are not being freed, but that's much more tricky to do.. This is a nice candidature for 'a'.
2014-02-03Code cleanup: use bools where possibleCampbell Barton
2014-01-13Fix T38040: Crash after loading big image file in compositorSergey Sharybin
Issue was caused by cache limitor removing viewer image buffer from the memory during compositing. Now made it so all viewer images are persistent in the memory. This solves the crash mentioned above and also makes it so render/compo results are never lost. Further tweaks are possible, but pretty much happy now, at least no stoppers for work are there.
2013-12-22Add ItemDestroyable to the cache limitorSergey Sharybin
This callback is used when cache limiter needs to remove some cached objects when running out of limit. From blender side it's used to keep painted images always in memory. This fixes issue when painted images were removing from the memory after image cache rewrite.
2013-12-16Better fix for previous commitSergey Sharybin
Cache iterator might return unused keys as well. Now unused keys are being removed before cleanup and iteration.
2013-12-16Fix possible crash when cleaning cache with some ibufs removed by the memory ↵Sergey Sharybin
limit
2013-12-13Image cache rewrite to using generic movie cacheSergey Sharybin
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
2013-05-08rename BLI_ghashIterator_notDone() -> BLI_ghashIterator_done()Campbell Barton
was renamed fairly recently but other similar iterators not negated like this, would prefer to keep it as it was
2013-03-20Prefetching for movie clipsSergey Sharybin
This commit basically implements frames prefetching for movie clip datablock. Number of frames to be prefetched is controlled in User Preferences, System tab, Prefetch Frames option. Currently prefetching is destructive-less for movie cache, meaning mo frames will be removed from the cache when while prefetching. This is because it's half of simplier to implement, but it also makes sense from tracking point of view -- we could want to playback in both directions and removing frames from behind time cursor is not always a good idea. Anyway, smarter prefetching strategy could be developed later. Some implementation notes: - Added MEM_CacheLimiter_get_memory_in_use function to get memory usage of specified memory limiter. - Fixed prototype of MEM_CacheLimiter_get_maximum which was simply wrong (used wrong data type for output). - Added some utility functions to movie clip and movie cache for direct cache interaction and obtaining cache statistics. - Prefetching is implemented using general jobs system. which is invoking from clip draw function. - Prefetcing will stop as soon other job or playback starts. This is done from performance point of view. Jobs will likely require lots of CPU power and better to provide whole CPU to it. Playback is a bit more complicated case. For jpeg sequence playback prefetching while paying back is nice. But trying to prefetch heavy exr images and doing color space conversion slows down both playback and prefetching. TODO: - Think of better policy of dealing with already cached frames (like when cached frames from other clips prevents frames from current clip to be prefetched) - Currently a bit funky redraw notification happens from prefetch job. Perhaps own ND_ is better to have here. - Hiding clip while prefetch is active in theory shall stop prefetching job. - Having multiple clips opened on file load will prefetch frames for only one of them.
2013-03-07Change !BLI_ghashIterator_isDone to BLI_ghashIterator_notDone. It isAntony Riakiotakis
always used in that context so we can at least avoid reverting it twice :p.
2012-09-20Fix #32579: Sequencer crash when changing render dimensionsSergey Sharybin
Memory limitor's queue could be affected when it's being iterated on enforcing limits -- that's because iteration could free color managed image buffers. Fixed by getting least priority element after every element was freed. Could be optimized a bit, but it anyway shouldn't be so slow due to specific of cache limiting and limit enforcing finish condition.
2012-09-14Movie cache: made it thread safe to operate with memory limitorSergey Sharybin
Movie cache is using global memory limitor, which isn't thread safe in some of operations, so it required to add mutex around limitor operations in movie cache. It's probably could be solved in a way with less locks involved by using different limitor for different areas (like use own limitor for clips, own limitor for sequencer and so), but that wouldn't be so easy to control overall memory usage. -- svn merge -r50125:50126 ^/branches/soc-2011-tomato
2012-09-05fix for various redundant checks and possibly fix some crashes in rare ↵Campbell Barton
situations.
2012-08-08Movie cache: add function to iterate through cache and remove itemsSergey Sharybin
using custom check function for this. Currently unused, but would be helpful for sequencer cache.
2012-07-10Make grumpy gcc in "overwarning" mode happy again...Bastien Montagne
2012-07-10Improved cache management for movie clips from tomato branchSergey Sharybin
Replace pseudo-LRU approach of determining which buffer to remove when running out of space allowed for cache with approach which would remove the frame which is most far away from newly added frame. This is still a bit tricky because it's impossible to distinguish which frame to delete in situation of: CCCC...CC ^ it's either user wants to extend left segment of cached frames and buffers from right segment should be removed or he wants to join this two segments and in that case buffers from right segment should be removed. Would need a bit more investigation which situation is more common in general usecase. Additional changes: - Cleanup some memutil files (which are familiar to cache limiter) - Add option to make moviecache verbose. If DEBUG_MESSAGES is defined in moviecache.c detailed logs would be printed to the console. - Movie caches are now named which helps reading debug messages.
2012-05-18style cleanup: function definitionsCampbell Barton
2012-05-16style cleanup: imbufCampbell Barton
2012-05-04Style cleanup: spaces around operatorsSergey Sharybin
2012-03-26Style cleanup of movie cache moduleSergey Sharybin
2012-03-24style cleanup: follow style guide for/with/if spacingCampbell Barton
2012-03-24style cleanup: follow style guide for formatting of if/for/while loops, and ↵Campbell Barton
else if's
2012-03-02Code Cleanup: update to mempool, use flag rather then bool args.Campbell Barton
2012-01-31Cache limiter will now work properly with limits >= 4GbSergey Sharybin
2011-11-16merge mempool changes from bmesh (adds mempool iterator).Campbell Barton
2011-11-05misc doc editsCampbell Barton
- remove recently added sphinx reference workaround. - tested doxygen, correct some warnings, set tab width and added pymathutils group. - added convenience target 'make doc_doxy'
2011-11-03python string conversionCampbell Barton
- use _PyUnicode_AsStringAndSize where possible - use %R for PyErr_Format(...) rather then running repr on the object explicitly - use const char
2011-10-23remove $Id: tags after discussion on the mailign list: ↵Campbell Barton
http://markmail.org/message/fp7ozcywxum3ar7n