GPv3: Time offset modifier #118371
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#118371
Loading…
Reference in New Issue
No description provided.
Delete Branch "LukasTonne/blender:gp3-time-offset-modifier"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Port of the Time Offset modifier from GPv2.
Changed behavior
The GPv2 version of this modifier handles many edge cases incorrectly:
0.5
should make every frame last 2 frames. But the result is that frame 1 lasts 3 frames and every subsequent frame lasts 2.85b1e701d4
to39ab85138e
WIP: GPv3: Time offset modifierto GPv3: Time offset modifierI see that there is commented out code and a few
#if 0
s. Should this PR still beWIP
?Good job on making the code very readable 👍 I left a few cleanup comments.
@ -0,0 +134,4 @@
* reversing the direction. */
static const IndexRange find_key_range(const Span<int> sorted_keys, const FrameRange &frame_range)
{
IndexRange result = sorted_keys.index_range();
Can be
const
Is modified below (after function was cleaned up), the function snips off the head and tail keys that don't affect the frame range, and then returns
result
.@ -0,0 +449,4 @@
const auto mode = GreasePencilTimeModifierMode(tmd.mode);
const bool use_custom_range = tmd.flag & MOD_GREASE_PENCIL_TIME_CUSTOM_RANGE;
const Scene *scene = DEG_get_evaluated_scene(ctx.depsgraph);
I think
fill_scene_timeline
should just get aconst Scene &eval_scene
(instead ofconst ModifierEvalContext &ctx
). ThenDEG_get_evaluated_scene
can just be called once before the loop over the layers inmodify_geometry_set
.@ -0,0 +497,4 @@
const IndexMask layer_mask = modifier::greasepencil::get_filtered_layer_mask(
grease_pencil, tmd->influence, mask_memory);
for (const int64_t i : layer_mask.index_range()) {
Would be a bit better to use the
foreach_index
API here:@blender-bot build
@blender-bot build
@blender-bot build
@blender-bot build
Thanks, looks good.
@blender-bot build
@blender-bot build
@blender-bot build