Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
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()
|
|
|
|
always used in that context so we can at least avoid reverting it twice
:p.
|
|
|
|
Gazzán and S. Lockal for spotting them!
|
|
autocomplete is now unicode aware, using python api's checks for now. eventually we should have our own.
|
|
|
|
|
|
style edits and typo corrections.
|
|
dialog.
|
|
|
|
clicking a pair chars would select 3 - one to the left).
|
|
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!
|
|
|
|
|
|
|
|
from Benjamin Tolputt (btolputt), (with minor changes)
adds support for LUA syntax highlighting.
|
|
|
|
fills in the line with a formatting value.
this fixes a mistake in OSL lexer which would comment all lines after '//'
|
|
CTRL+F in text editor now also works in the button region.
Added generic keymap for it, could get other shortcuts as well. Will leave it to the
maintainers :)
|
|
|
|
|
|
|
|
- make the popup box line up the X axis with the current word.
- add poll function for the operator
|
|
- This doesnt use python as 2.4x did, instead it just autocompletes based on the text files unique identifiers so its useful for any language.
- key is same as console (Ctrl+Space)
|
|
- draw function wasn't lining up correctly since DPI edits
- rename text_python.c to text_autocomplete.c
|
|
|
|
- dont set the color for each character, check if it changes from the previous one.
- dont memcpy text into a null terminated string to draw, instead rely on the length argument to BLF_draw().
|
|
* Add 3 simple templates:
** empty_shader.osl: A basic shader declaration to start with
** wireframe.osl: Simple wireframe shader
** noise.osl: Simple noise shader, with 3 noise types.
|
|
* Added the remaining shader types
* Some comment and link fixes.
|
|
in python.
|
|
|
|
comment for // in OSL)
|
|
asserts if the continuation values are wrong (which can happen with buffer overflows on formatting).
|
|
statement
|
|
active Text object
|
|
from Patrick Boelens (senshi). with modifications to split it into its own function.
also added C style multi-line comment support /* ... */
I've left out the part of this patch that sets the language in the space, since I think this might be better stored in the text block.
For now it simply uses OSL syntax highlighting when the extension is '.osl'.
|
|
decorators and decorators where being skipped.
|
|
|
|
STR_LITERAL_STARTSWITH() macro that gets the size from sizeof().
|
|
|
|
|
|
|
|
|
|
text_format_py.c
|
|
each has their own source file,
Since we will likely have OSL formatting added soon.
|