Page MenuHome

Wave Modifier: Add Sine and Lock Animation options
Needs ReviewPublic

Authored by Jacob W. (Yoshimaster96) on Nov 10 2020, 10:51 PM.

Details

Summary

The "Sine" option is added in addition to the default (previously only) "Gaussian" option as a shape for the wave.

The "Lock Animation" disables the default animation and time-dependence to make more dynamic wave animations easier. This is off by default for backwards-compatibility.

Diff Detail

Repository
rB Blender

Event Timeline

Jacob W. (Yoshimaster96) requested review of this revision.Nov 10 2020, 10:51 PM
Jacob W. (Yoshimaster96) created this revision.
Jacob W. (Yoshimaster96) created this object with edit policy "Administrators".

Not sure if the way I implemented "Lock Animation" is the best though, specifically if the existing speed/offset system is best suited for the task.

Currently all it does is force the time to be 0. What I'm wondering is if it'd be best to just add a raw offset parameter instead of using the existing system for this.

Bastien Montagne (mont29) requested changes to this revision.Nov 12 2020, 9:56 AM

Generally looks fine, and useful to me... @Campbell Barton (campbellbarton) may also want to check on tit?

source/blender/makesdna/DNA_modifier_types.h
720–723

You can instead remove _pad1 and replace it by that new int.

source/blender/modifiers/intern/MOD_wave.c
74

Prefer C comments, also again spaces...

76

Style: spaces around operators.

156

Again, spaces around operators...

272

Not really useful, the enums already have explicit names.

273–280

Please follow our codestyle, those should be indented further, not less.

278–280

Use explicit value, much easier to detect then when we add another enum value and forget to handle it somewhere.

This revision now requires changes to proceed.Nov 12 2020, 9:56 AM

Fixed issues with formatting.

Jacob W. (Yoshimaster96) marked 6 inline comments as done.

Updated padding.