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-11-29Rename 'override' to 'override_static' (and similar).Bastien Montagne
Initially there was hope at least part of this work could be used for dynamic overrides as well... but looks like not, so better be specific and avoid any confusion. PS: this commit break any file saved with static overrides, should not be an issue though.
2017-11-28Address review points (mainly some missing usages of RNA_STACK_ARRAY).Bastien Montagne
2017-11-24Address points from initial review.Bastien Montagne
2017-11-24Merge branch 'blender2.8' into id_override_staticBastien Montagne
2017-11-23RNA: Allow structs to define tags for their propertiesJulian Eisel
Adds support for defining a number of tags as part of the rna-struct definition, which its properties can set similar to property-flags. BPY supports setting these tags when defining custom properties too. * To define tags for a struct (which its properties can use then), define the tags in an `EnumPropertyItem` array, and assign them to the struct using `RNA_def_struct_property_tags(...)`. * To set tags for an RNA-property in C, use the new `RNA_def_property_tags(...)`. * To set tags for an RNA-property in Python, use the newly added tags parameter. E.g. `bpy.props.FloatProperty(name="Some Float", tags={'SOME_TAG', 'ANOTHER_TAG'})`. Actual usage of this will be added in a follow-up commit.
2017-11-16Rename destination and source parameters in override_apply.Bastien Montagne
local and reference are awfully confusing names here, since destination is a copy of reference that will become local override once applied, and source is .blend-file-written version of local override...
2017-11-15Heavy refactor of new RNA override/comparison code.Bastien Montagne
Main reason here is to make comparison/override_diff/override_store/override_apply customizable per RNA property if needed. This should allow us especially to get advanced behavior on case-by-case basis, when dealing with Pointer and Collection properties mostly. Note that IDProps remain fuzzy area for now, a big part of the code tries to take them into account, but it's most likely still missing some bits, and definitively not tested at all yet!
2017-10-19Merge branch 'master' into id_override_staticBastien Montagne
2017-10-18Cleanup: Use const for RNA EnumPropertyItem argsCampbell Barton
Practically all access to enum data is read-only.
2017-09-21Merge branch 'master' into id_override_staticBastien Montagne
2017-09-20Expose multi-dimensional array data in properties' introspection data.Bastien Montagne
Required to generate valid doc for such arrays!
2017-09-05Merge branch 'master' into id_override_staticBastien Montagne
2017-08-31RNA: Limit which classes struct-map containsCampbell Barton
Only add subclasses of: Menu, Panel, Header, UIList, Operator This helps avoid unnecessary naming collisions, See T52599 for details
2017-08-16Merge branch 'master' into id_override_staticBastien Montagne
2017-08-11RNA: Use hash lookups for structsCampbell Barton
Adding structs was checking for duplicates causing approx 75k string comparisons on startup. While overall speedup is minimal, Python access to `bpy.types` will now use a hash lookup instead of a full linked list search. See D2774
2017-03-02Add some basic UI and RNA feedback for overriden properties.Bastien Montagne
For now chose some teal blue to mark overridden state of prop in UI, kind of last nicely different tint available...
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-02-29RNA: add is_array propertyCampbell Barton
Needed since dynamic arrays would have zero length.
2016-02-09Fix T47371 - add access to 'static' enum items.Bastien Montagne
Some dynamic enums, which do not need a valid context pointer, have their 'itemf' callback always called. This is annoying for introspection tools (like the ones generating translations, or API documentation), because it means they never have access to all possible options (enum items). So now, there is also an `enum_items_static` accessor to get only statically-defined enum items. Note: only i18n tools take advantage of this currently, others are still to be updated. Reviewers: campbellbarton, sergey Differential Revision: https://developer.blender.org/D1782
2016-02-08Fix for non-bool return values of a few common RNA functions with declared ↵Lukas Tönne
boolean return. Since rBbbc7dc169dc365889bad3f3aed7b868efb432710 bool-valued RNA functions are expected to return only 0 or 1. For flag tests as in these functions the returned int value needs to be explicitly converted to bool.
2015-11-23Cleanup: use `rna_enum_` prefix for RNA enumsCampbell Barton
Definitions could shadow local vars.
2015-06-17Cleanup: duplicate includesCampbell Barton
2015-02-24RNA: correct enum flag callbackCampbell Barton
Was returning NULL, auto-completing: bpy.types.Material.bl_rna.properties["type"]. Would crash, accessing 'default_flag', thanks to @lukastoenne for investigating.
2015-02-20RNA: correct bool callbacksCampbell Barton
2015-01-26Cleanup: strcmp/strncmp -> STREQ/STREQLEN (in boolean usage).Bastien Montagne
Makes usage of those funcs much more clear, we even had mixed '!strcmp(foo, bar)' and 'strcmp(foo, bar) == 0' in several places...
2014-11-16Cleanup: use BLI_listbase_*** prefix for count,sort,sort_rCampbell Barton
2014-04-05RNA: optimization to avoid malloc for iterators.Brecht Van Lommel
This mostly helps making Cycles scene synchronization a bit faster.
2014-04-01Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT defineCampbell Barton
2014-03-20Fix for crash generating docs (enums with only callbacks)Campbell Barton
2014-02-26Fix T38855: DIRECTORY_PATH vs. DIR_PATH inconsistency in python API docs.Brecht Van Lommel
2014-01-23Fix for crash getting the name of RNA properties with empty nameCampbell Barton
2014-01-04RNA API: use bool's for enum itemf callbacks.Campbell Barton
2013-12-12RNA: Add pixels property typeScott Petrovic
2013-08-27Followup to r59536: make "is_argument_optional" available to py, and use it ↵Bastien Montagne
in API doc generation. Thanks Campbell for the much better name suggestion!
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-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-03-07use bool for rna funcs.Campbell Barton
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!