Age | Commit message (Collapse) | Author |
|
Useful for Python scripts, which could duplicate but not close windows.
|
|
Also make enum identifiers less cryptic.
|
|
Paths >128 chars could crash.
Replace BLI_newname with direct BLI_stringenc/dec use which makes more sense in this case.
|
|
linking API funcs would use 'name, idcode', when all other code here uses
(more sensible) 'idcode, name'.
Also, use 'name' arg name when we expect a bare name, without the prepended ID code, and
'idname' arg name when we expect a complete ID name.
And here too, idcode shall be short, not int!
|
|
Was never freeing filenames or pictures.
|
|
|
|
|
|
OpenGL sequencer render now uses a single fbo for all rendering.
|
|
|
|
|
|
New code loops much less, does re-open & close .blend files for each data type,
and is much much more flexible - it is also ready for id-remap & co work being done in branches.
Main idea is to store libraries & datablocks to link in a dedicated struct, in a way
that avoids too much looping, and also allows to search for a single datablock in several libraries.
Here again, no change is expected in current behavior of link/append tool, please report
if anything goes different!
|
|
This commits does mostly two things:
* Get rid of bContext parameter: I can see no real good reason to pass such a high-level data
to such low-level code... It also makes it more difficult to call when you do not have
a context available.
* Cleanup the instantiating part.
Last point is the most risky - previous code was sometimes quite confusing and hard to follow,
from tests nothing behaves differently in new code, but some hidden corner case may show up.
Anyway, no change in behavior is expected from this commit, if it happens please file a bugreport!
|
|
but only linking of datablocks!
|
|
Add 'Seed' option for all random select operators
D1508 by @mba105, w/ edits
|
|
WM_file_read must support background mode already
since it can be called by Python scripts in background mode.
|
|
Was setting the path to a directory when no file was given -
then checking its a loadable file.
|
|
|
|
Report an error instead of crashing if a new window can't be created
(typically caused by bad drivers).
|
|
|
|
We need custom context here, those are often very short names so context collision is pretty easy.
Also some minor changes (and avoid shadowing varnames)...
|
|
Calling event handling recursively during window live resize is problematic,
the code wasn't designed to do that. Instead postpone event handling until
after live resize.
|
|
On the very first start, reporting of missing engines wasn't working.
|
|
Reports are now initialized before reading startup.blend
|
|
Re-enable old code, now show in header instead of popup.
|
|
|
|
Match regular file loading logic for new-file operator.
|
|
|
|
|
|
|
|
|
|
Due to how we find kmi to remove and kmi to add when patching final keymap with user defines,
we could actually end up with same kmi for both, see comments in code for details.
Note that it may be a good idea to make user-defined customizations specific to a given base keymap,
instead of applying them blindly?
|
|
Did a fullscreen check in a function that should only be called in fullscreen mode. Not a big deal, but bad API practice.
|
|
|
|
|
|
We had too many warnings lately... was awaiting that someone would kill them - didn't happen -> goes to my commit ratio! :P
|
|
Also modify a copy of argv
|
|
Issues re-initializing audaspace
|
|
|
|
them when reading in background mode.
Primary goal of this commit is to fix an annoying issue - when processing and saving .blend
files in background mode you lose their thumbnails, since it can only be generated with
an OpenGL context.
Solution to that is to read .blend thumbnail while reading .blend file (only done in background
mode currently), and store it in Main struct.
Also, this lead to removing .blend file reading code from thumb_blend (no need to have doublons).
We now have a small interface in regular reading code area, which keeps it reasonbaly light
by only reading/parsing header info, and first few BHead blocks.
This makes code reading .blend thumbnail about 3 to 4 times slower than previous highly specialized
one in blend_thumb.c, but overall thumbnail generation of a big .blend files folder only grows
of about 1%, think we can bare with it.
Finally, since thumbnail is now optionally stored in Main struct, it makes it easy to allow user
to define their own custom one (instead of auto-generated one). RNA API for this was not added though,
accessing that kind of .blend meta-data has to be rethought a bit on a bigger level first.
Reviewers: sergey, campbellbarton
Subscribers: Severin, psy-fi
Differential Revision: https://developer.blender.org/D1469
|
|
Issue was caused by blender internal accessing data from DNA during rendering.
There's no simple solution to make stuff thread safe, so for now simply restart
rendering on frame update.
|
|
|
|
operator.
It's needed especially for the menu entry "recover auto save" where you'd like to have the files sorted by date most of the time but it could be useful in other places too.
There should be no functional change in other areas, I just added the missing parameter (FILE_SORT_ALPHA).
Was a request from @sebastian_k at #BCon13, so at least one guy needs it ;)
Reviewers: mont29
Reviewed By: mont29
Subscribers: sebastian_k
Differential Revision: https://developer.blender.org/D1476
|
|
It basically rewrites most of filelist.c, with some more limited changes in other areas of filebrowser.
From user perspective, it:
* Removes some info in 'long' drawing mode (owner, permissions) - OS-specific data that do not really matter in Blender!
* Makes short/long display 'fixed' size (among four choices, like thumbnails mode).
* Allows to list several layers of dirtree at once, in a flat way (inside .blend files and/or real directories).
* Consequently, adds datablocks types filtering.
* Uses way less RAM when listing big directories, especially in thumbnail mode (we are talking of several hundred of MiB spared).
* Generates thumbnails way faster.
From code perspective, it:
* Is ready for asset engine needs (on data structure level in filebrowser's listing).
* Simplifies and makes 'generic' file listing much lighter.
* Separates file listing in three different aspects:
** 'generic' filelisting (in BLI), which becomes a shallow wrapper around stat struct.
** 'filebrowser drawing' filelisting, which only contains current visible subset of the whole list (sliding window), with extra drawing data (strings for size, date/time, preview, etc.).
** 'asset-ready' filelisting, which is used for operations common to 'basic' filehandling and future asset-related one.
* Uses uuid's to handle file selection/state in the browser, instead of using flags in filelisting items.
* Uses much lighter BLI_task handling for previews, instead of heavy 'job' system (using the new 'notifier' timer to handle UI refresh, in similar way to jobs).
* Moves .blend datablocks preview handling to IMB_thumbnail (necessary to avoid storing all datablock previews at once, and gives better consistency and performances too).
Revision: https://developer.blender.org/D1316
Thanks to Campbell & Sergey for the reviews. :)
|
|
|
|
This new func will be fully used by upcomming code (it mostly adds
the extraction of library item name as well as library file and ID group).
|
|
- Add blentranslation `BLT_*` module.
- moved & split `BLF_translation.h` into (`BLT_translation.h`, `BLT_lang.h`).
- moved `BLF_*_unifont` functions from `blf_translation.c` to new source file `blf_font_i18n.c`.
|
|
This basically does the 'timer' part of Jobs system: it sends a given notifier on every timer step.
This is needed for background tasks (not full-fledged jobs, lighter BLI_tasks based) that want to update UI
(like for up-comming new thumbnail handling in filebrowser).
|
|
Not much to add, you can now clear previews from current .blend file, or a set of non-opened files.
Likewise, you can generate previews (for mat/tex, objects, groups, scenes, ...).
|
|
Refactor recent-file.txt handling, split into smaller functions.
It wasn't possible to write the current state to disk (depended on current context).
|
|
|