Added a helper that ensures a bbox has some non-NULL dimension along all its axes.
Also, fixed some (rather unlikely) NULL dereference cases (though it should not in this context,
`BKE_object_boundbox_get()` can return NULL).
non-power-of-2 texture support. Note that all I did was pass
the correct width/height into glReadPixels; the result may not
be the same as if non2 textures were enabled.
Deviding two ints together never yields a float... Also, logic of various proxies size corrections was quite broken.
Now we should always get the same (relative) size of text whatever proxy setting/render scale is chosen.
from system/user bookmarks' name if possible.
Volume label on Windows was request from T46083, makes Blender more in line
with 'common' filebrowsing on this OS.
And now, we automatically set name of recent entries from the bookmarks, if path
can be found there, more consistent too from user PoV.
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?
Since Blender internal strings are UTF8, changed the initialization
of the string to use initWithUTF8String from default encoding.
Fix worked on OSX 10.5.5.
This is called when modifying an RNA property,
however it can be useful to be able to make a properties
update callback run without having to change it.
IMAGE_OT_save_as assumes that active area is an Image Editor and the logic that should return to image editor after saving didn't run after fullscreen was manually exited.
Note that allocating DM arrays from an editmesh is currently not threadsafe,
however even if were resolved, its more efficient to avoid having to do it in the first place.
We were still using main borwser's FileDirEntryArr to own memory of entries currently in cache.
That was OK for common caching operation, but if was not released when clearing cache!
Nothing dramatic, since that was cleared too, but less often, so e.g. by changing sorting
options you could pile up more and more no-more-used entries there...
Anyway, there is no reason to do that, much more sound and clean to keep everything
cache-related in dedicated FileDirEntryCache struct.
This means main borwser's FileDirEntryArr is now always expected to not store any actual entry!
Note: this can probably be cleaned up a bit more, but would wait after 2.76 for this!
This was introduced in the fix for T44336 .
The code is now what it should have been in the first place at the time
of multiview commit.
ImageUser->passtype is being removed in favour of bringing
ImageUser->pass back.
Reviewers: sergey
Differential Revision: https://developer.blender.org/D1504
To reproduce the crash:
* Add some shapekeys to default cube.
* Add at least on driver (can be default empty one) to a shapekey value.
* **Make this driver visible in Outliner**.
* Delete all shapekeys.
* Undo.
* Crash.
Root of the issue is outliner reading code in `blo_lib_link_screen_restore()`,
which would try to `restore_pointer_by_name()` for all `TreeStoreElement->id` pointers.
Thing is, those id pointers are not always IDs, they can be animdata, sequence, RNA struct/property...
That's really not so great design, but also has reasons like size of the struct, we have to live with it.
So now:
* TreeStoreElement->type defines are braught back into DNA.
* There we also define a `TSE_IS_REAL_ID` macro to check whether a given TreeStoreElement actually stores an ID pointer or not.
* And in Outliner read code we only try to retore pointers by name for actual ID ones, and set the others to default NULL value.
Also, added clear comment to TSE types that do not store a real ID pointer!