Skip to content

Working but throwing an error in 2.0.0 α #8

@j2l

Description

@j2l

Fantastic tool!
Hope it will be integrated as stock Blender addon soon.
I tried a bone and a cube and it works but it stills complains:

WARN (bpy.rna): c:\b\win64_cmake_vs2017\win64_cmake_vs2017\blender.git\source\blender\python\intern\bpy_rna.c:1476 pyrna_enum_to_py: current value '0' matches no enum in 'OBJECT_OT_create_driver_constraint', '(null)', 'action'
Traceback (most recent call last):
  File "C:\Users\nobody\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\driver_constraint_addon\constraint_operator.py", line 583, in execute
    self.create_property_driver(wm,context,scene,active_object)
  File "C:\Users\nobody\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\driver_constraint_addon\constraint_operator.py", line 659, in create_property_driver
    curve_var.targets[0].bone_target = bpy.context.active_pose_bone.name
AttributeError: 'NoneType' object has no attribute 'name'

location: <unknown location>:-1

location: <unknown location>:-1

The driver is missing the bone name:
image
I also tried after selecting the bone in pose mode then selected both mesh and bone.
Maybe because the name is used as index?
bones["Bone"].name
Maybe bpy.context.active_pose_bone.name moved away from 2.8+?
If I change its name, it also changes the index:
bpy.context.object.data.bones["Bonetest"].name = "Bonetest"

Hope it helps

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions