Cleanup: Power Sequencer update links and none type attribute access errors #105085

Open
Dennis Crenshaw wants to merge 5 commits from Dennis-Crenshaw/blender-addons:power-sequencer-fixes into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
3 changed files with 3 additions and 4 deletions

View File

@ -29,8 +29,7 @@ bl_info = {
"version": (2, 0, 2),
"blender": (2, 93, 3),
"location": "Sequencer",
"tracker_url": "https://github.com/GDquest/Blender-power-sequencer/issues",
"wiki_url": "https://www.gdquest.com/docs/documentation/power-sequencer/",
"doc_url": "{BLENDER_MANUAL_URL}/addons/sequencer/power_sequencer.html"

Addons bundled with Blender automatically get a "Report a Bug" button that creates a new bug report in this blender-addons issue tracker, without needing to specify a "tracker_url" (though possibly due to a bug, this only happens currently if "doc_url" is defined).

(The "tracker_url" used here was also creating a bug report in the blender repository, but it should have been blender-addons.)

Addons bundled with Blender automatically get a "Report a Bug" button that creates a new bug report in this `blender-addons` issue tracker, without needing to specify a `"tracker_url"` (though possibly due to a bug, this only happens currently if `"doc_url"` is defined). (The `"tracker_url"` used here was also creating a bug report in the `blender` repository, but it should have been `blender-addons`.)

This is (probably very obviously) my first foray into trying to contribute to Blender-- the way I got here was clicking the "report a bug" button on the plugin I saw an error for, which took me to the original gdquest github repo for the addon, and I tried to submit a PR there and was informed it now lived in the core blender addons repo... so here I am and thanks for being patient while I learn!

If I understand correctly I can replace both the wiki_url and the tracker_url with just the templated doc_url you provided above and the make job should automate providing a proper tracker_url to this core repo for bug reports?

Is this true for the rest of the core maintained addons and do all the addons in this core addons repo need to have their tracking_url point to their entry here instead of their original external repo? Eg. I just looked at add_camera_rigs addon and it has a doc_url as well as a tracking_url defined to an external repository and currently the "report a bug" button takes you to the external repository defined by the tracking_url it provided (telling me that the doc_url auto gen doesn't override the tracking_url if one is defined)

This is (probably very obviously) my first foray into trying to contribute to Blender-- the way I got here was clicking the "report a bug" button on the plugin I saw an error for, which took me to the original gdquest github repo for the addon, and I tried to submit a PR there and was informed it now lived in the core blender addons repo... so here I am and thanks for being patient while I learn! If I understand correctly I can replace both the `wiki_url` and the `tracker_url` with just the templated `doc_url` you provided above and the make job should automate providing a proper `tracker_url` to this core repo for bug reports? Is this true for the rest of the core maintained addons and do all the addons in this core addons repo need to have their `tracking_url` point to their entry here instead of their original external repo? Eg. I just looked at add_camera_rigs addon and it has a `doc_url` as well as a `tracking_url` defined to an external repository and currently the "report a bug" button takes you to the external repository defined by the `tracking_url` it provided (telling me that the `doc_url` auto gen doesn't override the `tracking_url` if one is defined)

I don't know for sure, but I'm guessing it's up to the maintainer of the addon whether they want to handle any bug reports here or on a different site.


As for the 'automatic tracker_url', I knew that io_scene_fbx didn't have a tracker_url defined, but that it got a "Report a Bug" button that opened new issues in this repository somehow, so I looked up the UI source code for the buttons (right click -> Edit Source from within Blender when Developer Extras are enabled in the Interface preferences): 6b0ecd9601/scripts/startup/bl_ui/space_userpref.py (L2264) . Basically, if either of tracker_url or doc_url are defined, then a button or two will be drawn under the addon in the Add-ons list. Then, if there's no tracker_url and the addon is not user-installed (so its one that is bundled with Blender), then a button using the 'BUG_ADDON' preset is drawn, which is what you'll see if you scroll to the FBX addon and expand its UI.

I've represented the different possible cases with a table:

doc_url tracker_url user_addon Result
exists exists True/False Documentation button that goes to doc_url and "Report a Bug" button that goes to tracker_url
exists True Only a documentation button that goes to doc_url
exists False Documentation button that goes to doc_url and "Report a Bug" button that uses the 'BUG_ADDON' preset
exists True/False Only a "Report a Bug" button that goes to tracker_url
True No buttons
False No buttons (maybe a bug)

What I think could be a bug with this UI code is that no buttons are drawn when the addon is not a user_addon, because in that case, the '"Report a Bug" button that uses the 'BUG_ADDON' preset' could still be used.

I don't know for sure, but I'm guessing it's up to the maintainer of the addon whether they want to handle any bug reports here or on a different site. --- As for the 'automatic `tracker_url`', I knew that `io_scene_fbx` didn't have a `tracker_url` defined, but that it got a "Report a Bug" button that opened new issues in this repository somehow, so I looked up the UI source code for the buttons (right click -> `Edit Source` from within Blender when Developer Extras are enabled in the Interface preferences): https://projects.blender.org/blender/blender/src/commit/6b0ecd9601314a1bac3439eae0a2287d172b05e1/scripts/startup/bl_ui/space_userpref.py#L2264 . Basically, if either of `tracker_url` or `doc_url` are defined, then a button or two will be drawn under the addon in the Add-ons list. Then, if there's no `tracker_url` and the addon is not user-installed (so its one that is bundled with Blender), then a button using the `'BUG_ADDON'` preset is drawn, which is what you'll see if you scroll to the FBX addon and expand its UI. I've represented the different possible cases with a table: | `doc_url` | `tracker_url` | `user_addon` | Result | | -- | -- | -- | -- | | exists | exists | True/False | Documentation button that goes to `doc_url` and "Report a Bug" button that goes to `tracker_url` | | exists | | True | Only a documentation button that goes to `doc_url` | | exists | | False | Documentation button that goes to `doc_url` and "Report a Bug" button that uses the `'BUG_ADDON'` preset | | | exists | True/False | Only a "Report a Bug" button that goes to `tracker_url` | | | | True | No buttons | | | False | No buttons (maybe a bug) What I think could be a bug with this UI code is that no buttons are drawn when the addon is not a `user_addon`, because in that case, the '"Report a Bug" button that uses the `'BUG_ADDON'` preset' could still be used.
"support": "COMMUNITY",
Dennis-Crenshaw marked this conversation as resolved Outdated

This should be "doc_url" if the addon should have a "Documentation" button that opens the URL.

Also, "{BLENDER_MANUAL_URL}/addons/sequencer/power_sequencer.html" can be used to prepend the manual URL for the current Blender version rather than the latest Blender version.

This should be `"doc_url"` if the addon should have a "Documentation" button that opens the URL. Also, `"{BLENDER_MANUAL_URL}/addons/sequencer/power_sequencer.html"` can be used to prepend the manual URL for the current Blender version rather than the latest Blender version.
"category": "Sequencer",
}

View File

@ -39,7 +39,7 @@ class POWER_SEQUENCER_OT_make_hold_frame(bpy.types.Operator):
@classmethod
def poll(cls, context):
return context.scene.sequence_editor.active_strip.type in SequenceTypes.VIDEO
return context.scene.sequence_editor.active_strip.type in SequenceTypes.VIDEO if context.scene.sequence_editor.active_strip is not None else None
Dennis-Crenshaw marked this conversation as resolved Outdated

return is missing

`return` is missing
def invoke(self, context, event):
window_manager = context.window_manager

View File

@ -30,7 +30,7 @@ class POWER_SEQUENCER_OT_speed_remove_effect(bpy.types.Operator):
@classmethod
def poll(cls, context):
return context.scene.sequence_editor.active_strip.type == "META"
return context.scene.sequence_editor.active_strip.type == "META" if context.scene.sequence_editor.active_strip is not None else None
def execute(self, context):
active = context.scene.sequence_editor.active_strip