“Scripted Expression” for driving the “Copy Rotation Constraint’s Influence” on Piero’s “Toe Control Bones”

Forum Archive “Scripted Expression” for driving the “Copy Rotation Constraint’s Influence” on Piero’s “Toe Control Bones”

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #13043
    Ingmar Franz
    Participant

      @theluthier You could use the “Greater Or Equal  Comparison Operator” as “Scripted Expression” for driving the “Copy Rotation Constraint’s Influence” on Piero’s “Toe Control Bones”:

      -var >= 0 

      “Positive  X Rotations” gives “0” (“FALSE”) as “Driver Value” and “Unrotated” or “Negative X Rotations” give “1” (“TRUE”) as “Driver Value”.

      File is here.

      #61423
      spikeyxxx
      Participant

        Oh, I never thought of using Booleans in Scripted Expressions. Great tip Ingmar! 

        Although I personally would use var<=0 in this case, but that’s nitpicking and I don’t know enough about Python, but that might even be just as fast (it would be in C/C++).

        #61424
        Ingmar Franz
        Participant

          @spikeyxxx You’re absolutely right using “var <= 0” instead of “-var >= 0” since it’s the simpler expression.

          #61425
          spikeyxxx
          Participant

            Yeah, it probably doesn’t matter for the computer, but for me it’s easier to read and understand 😀

          Viewing 4 posts - 1 through 4 (of 4 total)
          • The topic ‘“Scripted Expression” for driving the “Copy Rotation Constraint’s Influence” on Piero’s “Toe Control Bones”’ is closed to new replies.