Simply Push/extend Joint Limits

Simply Push/extend Joint Limits. Is it possible to create a script to do this?

preferably for Genesis 1 ...


Does something like this exist?

Edited to add subject to body of post

Post edited by Richard Haseltine on

Comments

  • Richard HaseltineRichard Haseltine Posts: 100,886
    edited December 1969

    What do you mean? Adjusting limits by script in DAZ Studio is certainly possible.

  • TimingisEverythingTimingisEverything Posts: 112
    edited December 1969

    Yes, that is what I mean

    I want to request such a thing but I may be in the wrong forum

    though I know alittle bit of visual basic, do you think I would be able to make this script?
    I don't know where to start with Daz Scripting

  • TimingisEverythingTimingisEverything Posts: 112
    edited December 1969

    A Script to Extend the limits of Genesis behind their default limits, I am wanting to request this or learn how I would go about creating this

    for Genesis 1

  • Richard HaseltineRichard Haseltine Posts: 100,886
    edited December 1969

    Merged threads and moved to Developer Discussion.

    If this is just for joint limits you can use something like this, assuming you want to increase all rotations by the same amount. You'd need to repeat the bits for the the rotation limit relaxation for the Y and Z rotations.

    // Get the primary seelction
    var item = Scene.getPrimarySelection();
    
    // if it's a bone, get the figure it belongs to
    if ( item.inherits( "DzBone" ) ) {
     item = item.getSkeleton();
    }
    
    // Assuming we now have a figure (DzSkeleton) we can relax limits
    if ( item.inherits( "DzSkeleton" ) ) {
     // Get the list of bones
     var bones = item.getAllBones();
     var control;
     // Now go through the list of bones relaxing limits
     for ( var n = 0 ; n < bones.length ; n++ ) {
      // Get the Xrotation control
      control = bones[ n ].getXRotControl();
      // If we have a controller, check for limits and relax them
      if ( control ) {
       if ( control.isClamped( 0 ) ) {
        // Increase limit by 10%
        control.setMin( control.getMin() * 1.1 );
        control.setMax( control.getMax() * 1.1 );
       }
      }
     }
    }
  • TimingisEverythingTimingisEverything Posts: 112
    edited December 1969

    Yes , Thank you for this script! this is very awesome

    also thank you for the easy to follow comments, Im kinda able to get my head around Daz scripting from this script

    w00t w00t

Sign In or Register to comment.