Feat: Blender 4.0/5.0 API Compatibility Fixes#397
Open
GeorgeKugler wants to merge 1 commit intodfki-ric:masterfrom
Open
Feat: Blender 4.0/5.0 API Compatibility Fixes#397GeorgeKugler wants to merge 1 commit intodfki-ric:masterfrom
GeorgeKugler wants to merge 1 commit intodfki-ric:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request resolves a series of critical API compatibility issues that prevented Phobos from running correctly on Blender 4.0, 5.0, and newer versions. The addon would fail to register, and several core features would cause crashes or errors due to deprecated APIs.
Summary of Changes
This PR introduces a chain of fixes to stabilize the addon for modern Blender versions:
bgl/blfAPI Migration:bglandblfmodule usage with the moderngpushader-based API for viewport drawing inoperators/poses.py. This resolves aModuleNotFoundErroron startup.bpy.propsAPI Updates:AddonPreferences: Refactored theloglevelproperty inphobosgui.pyto use a dedicated storage property, fixing aTypeErrorrelated to accessing IDProperties onbpy_struct.bone.selectproperty with the correct API call inmodel/joints.py, fixing anAttributeErrorwhen defining joints.Operator & Workflow Fixes:
poll()methods to operators (StorePoseOperator) to prevent them from running in an invalid context, which was causing segmentation faults.ErrorMessageWithBoxcall with the standardself.report()inDefineJointConstraintsOperatorto prevent crashes.invoke()methods for several operators to ensure their UI dialogs are invoked correctly.CreateLinksOperator: Made the operator more robust and intuitive by correctly handling multiple objects, context-aware defaults, applied transforms, and collection placement.Testing:
These changes collectively bring Phobos back to a stable, usable state on modern Blender versions.