Age | Commit message (Collapse) | Author |
|
BKE_image was an ugly nest, could fix all but the ones from compositor,
so moved ugly G.main there, at least we know where the Evil is that way ;)
|
|
There is one legit place in the code where memcpy was used as an
optimization trick. Was needed for older version of GCC, but now
it should be re-evaluated and checked if it still helps to have
that trick.
In other places it's somewhat lazy programming to zero out all
object members. That is absolutely unsafe, at the moment when
less trivial class is used as a member in that object things
will break.
Other cases were using memcpy into an object which comes from
an external library. We don't control that object, and we can
not guarantee it will always be safe for such memory tricks
and debugging bugs caused by such low level access is far fun.
Ideally we need to use more proper C++, but needs to be done with
big care, including benchmarks of each change, For now do
annoying but simple cast to void*.
|
|
In C++ it is not really safe to memcpy objects, and newer GCC will warn
about this. However, we don't use our vector for unsafe-to-memcpy objects,
so just explicitly silence that warning.
|
|
This commit actually adds some G.main... but at much, much higher level
than the ones it removes, so should still be better ;)
|
|
|
|
|
|
It has behavior which we expect, and silences strict compiler warning.
|
|
thanx bblanimation (Christopher Gearhart) for spotting the issue and
providing the fix!
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D3449
|
|
Also style cleanup.
|
|
|
|
atoi usage in BLI_stringdec could overflow, use strtoll instead and
check
valid range with INT_MIN and INT_MAX
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D3452
|
|
use better poll and get ob with 'ED_object_active_context' (instead of
'CTX_data_active_object')
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D3467
|
|
Use to check click/drag,
fixes issue with mouse wheel triggering pie menu.
|
|
|
|
This was added as an experiment to extract information for docs
but this was never all that useful for its intended purpose.
|
|
|
|
|
|
|
|
|
|
|
|
Harmless since this is always enabled,
only do this for easier troubleshooting when disabling the define.
|
|
This means we can check keys such as tilde in a generic way.
|
|
fb1915d87090a - caused click/drag events not to be detected.
Now check a key is a mouse or keyboard event.
|
|
|
|
|
|
|
|
This still uses the correct string when typing text,
it just allows the key to be used in keymaps.
We should eventually add scan-code support.
|
|
|
|
Sometimes one needs a *lot* of changes for a single G.main... :/
|
|
|
|
Drag events finished drawing early.
|
|
|
|
|
|
Remove from blender/nodes, collada, blenfont & render.
|
|
|
|
|
|
All keyboard events were sending double key events (including modifiers)
when xinput was enabled with gnome (causing much confusion!).
I cant test if XIM works,
but this isn't useful to send double events, so disabling for now.
|
|
|
|
This allows for a single key to be mapped to both release and drag,
useful for pie menus to share a key with a different action.
|
|
|
|
|
|
Makes reasoning about events more predictable.
|
|
code.
From own previous G.main-busting commit.
|
|
|
|
|
|
Notes:
* Really need to address RNA setters case, end up adding way too much
G.main here these days... :/
* Added Main pointer into bAnimContext, helps a lot in anim code ;)
|
|
Not sure why exactly it is called a cleanup, the code was much more clear
and robust against possible missing return statements which are MANDATORY.
Missing return statement will:
- Cause two different BVH traversals to be run.
Not is happening currently, but if more BVH layouts are added, it will
become a problem.
- It is already causing assert() statements to fail, since functions are
no longer returning when they are supposed to.
If there is any measurable reason to keep this change, let me know.
Otherwise just stick to reliable/tested/robust code.
This reverts commit ba65f7093b39a8e5f1fb869cbc347fb810a05ab9.
|
|
|
|
Support only basic operations new/load/write & resize.
Add now so we can extend as needed & more easily accept patches.
|
|
|