Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-01-28Fix for the is_registered_optional property of RNA functions, now only ↵Lukas Toenne
returns true for actually optional functions.
2013-01-20Python i18n API. Many thanks to Campbell and Brecht for the reviews and ↵Bastien Montagne
suggestions! This commit adds: * A new bpy.app.translations module giving some info about locales/translation stuff (current active locale, all locales currently known by blender, all translation contexts currently defined, etc.). * The ability for addons to feature translations, using the (un)register functions of above module. * Also cleans up "translate py string when storing into RNA prop" by removing "PROP_TRANSLATE" string's subtype, and adding a PROP_STRING_PY_TRANSLATE flag instead (this way it is no more exposed to python...). Addon translations work with py dictionaries: each addon features a dict {lang: {(context, message): translation, ...}, ...}, which is registered when the addon is enabled (and unregistered when disabled). Then, when a key (context, message) is not found in regular mo catalog, a cache dict for current locale is built from all registered addon translations, and key is searched in it. Note: currently addons writers have to do all the work by hand, will add something (probably extend "edit translation" addon) to automate messages extraction from addons soon(ish)! To get a look to expected behavior from addons, have a look at render_copy_settings/__init__.py and render_copy_settings/translations.py (rather stupid example currently, but...). Once we have a complete process, I'll also update relevant wiki pages.
2013-01-17show a title in menus triggered by WM_OT_context_menu_enum, also show an ↵Campbell Barton
icon when available.
2013-01-13remove TRANSFORM_OT_snap_type, use WM_OT_context_menu_enum instead.Campbell Barton
add Ctrl+Shift+Tab shortcut for selecting snap type to the UV editor too. also added icon drawing to WM_OT_context_menu_enum() so it gets the icons from the enum to draw them in the menu.
2012-12-20Support for actual class methods in the RNA/bpy. Previously all functions ↵Lukas Toenne
with FUNC_NO_SELF were treated as static methods, which is not sufficient for getting actual type information if the function can not be generated in advance in makesrna. Now the FUNC_USE_SELF_TYPE flag can be set in addition to FUNC_NO_SELF (if FUNC_NO_SELF is not set, FUNC_USE_SELF_TYPE has no effect). Such functions will be interpreted as class methods and must take a StructRNA pointer argument. This pointer is the same as the type member in PointerRNA, but can be passed without an actual data/id instance.
2012-10-26style cleanupCampbell Barton
2012-07-29code cleanup: replace MIN2/MAX2 with minf/maxfCampbell Barton
2012-07-26fix some types and incorrect infoCampbell Barton
2012-05-20Added 'LIBRARY_EDITABLE' flag to bpy.props.*Dan Eicher
Rationale: custom props on linked objects are editable through ops and the console but the UI code calls RNA_property_editable() which returns false if (id->lib && !(prop->flag & PROP_LIB_EXCEPTION)) Setting the 'LIBRARY_EDITABLE' flag allows UI templates to change these props (but the changes aren't saved!) for things like indices into CollectionProperties which live on the linked object
2012-05-12style cleanup: mostly whitespace in rnaCampbell Barton
2012-03-18Code style edits (mostly spliting long lines, and removing trailing spaces).Bastien Montagne
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-18spelling cleanupCampbell Barton
2012-03-16i18n stuff: adds translation_context to RNA structs (used for there ui ↵Bastien Montagne
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-06Code cleanup in rna files (huge, higly automated with py script).Bastien Montagne
Addresses: * C++ comments. * Spaces after if/for/while/switch statements. * Spaces around assignment operators.
2011-12-22Translation context for RNA propertiesSergey Sharybin
This commit implements a way to define context of property which is used by localization stuff and which is needed to resolve translation context when some word wit the same english spelling is used in different meanings (like Manual in meaning of tutorial, and Manual in meaning of something is setting up by hand). To define property's context there's a function RNA_def_property_translation_context. If property doesn't have context, regular BLF_gettext function is used to get translation of property name, otherwise BLF_pgettext is used for this. Hence, for correct translation, messages in .po files should be marked by "msgctxt" context, otherwise property with context declared wouldn't be translated at all. Toolchain scripts from bf-translation project would be updated soon. If context for some values of enumerator property, property itself should be moved to other context and all items from this enum would be moved to this context automatically (it's impossible to move one few items to another context). P.S. Think context like "BRUSH" or "MODIFIER" are preferable than "NOUN" and "VERB" because in some cases the same english noun used in different areas better be translated differently to make translation more native.
2011-12-02renaming BooleanProperty to BoolProperty (rna structs shouldnt affect scripters)Dalai Felinto
Talked with Brecht and Campbell and they both agreed that bpy.types should match bpy.props In the ideal world we would rename bpy.props to BooleanProperty. This would break scripts though. So we go for a compromise and at least have some consistency.
2011-11-27accessing rna 'default_flag' attribute of a non enum-flag could crash. eg.Campbell Barton
bpy.types.Modifier.bl_rna.properties["type"].default_flag now check the default/default_flag match the enum property they are used with.
2011-10-23remove $Id: tags after discussion on the mailign list: ↵Campbell Barton
http://markmail.org/message/fp7ozcywxum3ar7n
2011-10-20misc editsCampbell Barton
- rename define DISABLE_SDL --> WITH_SDL (which was already used in some places) - blenders interation preset was using orbit rather then turntable 3d view preference (different from factory defaults). - tagged some unused rna args.
2011-10-08fix [#28821] Whole Character keying set ignores non animatable propertyflagCampbell Barton
2011-10-01add a collection function slot for assignment (not used yet).Campbell Barton
2011-09-21py/rna string subtypes for strings which should be automatically translated:Campbell Barton
layout.prop("blah", text="Translate Me!")
2011-09-06Merged the particles-2010 branch with node improvements into trunk.Lukas Toenne
This branch adds mostly organizational improvements to the node system by renaming the node folders and files. A couple of internal features have been added too. Detailed information can be found on the wiki page: http://wiki.blender.org/index.php/User:Phonybone/Particles2010
2011-06-25fix incorrect ui text for is_runtimeCampbell Barton
2011-06-07rna option not to save certain properties for redoing later, currently only ↵Campbell Barton
used by operator presets.
2011-05-28fixed "rather then" -> "rather than" typos all over the placeM.G. Kishalmi
2011-05-26add the property as an argument to enum item functions, not used yet but ↵Campbell Barton
needed for dynamic python enums.
2011-04-08add new subtype PROP_COORDS, for generic coordinates that are not to be ↵Campbell Barton
changed by units.
2011-03-28- quiet new warnings with gcc 4.6Campbell Barton
- use BLI math funcs for normal float/short conversion. - correct some un-intentional float/double promotions.
2011-03-25fix [#26601] Python error when use of autocompleteCampbell Barton
Was a naming collision with 'keys' python method, reserve keys/items/values/get for python. Updated animsys_update.py for shapekey data paths. renamed: Particle.hair --> hair_keys Particle.keys --> particle_keys Key.keys --> key_blocks EnumProperty.items --> enum_items KeyMap.items --> keymap_items noted: http://wiki.blender.org/index.php/Dev:2.5/Py/API/Updates#Since_2.56a
2011-03-03replace 0 with NULL when used as a pointerCampbell Barton
2011-02-27doxygen: blender/makesrna tagged.Nathan Letwory
2011-02-23doxygen: prevent GPL license block from being parsed as doxygen comment.Nathan Letwory
2011-02-16enum-flag arguments were incorrectly documented.Campbell Barton
2011-01-25property lookups on structs was doing a listbase search even if the hash was ↵Campbell Barton
defined. since the property hash is maintained there is no reason for this, especially since the property could be in the StructRNA's parent class.
2011-01-07split BKE_utildefines.h, now it only has blender specific defines like GS() ↵Campbell Barton
MAKE_ID, FILE_MAXDIR, moved the generic defines to BLI_utildefines.h. no functional changes.
2011-01-05fix for py/rna mesh.materials[:] where empty materials exist, would raise a ↵Campbell Barton
runtime exception. problem was there was no way to tell the difference between getting an empty item from a collection or the item not being found.
2010-12-24is_hidden property for rna introspectionCampbell Barton
2010-11-22bugfix [#23609] Lamp PointerPropertyCampbell Barton
2010-09-02bugfix [#23635] property limits don't work when added via scripting\Campbell Barton
also fix for bug where soft limits could be greater then hard limits with bpy.props.* functions.
2010-08-19- Properties from base classes are now registered too, this allows class ↵Campbell Barton
mix-in's to define properties. An example of how this is useful - an importer mixin could define the filepath properties and a generic invoke function which can run the subclasses exec for each selected file. - Panels and Menus now skip the property check when registering. - renamed _idproperties_ to _idprops_ in function names, function names were getting very long.
2010-08-18more rna renaming.Campbell Barton
2010-08-18rna renaming, still only adjusting properties that wont be animated (at ↵Campbell Barton
least its very unlikely).
2010-08-17document rna functions that have the no_self flag set as classmethodsCampbell Barton
2010-08-16- remove unused includes IMB_*, BIF_* & MEM_*Campbell Barton
- remove MEM_guardedalloc.h from header files (include directly)
2010-08-03rna pointer poll function, not used yet.Campbell Barton
2010-05-04Great patch by Harley Acheson fixing about 80 typos and spellingDaniel Salazar
mistakes in makesrna
2010-03-24remove unused rna includesCampbell Barton
2010-02-16bugfix [#21173] Autocompleate raises an errorCampbell Barton
split PropertyRNA off into 3 types, base type, collection and array, since array and collections needed internal checks inside almost every function its better to have the, as subclassed to the property type. This makes introspection more useful. Also made printing of structs and properties prettier giveing type and length.
2010-02-12correct fsf addressCampbell Barton