Commit Graph

90 Commits

Author SHA1 Message Date
030ae5cadf Quiet warnings 2014-04-25 03:21:13 +10:00
258a9b5fc1 Fix T39867: Hotkey is not displayed in the node editor's menu.
Making both keymap and menu values the same, and adding a (debug only) check in
IDP_EqualsProperties_ex() warning when comparing two floats with nearly the same value.
2014-04-24 16:48:43 +02:00
617557b08e Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define 2014-04-01 15:22:28 +11:00
77a15aba38 IDProp API: change IDP_NewString so sizeof() can be passed in. 2014-02-15 12:31:58 +11:00
2195dd32cc Fix T37595: Switching modal transform broke with trackball rotation.
Id properties may have different sized "values" array depending on the
transform operator
2013-12-13 00:35:12 +11:00
8a7f2b24c1 Code Cleanup: use const's and bools for idprops 2013-12-13 00:35:11 +11:00
089d0ad8f9 add IDP_FreeFromGroup(), replaces IDP_RemFromGroup(), IDP_FreeProperty(), MEM_freeN(). 2013-10-16 05:29:28 +00:00
78a8b2a883 add asserts for id property functions (ensure invalid types aren't passed) 2013-09-30 11:27:03 +00:00
6fce374637 simplify idprop reallocation with MEM_recallocN 2013-09-05 04:26:08 +00:00
7db1d6556d code cleanup: add break statements in switch ()'s, (even at the last case). 2013-07-21 08:16:37 +00:00
bea14e8aaa Fix slow resizing of ID property arrays with more than 1619 items, it incorrectly
reverted to sizing with by 1 each time. This was slowing down painting long strokes
with small brush radius.
2013-05-15 14:36:58 +00:00
08aef8a7c8 code cleanup: move doxy docs from headers into source. also replace strncpy();str[len]=0 with BLI_strncpy() in BLI_stringdec(). 2013-03-24 01:51:54 +00:00
f9f7070336 add STREQ macro (commonly used macro like CLAMP, MAX2, STRINGIFY). Use for some areas of the python api, bmesh. 2013-03-10 06:18:03 +00:00
4df5b943ed patch [#34103] - listbase.patch, insertlinkbefore.patch
from Lawrence D'Oliveiro (ldo) 


notes from tracker:
use bool for return type from BLI_remlink_safe, necessitating including BLI_utildefines.h in BLI_listbase.h
get rid of duplicate BLI_insertlink, use BLI_insertlinkafter instead.

A few places which were using BLI_insertlinkafter (actually BLI_insertlink), when it would be simpler to use BLI_insertlinkbefore instead.
2013-02-22 14:12:55 +00:00
69993c5d40 style cleanup: spaces -> tabs 2013-02-04 00:18:09 +00:00
ba78e3e312 no need to call BLI_countlist on idproperty groups when comparing. 2013-01-14 12:02:10 +00:00
1a7638fa94 add id property clear function (matching the same python function for dicts/lists) 2013-01-02 23:10:14 +00:00
1bcadda46b fix [#30910] Problems: Add Shortcut(s) for "Ctrl Tab" menu
comparing keymaps was too sloppy or too strict, now sloppy keymap comparison works by setting all the operator
properties to their default values if they are not already set, then compare this with the keymap item (ignoring values missing from either one).

... this way any non default keymap setting wont match with an operator menu item which doesnt set this operator at all (a problem sighted in this bug report).


developer notes:
- IDP_EqualsProperties_ex() function adds an argument to treat missing members of either group to act as if there is a match.
- WM_operator_properties_default() function to reset RNA values to their defaults.
- add IDP_spit(), debug only function to print out ID properties.
2012-10-31 20:29:32 +00:00
26541afc8b code style: use switch for IDP_EqualsProperties() 2012-10-31 19:42:02 +00:00
c7fbeded4c add IDP_MergeGroup(dst, src, overwrite) function,
like PyDict_Merge()
2012-10-31 19:07:25 +00:00
2fb8292005 style cleanup 2012-09-16 04:58:18 +00:00
d248f94cf8 add endian switch functions to replace macros SWITCH_INT/LONG/SHORT, with BLI_endian_switch_int32/int64/float/double... 2012-09-03 07:37:38 +00:00
e9caa21830 fix own error in recent smoothview cleanup, also correct some cross references in bmesh docs. 2012-08-17 14:43:20 +00:00
0c7b56cf39 correct use of nonull attribute 2012-07-08 17:08:27 +00:00
b91bc4f037 use gcc attrubutes to warn on unused return values and arguments which shouldnt be NULL.
also remove IDP_AppendArray's return value which wasnt the new item in the array (which is odd/misleading), but wasnt used anywhere either.
2012-07-08 06:00:27 +00:00
599d213115 style cleanup: line length and ensure some macros error when not ending with ';' 2012-05-17 07:59:25 +00:00
ffed654ff2 style cleanup: blenkernel 2012-05-06 17:22:54 +00:00
b340f930ec style cleanup: changes to brace placement / newlines - for/while/if/switch 2012-04-28 06:31:57 +00:00
ee6aaafd31 code cleanup: typos and set gcc attributes for string formatting. 2012-04-25 06:06:40 +00:00
69e6894b15 style cleanup: follow style guide for formatting of if/for/while loops, and else if's 2012-03-24 06:18:31 +00:00
4f19c1a995 spelling cleanup 2012-03-18 07:38:51 +00:00
f6ae27daef style cleanup - comment spelling + translate some dutch. 2012-03-04 04:35:12 +00:00
95670e03a0 style cleanup / comment formatting for bli/bke/bmesh 2012-03-03 20:19:11 +00:00
ea13ec1699 Spelling Cleanup 2012-03-01 12:20:18 +00:00
47c373c7a9 style cleanup (mostly whitespace) 2012-02-27 10:35:39 +00:00
6ca7d82932 code cleanup: white space, spelling & ';;' end of lines. 2012-02-25 16:04:03 +00:00
51016c4dea split >120 length lines (mostly if statements) 2011-12-22 00:03:20 +00:00
3cf56d46d1 add IDP_EqualsProperties support for comparing non-null terminated byte strings. 2011-11-15 10:32:08 +00:00
8623935aa8 pass a pointer to IDP_New's IDPropertyTemplate rather then a copy. 2011-11-15 09:22:52 +00:00
2ab1732613 support for non-null terminated byte strings in id properties (as a subtype of IDP_STRING types) 2011-11-15 09:12:10 +00:00
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
22c2aef77c replace inline string searches with BLI_findstring(), strcmp(..., ""), with char comparisons. 2011-05-01 06:34:40 +00:00
fde9ecbfbd fix [#26967] separate mesh with p crashes blender
copying ID properties assumed each property was allocated separately which isnt the case for IDP_Arrays.
2011-04-19 23:52:14 +00:00
97edca3bc9 Old IDProperty bug, (from original commit r8916),
found crash while changing operator string size.

Shrinking arrays never worked right.
rather then "newlen * sizeof(...)", it would memcpy "newlen * oldlen * sizeof(...)" which always goes over the array bounds.
2011-03-08 03:14:59 +00:00
Nathan Letwory
0ff06e21cd doxygen: blender/blenkernel tagged. 2011-02-27 20:40:57 +00:00
Nathan Letwory
5b607701a7 doxygen: prevent GPL license block from being parsed as doxygen comment. 2011-02-23 10:52:22 +00:00
0955c664aa fix for warnings from Sparse static source code checker, mostly BKE/BLI and python functions.
- use NULL rather then 0 where possible (makes code & function calls more readable IMHO).
- set static variables and functions (exposed some unused vars/funcs).
- use func(void) rather then func() for definitions.
2011-02-13 10:52:18 +00:00
867fc4b463 enforce string limits (reported by pedantic checking tools & some developers).
mostly replace strcpy with BLI_strncpy and multiple strcat's with a BLI_snprintf().
also fix possible crash if CWD isnt available.
2011-02-13 03:21:27 +00:00
ad8c79405a Type checks for internal ID-Property UI min/max/tip & use defines to get values from ID-Props.
Probably wouldn't cause a problem but manually editing these types through python could easily crash blender.

also changed cmake, stub-makefile default build dir to be lower case and leave out architecture string, easier for documentation.
Use ../build/linux/ rather then ../build/Linux_i686/
2011-02-07 05:05:41 +00:00
eac31a2ece remove unused vars & avoid some clang warnings. 2011-01-14 21:06:28 +00:00