Commit Graph

189 Commits

Author SHA1 Message Date
5caf6e9070 presets now work from non-redo popups,
ended up having to add a new pointer into the uiBlock (which I'd rather have avoided), but setting the uiLayoutSetContextPointer(..) was complicated to properly use for submenus and popus.
2011-11-10 03:44:50 +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
ebe63b664b py api - added PyC_UnicodeFromByteAndSize() to match PyUnicode_FromStringAndSize()
also made RNA_property_string_get_alloc() return the length of the new string to avoid having to run strlen on it after.
2011-10-22 10:49:35 +00:00
874c96a2b9 Cleaning i18n code.
Previous state:
Right now, there are "memories" of the "old" (less than a month!) translation way:
* A few remaining calls to BLF_gettext() (only UI_translate_do_iface and UI_translate_do_tooltip should be used).
* The _() macro still also calls BLF_gettext()!

New state:
Here are the changes made by the patch:
* Removing the no more needed _() macro.
* Removing most N_() and _() calls, only keeping the few needed ones (i.e. strings that are in no other way findable by xgettext and/or update_msg script).
* Defining in UI_interface.h IFACE_() and TIP_() macros (resp. for UI_translate_do_iface and UI_translate_do_tooltip).
* Replacing all calls to BLF_gettext by relevant IFACE_ or TIP_ one.
* Replacing all calls to UI_translate_do_iface by IFACE_.
* Replacing all calls to UI_translate_do_tooltip by TIP_.

All this somewhat clarifies and simplifies the code.
On the bf-translations scripts side, this only implies adding IFACE_ and TIP_ as detection markers for xgettext.
It also allows to reduce POTFILES.in quite notably (only 20 files remaining in it).

Please also have a look at those pages:
* Coder POV: http://wiki.blender.org/index.php/Dev:2.5/Source/Interface/Internationalization
* Translator POV: http://wiki.blender.org/index.php/Dev:2.5/Doc/How_to/Translate_Blender
2011-10-20 20:38:26 +00:00
388eae9a81 minor edits
- use TRUE/FALSE rather than 1/0
- WM_operator_properties_create_ptr rather than WM_operator_properties_create since the pointers available.
- remove redundant strlen()
2011-10-05 12:20:38 +00:00
f87ab2e907 minor edit for UI code, pointless short/int mix. 2011-10-03 01:01:01 +00:00
fbdfdfefd8 use BLI_snprintf rather than sprintf for interface functions 2011-09-26 16:53:04 +00:00
573ed73be8 change define INTERNATIONAL --> WITH_INTERNATIONAL
also rename backface_culling --> use_backface_culling (which is used elsewhere in rna)
2011-09-26 10:35:47 +00:00
6d125e159d i18n: code clean-up
- Move all translation-related declarations to BLF_translation.h
- Reverted some changes to match trunk svn rev40365
2011-09-20 07:39:25 +00:00
8dbc7a3ba3 Merging r40345 through r40365 from trunk into soc-2011-garlic 2011-09-19 15:47:05 +00:00
706a2c80f0 i18n: code cleanup and fixing unneeded translation (when partial translation is used only) 2011-09-19 15:10:38 +00:00
f157a543c6 /blender/editors: Removed final points in UI strings and messages.
Plus a few cuts in very long lines…
2011-09-19 12:26:20 +00:00
0eda51f2ea Fixing issues with i18n stuff:
- Make gettext stuff draw-time. so switching between languages
  can happens without restart now.
- Added option to translate visible interface (menus, buttons, labels)
  and tooltips. Now it's possible to have english UI and localized tooltips.
- Clean-up sources, do not use gettext stuff for things which can be
  collected with RNA.
- Fix issues with windows 64bit and ru_RU locale on my desktop
  (it was codepage issue).
- Added operator "Get Messages" which generates new text block with
  with all strings collected from RNA.
- Changed script for updating blender.pot so now it appends
  messages collected from rna to automatically gathered messages.
  To update .pot you have to re-generate messages.txt using "Get Messages"
  operator and then run update_pot script.
- Clean up old translation stuff which wasn't used and most probably
  wouldn't be used.
- Return back "International Fonts" option, so if it's disabled, no
  gettext lookups happens on draw.
- Merged read_homefile function back. No need in splitting it.

TODO:
- Custom fonts and font size.
  Current font isn't nice at least for russian locale, it's
  difficult to read it.
- Put references to messages.txt so gettext can merge translation when
  name/description of some property changes.
2011-09-15 13:20:18 +00:00
30293dc2ca svn merge -r39834:40222 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2011-09-15 13:02:37 +00:00
2827ee26e5 fix for ntreeGPUMaterialNodes(), using uninitialized exec pointer.
also commented some set-but-unused variables.
2011-09-12 00:00:21 +00:00
a59ba9a519 - turn RNA_warning into a macro which includes the function name (was being written in manually but had incorrect func names in places).
- add __func__ define to BLI_utildefines.h for MSVC.
2011-09-09 01:29:53 +00:00
76ddf6d2ee Fix #28404: certain keyboard shortcuts not shown in menus, e.g. move operators
in graph editor > channel menu. Problem was these did not inherit operator
execution context correctly.

Fix found by Sergey, also needed to fix logic operators which were not working
when invoked instead of executed.
2011-09-05 17:57:04 +00:00
59dbd53e72 Fix #28389: UILayout.menu function didn't emboss menu button correct in the
3d view tools region.
2011-09-05 15:55:53 +00:00
Xiao Xiangquan
981f7fcd0d merge with trunk r39834 2011-09-01 15:08:32 +00:00
fa2ba5fbf5 - use static vars and functions where possible.
- use NULL rather than 0 when used as pointers.
2011-08-28 05:06:30 +00:00
042d4d3509 misc changes to unterface & undo
- operator strings were doing undo pushes (in fileselector text for example), this is dumb since the operators themselves handle undo.
- interface code checks rna props are arrays rather then checking the array length.
- disable properties window pin undoing.
- sequencer refresh was calling undo, disable since this is clearnign global data not handled by undo.
- added commented out code for drawing mesh vertex index/key index, useful for debugging shapekey - hook issyes.
2011-08-18 19:07:37 +00:00
cad6ed9bc6 fix for fix r39388, this added checkboxes to buttons which are not supposed to have them.
now only add checkboxes when the background is not emboss - which works for menus but will work in more general cases too.
2011-08-14 11:38:17 +00:00
540f0c64b5 add in asserts for when array/non array RNA funcions are used incorrectly, would have made previous fix a lot easier to find.
also remove unused argument from RNA_property_array_check.
2011-08-14 10:28:18 +00:00
62fdee3d8a fix [#28245] Checkboxes in menu items fail for boolean arrays.
2 bugs with displaying boolean arrays.
2011-08-14 10:17:41 +00:00
Xiao Xiangquan
465c3b82fa merge with trunk r39216 2011-08-10 14:32:03 +00:00
85b77c931d fix [#28183] Wavefront OBJ import has no preset saving 2011-08-08 14:50:10 +00:00
79e359f92a rna/ui: avoid duplicate property gHash lookups by passing the property when its already been found.
added _prop suffix to ui functions which take a prop rather then a propname, may change this later since its not that nice but for gsoc branches this keeps existing UI functions working the same.
2011-08-06 16:00:00 +00:00
Xiao Xiangquan
287b24926f merge with trunk r38787 2011-07-29 17:42:53 +00:00
955ba3f7fb * Fixed a typo in the code (uiLayoutItemSplt -> uiLayoutItemSplit) 2011-07-26 20:22:54 +00:00
a460299b08 - bugfix for icon listview where the icons would only wrap once
- also quiet some clang warnings
2011-07-26 19:47:56 +00:00
Xiao Xiangquan
b429af10d0 merge from trunk #37722 2011-06-24 03:30:50 +00:00
dce577ad85 use directory selector for properties defined as PROP_DIRPATH, user preferences 'File' buttons for eg. 2011-06-16 15:28:39 +00:00
Xiao Xiangquan
de12f8049a translate left panel 2011-06-15 11:41:15 +00:00
68a3303013 operator buttons get a red highlight when alert is set for the layout 2011-06-05 17:02:57 +00:00
49ad7345af fix [#27479] Missing 'Select vertex groups under the cursor' in weight paint mode
really todo :) but still needs to be done.

Split this into 2 operators, works like 2.4x
- Ctrl+LMB samples weight.
- Shift+LMB selects vertex groups.
2011-05-25 10:07:59 +00:00
4c28693ae3 UI: fix direction properties not showing the right direction editing widget,
code was there but in the wrong location. This makes the opengl lights in
the user preferences show that widget again as in 2.4.
2011-05-19 11:18:09 +00:00
22c22d4961 fix [#27304] uiItemsFullEnumO: operator missing srna ''
python strings are not static so dont hold pointers to them within blenders UI.
2011-05-06 02:55:09 +00:00
210ee1ade4 whitespace only, no functional change mixed tabs/spaces --> tabs. 2011-04-21 13:11:51 +00:00
a21f46b6d4 new function RNA_warning(), replaces printf with function which may be called via python.
Now this gives the line number of the scripts thats running, eg:

uiItemFullO: unknown operator 'some.operator'
/c/bin/2.56/scripts/startup/bl_ui/space_view3d_toolbar.py:73
2011-03-25 04:36:10 +00:00
422f1674bb fix for using uiItemIntO for an enum, added uiItemEnumO_value function. 2011-03-24 12:36:12 +00:00
e9005b985e remove some redundant vars, assignments & checks. 2011-03-19 05:06:06 +00:00
Nathan Letwory
95100afc12 doxygen: blender/editors tagged. 2011-02-27 20:29:51 +00:00
4ed5cd6cef == UI icons ==
* Change ICON_NULL --> ICON_NONE to avoid two #defines with the same meaning.
2011-02-27 18:03:19 +00:00
Nathan Letwory
5b607701a7 doxygen: prevent GPL license block from being parsed as doxygen comment. 2011-02-23 10:52:22 +00:00
b47bfd85e8 UI Tweaks: Text field in Rename Markers popup now gets focus when the
popup appears, saving an extra click

I've separated out the "XXX"-'d event-adding-hack section from the
search-menu code into a separate API function (as recommended there).
This call is used to make sure that textboxes in popups can get
activated by default, to allow typing immediately.
2011-02-15 01:24:12 +00:00
4124804b4e many functions in blender are not marked static but should be.
most local modifier,GPU,ImBuf and Interface functions are now static.

also fixed an error were the fluid modifier definition and the header didnt have the same number of args.
2011-02-13 14:16:36 +00:00
c0f161f811 fix [#25776] Crash when operator's bl_idname has more than one dot 2011-01-24 05:15:14 +00:00
0097997911 no functional changes.
- remove unneeded casts to (char*) in interface code.
- replace strcmp(.., "") with checks on the first char of the string.
2011-01-24 02:56:23 +00:00
f49d7d59dc Bugfix #25652
Report was that move-to-layer menu failed. The real cause was
more complex; had to dive deep in the dungeons of the interface
code that handled undos and operators. Found several issues:

- popup menus (like redo operator, color picker) executed again
  on a mouse-exit
- far too many buttons were sending undo pushes; even worse, in
  the operator redo-panel each button action was pushed twice
- in case operator redo-buttons have own callbacks (like layer
  buttons) the redo wasn't working
- layerbutton menu was called without creating a proper undo/redo
  case

Things should all work smoother now!

On todo:
- better definition and handling of all versions for operator menus
  (four types now, not fun)
  also: make operator "do" menu, which on first action does operator
  and then switches to redo-ing
- bring back Undo menu, to list the undo stack and jump in it.
2011-01-19 14:19:20 +00:00
8f21a43535 split BKE_utildefines.h, now it only has blender specific defines like GS() MAKE_ID, FILE_MAXDIR, moved the generic defines to BLI_utildefines.h.
no functional changes.
2011-01-07 18:36:47 +00:00