Commit Graph

469 Commits

Author SHA1 Message Date
5fcb12d754 changing RNA properties now prints python script in the info view.
next will add context so bpy.data.xxx[id] are not used for all references.
2012-12-18 15:22:06 +00:00
db14a81e04 some speedup by avoiding translation on entire enum arrays, and just translate the single name that ends up being used. 2012-12-18 13:46:37 +00:00
b9d03811d5 add index argument to RNA_property_as_string() - currently unused. 2012-12-18 13:21:32 +00:00
3d6bc1e1f4 Fix warning about missing BKE_idcode_to_name_plural. 2012-12-02 09:54:44 +00:00
82fc331959 There was no way of knowing what ID type a property comes from by the tooltip, (since copying the Data-Path doesn't include the ID the user had to guess).
Now include the full python path to the property in the tool-tip.
2012-12-02 07:13:19 +00:00
ea828fd20e code cleanup: warnings, style 2012-11-25 15:05:17 +00:00
abc059f99a fix [#33299] When I click right button on proportional editing mode button Blender crashes (segmentation fault)
RNA_path_from_ID_to_property() would return an uninitialized pointer.
2012-11-25 09:25:24 +00:00
33767bde9b Fix #33297: crash loading modal keymap after recent keymap bugfix. 2012-11-25 06:55:33 +00:00
87ccc78f2c Fix #33286: when keyframing object scale, noise fmodifier scale would show
as animated in the UI.
2012-11-24 15:46:14 +00:00
ea0d1c74e4 Fix #33227: custom keymap syncing didn't work well always when adding/removing
properties from operator, now it compares at RNA rather than ID property level,
which is more accurate.
2012-11-20 19:44:20 +00:00
Lukas Toenne
616eb84452 Support for type callbacks on IDProperty pointers. Before this the type of the type of a PropertyGroup pointer would be fixed to the default RNA type. This is fine in most cases, but it may be necessary to define the property group subtype dynamically in some cases. Now the returned RNA pointer uses the typef callback if it exists. 2012-11-20 12:25:28 +00:00
5ff3017900 Replacing gettext i18n backend by boost::locale one.
This commit adds a small and simplistic C wrapper around boost's locale library as intern/locale, and heavily simplifies/reduces Blender's own i18n code (under blenfont/ dir). And it adds back UI translation on windows' official builds (with msvc)!

Note to platform maintainers: iconv and gettext (libintl) can now be removed from precompiled libs (not gettext binaries, under windows, of course ;) ).

Note to MinGW32/64 users: boost_locale lib has not yet been uploaded for those build env, please disable WITH_INTERNATIONAL for now (hopefully will be fixed very soon, have contacted psy-fy).
2012-11-11 16:54:26 +00:00
03d0040fe7 patch [#32874] Fixed the property path calculation in situations where the link.index variable gets set during the search.
From Florian K?\246berle
2012-11-08 09:38:18 +00:00
db250a48f6 fix [#32855] Obj im and export and the file path and name
file selector now uses previously used settings for operators rather then over riding them with the currently open blend file.
2012-10-24 04:29:35 +00:00
0760308551 fix for crash using an uninitialized pointer when fcurves reference missing collections (removing animated shape keys could crash). 2012-10-23 11:03:52 +00:00
1767b65846 style cleanup: also rename bmesh_decimate.c --> bmesh_decimate_collapse.c 2012-10-23 03:38:26 +00:00
a99b377167 More UI messages fixes and tweaks, and BKE_report<->BKE_reportf. 2012-10-20 10:28:34 +00:00
459a2b38e0 correct another misuse of FLT_MIN 2012-10-14 13:21:40 +00:00
8e01b8959e style cleanup 2012-10-14 13:08:19 +00:00
6c1da4d022 code cleanup: make many functions static 2012-09-22 14:07:55 +00:00
10d18e5b5f code cleanup: use min/max inline functions rather than macros & simplify loop 2012-09-11 09:39:37 +00:00
1a7eb3454e style cleanup 2012-09-08 08:59:47 +00:00
e9d73dbba5 use -FLT_MAX where FLT_MIN was misused 2012-08-07 19:49:38 +00:00
e32c60284a style cleanup 2012-07-29 00:20:28 +00:00
0dafa97ea3 UI translation from inside Blender UI: first part.
This commit reshapes a bit runtime button info getter, by adding a new uiButGetStrInfo() which accepts a variable number of uiStringInfo parameters, and tries to fill them with the requested strings, for the given button (label, tip, context, RNA identifier, keymap, etc.). Currently used mostly by existing ui_tooltip_create(), and new UI_OT_edittranslation_init operator.

It also adds a few getters (to get RNA i18n context, and current language iso code).

Finally, it adds to C operators needed for the py ui_translation addon:
*UI_OT_edittranslation_init, which gathers requested data and launch the py operator.
*UI_OT_reloadtranslation, which forces a full reload of the whole UI translation (including rechecking the directory containing mo files).

For the first operator to work, it also adds a new user preferences path: i18n_branches_directory, to point to the /branch part of a bf-translation checkout.
2012-07-09 14:25:35 +00:00
f6e21881f5 change RNA_struct_find_function to accept a type rather then a PointerRNA, add a check duplicate functions are not defined. 2012-06-10 13:34:59 +00:00
1931aac1f7 style cleanup: (indentation) 2012-06-06 14:48:39 +00:00
032d83ecc4 style cleanup: defines with braces 2012-05-27 20:13:59 +00:00
b33f0ef0e3 style cleanup 2012-05-27 19:40:36 +00:00
2d2d36fe3b code cleanup:
- style - multi-line ifs move braces onto new lines.
- iterators - convert some to macros, other split up and move brace.
2012-05-20 19:49:27 +00:00
5fe5a8c283 style cleanup: function definitions 2012-05-17 23:21:11 +00:00
ed33320e3f Code cleanup: simplify standard GHash creation.
Added four new functions as shortcuts to creating GHashes that use the
standard ptr/str/int/pair hash and compare functions.

GHash *BLI_ghash_ptr_new(const char *info);
GHash *BLI_ghash_str_new(const char *info);
GHash *BLI_ghash_int_new(const char *info);
GHash *BLI_ghash_pair_new(const char *info);

Replaced almost all occurrences of BLI_ghash_new() with one of the
above functions.
2012-05-16 00:51:36 +00:00
a9f6e54384 style cleanup: mostly whitespace in rna 2012-05-12 11:01:29 +00:00
b667f29a84 no need to clamp python values twice when assigning. 2012-05-11 10:25:12 +00:00
a2e225277f sequencer bug, was possible to add strips to negative channels, the channel clamping was ignored when calling RNA_property_int_set() when setting operator int/floats. 2012-05-11 10:20:35 +00:00
26ce1018cd Add an RNA access function to get an enum item name from its value.
New function is RNA_enum_name_from_value.
2012-05-10 20:32:21 +00:00
a5af5e8f50 style cleanup: re - http://wiki.blender.org/index.php/Dev:Doc/CodeStyle#Braces_with_Macros 2012-04-30 16:22:40 +00:00
ef054e165c style cleanup: format 'for' loop macros the same as for loops, some renaming to BLI_array macros. 2012-04-28 15:14:16 +00:00
b340f930ec style cleanup: changes to brace placement / newlines - for/while/if/switch 2012-04-28 06:31:57 +00:00
6fed4fdd5e Style cleanup (mostly line length, also no final point in tips...). 2012-04-15 13:41:07 +00:00
f469e0652a Node socket values now only have soft limits, rather than hard limits, so you
can type in any value, and only when sliding the number value there is a limit.
It was already possible to assign any value to a socket with node linking, so
this shouldn't cause any new issues.

Also raised the limits on the math nodes, with a patch by Agustin Benavidez.
2012-03-30 16:09:05 +00:00
5a90ea77bc style cleanup: follow style guide for formatting of if/for/while loops, and else if's 2012-03-24 06:24:53 +00:00
c5f15da34e py/rna api - fix for an empty enum flag with no members being displayed as {}, now check for this case and display as set() 2012-03-20 07:52:39 +00:00
3b9b53d876 fix [#30589] RNA function descriptions not showing in Python console on autocomplete
show rna function description and arguments now.
2012-03-20 07:41:47 +00:00
ed43b652ee Code style edits (mostly spliting long lines, and removing trailing spaces).
Note about long lines: I did not touch to two pieces of code (because I don’t see any way to keep a nicely formated, compact code, with shorter lines):
* The node types definitions into rna_nodetree_types.h
* The vgroup name functions into rna_particle.c
2012-03-18 09:27:36 +00:00
4f19c1a995 spelling cleanup 2012-03-18 07:38:51 +00:00
2caa507b7e i18n stuff: adds translation_context to RNA structs (used for there ui name), and a first default "Operator" one for all operators' label.
The fact is, operators' label are nearly always verbs, while properties labels are nearly always nouns. So this should already solve many translations' problems regarding noun/verb confusion.

This commit also simplifies a bit i18n usage:
*Now IFACE_ and TIP_ macros (or there context versions, CTX_IFACE_/TIP_) are used nearly everywhere (with one exception, where code is a bit complex and needs to manually test whether ui/tip translations is allowed, so no need to redo it later through those macros).
*Also, those macros are now defined to NOP in case WITH_INTERNATIONAL is false, which avoid testing that define everywhere in code!
2012-03-16 15:39:25 +00:00
aedd4af57e code cleanup/bugfix uninitialized values
- edgebisect bmesh operator used uninialized beauty field.
- BLI_join_dirfile could read from before the string bounds when passed an empty dir string.
- pransform could use an uninitialized projected coordinate (unlikely but possible)
- RNA_property_path_from_ID_check would compare against an uninitialized pointer when the path wasn't found.

also have bmesh walker use BM_edge_other_vert() utility function.
2012-03-12 06:53:47 +00:00
89a963fb7f style cleanup: comment blocks 2012-03-09 18:28:30 +00:00
4f7bdc59d3 style cleanup: spelling.
also remove large, duplicate comments from sunsky.h
2012-03-09 00:41:09 +00:00