Age | Commit message (Collapse) | Author |
|
Own mistake in recent fix for Text data-block usercount (rBa9163f7d2).
Reported by @sergey over IRC, thanks.
|
|
Reported on IRC by dfelinto, thanks.
Root of the issue was that opening a new text file would create
datablock with one user, when Text editor is actually a 'user one' user.
This was leaving Text datablocks in inconsitent user count, and
generating asserts in BKE_library area.
Also changed a weird piece of code related to that extra user thing in
main remapping func.
|
|
Was using a bunch of different spellings, mostly "data-block" though, so went with that one (would have been my #1 choice anyway ;) )
|
|
Idea is to replace hard-to-track (id->lib != NULL) 'is linked datablock' check everywhere in Blender
by a macro doing the same thing. This will allow to easily spot those checks in future, and more importantly,
to easily change it (see work done in asset-engine branch).
Note: did not touch to readfile.c, since there most of the time 'id->lib' check actually concerns the pointer,
and not a check whether ID is linked or not. Will have a closer look at it later.
Reviewers: campbellbarton, brecht, sergey
Differential Revision: https://developer.blender.org/D2082
|
|
BKE_libblock_... API.
|
|
Editing with spaces + auto-indent didn't delete indentation as expected.
|
|
|
|
Use BPY_execute_* prefix for all Python execution commands
|
|
happy).
|
|
Cleanup and rework a bit text_cursor_set_to_pos_wrapped(), it did not handle correctly negative y valuesi,
because it was only checking lines starting from first visible one.
Mostly, we now directly get line matching given y position (be it an invisible one) from the helper
(renamed `get_line_pos_wrapped()`), instead of first visible one, which allows us to get rid of
additional complexity of looping over next lines until we find correct one.
This code remains rather complex to follow, added some asserts to ensure everything works as expected,
and tested it rather seriously, but DO NOT backport this to 2.76!
|
|
non-ASCII strings.
Code was totally unaware of UTF8, also it was needlessly complicated...
|
|
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
|
|
- 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`.
|
|
Term pointer is overloaded already.
|
|
Our current keymap doesn't give us enough room to make such changes in
the event system. To fix small issues caused by this, we would need to do
drastic changes in Blender's keymaps and internal handling. It was worth
a try, but it didn't work.
I can write down a more descriptive statement in a few days, but for now
I need a break of this stuff.
|
|
|
|
Design task: T42339
Differential Revision: D840
Initial implementation proposal: T41867
Short description:
With this we can distinguish between holding and tabbing a key. Useful
is this if we want to assign to operators to a single shortcut. If two
operators are assigned to one shortcut, we call this a sticky key.
More info is accessible through the design task and the diff.
A few people that were involved with this:
* Sean Olson for stressing me with this burden ;) - It is his enthusiasm
that pushed me forward to get this done
* Campbell and Antony for the code and design review
* Ton for the design review
* All the other people that gave feedback on the patch and helped to
make this possible
A big "Thank You" for you all!
|
|
Makes usage of those funcs much more clear, we even had mixed '!strcmp(foo, bar)'
and 'strcmp(foo, bar) == 0' in several places...
|
|
|
|
|
|
|
|
Make the UI API more consistent and reduce confusion with some naming.
mainly:
- API function calls
- enum values
some internal static functions have been left for now
|
|
Use a timer to get predictable speed.
|
|
Operators that trigger UI events (but nothing else)
were using 'CANCELLED' making it impossible to tell if an invoke
function failed, or opened a menu.
|
|
Logic for load/reload was duplicated, Fix T28087 missed reload.
De-duplicate, also replace stat -> BLI_stat
|
|
|
|
Issue was caused by _wstat returning EOVERFLOW error because
of file size didn't fit into stat structure which was using
long datatype.
The idea of this patch is to use _wstat64 and _stat64 structure
which is capable storing 64bit file sizes.
Made it a typedef for stat structure used by BLI_stat function
in order to make code easier to follow and avoid ifdefs all
over the place.
Additionally solved issue with BLI_exists which was wrongly
returning False in cases destination file is larger then 4GB.
|
|
Opted to keep includes if they are used indirectly (even if removing is possible).
|
|
also fix bug where text saving would strip last newline
|
|
|
|
|
|
|
|
|
|
|
|
exposes many incorrect and redundant stubs
|
|
|
|
Previously this only worked for some datablocks relevant to rendering, now it
can be used to detect if any type of datablock was added or removed (but not
yet to detect if it was modified, we need many more depsgraph tags for that).
Most of the changes are some function parameter changes, the important parts
are the DAG_id_type_tag calls.
Reviewed By: sergey, brecht
Differential Revision: https://developer.blender.org/D195
|
|
|
|
The trackpad would give isolated mouse pan events with a distance smaller than
one line or character. For other 2D views this is all accumulated in floats,
but in the text editor it only keeps track of integers, and the small mouse pan
events got lost due to rounding.
Now it keeps track of sub-line or sub-character scroll offsets to avoid this.
|
|
OPERATOR_CANCELLED.
|
|
Seems no user counter tricks are needed from r23598.
Also, r33453 is obviously wrong, because new ID's user counter is 1,
and could not exceed this value.
|
|
update some descriptions, others were removed and operators tagged as internal.
add a script to detect duplicate operator descriptions.
|
|
When tabs to spaces is enabled and a paste command is undone, the improper number of characters could get removed. Also fixed issue with shift + left/right only selecting a max of 1 character.
|
|
jumps to either side of the selection previously the cursor would move and loose the selection too.
text button fields already did this.
|
|
which is needed after splitting).
|
|
(would flicker on scroll).
|
|
characters on Windows.
Replaced some uses of stat() by BLI_stat() to properly handle such filepaths.
|
|
An optional 'internal' argument was added to the bpy.data.texts.load() operator.
The changes in revision 57153 were reverted, so that the is_in_memory and is_dirty
properties of text datablocks are not editable again.
In the C API layer, BKE_text_load_ex() was introduced to allow for optionally
making text datablocks internal after loading.
|
|
|
|
for now just don't jump words when theres a selection.
|