Age | Commit message (Collapse) | Author |
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
This affects point, spot and area lights. Sun light strength remains without
a unit. This change does not affect .blend file compatibility in any way, as
with the rest of the unit system it's purely a display and editing feature.
Not used for Cycles yet, that will be done after unifying the settings with
Eevee.
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
Needed for clan-format not to wrap onto one line.
|
|
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
|
|
Prevents clang-format merging into a single line.
|
|
Allows expanding tabs before running clang-format.
|
|
|
|
Differential Revision: https://developer.blender.org/D3697
|
|
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.
|
|
Differential Revision: https://developer.blender.org/D3628
|
|
|
|
We were using int's for bool arguments in BKE,
just to avoid having wrapper functions.
|
|
|
|
This is for internal CAPI use only, avoid confusion w/ bpy.utils module.
|
|
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'})`.
|
|
Move function error printing utility into py_capi_utils.
|
|
Practically all access to enum data is read-only.
|
|
This was added to all prop types, when it is only available for Pointer ones.
|
|
No functional changes.
|
|
Regression in a7b3047
|
|
This was meant to be generic but introduced possible type errors
and unnecessary complication.
Replace with typed PyC_Tuple_PackArray_* functions.
Also add PyC_Tuple_Pack_* macro which replaces some uses of
Py_BuildValue, with the advantage of not having to parse a string.
|
|
Avoids setting exceptions inline,
also use Matrix_ParseAny for bmesh.ops.
Some inline exceptions are kept because they show useful details.
|
|
|
|
|
|
|
|
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
|
|
|
|
Blender doesn't necessarily crash when Python doesn't keep references to
the returned strings. As a result, someone that implements this incorrectly
could be lulled into a false sense of correctness by Blender not crashing.
|
|
|
|
|
|
no functional changes
|
|
Definitions could shadow local vars.
|
|
This could cause problems since they could be any int,
then passed directly to internal functions that assume bools.
|
|
Access arrays directly, avoiding type-check every time.
|
|
|
|
Enum's itemf callback can be called without context in some cases (UI, doc generation...).
Python's enum properties did not handle this at all - it's kind of odd this did not cause
more trouble and wasn't notice earlier... Probably dynamic enums using context are not
much used in py code.
Note about nodes: those are heavy users of dynamic enum with context. Now,
we expect `NodeCategory.poll()` and `NodeItem.poll()` to always be called with
a valid context (since when there is no context available, we can assume `poll()`
is always True). `NodeCategory.items()`, however, must accept NULL context, so if
you use custom `items` callable for your custom node categories, you may need
to update it (as was done here for builtin `node_group_items()`).
|
|
|
|
|
|
* There was no real default value for this parameter (neither "" nor None would work the same as
not specifying that parameter). Now, 'None' is considered as default value, and you get
exact same behavior with this value and if not specifying it. This is important at least for
consistency, and potentially too in some esoteric cases (like generated code or so).
* Add a warning about the fact that 'default' parameter shall not be psecified when items
are given a callback function.
|
|
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
|
|
items of enums.
Rather straightforward, allows for 'DATA' icons (like mat or tex 'previews')
to be used as icon for operator button or items of an enum.
Patch by Simon Lušenc, with minor cleanup by self.
|
|
|
|
wtihout kwarg "type".
Turned up to be a cleanup of doc in that whole module...
|
|
|
|
|
|
|
|
added some missing flags into docs too.
|
|
|
|
|