1d067868c0
UI: tweak drawing of header status text for transparent headers.
2018-08-15 16:00:40 +02:00
5513da65b2
Cleanup: trailing space for BLI
2018-06-17 16:32:54 +02:00
75fc1c3507
Cleanup: trailing whitespace (comment blocks)
...
Strip unindented comment blocks - mainly headers to avoid conflicts.
2018-06-01 18:19:39 +02:00
12a9e9ae33
Fix restrict error in BLI_str_format_byte_unit
...
Don't use sprintf to append a string to it's self.
Also correct BLI_str_rstrip_float_zero's return value.
2018-05-27 10:28:04 +02:00
4dee702332
Add number and memory size formatting throughout the UI
...
This commit adds number formatting (thousands separator) to the baking panel. It also adds a new function to format memory sizes (KB/GB/etc) and applies it to the baking panel and scene stats. The new function is unit tested.
Reviewers: Severin
Tags: #user_interface
Differential Revision: https://developer.blender.org/D1248
2018-05-25 22:41:49 +02:00
7cc2b27099
Cleanup: stray tabs
...
Tabs in middle of code (mostly for no reason / by accident).
2018-03-23 11:51:19 +01:00
bf8f5f5142
Cleanup: doxygen comments
2018-03-14 02:08:07 +11:00
81e584ed17
CMake: Use GCC7's -Wimplicit-fallthrough=5
...
Use to avoid accidental missing break statements,
use ATTR_FALLTHROUGH to suppress.
2017-05-20 14:01:03 +10:00
70fcecc1f7
Fix BLI_strncasestr use with a single character
2016-03-24 23:30:51 +11:00
80a7efdc1d
UI: multi word filtering in search menu
...
D1080 by @rockets, with own improvements to tests
2016-03-23 18:51:29 +11:00
2cbf32e0fb
Cleanup: double promotion
...
Also remove null checks from args with non-null attribute.
2016-02-10 15:27:28 +11:00
32be51dc66
Cleanup: warnings (msvc)
...
Part of patch D1670 by @LazyDodo
2015-12-21 13:02:38 +11:00
09e40a4956
Cleanup: spelling
2015-09-14 02:22:22 +10:00
4f61de6588
Fix T45884: Crash copying keyframes
...
BLI_str_quoted_substrN could crash if the prefix wasn't found
2015-08-24 09:29:00 +10:00
b7c42ef93e
Cleanup: use ascii as suffix (as with utf8)
2015-07-14 09:17:00 +10:00
d59721e47a
Cleanup: move BLI_char_switch into BLI_string
2015-06-30 15:18:03 +10:00
d17cb3f75f
Cleanup: use BLI_str prefix for BLI_replacestrN
2015-06-30 14:50:34 +10:00
8bef305b6d
Cleanup: move BLI_timestr to BLI_timecode
2015-06-30 14:47:31 +10:00
e170d6be7f
Cleanup: all params of BLI_str partition funcs can be const...
2015-06-27 11:00:47 +02:00
4d043c99dc
Extend BLI_str_partition_ex: add possibility to define a right limit to the string.
...
Now you can define `end` pointer as right limit of the string (allows to easily search
in substring, especially useful when searching from right).
2015-06-27 10:24:54 +02:00
bf69453ae7
BLI_string: add BLI_snprintf_rlen
...
use when the length of the destination string is needed.
2015-04-22 05:37:22 +10:00
5357474ad8
Fix building with very strict flags, use size_t rather than int for string length.
...
Reported on bf-committers.
2015-01-10 19:15:49 +01:00
9590e77a59
cleanup: style & warnings
2015-01-10 12:40:09 +11:00
ac619aaf38
BLI_string: BLI_str_ends_with -> BLI_str_endswith
...
Loosely following Python str convention.
2015-01-09 23:47:17 +11:00
2f16098d20
Gooseberry animation request: Paste flipped pose in action
...
and graph editor.
This was a tricky commit that was not so straightforward to make work.
The information for bones is not easy to come by in the animation curves,
however we do have some string manipulation tricks to make it happen.
Testing in gooseberry worked for the rigs there, commiting to master now
2015-01-09 12:16:58 +01:00
16ed20ff3c
Add some BLI helpers needed by asset branch.
...
`BLI_strncpy_ensure_pad()` is also useful with current master code.
The two others (`BLI_strcmp_ignore_pad()` and `BLI_filelist_duplicate()`)
are only used in asset branch currently, but think they could be useful
in other places too, and simplifies handling of asset branch & future patch review.
Reviewers: campbellbarton
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D965
2015-01-03 10:13:44 +01:00
0d1484e4ad
Make function definition consistent with function declaration (as discussed with campbell)
2014-08-01 14:32:04 +02:00
4cc93123c8
Add thousands separators to scene stats (D646)
...
by januz with own modifications
2014-07-17 14:54:12 +10:00
ea1f1fe0c2
BLI_string, dont pass unicode to ascii BLI_str_partition functions
2014-07-08 06:06:34 +10:00
e3c8cf0a9e
Add (r)partition funcs to BLI_string, to get left-most/right-most first occurence of delimiters.
...
Inspired by Python (r)partition str functions. Also added some Gtest cases for those new funcs.
Reviewed by Campbell Barton, many thanks!
2014-07-04 14:14:06 +02:00
ab5f4c4dfa
BLI: Add two helpers to search a given string in an array of strings.
2014-06-17 15:58:07 +02:00
341fd67fbf
Add string escaping support for BLI_str_quoted_substrN
2014-06-14 00:47:12 +10:00
483d8da9bc
Code cleanup: use 'const' for arrays (blenlib)
2014-04-27 00:25:15 +10:00
dcba34b411
Fix T38303: same names with different case sorted unpredictable in the file browser.
...
The string comparison was in lower case, so the same strings with different case
were considered the same which can make qsort give different results on each
sort since it's not a stable sort. Now take case into account in comparison.
2014-01-21 14:59:12 +01:00
af93ebcb50
Code Cleanup: style and redundant casts
2014-01-16 19:15:53 +11:00
7f4533fa49
String API: BLI_ascii_strtolower/upper now check NULL terminator
...
This wasn't needed before now, but since recent change to bUnit_ReplaceString,
it uses in a context where NULL terminator is expected - best add.
(spotted by Sergey)
2013-12-25 01:20:46 +11:00
c4a50e9aeb
remove unneeded NULL checks, add one for give_matarar() return value.
2013-07-28 06:37:58 +00:00
6aa001f48d
code cleanup: remove redundant NULL checks and avoid writing to the source string.
...
also rename BLI_replacestr() -> BLI_replacestrN() since it returns an allocated buffer.
2013-07-27 14:05:59 +00:00
3ff3d1bc0f
replace use of strcat() where the string offset is known.
...
also correct bad logic with converting a textblock to 3d-text, bytes-vs-number of chars wasn't handled right.
2013-07-23 12:49:30 +00:00
7db1d6556d
code cleanup: add break statements in switch ()'s, (even at the last case).
2013-07-21 08:16:37 +00:00
02f5b0fc08
debug option (off by default), for BLI_string to help find incorrect sizes being passed in (enable in source files only)
2013-07-15 03:54:57 +00:00
2df82a2a2b
Code cleanup: fix some vs2012 compiler warnings
2013-06-21 12:33:19 +00:00
c9341334b1
add BLI_strcpy_rlen, replace strcat, which was used in misleading way.
2013-06-16 08:29:02 +00:00
0d36225dd1
quiet sign conversion warnings and reduce sign conversion for BLI_string, and BLF.
2013-05-12 06:33:21 +00:00
65ed588c8b
Fix #35270 : files with numbers higher than 2147483648 or with different numbers
...
of leading zeros but otherwise the same would show in random order in the file
browser. Selecting an item would change the order of all the items.
Problem was that it was comparing by parsing the number into an int, which has
only limited precision and does not care about the number of leading zeros. Now
do the comparison directly on the string.
2013-05-10 14:52:23 +00:00
c97983c9de
correction for uv template, also some doxygen comment corrections.
2013-05-05 18:41:45 +00:00
1777a69818
misc minor edits.
...
- pass string size to BLI_timestr() to avoid possible buffer overrun.
- quiet warning for mingw.
- include guards for windows utf conversion funcs.
- fix for mistage in edge-angle-selection check.
- some style cleanup.
2013-03-29 06:25:22 +00:00
9e2db2dad4
revert own change: don't use memchr for strnlen, causes problems when the len is longer then the string data, instead use strnlen from freebsd.
...
also simplify empty string checks in logic_ops.c
2013-03-16 18:52:09 +00:00
0159647ada
add BLI_strncpy_rlen(), a clone of BLI_strncpy() that returns the number of bytes copied.
...
also move doxy comments for BLI_string.h into the C file.
2013-03-14 10:07:05 +00:00
4dcd4e1a28
minor change to BLI_strncpy(). replace strlen() with BLI_strnlen().
2013-03-14 09:49:20 +00:00