Commit Graph

105 Commits

Author SHA1 Message Date
de13d0a80c doxygen: add newline after \file
While \file doesn't need an argument, it can't have another doxy
command after it.
2019-02-18 08:22:12 +11:00
eef4077f18 Cleanup: remove redundant doxygen \file argument
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
2019-02-06 15:45:22 +11:00
744f633986 Cleanup: trailing commas
Needed for clan-format not to wrap onto one line.
2019-02-03 14:59:11 +11:00
65ec7ec524 Cleanup: remove redundant, invalid info from headers
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.
2019-02-02 01:36:28 +11:00
Anton Stötzer
4e9817a4fb Fix wrong f-curve modifier mute checkbox icon / tooltip.
Differential Revision: https://developer.blender.org/D3930
2019-01-23 18:31:15 +01:00
de1d3e5f5f NLA: implement a new blending mode that intelligently combines actions.
The existing Add and Multiply blending modes have limited usability,
because the appropriate operation for meaningfully combining values
depends on the channel. This adds a new mode that chooses the operation
automatically based on property settings:

- Axis+Angle channels are summed, effectively averaging the
  axis, but adding up the angle. Default is forced to 0.

- Quaternion channels use quaternion multiplication:

  result = prev * value ^ influence

- Scale-like multiplicative channels use multiplication:

  result = prev * (value / default) ^ influence

- Other channels use addition:

  result = prev + (value - default) * influence

Inclusion of default in the computation ensures that combining
keyframed default values of properties keeps the default state,
even if the default isn't 0 or 1.

Strips with this mode can be keyframed normally in Tweak mode,
except that for quaternion rotation keyframing always inserts
all 4 channels, and the channel value sliders on the left side
of Graph/Action editors won't insert keys without Auto Key.
Quaternion keys are also automatically normalized.

Differential Revision: https://developer.blender.org/D4190
2019-01-14 19:14:28 +03:00
79312c1912 Depsgraph: Remove duplicated sets of recalc/update flags
There were at least three copies of those:

- OB_RECALC* family of flags, which are rudiment of an old
  dependency graph system.
- PSYS_RECALC* which were used by old dependency graph system
  as a separate set since the graph itself did not handle
  particle systems.
- DEG_TAG_* which was used to tag IDs.

Now there is a single set, which defines what can be tagged
and queried for an update. It also has some aggregate flags
to make queries simpler.

Lets once and for all solve the madness of those flags, stick
to a single set, which will not overlap with anything or require
any extra conversion.

Technically, shouldn't be measurable user difference, but some
of the agregate flags for few dependency graph components did
change.

Fixes T58632: Particle don't update rotation settings
2018-12-07 11:37:38 +01:00
55e719ec35 Merge branch 'master' into blender2.8 2018-11-14 17:21:34 +11:00
d7f55c4ff5 Cleanup: comment block tabs 2018-11-14 17:10:56 +11:00
aee0446b6b Add a lot of update tagging to operations with NLA tracks and strips. 2018-11-12 16:18:33 +03:00
b2411fe269 Fix unneeded/unwanted user counter when freeing CoW NLA 2018-10-29 11:48:37 +01:00
8dff538989 Merge branch 'master' into blender2.8 2018-07-05 22:46:04 +02:00
0e2915b292 RNA: correct callback type
Missed when changing callbacks from int to bool type.
2018-07-05 22:25:34 +02:00
2ca8230f67 Merge branch 'master' into blender2.8 2018-06-09 14:43:01 +02:00
fb565ddb68 Cleanup: trailing space in RNA 2018-06-09 14:40:09 +02:00
1c4b04f1fd Merge branch 'master' into blender2.8 2018-06-06 19:52:20 +02:00
70b705b5fe UI: NLA: Influence should be a factor (RNA) 2018-06-06 12:09:13 -04:00
222a941a2b Merge branch 'master' into blender2.8 2018-03-08 17:47:02 +11:00
5331581ea4 Cleanup: Use BKE_ prefix for all public functions exposed by the NLA module 2018-03-08 17:15:34 +13:00
ec2bbc90e7 Merge branch 'master' into blender2.8 2017-10-18 17:09:41 +11:00
ab7ebf2b10 Cleanup: Use const for RNA EnumPropertyItem args
Practically all access to enum data is read-only.
2017-10-18 16:04:07 +11:00
4233ccfb6c Merge branch 'master' into blender2.8 2017-07-11 16:18:17 +02:00
b452003015 Fix T51879: NLA Influence can not be autokeyed
As with Strip Time, the updates here would get triggered before the
autokeying had a chance to record the unkeyed values, making it impossible
to autokey.
2017-07-11 23:33:24 +12:00
d675415eef Replace all old DAG calls with direct calls to new DEG and remove BKE_depsgraph.h
This removes BKE_depsgraph.h and depsgraph.c
2017-06-08 10:17:04 +02:00
65582e75e3 Fix: NLA "Strip Time" setting cannot be edited
This is a hacky fix for a regression introduced sometime after 2.76.
The "Strip Time" setting on NLA Strips could not be edited without the
value immediately jumping back to the current FCurve value (or 0.0 if no
keyframes existed); even enabling autokey wouldn't let you key the property.

Until we have proper overrides (that only lose their values on frame change),
it's best that this setting is editable, even if it does mean it you have to
manually change the frame to see the updated values.
2017-01-03 11:42:50 +13:00
440d104279 Refactor RNA property: split flags in property flags, parameter flags, and 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-12-12 15:46:06 +01:00
Julian Eisel
6f80604509 RNA/UI: Allow displaying in tooltip why RNA property isn't editable
This commit allows RNA properties to return additional info on their editable state which may then be displayed in tooltips. To show how it works, it also adds some info for the editable check of proxies. For generally un-editable properties or properties of a linked data-block, RNA returns default strings.

| {F362785} | {F362786} | {F362787} |

Reviewed by brecht, thanks!

Differential Revision: https://developer.blender.org/D2243
2016-09-22 00:10:53 +02:00
c41b2bd7c6 Fix T48223: 3D View not refresh after changing Blending mode in NLA.
This fixes a lot of things in NLA RNA update handling (which basically did not update anything previously).

There are more update issues with this editor though...
2016-04-22 16:48:57 +02:00
676d790d29 Cleanup: use rna_enum_ prefix for RNA enums
Definitions could shadow local vars.
2015-11-23 17:40:09 +11:00
8d08976ef0 Cleanup: return PROP_EDITABLE rna flag
Harmless, since the flag happens to be 1.
2015-10-06 21:43:04 +11:00
4269c56904 Fix T45865: NLA: Auto Blend is not recalculated when adjusting repeat. 2015-09-24 10:53:09 +02:00
09b7ec1864 Fix T45865: Auto Blend is not recalculated when adjusting start/end/scale etc. of strip through RNA. 2015-08-21 16:18:20 +02:00
b3ac7c07ff Added NlaStrip.fcurves.find(data_path, array_index=0)
This is the same as D1427 / 89e5c75666
except for NlaStrip.fcurves instead of Action.fcurves. It makes finding
a specific fcurve in Python much easier, as you don't need a Python-side
loop any more.

Reviewers: aligorith

Reviewed By: aligorith

Differential Revision: https://developer.blender.org/D1430
2015-07-23 15:38:25 +02:00
c31c8fa14e Fix T39015: NLA Clip Auto Blend In/Out Check Box Not Working
Fix for regression accidentally introduced in 5f18d863a9 (affecting current 2.70 rc-1)
which means that this setting wasn't working anymore at all.
2014-03-07 19:11:53 +13:00
5f18d863a9 Bugfix: Toggling "auto-blends" option on NLA Strips doesn't update them immediately 2014-02-22 00:53:04 +13:00
646cc46400 Fix typo in nla blend modes. 2014-01-26 20:12:29 +04:00
24b4304334 fix for nla-strip-path function not returning an allocated pointer and new mask function ignoring the name argument from RNA-api. 2013-09-20 06:23:09 +00:00
202109a8f5 code cleanup: set enums as static or add RNA_enum_types.h where they are used elsewhere.
also minor style cleanup.
2013-09-11 21:27:14 +00:00
eda757d4c8 Bugfix [#34645] NlaStrip Tweak Mode - No automatic action length sync on exit
Originally I was thinking of not restoring this functionality (see report for
further details). However, upon rechecking the code, it seems that there was
actually a define set up for this already, but which wasn't actually hooked up
yet. So, this commit basically exposes this option ("Sync Length") which ensures
that when exiting tweak mode on a NLA Strip, that strip instance (and not other
users of the same action) will be updated to include the newly added keyframes.
This option is not enabled by default, and shouldn't really be needed in most
("intended") workflows.
2013-04-26 13:42:55 +00:00
7dde355185 fix [#34958] keyframe many items would fail if there was a (") in the text. 2013-04-23 20:10:22 +00:00
dfa8540cdf use bool for rna funcs. 2013-03-07 02:44:55 +00:00
bfa065f10c Bugfix [#33852] Scale of a strip in NLA is changed after moving it long distance
using numeric input

When using numeric input to move strips, the strip extent clamping code could
end up prematurely truncating one endpoint. This was because the clamping code
uses the values of the other end (e.g. end for start, and start for end) as one
of the limits on its allowable range to prevent inverted strips.

Now we just set these values twice - the first time, one of the endpoints may
still get truncated (while the other one will be able to go to its correct
value), then the second time both will get set correctly (and validated too).
2013-01-21 06:31:17 +00:00
a31449edad all remove functions now invalidate the RNA objects passed, to help script authors to avoid bugs with accessing removed data. 2012-11-02 09:41:26 +00:00
a99b377167 More UI messages fixes and tweaks, and BKE_report<->BKE_reportf. 2012-10-20 10:28:34 +00:00
aa49ca25d5 incorrect spelling in comments 2012-09-26 20:05:38 +00:00
6c1da4d022 code cleanup: make many functions static 2012-09-22 14:07:55 +00:00
c41e1e434a code cleanup: replace MIN2/MAX2 with minf/maxf 2012-07-29 16:59:51 +00:00
16516238e2 patch [#32152] Make NlaTrack.is_solo settable
from Peter Amstutz (tetron)
2012-07-20 19:11:47 +00:00
a9f6e54384 style cleanup: mostly whitespace in rna 2012-05-12 11:01:29 +00:00
ff4ff9c8a4 Bugfixes for various ID-block references (Constraints, NLA)
* ID-blocks referenced by Constraints but not being used as the target objects
(such as Actions in the Action Constraint, or Text Blocks in PyConstraints) now
get usercounts for being referenced in this way. This should fix ancient bugs
such as [#19205] and [#8593]. More tests still needed to verify that this
does now play nicely with proxies.

* Changing actions used by NLA strips should now update the usercounts
accordingly
2012-05-05 15:54:08 +00:00