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
2017-04-13Datablock ID PropertiesAlexander Romanov
The absence of datablock properties "will certainly be resolved soon as the need for them is becoming obvious" said the [[http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.67/Python_Nodes|Python Nodes release notes]]. So this patch allows Python scripts to create ID Properties which reference datablocks. This functionality is implemented for `PointerProperty` and now such properties can be created with Python. In addition to the standard update callback, `PointerProperty` can have a `poll` callback (standard RNA) which is useful for search menus. For details see the test included in this patch. Original author: @artfunkel Alexander (Blend4Web Team) Reviewers: brecht, artfunkel, mont29, campbellbarton Reviewed By: mont29, campbellbarton Subscribers: jta, sergey, campbellbarton, wisaac, poseidon4o, mont29, homyachetser, Evgeny_Rodygin, AlexKowel, yurikovelenov, fjuhec, sharlybg, cardboard, duarteframos, blueprintrandom, a.romanov, BYOB, disnel, aditiapratama, bliblubli, dfelinto, lukastoenne Maniphest Tasks: T37754 Differential Revision: https://developer.blender.org/D113
2017-01-12UI: Try limiting 'x' icon to search buttonsJulian Eisel
Reusing PROP_TEXTEDIT_UPDATE instead of adding a new property flag just for search strings. Currently it's only used for search strings anyway so seems fine for now. Fixes T50336.
2016-12-12Refactor RNA property: split flags in property flags, parameter flags, and ↵Bastien Montagne
internal flags. This gives us 9 flags available again for properties (we had none anymore), and also makes things slightly cleaner. To simplify (and make more clear the differences between mere properties and function parameters), also added RNA_def_parameter_flags function (and its clear counterpart), to be used instead of RNA_def_property_flag for function parameters. This patch is also a big cleanup (some RNA function definitions were still using 'prop' PropertyRNA pointer, etc.). And yes, am aware this will be annoying for all branches, but we really need to get new flags available for properties (will need at least one for override, etc.). Reviewers: sergey, Severin Subscribers: dfelinto, brecht Differential Revision: https://developer.blender.org/D2400
2016-07-30Py-Driver: add 'self' optionCampbell Barton
Drivers can use this to refer to the data which the driver is applied to, useful for objects, bones, to avoid having to create a variable pointing to its self.
2016-06-22Cleanup: use proper RNA struct type for ListBase typeBastien Montagne
(otherwise all code using RNA has to link DNA_listbase.h, not clean at all!).
2016-05-08Docs: explain some details of RNA enumsCampbell Barton
2015-11-16minor cleanup: typoMike Erwin
2015-03-28Cleanup: redundant struct declarationsCampbell Barton
2014-12-25Refactor 'immediate search' featureBastien Montagne
Currently, code just checks whether a text-edited button uses a given icon (VIEWZOOM) to decide to apply changes on each typed char. This patch adds a propper button flag (UI_BUT_TEXTEDIT_UPDATE) and a dedicated RNA flag (PROP_TEXTEDIT_UPDATE) for that. It's also now usable not only for text buttons, but also for example for num buttons when in 'text edit' mode, etc. It also fixes an actual bug, which is for text properties, in 'immediate' mode, hitting escape would not restore org value, because `ui_apply_but_TEX()` would set its orgstr to NULL on first call (giving it to `but->rename_orig` instead of copying it). Note no change in behavior is expected from user POV. Update for addons using that 'VIEWZOOM' icon 'feature' will follow (if any). Reviewers: campbellbarton Reviewed By: campbellbarton Projects: #user_interface, #bf_blender:_next Differential Revision: https://developer.blender.org/D938
2014-04-05RNA: optimization to avoid malloc for iterators.Brecht Van Lommel
This mostly helps making Cycles scene synchronization a bit faster.
2014-02-08RNA: add flag to be used for changing numbers proportionallyCampbell Barton
2014-02-08RNA API: remove unused PROP_NEVER_CLAMP flagCampbell Barton
2014-01-04RNA API: use bool's for enum itemf callbacks.Campbell Barton
2013-12-12RNA: Add pixels property typeScott Petrovic
2013-08-30Cleanup, bitflags as bitshift ops, and some formating...Bastien Montagne
2013-08-27This commit adds optional parameters for pyfunc implementations of RNA API ↵Bastien Montagne
(i.e. callbacks, e.g. draw functions of panels, uiLists, or exec/poll/etc. of operators). Thanks to Brecht for he review! Any parameter after the first flagged with PROP_PYFUNC_OPTIONAL will be considered as optional, hence the python code does not have to define/use it. This will ease API evolutions by avoiding to break existing code when adding non-essential new parameters. Note: this will need some update to API doc generation, patch is ready, will have it reviewed by Campbell asap.
2013-05-28move BLO_sys_types.h -> BLI_sys_types.h (it had nothing todo with loading)Campbell Barton
remove MEM_sys_types.h which was a duplicate.
2013-04-25Fix [#34545] Render layer name is unwantedly translated in composite node editorBastien Montagne
Some enums' items actually are generated from data (like the render layers of compo nodes), so they should not be translated. Added a PROP_ENUM_NO_TRANSLATE new RNA flag to tag those enums (only found those for nodes, but may be more of them around). Also fix similar issue in main list of render layers (Py UI code! :P ).
2013-03-13Fix #34481: camera focal length and sensor size did not use units yet, now ↵Brecht Van Lommel
they do. I've added a separate camera unit type. It's a bit strange to have an exception for this but it ensures units are shown in familiar millimeters and it also ensures backwards compatibility.
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-04Fix #34079: RGB and HSV values inconsistencySergey Sharybin
Use COLOR_GAMMA subtype for new image color since this color is actually being color managed. Also made it so byte and float buffers would have the same exact display color after creation with the same color value. Also made it so color strip's color have COLOR_GAMMA subtype, otherwise swatch color wouldn't match render result which is not nice at all.
2013-01-28Fix for RNA function flag conflict: FUNC_USE_REPORTS was using same bits as ↵Lukas Toenne
FUNC_REGISTER. Previously errors resulting from this could go unnoticed because of broken FUNC_REGISTER test (all functions considered optional). Watch this in future ...
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-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-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-11-03BPY/RNA: determine callback functions that are allowed to write data by a flagBrecht Van Lommel
on the function instead of checking the name.
2012-10-26* New string property subtype: PASSWORDJiri Hnidek
When this new subtypes is used, then string of property is hidden using asterisks, e.g.: mysecretpassword -> **************** This code was reviewed and modified by Brecht. Thanks very much: - https://codereview.appspot.com/6713044/ This new subtype of string property is intended mostly for Add-on developers writing Add-on which communicates with some server (http, sql, ftp, verse, etc.). When this server requires user authentication and user has to type username and password, then current API didn't allow to type 'hidden' password, e.g. when you want to demonstrate this script, then everybody can see this security password. Some examples of Add-on which could use this new subtype: - On-line database of textures - Integration of render farm - Integration of Verse Security Notes: - You can copy paste hiddent string of property from text input using (Ctrl-C, Ctrl-V), but you can do this in other GUI toolkits too (this behavior it is widely used). - Text of string property is stored in plain text, but it is widely used in other GUI toolkits (Qt, Gtk, etc.). Simple examples: - https://dl.dropbox.com/u/369894/draw_op_passwd.py - https://dl.dropbox.com/u/369894/blender-password.png
2012-07-17code cleanup: spellingCampbell Barton
2012-05-12style cleanup: mostly whitespace in rnaCampbell Barton
2012-05-05Style Cleanup: Wrapping with parens for safety and whitespace editsJoshua Leung
2012-04-15style cleanup: for loop macros, also add a config file for uncrustify source ↵Campbell Barton
formatter (able to get very close to our own style guide).
2012-04-10code cleanup: replace (val >> 16) with macro RNA_SUBTYPE_UNIT_VALUE(val)Campbell 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-03-09style cleanup: comment blocksCampbell Barton
2012-03-03style cleanup - spelling corrections & update some incorrect comments.Campbell Barton
2012-02-17unify include guard defines, __$FILENAME__Campbell Barton
without the underscores these clogged up the namespace for autocompleation which was annoying.
2011-11-17add flag FUNC_USE_MAIN for rna functions which don't need the context. ↵Campbell Barton
(currently unused)
2011-11-15bytestring support for py/rna - this is so py can access data whichCampbell Barton
isn't meant to be accessed as unicode text.
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-03Change struct alignment for structs which are intended to be aligned but aren't.Campbell Barton
remove uiIconImage too since its unused.
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-08-15comment unused lines.Campbell Barton
2011-06-07rna option not to save certain properties for redoing later, currently only ↵Campbell Barton
used by operator presets.
2011-06-06Support for update callbacks in python defined RNA properties as discussed ↵Campbell Barton
last meeting. This means script authors can perform actions using these callbacks rather then on drawing which puts blender in a readonly state. Simple example: import bpy def up_func(self, context): print("test") bpy.types.Scene.testprop = bpy.props.FloatProperty(update=up_func) bpy.context.scene.testprop = 11 # prints -> test
2011-05-26add the property as an argument to enum item functions, not used yet but ↵Campbell Barton
needed for dynamic python enums.
2011-05-18RNA: make mechanism used by operators to keep python instance alive more ↵Brecht Van Lommel
generic, to be used by render engine later.