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-06-06style cleanupCampbell Barton
2013-06-01add popup menu to allow python scripts to show popups without having to ↵Campbell Barton
define a menu class first.
2013-04-07Reverting changes from r55873 for rna_define.c, sorry about that...Bastien Montagne
svn merge -r55873:55872 ./source/blender/makesrna/intern/rna_define.c
2013-04-07Usual typo fixes... ;)Bastien Montagne
2013-03-19Various cleanup around default i18n context.Bastien Montagne
Issue is that the real default context is NULL, however, in python and RNA, this value can't be used easily. So we use a specific string instead ("*"), defined as BLF_I18NCONTEXT_DEFAULT_BPYRNA. From now on, all bpy/rna code should only use the BLF_I18NCONTEXT_DEFAULT_BPYRNA value, while all "usual" C code should use the BLF_I18NCONTEXT_DEFAULT value (BLF_pgettext is still able to "understand" both, anyway). Also added BLF_is_default_context helper func, so that we can keep that check in a single place! Finally, we should no need anymore to understand the void string "" as default context too - two values for a same thing are more than enough!
2013-03-18code cleanupCampbell Barton
2013-03-18Merge of the PyNodes branch (aka "custom nodes") into trunk.Lukas Toenne
PyNodes opens up the node system in Blender to scripters and adds a number of UI-level improvements. === Dynamic node type registration === Node types can now be added at runtime, using the RNA registration mechanism from python. This enables addons such as render engines to create a complete user interface with nodes. Examples of how such nodes can be defined can be found in my personal wiki docs atm [1] and as a script template in release/scripts/templates_py/custom_nodes.py [2]. === Node group improvements === Each node editor now has a tree history of edited node groups, which allows opening and editing nested node groups. The node editor also supports pinning now, so that different spaces can be used to edit different node groups simultaneously. For more ramblings and rationale see (really old) blog post on code.blender.org [3]. The interface of node groups has been overhauled. Sockets of a node group are no longer displayed in columns on either side, but instead special input/output nodes are used to mirror group sockets inside a node tree. This solves the problem of long node lines in groups and allows more adaptable node layout. Internal sockets can be exposed from a group by either connecting to the extension sockets in input/output nodes (shown as empty circle) or by adding sockets from the node property bar in the "Interface" panel. Further details such as the socket name can also be changed there. [1] http://wiki.blender.org/index.php/User:Phonybone/Python_Nodes [2] http://projects.blender.org/scm/viewvc.php/trunk/blender/release/scripts/templates_py/custom_nodes.py?view=markup&root=bf-blender [3] http://code.blender.org/index.php/2012/01/improving-node-group-interface-editing/
2013-02-22patch [#34103] Add explanatory comments to dna_genfile.[ch]Campbell Barton
from Lawrence D'Oliveiro (ldo)
2013-02-12fix [#34198] Scene unit size and dyntopo detail sizeCampbell Barton
there were 2 bugs here. - int buttons scaling values on input but not on display. - pixel distances were using PROP_DISTANCE subtype - which isn't correct. added assert incase PROP_INT values have PROP_DISTANCE subtype applied in future.
2013-02-08Cleanup: happily remove no-more-used PY_TRANSLATE RNA prop flag, and related ↵Bastien Montagne
code (just realized that flag value was wrong, probably own typo in a previous commit :/ ). That "trick" was nice when introduced, but it became kind of a pita since we added translation contexts...
2013-02-05add RNA_define_animate_sdna() so animation can be easily disabled when ↵Campbell Barton
defining many properties - currently use to disable animating brushes and toolsettings.
2013-02-04fix for rangefunc being unused for int & int array.Campbell Barton
also cast strlen to an int to avoid overflow.
2013-01-22comments for RNA_def_property_ui_range() and clamp some out-of-range values.Campbell Barton
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-09add RNA_def_struct_ptr(...) to use for runtime struct registration, saves ↵Campbell Barton
over 2000 string lookups on startup and gives overall ~10% speedup for starting blender on my system.
2013-01-05This patch adds support in bpy.props for getter/setter callback functions. ↵Lukas Toenne
We already have update callbacks, but generic get/set functions can come in handy in some cases where the functionality is too complex to use a single value. The current C callback functions are too simple allow a straightforward implementation, in particular they don't receive the PropertyRNA pointer itself as an argument, which means the callback cannot directly access the PropertyRNA's py_data pointers which store the python function objects. For this reason a second runtime variant of these callbacks has been added. It is only used for runtime callbacks and not in makesrna, but otherwise works the same way.
2012-12-29style cleanupCampbell Barton
2012-12-27validate operator names on startup (debug mode only)Campbell Barton
2012-11-01fix for long standing problem with blender 2.5x py api.Campbell Barton
Removing data then accessing would allow invalid memory access and often crash. Example: import bpy image = bpy.data.images.new(name="a", width=5, height=5) bpy.data.images.remove(image) print(image.name) Now access to the removed data raises an error: ReferenceError: StructRNA of type Image has been removed This is the same level of error checking that was done in blender 2.4x but was made difficult by RNA functions not having access to the PyObject's.
2012-10-26style cleanupCampbell Barton
2012-10-22New "dynamic" i18n menu.Bastien Montagne
Now both UI translation menu (in userprefs) and isocodes are defined in a text file (release/datafiles/locale/languages), parsed at lunchtime. This way: * No more need to edit Blender code each time we want to add an new language or reorganize the existing menu; * Translators can easily add a new language for testing, by just editing the text file, so no more need to ask to change Blender code and wait for a new build to see your new translation work in Blender! Remaining todo: * Commit i18n py tools * Update wiki doc!
2012-10-12fix for many RNA definitions having soft/hard ranges swapped, make this ↵Campbell Barton
BLI_assert() on debug builds.
2012-09-08style cleanupCampbell Barton
2012-06-29code cleanup: bge builds with clang without warnings / errors.Campbell Barton
2012-06-28code cleanup: compile with clang and quiet some warnings.Campbell Barton
2012-06-10change RNA_struct_find_function to accept a type rather then a PointerRNA, ↵Campbell Barton
add a check duplicate functions are not defined.
2012-05-28style cleanup: defines with bracesCampbell Barton
2012-05-12style cleanup: mostly whitespace in rnaCampbell Barton
2012-04-10Address [#30842] Blenders Measurement Units set to Metric, makes some ↵Campbell Barton
Precision Flaws. use the same precision for location all over (2-5 was used), use define as 5. also disallow boolean to have any subtype besides PROP_LAYER_MEMBER, some booleans had TRANSLATION / XYZ subtypes which don't make sense.
2012-04-09fix [#30865] Crash when browsing last operators in outliner (or by Python API)Campbell Barton
Operator descriptions can be NULL pointers, fix this by making use of PROP_NEVER_NULL flag, when its not set, generated string funcs will test for NULL.
2012-04-06update python keywords (remove exec, print, add nonlocal)Campbell Barton
2012-03-24style cleanup: follow style guide for formatting of if/for/while loops, and ↵Campbell Barton
else if's
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-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-09style cleanup: comment blocksCampbell Barton
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.
2012-02-24bmesh py api - bmesh.utils.face_flipCampbell Barton
2012-01-01rna api - set hard min/max for colors which are float properties but ↵Campbell Barton
internally use chars to 0/1.
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-25Image save as operator 'BW' option wasnt working on some formats, now only ↵Campbell Barton
show when its supported.
2011-11-21minor edits to error printing, also print the proprty identifier for rna ↵Campbell Barton
property errors.
2011-11-18make RNA_def_float_rotation usable for single value rotations (not arrays).Campbell Barton
2011-11-08- disable undo for user preferences (every click would do push an undo), was ↵Campbell Barton
noticeable on large files. - also netbeans project file generator now uses branch name for project.
2011-10-23remove $Id: tags after discussion on the mailign list: ↵Campbell Barton
http://markmail.org/message/fp7ozcywxum3ar7n
2011-10-20- add BLI_string_utf8.h for unicode functions.Campbell Barton
- move font.c unicode functions into string_utf8.c and rename to fit with other BLI_string funcs.
2011-10-01add a collection function slot for assignment (not used yet).Campbell Barton
2011-09-28use __func__ rather than function names in rna prints, some were incorrect.Campbell Barton
also replace use of strlen() where checking first char is enough.
2011-09-21check that descriptions dont end with a '.', for non release builds.Campbell Barton
this is annoying for translators so rather then correct along the way which gives merge conflicts for branches - print a complaint message.
2011-09-21py/rna string subtypes for strings which should be automatically translated:Campbell Barton
layout.prop("blah", text="Translate Me!")