bpy.context.object.pose.bones

Поділитися
Вставка
  • Опубліковано 27 сер 2024

КОМЕНТАРІ • 15

  • @stevegoodman4290
    @stevegoodman4290 8 місяців тому

    In fact :
    bpy.context.object.pose.bones['bone 1'].bone.
    &
    bpy.context.object.data.bones['bone 1'].
    give you access to the exact same commands.

    • @slephy
      @slephy  8 місяців тому

      Truuuuuuuuueeee 😆

  • @Crabnuts
    @Crabnuts Рік тому

    thank you so much for this video! it's taught me a ton

    • @slephy
      @slephy  Рік тому +1

      you're welcome :)

  • @stevegoodman4290
    @stevegoodman4290 8 місяців тому

    Enjoyed this! Thanks.😎

  • @eternalguy6023
    @eternalguy6023 Рік тому

    ♥️

  • @abdelrahmansameh3925
    @abdelrahmansameh3925 7 місяців тому

    Thanks a lot for the video ♥

  • @Hepworks
    @Hepworks 3 місяці тому

    thanks for this - I've been trying to get a python script to help with lip sync -- this seems to be something that has been solved years ago, but so far I'm struggling....I've been having the merlin plug in help with my python, but am wondering if you can just point me in the right direction: ideally I'd import a csv file that has frame numbers and visemes, then the script would pose my model with the pose name that matches the viseme name at the relevant frames. I've gotten 'parts' of this to work, like applying a pose on a very simple armature, but think I must have a concept or several wrong in getting python to 'find' and apply the poses. Any help appreciated

    • @slephy
      @slephy  3 місяці тому

      i don't understand your problem properly and the tools you are mentioning i have no experience with, but if you are talking about poses, you might need to search for actions and the values on the keyframes of those actions

  • @mienaiknife
    @mienaiknife Місяць тому

    How do I delete a bone constraint based on what type of constraint it is?

    • @slephy
      @slephy  Місяць тому

      constraint.type is how you get the constraint type. C.active_pose_bone.constraints.remove(constraint) is how to delete it. Example (hopefully the youtube respects the spacing i used here): select the bone you want to remove constraints from:
      for constraint in C.active_pose_bone.constraints:
      if constraint.type == 'COPY_TRANSFORMS':
      C.active_pose_bone.constraints.remove(constraint)

    • @mienaiknife
      @mienaiknife Місяць тому

      @@slephy I was hoping to select the bone that I wanted to delete the constraint of based on its name rather than whether it's the active bone, but now I'm guessing that it might only be possible to do this operation with Python if the bone is actively selected. Is that correct?

    • @slephy
      @slephy  Місяць тому

      @@mienaiknife No, you can easily do it with the bone name: C.object.pose.bones['bone_name']

    • @mienaiknife
      @mienaiknife Місяць тому

      @@slephy I'm getting an error that says "'PoseBone' object is not iterable," but maybe that has something to do with the fact that I'm still on Blender 3.6?

    • @slephy
      @slephy  Місяць тому

      @@mienaiknife No, you can't iterate through a single pose bone, because it's not part of a list, but you can iterate through the constraints of a single pose bone.