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-15Cleanup: remove undoing access, minor formattingCampbell Barton
Access to undoing state isn't needed, some text insert code was overly compacted.
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-24Cleanup: move undo opcodes out of public headerCampbell Barton
2017-08-07Refactor ID copying (and to some extent, ID freeing).Bastien Montagne
This will allow much finer controll over how we copy data-blocks, from full copy in Main database, to "lighter" ones (out of Main, inside an already allocated datablock, etc.). This commit also transfers a llot of what was previously handled by per-ID-type custom code to generic ID handling code in BKE_library. Hopefully will avoid in future inconsistencies and missing bits we had all over the codebase in the past. It also adds missing copying handling for a few types, most notably Scene (which where using a fully customized handling previously). Note that the type of allocation used during copying (regular in Main, allocated but outside of Main, or not allocated by ID handling code at all) is stored in ID's, which allows to handle them correctly when freeing. This needs to be taken care of with caution when doing 'weird' unusual things with ID copying and/or allocation! As a final note, while rather noisy, this commit will hopefully not break too much existing branches, old 'API' has been kept for the main part, as a wrapper around new code. Cleaning it up will happen later. Design task : T51804 Phab Diff: D2714
2017-06-14Make whole ID copying code use const source pointer.Bastien Montagne
Noisy change, but safe, and better do it sooner than later if we are to rework copying code. Also, previous commit shows this *is* useful to catch some mistakes.
2016-07-21Fix missing datablocks types in id_make_local.Bastien Montagne
Adding make_local for vfont/gpencil/group/freestyle linestyle/mask/scene/sound/text. Note that there are still some lose ends here, since some type are not handled by id_copy (Scene, Sound and VFont), which means in case a datablock of that type is used both directly and indirectly, localization will fail. Scene copying might be doable though (maybe with a simple new 'full shalow' mode to existing BKE_scene_copy?), not sure about sounds and vfonts... Situations where this becomes an issue should be very rare corner cases anyway.
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.
2015-12-14BLI_storage: util function BLI_file_read_as_memCampbell Barton
Use for text loading and pasting from file.
2015-10-20First step to handle missing libs/datablocks when reading a file.Bastien Montagne
Idea is, instead of ignoring completely missing linked datablocks, to create void placeholders for them. That way, you can work on your file, save it, and find again your missing data once lib becomes available again. Or you can edit missing lib's path (in Outliner), save and reload the file, and you are done. Also, Outliner now shows broken libraries (and placeholders) with a 'broken lib' icon. Future plans are also to be able to relocate missing libs and reload them at runtime. Code notes: - Placeholder ID is just a regular datablock of same type as expected linked one, with 'default' data, and a LIB_MISSING bitflag set. - To allow creation of such datablocks, creation of datablocks in BKE was split in two step: + Allocation of memory itself. + Setting of all internal data to default values. See also the design task (T43351). Reviewed by @campbellbarton, thanks a bunch! Differential Revision: https://developer.blender.org/D1394
2015-06-05Check ftell return valuesCampbell Barton
2015-03-28Cleanup: redundant struct declarationsCampbell Barton
2015-01-08Fix T43159: Copying of linked datablocks using relpath leads to invalid ↵Bastien Montagne
paths in new copies. Simply have to rebase onto main filepath when copying, if source datablock is lib and path is relative. Afaict, only affected Image and Text datablocks. MovieClip would also be a candidate, but has no copy implemented currently.
2014-08-29Fix Text editor home/end keys when theres a selectionCampbell Barton
2014-04-01Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT defineCampbell Barton
2014-02-03Code cleanup: use bools where possibleCampbell Barton
2014-01-27Use includes for blenderplayer stubsCampbell Barton
exposes many incorrect and redundant stubs
2014-01-04UI: Use bool rather then int/short's where possibleCampbell Barton
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-07-21code cleanup: de-duplicate BLI_ghashIterator_new/init and disable unused ↵Campbell Barton
text undo print function.
2013-06-02Better API design for making text datablocks after loading.Tamito Kajiyama
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.
2013-05-01holding ctrl when using arrow keys in the text editor didn't navigate newlines.Campbell Barton
2013-03-14style cleanup: odd indentationCampbell Barton
2013-03-12Patch [#34373] Use i18n monospace font in Text editor and Python consoleIrie Shinsuke
This patch allows Blender to display i18n monospace font in the text editor and the Python interactive console. Wide characters that occupy multiple columns such as CJK characters can be displayed correctly. Furthermore, wrapping, selection, suggestion, cursor drawing, and syntax highlighting should work. Also fixes a bug [#34543]: In Text Editor false color in comment on cyrillic To estimate how many columns each character occupies, this patch uses wcwidth.c written by Markus Kuhn and distributed under MIT-style license: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c wcwidth.c is stored in extern/wcwidth and used as a static library. This patch adds new API to blenfont, blenlib and blenkernel: BLF_get_unifont_mono() BLF_free_unifont_mono() BLF_draw_mono() BLI_wcwidth() BLI_wcswidth() BLI_str_utf8_char_width() BLI_str_utf8_char_width_safe() txt_utf8_offset_to_column() txt_utf8_column_to_offset()
2013-02-19fix [#34275] Text autocomplete cuts words with accents or special charactersCampbell Barton
autocomplete is now unicode aware, using python api's checks for now. eventually we should have our own.
2013-02-14fix for double clicking in the text editor not working usefully (double ↵Campbell Barton
clicking a pair chars would select 3 - one to the left).
2013-02-05Fix #34040: Moving Normal Node with enabled Cycles Material Preview crashesSergey Sharybin
Issue was caused by couple of circumstances: - Normal Map node requires tesselated faces to compute tangent space - All temporary meshes needed for Cycles export were adding to G.main - Undo pushes would temporary set meshes tessfaces to NULL - Moving node will cause undo push and tree re-evaluate fr preview All this leads to threading conflict between preview render and undo system. Solved it in way that all temporary meshes are adding to that exact Main which was passed to Cycles via BlendData. This required couple of mechanic changes like adding extra parameter to *_add() functions and adding some *_ex() functions to make it possible RNA adds objects to Main passed to new() RNA function. This was tricky to pass Main to RNA function and IMO that's not so nice to pass main to function, so ended up with such decision: - Object.to_mesh() will add temp mesh to G.main - Added Main.meshes.new_from_object() which does the same as to_mesh, but adds temporary mesh to specified Main. So now all temporary meshes needed for preview render would be added to preview_main which does not conflict with undo pushes. Viewport render shall not be an issue because object sync happens from main thread in this case. It could be some issues with final render, but that's not so much likely to happen, so shall be fine. Thanks to Brecht for review!
2013-01-16dont add identifiers starting with digits to autocompleteCampbell Barton
2012-12-31text autocompleteCampbell Barton
- make the popup box line up the X axis with the current word. - add poll function for the operator
2012-11-23Text Editor: remove text marker functionality. Patch [#33251]Justin Dailey
2012-11-15Patch [#31006] Text editor undo buffer rework.Justin Dailey
2012-05-05code cleanup: BKE_ naming, also make bpy.data.images.load() always load a ↵Campbell Barton
new image. (not use existing one)
2012-05-05code cleanup: function naming, use BKE_*type* prefix.Campbell Barton
2012-05-04make text move up/down into a single operator with a direction propertyCampbell Barton
2012-05-04Patch [#30654] Wiki Quick Hack: Text editor move lines up/downJoshua Leung
Submitted by: Justin Dailey (dail) Patch allows the current line (or selected lines) to be moved up and down with Ctrl+Shift+Up and Ctrl+Shift+Down. Has undo/redo support and operators in python menu.
2012-04-29patch [#30821] Wiki Quick Hack: Text editor duplicate lineCampbell Barton
from Justin Dailey (dail) made this Ctrl+D, to replace Delete.
2012-04-06update python keywords (remove exec, print, add nonlocal)Campbell Barton
2012-02-29Code Cleanup: remove non existing function declarations.Campbell Barton
added some missing functions too - which are not used yep but should be there for api completeness. * CDDM_set_mloop * CDDM_set_mpoly * BLI_mempool_count
2012-02-17unify include guard defines, __$FILENAME__Campbell Barton
without the underscores these clogged up the namespace for autocompleation which was annoying.
2012-01-17Whitespace tabs vs. spaces consistency changesSergey Sharybin
2012-01-16patch [#29859] UTF-8 support for text editor.Sv. Lockal
This also fixes cursor movement in the beginning of line and adds do_versions block for converting text files with old extended ascii encoding into UTF-8.
2011-11-05use (const char*) rather than (char*) where possible.Campbell Barton
also removed some unused function definitons.
2011-10-23remove $Id: tags after discussion on the mailign list: ↵Campbell Barton
http://markmail.org/message/fp7ozcywxum3ar7n
2011-05-23fix own mistake [#27451] Flip to Top / Flip to Bottom menuitems on right ↵Campbell Barton
click on header not working also get rig of more shadowed vars (-Wshadow).
2011-05-07Fix #27319: Text editor "Find" does not locate words.Sergey Sharybin
Added new option to find panel of space text which toggles case-esensitive search. Additional changes: - Send NC_TEXT|NA_EDITED when removing markers in find_and_replace modifier this prevents "sticked" markers which disappears on first redraw when search text wasn't found - Do not show "Text wasn't found" error when text to be searched is contained in the end of buffer and it's selected. Replacing/marking used to happen, but this popup message was really annoying for this case. TODO: It's incorrect to use UI_GetThemeColor4ubv from this operator
2011-04-20Fix #27014: ctrl-A, ctrl-C, ctrl-V breaks formatting of scriptSergey Sharybin
This bug was caused by tabs->spaces conversion. Change pate-ing logic to paste buffer AS-IS (without any conversions). This commit also fixes undo-ing block deletion which contains tabs when "Tabs as spaces" is toggled on. Also, markes shouldn't be moved after pasteing new buffer.
2011-02-18doxygen: blenkernel under core as module.Nathan Letwory
2010-12-20fix [#25283] Edge length display difficult to readCampbell Barton
- made theme colors for mesh edge len & face angle/area display. - use %g rather then %f for float display, trims unneeded zeros. - store cached 2d and 3d text color as bytes rather then floats, compare when drawing to avoid setting the context. - use unsigned char for more color functions, avoids casting to glColorubv().
2010-11-17use 'const char *' by default with RNA functions except when the value is ↵Campbell Barton
flagged as PROP_THICK_WRAP. Also use const char in many other parts of blenders code. Currently this gives warnings for setting operator id, label and description since these are an exception and allocated beforehand.
2010-07-30patch [#23088] 2.5 Text Editor: Preserve indentation with spacesCampbell Barton
from Fabian Fricke (frigi)