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.
First-time contributor

Updating the plugin's issue and wiki links as well as fixing a couple of errors I saw when I was using an unrelated addon in the 3d viewport.

Updating the plugin's issue and wiki links as well as fixing a couple of errors I saw when I was using an unrelated addon in the 3d viewport.
Dennis Crenshaw added 3 commits 2023-12-25 03:21:26 +01:00
Thomas Barlow reviewed 2023-12-27 04:20:37 +01:00
@ -40,3 +40,3 @@
@classmethod
def poll(cls, context):
return context.scene.sequence_editor.active_strip.type in SequenceTypes.VIDEO
context.scene.sequence_editor.active_strip.type in SequenceTypes.VIDEO if context.scene.sequence_editor.active_strip is not None else None
Member

return is missing

`return` is missing
Dennis-Crenshaw marked this conversation as resolved
Thomas Barlow reviewed 2023-12-27 04:37:30 +01:00
@ -32,2 +32,2 @@
"tracker_url": "https://github.com/GDquest/Blender-power-sequencer/issues",
"wiki_url": "https://www.gdquest.com/docs/documentation/power-sequencer/",
"tracker_url": "https://projects.blender.org/blender/blender/issues/new?template=.gitea%2fissue_template%2fbug.yaml",
"wiki_url": "https://docs.blender.org/manual/en/latest/addons/sequencer/power_sequencer.html",
Member

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.
Dennis-Crenshaw marked this conversation as resolved
Thomas Barlow reviewed 2023-12-27 04:44:37 +01:00
@ -31,3 +31,2 @@
"location": "Sequencer",
"tracker_url": "https://github.com/GDquest/Blender-power-sequencer/issues",
"wiki_url": "https://www.gdquest.com/docs/documentation/power-sequencer/",
"tracker_url": "https://projects.blender.org/blender/blender/issues/new?template=.gitea%2fissue_template%2fbug.yaml",
Member

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`.)
Author
First-time contributor

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)
Member

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.
Dennis Crenshaw added 1 commit 2023-12-29 15:23:08 +01:00
Dennis Crenshaw added 1 commit 2023-12-29 15:47:25 +01:00
ae6bfda81e Replace wiki and tracking urls with templated doc_url
Replace wiki and tracking urls with templated doc_url which provides automated tracking_url generation
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u power-sequencer-fixes:Dennis-Crenshaw-power-sequencer-fixes
git checkout Dennis-Crenshaw-power-sequencer-fixes
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#105085
No description provided.