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
2019-01-02Cleanup: indentation, namingCampbell Barton
Use rna naming conventions for unit-settings callbacks.
2018-11-15RNA: always allow fallback from defaultarray to defaultvalue.Alexander Gavrilov
The python getters for the array already allowed that, but not the actual C RNA access functions. This is inconsistent, so implement the fallback in all cases. Now if by default the property should contain the same value in all positions, it is not necessary to actually use an array. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D3940
2018-09-24Spelling fixes in comments and descriptions (2.8 changes), patch by luzpaz.Brecht Van Lommel
Differential Revision: https://developer.blender.org/D3719
2018-08-31Merge branch 'master' into blender2.8Sergey Sharybin
2018-08-31Python: Enable MASS unit in FloatPropertyMonique Dewanchand
MASS unit was already implemented for the C api. Only making sure it is accessible in the python api. Also added 'CAMERA' to the documentation as a valid option.
2018-07-05Merge branch 'master' into blender2.8Campbell Barton
2018-07-05RNA: correct callback typeCampbell Barton
Missed when changing callbacks from int to bool type.
2018-07-01Merge branch 'master' into blender2.8Campbell Barton
2018-07-01RNA: use bool for boolean RNA typesCampbell Barton
We were using int's for bool arguments in BKE, just to avoid having wrapper functions.
2018-06-29Refactor static override code to pass Main around.Bastien Montagne
Access to main database is actually rarely needed, but some custom 'apply' functions do need it (like Collections' overriding of objects or children collections).
2018-06-28Static Override: fix diffing logic for ietms ID pointers case.Bastien Montagne
I.e. we can now use REPLACE operation directly on items of an RNA collection, when those items are ID pointers. Again, mandatory to support new Collection's objects/children override.
2018-06-28Static Override: RNA apply code: pass extra 'item_ptr' to apply callbacks.Bastien Montagne
This is unused currently, but is mandatory for incomming support to Collections objects and children items override support.
2018-06-09Merge branch 'master' into blender2.8Campbell Barton
2018-06-09Cleanup: trailing space in RNACampbell Barton
2018-06-05Static Override: progresses towards full support for material slots.Bastien Montagne
Material slots are a real pain to get working, due to all the black magic they do to hide object vs. obdata storage of the material... Currently hitting an order problem - we need to always set 'link' (to object or obdata) property of the slot first, before we set its material... *super-sigh*
2018-06-05RNA/Override: Move override-related property flags to own variable.Bastien Montagne
We are already running out of available flags in main, generic int, and everytime I work on static override I find new special cases that will need new specific propflag, so...
2018-05-17RNA: move enums to rna_rna.cCampbell Barton
Needed for use in rna non runtime code.
2018-05-17RNA: move enums to rna_rna.cCampbell Barton
Needed for use in rna non runtime code.
2018-05-17Static Override/RNA diffing: Use a nasty macro to factorize a bit the code.Bastien Montagne
This piece of code remains annoyingly verbose, but at least now we do not have anymore twice the same logic duplicated between single array element handling, and non-array properties.
2018-05-02Static overrides: make it clear collections need specific apply callbacks.Bastien Montagne
2018-05-02Static override: initial work for generating 'insertion' in collections.Bastien Montagne
Does not yet support applying those operations, only detecting insertions and generating matching rules was already rather complicated. Also got rid of ;ost rna_path string allocation in collection diffing code, could help a bit with speed too.
2018-04-23Static Overrides: more performances improvements.Bastien Montagne
Moved another dynamic allocating print into (usually) static one, gives us another average 8% speedup on Autumn rig.
2018-04-23Static Overrides: hide/deactivate all but 'REPLACE' operation.Bastien Montagne
Others remain in code for now, just not exposed to user.
2018-04-03Merge branch 'master' into blender2.8Bastien Montagne
2018-04-03Fix (unreported) crash when accessing some bl_rna.properties.Bastien Montagne
E.g. typing `bpy.data.bl_rna.properties[8].<tab>` in console would hard-crash trying to dereference NULL pointer. Was a missing check in rna_Property_tags_itemf().
2018-03-20Fix broken tatic verride detection in RNA collections.Bastien Montagne
We have to check all items of a collection when we want to create overrides as needed...
2018-03-16Fix (unreported) a broken 'RNA diff collection' case.Bastien Montagne
When a name property is defined for collection's struct, but no name is actually set, we want to also fallback to index case. We cannot handle empty names to address items of a collection!
2018-02-01Fix some issues in new RNA diff code.Bastien Montagne
2017-12-20Merge branch 'master' into blender2.8Campbell Barton
2017-12-19Fix crash in RNA when accessing empty property_tags listJulian Eisel
E.g. running `bpy.context.active_object.cycles.bl_rna.property` in the console would crash. Thanks @lijenstina for reporting!
2017-12-18Serious cleanup/refactor/fixing of new RNA comparison code.Bastien Montagne
Code also handling auto-generation of static overrides. Aside from some naming consistency cleanup, this commit: * Is the first step addressing the 'operator' issue with static overrides, by implementing a first version of the 'restore from reference' behavior. * Fixes several issues that were discovered on the way in enhanced RNA comparision code, like the 'zero-length dynamic array' case, or some infinite looping caused by some non-ID pointers (that for some mysterious reasons did not show up previously...). * Factorizes a bit said RNA comparison code (auto-static override generation and comparison/check were essentially doing the same thing).
2017-12-01Fix warnings in release builds.Bastien Montagne
2017-12-01Cleanup: forgot to rename RNA prop flag to override_static...Bastien Montagne
2017-11-29ID Static Override, part II: RNA changes.Bastien Montagne
This is essentially a huge refactor/extension of our existing RNA compare & copy code, since static override needs more advanced handling here. Note that not all new features are implemented yet, advanced things like collections insertion/deletion are still TODO (medium priority). This completes the ground work for overrides, remaining commits will be about UI and some basic/testing activation of overrides for a limited set of data-blocks & properties. For details see https://developer.blender.org/D2417
2017-11-29RNA: 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'})`.
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-10-18Cleanup: Use const for RNA EnumPropertyItem argsCampbell Barton
Practically all access to enum data is read-only.
2017-09-20Expose multi-dimensional array data in properties' introspection data.Bastien Montagne
Required to generate valid doc for such arrays!
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-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
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