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
2018-04-05Undo: split text undo steps out of the data-blockCampbell Barton
This moves undo storage into a separate struct which is passed in from the undo system.
2018-03-31Undo: unified undo system w/ linear historyCampbell Barton
- Use a single undo history for all operations. - UndoType's are registered and poll the context to check if they should be used when performing an undo push. - Mode switching is used to ensure the state is correct before undo data is restored. - Some undo types accumulate changes (image & text editing) others store the state multiple times (with de-duplication). This is supported by checking UndoStack.mode `ACCUMULATE` / `STORE`. - Each undo step stores ID datablocks they use with utilities to help manage restoring correct ID's. Needed since global undo is now mixed with other modes undo. - Currently performs each undo step when going up/down history Previously this wasn't done, making history fail in some cases. This can be optimized to skip some combinations of undo steps. grease-pencil is an exception which has not been updated since it integrates undo into the draw-session. See D3113
2018-03-25Text: line break always returned cancelledCampbell Barton
Harmless but incorrect.
2017-11-06Rename ID_IS_LINKED_DATABLOCK to ID_IS_LINKED.Bastien Montagne
This makes code closer to id_override/assent-engine ones, which introduce a new type of linked data, and hence reserve ID_IS_LINKED_DATABLOCK to real linked datablocks.
2017-10-18Cleanup: Use const for RNA EnumPropertyItem argsCampbell Barton
Practically all access to enum data is read-only.
2017-01-13Fix missing user when opening text from ID UI widget.Bastien Montagne
Own mistake in recent fix for Text data-block usercount (rBa9163f7d2). Reported by @sergey over IRC, thanks.
2017-01-04Fix (IRC reported) bad handling of Text data-block user count.Bastien Montagne
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.
2016-09-19UI Messages: Consistent spelling of term "data-block"Julian Eisel
Was using a bunch of different spellings, mostly "data-block" though, so went with that one (would have been my #1 choice anyway ;) )
2016-07-06Replace of (id->lib != NULL) check by meaningful macro.Bastien Montagne
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
2016-06-25Cleanup: get rid of BKE_text_unlink(), replace by usage of generic ↵Bastien Montagne
BKE_libblock_... API.
2016-03-10Text Editor: Auto indent for backspace/deleteCampbell Barton
Editing with spaces + auto-indent didn't delete indentation as expected.
2016-02-07Cleanup: line widthCampbell Barton
2015-12-31Cleanup: Py API namingCampbell Barton
Use BPY_execute_* prefix for all Python execution commands
2015-10-04Clenup: Text Editor: Fix inconsistencies in textline handling (makes coverty ↵Bastien Montagne
happy).
2015-10-01Fix T46340: Auto scrolling in text editor with upward selection not work.Bastien Montagne
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!
2015-09-28Fix T46293: Text Editor: Convert to spaces/to tabs was totally broken with ↵Bastien Montagne
non-ASCII strings. Code was totally unaware of UTF8, also it was needlessly complicated...
2015-08-23This commit makes it possible to select the sort mode whenever we invoke an ↵Thomas Beck
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
2015-08-18Refactor translation code out of blenfontCampbell Barton
- 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`.
2015-04-27Cleanup: rename GRAB_POINTER -> GRAB_CURSORCampbell Barton
Term pointer is overloaded already.
2015-04-07Revert Sticky Keys (and everything related to that)Julian Eisel
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.
2015-04-04Add missing break statementsCampbell Barton
2015-04-03Sticky Keys backendJulian Eisel
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!
2015-01-26Cleanup: strcmp/strncmp -> STREQ/STREQLEN (in boolean usage).Bastien Montagne
Makes usage of those funcs much more clear, we even had mixed '!strcmp(foo, bar)' and 'strcmp(foo, bar) == 0' in several places...
2015-01-24Cleanup: styleCampbell Barton
2015-01-07cleanup: de-duplicate codeCampbell Barton
2015-01-04FileBrowser: Cleanup: rename some (really ugly) enum names.Bastien Montagne
2014-11-11UI Refactor T41640Campbell Barton
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
2014-11-10Fix T39144: text-select scrolling too fastCampbell Barton
Use a timer to get predictable speed.
2014-10-28Fix T41041: 'Delete keyframe' removes markers tooCampbell Barton
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.
2014-09-17Text Editor: reload missed adding new-lineCampbell Barton
Logic for load/reload was duplicated, Fix T28087 missed reload. De-duplicate, also replace stat -> BLI_stat
2014-08-29Fix Text editor home/end keys when theres a selectionCampbell Barton
2014-05-28Fix T40157: Loading movies larger than 4GB in size failsSergey Sharybin
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.
2014-04-30Code cleanup: remove unused includesCampbell Barton
Opted to keep includes if they are used indirectly (even if removing is possible).
2014-04-30Report when saving images and textCampbell Barton
also fix bug where text saving would strip last newline
2014-04-26Code cleanup: use 'const' for arrays (editors)Campbell Barton
2014-04-11Code cleanup: use boolCampbell Barton
2014-04-01Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT defineCampbell Barton
2014-02-03Code cleanup: use bools where possibleCampbell Barton
2014-01-27Code cleanup: use booleans where appropriateCampbell Barton
2014-01-27Use includes for blenderplayer stubsCampbell Barton
exposes many incorrect and redundant stubs
2014-01-16Code Cleanup: no need to pass empty strings as default valuesCampbell Barton
2014-01-15Python/Depsgraph: bpy.data.*.is_updated now detects add/remove of any datablock.Tom Edwards
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
2014-01-08Code Cleanup: de-duplicate text pasting which only used the first lineCampbell Barton
2013-12-13Fix T37572: text editor scrolling not working well with Mac trackpad panning.Brecht Van Lommel
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.
2013-10-31remove return argument from wmOperatorType->cancel, was only ever returning ↵Campbell Barton
OPERATOR_CANCELLED.
2013-10-17Fix #37122: Text Editor: New Open-Shortcut different from Text > Open Text BlockSergey Sharybin
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.
2013-09-30lots of operator descriptions were incorrectly copy/pasted.Campbell Barton
update some descriptions, others were removed and operators tagged as internal. add a script to detect duplicate operator descriptions.
2013-09-06fix [#36656] text editor undo error when undoing paste commandJustin Dailey
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.
2013-09-02text editor cursor motion (left/right arrows) with selected text typically ↵Campbell Barton
jumps to either side of the selection previously the cursor would move and loose the selection too. text button fields already did this.
2013-08-29correct own error r59619 (changes made to patch, adding handle recalculation ↵Campbell Barton
which is needed after splitting).