Age | Commit message (Collapse) | Author |
|
Makes it more clear that code using this is related to the RNA
integration of a type.
Part of T74432.
Also ran clang-format on affected files.
|
|
|
|
Mistake in 03a4d3c33f82, turns out this actually is called from BPY
(which I didn't think it was). So only error out during makesrna, not at
runtime.
|
|
RE_engine_register_pass is sometimes in the headers with type
as an integer parameter, sometimes as eNodeSocketDatatype.
This caused warnings, the root cause was makesrna was not able
to generate the proper type for enums and defaulted to int.
makesrna has been extended with the RNA_def_property_enum_native_type
that allows telling makesrna the native type of an enum, if set it
will be used otherwise it will still fall back to int.
Differential Revision: https://developer.blender.org/D7117
Reviewed By: brecht
|
|
|
|
Would have prevented T74227 from slipping through
since it didn't crash on some systems.
|
|
This does not affect the RNA access API, since how the boolean is read from
DNA abstracted away in the API.
Differential Revision: https://developer.blender.org/D7002
|
|
We could of course always add checks for more invalid characters, but
I'd say they are more unlikely to happen.
|
|
The floating "Move" redo panel showed transform values with less
precision than in other places (e.g. sidebar and properties editor).
With Millimeters as unit it would even round to full integers, which
may be an issue since you typically work at higher precisions with this
unit.
Note that this only applies to the visual precision, internally we use
full floating point `float`s still.
Fixes T70367.
|
|
|
|
Avoids errors like T70281 slipping through.
|
|
|
|
These are now set from DNA defaults.
|
|
|
|
Use defaults from DNA_*_defaults.h headers, this avoids calling
RNA_def_property_*_default explicitly & having to repeat values.
|
|
Some statements were split across multiple lines because of their
trailing comments.
In most cases it's clearer to put the comments above.
|
|
|
|
Use so we can have a default update function,
that doesn't need to be set for every property.
|
|
Since these are temporary properties, changing them shouldn't cause
undo pushes. There already is a flag to disable that, but since each
operator inherits its own properties from the base, RNA define code
also had to be changed to allow inheriting the flag.
|
|
|
|
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
|
|
|
|
Some RNA errors are quite similar, use clog for consistent logging that
always includes the file, function and line number - making errors
quicker to troubleshoot.
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
This allows us to rename struct & struct members in the source code
without changing the file format.
This is useful because the code becomes increasingly confusing when
names such as oops, ipo & dupli aren't used anywhere except DNA headers.
dna_rename_defs.h is used to define renaming operations.
The renaming it's self will be done separately.
|
|
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.
|
|
|
|
Helps separate variable names from descriptive text.
Was already used in some parts of the code,
double space and dashes were used elsewhere.
|
|
|
|
|
|
This is needed because some RNA functions differentiate a NULL 'char *'
argument from an empty string.
Previously a NULL argument could be passed when the C definition
defined the default as NULL and the argument wasn't passed
which is a fairly hidden way of handling things.
Now strings use `PROP_NEVER_NULL` by default
which can be cleared for function arguments that allow None -> NULL.
|
|
The same icons are reused for "hide" and "show" properties, which need
to be in reverse order compared to each other.
|
|
|
|
Most of these were mismatched const qualifiers
|
|
|
|
We were using int's for bool arguments in BKE,
just to avoid having wrapper functions.
|
|
|
|
|
|
|
|
|
|
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...
|
|
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
|
|
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'})`.
|
|
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.
|
|
Practically all access to enum data is read-only.
|
|
This commit and previous one should be backported to 2.79a should we
release it.
|