Age | Commit message (Collapse) | Author |
|
It can be assumed that all scripts comply with basic pep8 formatting
regarding white-space, indentation etc.
Also remove note in best practices page & update `tests/python/pep8.py`.
If we want to exclude some scripts from make format,
this can be done by adding them to `ignore_files` in:
source/tools/utils_maintenance/autopep8_format_paths.py
Or using `# nopep8` for to ignore for individual lines.
Ref T98554
|
|
|
|
Use a shorter/simpler license convention, stops the header taking so
much space.
Follow the SPDX license specification: https://spdx.org/licenses
- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile
While most of the source tree has been included
- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
use different header conventions.
doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.
See P2788 for the script that automated these edits.
Reviewed By: brecht, mont29, sergey
Ref D14069
|
|
The storage of IDProperty UI data (min, max, default value, etc) is
quite complicated. For every property, retrieving a single one of these
values involves three string lookups. First for the "_RNA_UI" group
property, then another for a group with the property's name, then for
the data value name. Not only is this inefficient, it's hard to reason
about, unintuitive, and not at all self-explanatory.
This commit replaces that system with a UI data struct directly in the
IDProperty. If it's not used, the only cost is of a NULL pointer. Beyond
storing the description, name, and RNA subtype, derived structs are used
to store type specific UI data like min and max.
Note that this means that addons using (abusing) the `_RNA_UI` custom
property will have to be changed. A few places in the addons repository
will be changed after this commit with D9919.
**Before**
Before, first the _RNA_UI subgroup is retrieved the _RNA_UI group,
then the subgroup for the original property, then specific UI data
is accessed like any other IDProperty.
```
prop = rna_idprop_ui_prop_get(idproperties_owner, "prop_name", create=True)
prop["min"] = 1.0
```
**After**
After, the `id_properties_ui` function for RNA structs returns a python
object specifically for managing an IDProperty's UI data.
```
ui_data = idproperties_owner.id_properties_ui("prop_name")
ui_data.update(min=1.0)
```
In addition to `update`, there are now other functions:
- `as_dict`: Returns a dictionary of the property's UI data.
- `clear`: Removes the property's UI data.
- `update_from`: Copy UI data between properties,
even if they have different owners.
Differential Revision: https://developer.blender.org/D9697
|
|
|
|
|
|
Add a keying set that includes location, rotation, scale, and custom
properties.
The keying set is intentionally not based on the "Whole Character"
keying set. Instead, it is generic enough to be used in both object and
pose animation, making it possible to quickly switch between animating
characters and props without switching keying sets.
This is, according to @rikkert, what the Blender Studio animators need
99.9% of the time.
|
|
Move code common to the Whole Character keying sets ("Whole Character" and
"Whole Character (Selected Bones Only)" into a mix-in class. This avoids
the need to use direct assignments like
`poll = BUILTIN_KSI_WholeCharacter.poll`.
No functional changes.
|
|
Use `self` as self-parameter of methods, instead of the non-standard and
cryptic `ksi`.
No functional changes.
|
|
Custom properties with characters that needed escaping
had f-curves created with invalid paths.
|
|
Follow the MLA style, agreed upon in T79589. This means "from" within UI
labels should be lowercase.
Differential Revision: https://developer.blender.org/D8345
|
|
This resolves one of the last few areas where we still use inappropriate
abbreviations. Reading abbreviated words is usually slower, because
users must parse, guess and translate the words. Using abbreviations
such as 'rot' is also especially bad since it's a word in itself too.
The main advantage of abbreviations is that they are faster to *write*,
which just isn't a concern for text in the UI.
Differential Revision: https://developer.blender.org/D8174
|
|
The issue is that `something.path_resolve('"custom_property"')` raises a
`ValueError` when the custom property is set to `None`. Since `None`
cannot be stored in a keyframe anyway, the property is now silently
skipped. Not having an explicit value is the closest we can get to
`None`. This of course breaks when the value should be `None` in between
not-`None` values, but I would consider that as a problem with the rig,
and not something Blender can fix.
|
|
Prefer triple quoting to avoid having to escape quotes.
|
|
|
|
For now only `selected_pose_bones_from_active_object`, more options can
be added on demand.
Discussed this with Campbell Barton. We may need this only for selected
pose bones, time will tell.
|
|
Make it work only for the active object bones
|
|
|
|
|
|
|
|
Reorder keyingsets registration order, since it also afects order of I
menu options, better show most used ones first, pure alphabetical order
is not great here... Will likely break some muscle memory though. :|
Based on D2720 by Carlo Andreacchio (@candreacchio), thanks.
|
|
In preparation for it being removed, see: T47811
|
|
Apparently the keying sets system doesn't support subclassing
KeyingSetInfo subclasses. I have added a note to the top of the file to
indicate this to future developers.
|
|
Previously the pose library used the WholeCharacter key set, which ignores
selection and add keys for almost all bones in the rig. This is a very
slow operation on complex rigs. With this patch, only selected bones are
keyed, defaulting to keying all bones when none are selected.
Note that this fixes the FIXME previously mentioned in the source.
|
|
|
|
"connected" joint
|
|
This commit/patch/branch brings a bunch of powerful new options for B-Bones and
for working with B-Bones, making it easier for animators to create their own
rigs, using fewer bones (which also means hopefully lighter + faster rigs ;)
This functionality was first demoed by Daniel at BConf15
Some highlights from this patch include:
* You can now directly control the shape of B-Bones using a series of properties
instead of being restricted to trying to indirectly control them through the
neighbouring bones. See the "Bendy Bones" panel...
* B-Bones can be shaped in EditMode to define a "curved rest pose" for the bone.
This is useful for things like eyebrows and mouths/eyelids
* You can now make B-Bones use custom bones as their reference bone handles,
instead of only using the parent/child bones. To do so, enable the
"Use Custom Reference Handles" toggle. If none are specified, then the BBone will
only use the Bendy Bone properties.
* Constraints Head/Tail option can now slide along the B-Bone shape, instead of
just linearly interpolating between the endpoints of the bone.
For more details, see:
* http://aligorith.blogspot.co.nz/2016/05/bendy-bones-dev-update.html
* http://aligorith.blogspot.co.nz/2016/05/an-in-depth-look-at-how-b-bones-work.html
-- Credits --
Original Idea: Daniel M Lara (pepeland)
Original Patch/Research: Jose Molina
Additional Development + Polish: Joshua Leung (aligorith)
Testing/Feedback: Daniel M Lara (pepeland), Juan Pablo Bouza (jpbouza)
|
|
Fix for keyingsets tips, and make them (and a few others) findable by i18n messages extracting code (for some reasons, their bl_rna.description are void???).
|
|
visual values to key).
|
|
|
|
http://www.blender.org/documentation/blender_python_api_2_62_4/bpy.types.Whole%20Character.html
|
|
|
|
*Add a new idname to keyingsets, keeping name as label-only (using same string for both made lookup fail when using i18n other than english, as it tried to compare an untranslated static string id against a translated RNA name). Also adding a description string (can be helpful with custom keyingsets, imho).
*Fixed a few other bugs related to that area (namely, you can’t deselect current keyingset from the shift-ctrl-alt-I popup menu, and insert/delete key ops were using a rather strange way to get chosen custom keyingset…).
*Fixed UI code so that it always uses (RNA) enum, and simplified menu-creation code.
|
|
and add makefile target `check_spelling`
|
|
Talked with Brecht and Campbell and they both agreed that bpy.types should match bpy.props
In the ideal world we would rename bpy.props to BooleanProperty. This would break scripts though. So we go for a compromise and at least have some consistency.
|
|
|
|
causes Blender 2.60 RC2 to crash
This commit just rolls back part of r.40868, which was causing crashes
when trying to treat id-property-groups as bpy.type.Property to access
a special "rna_type" attribute added as part of said commit.
The underlying Py-API voodoo here is far too evil (along with the
myriad of ways of creating custom props) to work out an API fix for,
but at least we don't get anymore crashes now. In tests here, this
check even seems redundant!
|
|
properties
|
|
|
|
|
|
|
|
A change in the poll callback that Available KeyingSet used to use
restricted its use to Object-mode only, while this could also be
useful in Pose Mode (though it would only affect all channels there).
Made this use a custom poll callback now that tests for whether the
active object has an action. This does mean that if you select a bunch
of objects with animation data, but the active object doesn't have it,
then the keyingset will fail to fire, but that's been marked as a todo
in the code.
|
|
for convenience.
|
|
Rotation and Location don't have Keying Sets
Added Keying Sets for Delta Loc/Rot/Scale settings (aka dLoc/dRot).
These settings could already be found in the Object properties, under
the collapsed "Delta Transforms" panel.
I've added these to the end of the Keying Sets list, since adding any
earlier will end up breaking active Keying Set setting in older files.
Besides, these settings aren't that frequently used either...
|
|
ui/ --> startup/bl_ui
op/ --> startup/bl_operators
scripts/startup/ is now the only auto-loading script dir which gives some speedup for blender loading too.
~/.blender/2.56/scripts/startup works for auto-loading scripts too.
|