Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Allow rename of addon's folder #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions functions/mainFunctions.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import bpy
import numpy
from .jsonFunctions import objectDataToDico
from .. import __package__


def get_collection(context):
bw_collection_name = context.preferences.addons["boneWidget"].preferences.bonewidget_collection_name
bw_collection_name = context.preferences.addons[__package__].preferences.bonewidget_collection_name
collection = context.scene.collection.children.get(bw_collection_name)
if collection:
return collection
Expand Down Expand Up @@ -39,7 +40,7 @@ def fromWidgetFindBone(widget):
def createWidget(bone, widget, relative, size, scale, slide, collection):
C = bpy.context
D = bpy.data
bw_widget_prefix = C.preferences.addons["boneWidget"].preferences.widget_prefix
bw_widget_prefix = C.preferences.addons[__package__].preferences.widget_prefix

if bone.custom_shape_transform:
matrixBone = bone.custom_shape_transform
Expand Down Expand Up @@ -83,7 +84,7 @@ def createWidget(bone, widget, relative, size, scale, slide, collection):
def symmetrizeWidget(bone, collection):
C = bpy.context
D = bpy.data
bw_widget_prefix = C.preferences.addons["boneWidget"].preferences.widget_prefix
bw_widget_prefix = C.preferences.addons[__package__].preferences.widget_prefix

widget = bone.custom_shape

Expand Down
2 changes: 1 addition & 1 deletion prefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


class BoneWidgetPreferences(AddonPreferences):
bl_idname = 'boneWidget'
bl_idname = __package__

# widget prefix
widget_prefix: StringProperty(
Expand Down