GDQuest / blender-power-sequencer

Add-on for video editing in Blender 3D: edit videos faster! Included in Blender 2.81+
https://gdquest.com/blender/power-sequencer/
GNU General Public License v3.0
708 stars 58 forks source link

Fix for AttributeError: 'Context' object has no attribute 'active_node' #475

Closed crenshawda closed 8 months ago

crenshawda commented 8 months ago

What kind of change does this PR introduce? Fix for AttributeError: 'Context' object has no attribute 'active_node' error in make_hold_frame and speed_remove_effect when attempting to access attributes on the context object, it returns None type in some contexts.

Does this PR introduce a breaking change? No

New feature or change

What is the current behavior? When I activate discombobulator on just a regular, stock cube object and execute it (I don't think this is specific to that operator, it's just where I noticed it and what I use to reproduce it), Power Sequencer give me this error in the logs:

Python: Traceback (most recent call last):
  File "{BLENDER_PATH}\blender-4.0.2-windows-x64\4.0\scripts\addons\power_sequencer\operators\speed_remove_effect.py", line 133, in poll
    if context.active_node is not None :
AttributeError: 'Context' object has no attribute 'active_node'. Did you mean: 'active_bone'?

What is the new behavior? No error occurs in logs while unrelated operator execution takes place.

NathanLovato commented 8 months ago

Thanks for your contribution. The most up-to-date code for the add-on doesn't live here anymore. It's now part of Blender, and it's other Blender contributors who have been maintaining the add-on here: https://projects.blender.org/blender/blender-addons

I'll add a pinned issue that the project needs a new maintainer.

crenshawda commented 8 months ago

Oh-- TIL! The "Report a Bug" button in the addon lead me here! I'll look at the other repository and if the changes need to be made there I'll make another PR and I'll also put in a commit to change the report target to the Blender repo.

Thanks!