bpy.context.object.pose.bones

Sdílet
Vložit
  • čas přidán 25. 07. 2024
  • blender python rig code for pose mode
    slephy.gumroad.com
    stuff + things:
    0:00 intro
    5:26 other bone lists
    10:54 how to select + make active
    18:35 pose.bones fun
    24:55 custom_shape
    28:45 constraints, basic
    34:08 keyframe_insert, basic
  • Krátké a kreslené filmy

Komentáře • 15

  • @stevegoodman4290
    @stevegoodman4290 Před 7 měsíci

    Enjoyed this! Thanks.😎

  • @abdelrahmansameh3925
    @abdelrahmansameh3925 Před 6 měsíci

    Thanks a lot for the video ♥

  • @Crabnuts
    @Crabnuts Před rokem

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

    • @slephy
      @slephy  Před rokem +1

      you're welcome :)

  • @stevegoodman4290
    @stevegoodman4290 Před 7 měsíci

    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  Před 7 měsíci

      Truuuuuuuuueeee 😆

  • @eternalguy6023
    @eternalguy6023 Před rokem

    ♥️

  • @Hepworks
    @Hepworks Před 2 měsíci

    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  Před 2 měsíci

      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 Před 8 dny

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

    • @slephy
      @slephy  Před 8 dny

      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 Před 7 dny

      @@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  Před 7 dny

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

    • @mienaiknife
      @mienaiknife Před 7 dny

      @@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  Před 7 dny

      @@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.