Scripts Delete Keyframe Figure and Lock parts body for DS3 and DS4 (update V1.3)

ajd_at_072df9a27dajd_at_072df9a27d Posts: 60
edited August 2014 in Freebies

Scripts for Daz Studio 3.1 and 4.x

ACDZ_DeleteKeyFigure.dsa .- Delete Keyframe actual for figure
ACDZ_DeleteKeyFigureDialog.dsa .- Delete Range of Keyframes for figure or nodes selected
ACDZ_LockPartBody.dsa .- Lock/Unlocks or nodes selection for parts bodys

Changes: Add selection nodes for parts bodys
fix selection all for LockiPartBody
Add selection nodes for "delete range Keyframes figures"

http://www.sharecg.com/v/76963/view/21/DAZ-Studio/scripts-for-Delete-keyframe-and-Locks-V1.3
Warning:
Problems with morphs DaZ Studio for 4.X

Based in scripts mCasual


// DAZ Studio version 3.1  filetype DAZ Script
//Delete KeyFrame a Figure of Frame Actual
//Version 1.3 
var tick = Scene.getTimeStep();
FrameActual=Scene.getFrame()
var TimeRange=DzTimeRange(FrameActual*tick,FrameActual*tick)
 
setBusyCursor();
beginUndo();
Procesar()
acceptUndo("DeleteKeyFrameActualFigure");
clearBusyCursor();
function Procesar()
{
 nodeselection=Scene.getPrimarySelection();
 if (nodeselection)
 {
  Skeleto=nodeselection.getSkeleton()
 if (Skeleto)
 {
   
   //Delete KeyFrame for root Skeleto
   DelKeyNodesProperties(Skeleto)
   
   //Delete KeyFrame for All Bones
   var bones = Skeleto.getAllBones();
   for( var i = 0 ; i < bones.length ; i++ ) 
   {
    DelKeyNodesProperties( bones[ i ] );
   }
 }
 else
 {
      DelKeyNodesProperties(nodeselection)
   for( var i = 0 ; i < nodeselection.getNumNodeChildren() ; i++ ) 
   {
   DelKeyNodesProperties(nodeselection.getNodeChild(i))
   }
 }
  }
  else
  {
   MessageBox.information("Selection a Figure" ,"Information","Accept")
  }
}


//////////Functions

//Transformation and Parameters for Nodes and Bones
function DelKeyNodesProperties( Node )
{
 var NumProperties = Node.getNumProperties()
 for( var i = 0 ; i < NumProperties ; i++ ) 
 {
  DeleteKeyProperty( Node, i  );
 }
}
 
function DeleteKeyProperty(Node,item)
{
 Node.getProperty(item).deleteKeys(TimeRange);
}



KeyFrame1.3_.jpg
406 x 394 - 64K
Unlocks1.3_.jpg
438 x 579 - 104K
Post edited by ajd_at_072df9a27d on

Comments

  • DaremoK3DaremoK3 Posts: 798
    edited December 1969

    Looks promising...

    Could you please give an example of usage, and under what normal conditions one would need to use this?

  • ajd_at_072df9a27dajd_at_072df9a27d Posts: 60
    edited December 1969

    solutions to:
    How to remove animation from scene?
    http://www.daz3d.com/forums/discussion/6161/
    Moving Key frames
    http://www.daz3d.com/forums/discussion/608/

    Usage:
    For animators

    Situation:
    Move pose figure of frame 30 to 40

    Move keyFrame Figure:
    1.- "Memorize current Figure pose" frame 30
    2.- Run Script ACDZ_DeleteKeyFigure.dsa (Shorcut)
    3.- go frame 40 and "Restore current Figure pose "

  • mCasualmCasual Posts: 4,605
    edited December 1969

    in DS3, i get access to bone morphs using something like

     
     var obj = node.getObject();
     if( !obj )
     {
      return;
     }
     var n = obj.getNumModifiers()
     for( var i = 0; i < n; i++ )
     {
      modif = obj.getModifier( i );
      if( modif.inherits( "DzMorph" ) )
      {
       processProp( modif.getValueChannel() )
      }
     } 
    

    in DS4.5 only the skeleton has an object,
    if i remember correctly the names of the morph channels in DS 4.5
    lets you know which bone is affected by each morph

  • ajd_at_072df9a27dajd_at_072df9a27d Posts: 60
    edited December 1969

    Thanks casual by info.
    And thanks by your scripts

  • I used this script but it didn't work when I used Universal tool and move the hand.

    I want to make the push-up animation but I can't fix the hands on the ground, it always move a little bit between 2 actions: up and down.

    Plz show me how to do this animation?

    Demo the animation I want to do: https://youtu.be/5eSM88TFzAs

    Thanks a lot!

  • mCasualmCasual Posts: 4,605
    edited March 2016

    if you learn and use the two following scripts, you can get very very solid animations like that

    - mcjAutoLimb2015 - the whole legs and arms animation for the given hand/feet positions

    https://sites.google.com/site/mcasualsdazscripts6/mcjautolimb2015

    - mcjKeepOrient - the orientation of William's hands and feet

    https://sites.google.com/site/mcasualsdazscripts/mcjkeeporient

    ----- 

    for this animation i also used

    - mcjHoldOn ( Gabrielle's feet orientation )

    - mcjParent ( to make Gabrielle's feet targets follow William's hips )

    - mcjCycleFilter yo get good looping on Gabrielle's arm movements )

     

    "snapping leg" problem can be avoided by setting the knee limits to forbid negative bend angles -

    and by making sure the feet targets are never physically out of reach

     

     

     

    I used this script but it didn't work when I used Universal tool and move the hand.

    I want to make the push-up animation but I can't fix the hands on the ground, it always move a little bit between 2 actions: up and down.

    Plz show me how to do this animation?

    Demo the animation I want to do: https://youtu.be/5eSM88TFzAs

    Thanks a lot!

     

    Post edited by mCasual on
  • ajd_at_072df9a27dajd_at_072df9a27d Posts: 60
    edited March 2016

    Other way with "Tool Active Pose" (EASY).

    - Select nodes foots, hands. 

    - Toggle Pins.

    - Select Chest - Move Up - down (Tool Active Pose).

    This week, DAZ Studio up Tutorial.

     

    With universal Tool (IK) 

    - Select nodes foots, hands. 

    - Pin Translation/Rotation.

    - Select Chest - Move Up - down.

    Post edited by ajd_at_072df9a27d on
  • mCasualmCasual Posts: 4,605

    "Tool Active Pose" is good for posing and i should use it more often! 

    for animations where you want feet or hands to not move a millimeter

    for dozens of frames, or for an animations where hands/feet must stay "glued" to something or someone else

    ( ex: bike pedaling ) then mcjAutoLimb is still it i think

     

  • RuphussRuphuss Posts: 2,631
    edited March 2016

    active pose only uses translations as far as i know

    so it creates morphs where you do not want them

    sorry to say but animating with this when you have to move the hip is not possible with out trembling feet or hands

    or did this tool get an update ?

    if the author of this videos creates a decent walking animation with active pose i would stand corrected

    but it wont happen

    mjcautolimb 2015 in combination with keeporient is best we have at the moment

    edit2:

    amy is having fun i see

    where can i get an animatable bike like that ?

    Post edited by Ruphuss on
  • RuphussRuphuss Posts: 2,631
    edited March 2016

    example of mcasuals scripts here with modified push up animation from anymatter

    starring also the nice Stanley from mythcon

    turn your speakers loud and watch fullscreen

    renders are just opengl for quickness

    V4 bends bad at the wrists

     

    https://vimeo.com/160240622

    Post edited by Ruphuss on
  • mCasualmCasual Posts: 4,605

    i'll probably post the E.T. BMX this summer when i resume bullet ( or that nvidia physics sdk)  bike jumps 

     

    Ruphuss said:

     

    where can i get an animatable bike like that ?

     

  • IvyIvy Posts: 7,164
    mCasual said:

    if you learn and use the two following scripts, you can get very very solid animations like that

    - mcjAutoLimb2015 - the whole legs and arms animation for the given hand/feet positions

    https://sites.google.com/site/mcasualsdazscripts6/mcjautolimb2015

    - mcjKeepOrient - the orientation of William's hands and feet

    https://sites.google.com/site/mcasualsdazscripts/mcjkeeporient

    ----- 

    for this animation i also used

    - mcjHoldOn ( Gabrielle's feet orientation )

    - mcjParent ( to make Gabrielle's feet targets follow William's hips )

    - mcjCycleFilter yo get good looping on Gabrielle's arm movements )

     

    "snapping leg" problem can be avoided by setting the knee limits to forbid negative bend angles -

    and by making sure the feet targets are never physically out of reach

    Ive got to try this :)

  • IvyIvy Posts: 7,164
    Ruphuss said:

    example of mcasuals scripts here with modified push up animation from anymatter

    starring also the nice Stanley from mythcon

    turn your speakers loud and watch at fullscreen please

    https://vimeo.com/160240622

     

    Yup thats what I used for one of the scenes in this animation it worked out pretty good.

    https://www.youtube.com/watch?v=q4KlH5Mz2t4

  • RuphussRuphuss Posts: 2,631
    edited March 2016

    hi Ivy

    lots of work in your video

    i know this

    but how do i embed a video from vimeo here ?

    Post edited by Ruphuss on
  • IvyIvy Posts: 7,164
    edited March 2016

    I hope this helps follow below.

    PS:  I always add a link  as well. because some people may have some virus scanners and other security features that might prevent them from viewing  embed videos in their browsers

    2.jpg
    895 x 453 - 32K
    3.jpg
    1037 x 474 - 48K
    Post edited by Ivy on
  • RuphussRuphuss Posts: 2,631

    thank you very much Ivy

Sign In or Register to comment.