Shortcut to content library items

dpm316dpm316 Posts: 0
edited December 1969 in Daz Studio Discussion

I'm using the city limits layout and there is plenty of room around the border for more icons. I was hoping I could simply drag items from my content catalog onto the border to create shortcuts to those items (similarly to how you pin a program in the Windows taskbar), but it doesn't work. Is it possible to create shortcuts to my most used items?

Thanks!
dpm316

Comments

  • Lissa_xyzLissa_xyz Posts: 6,116
    edited December 1969

    Right click the item > create custom action (or something like that, it's at the bottom of the right click menu). You'll get it in a Scripts menu at the top of DS. You can then go to Window > Workspace > Customize and drag 'em where you want 'em.

  • JaderailJaderail Posts: 0
    edited December 1969

    That is done in Windows Menu> Workspace> Customize. Most common Commands are there. To Add Items (Content) you first need to do a Right Click and Create Custum Action on the Item, which adds the item to the Script Menu. You can then move Items from the Script Menu to other Custom lay outs in the Workspace editor.

  • JaderailJaderail Posts: 0
    edited December 1969

    And VASK beat me to the Post button.

  • dpm316dpm316 Posts: 0
    edited December 1969

    Sweet! Thanks to you both for the quick replies. This is exactly what I needed!

    Peace \/
    dpm316

  • Lissa_xyzLissa_xyz Posts: 6,116
    edited December 1969

    Jaderail said:
    And VASK beat me to the Post button.

    Bwahahaha

    :P

  • dpm316dpm316 Posts: 0
    edited December 1969

    So if I'm creating "custom actions" is it possible to script something like this:

    1. Select left eye.
    2. Select right eye.
    3. Point at camera.

    Thanks again!
    dpm316

  • Lissa_xyzLissa_xyz Posts: 6,116
    edited December 1969

    Don't think so. I don't think the 'point at' portion can be saved into a pose file. You'd need to code an actual script for something like that.

  • Richard HaseltineRichard Haseltine Posts: 96,219
    edited December 1969

    You could script it, certainly, but it would be a custom script - written in the ScriptIDE pane or a text editor and saved as a .dsa file. Once saved the script could be made a custom action in exactly the same way as content.

  • JaderailJaderail Posts: 0
    edited December 1969

    Yes, I have many Scripts added to my interface in that fashion.

  • dpm316dpm316 Posts: 0
    edited October 2013

    So how would one go about writing a script that selects the left and right eyes of the selected object (i.e. Genesis) and sets them both to point to the camera? I've seen more complicated scripts for following the camera which seems to be made for animation and correction scripts for adjusting the eye lids, but nothing simple like what I'm trying to achieve. Is there a script recorder tool I can use to record my actions in real time? If not, is there a sample script for selecting objects and changing parameter values?

    Thanks!
    dpm316

    Post edited by dpm316 on
  • Richard HaseltineRichard Haseltine Posts: 96,219
    edited December 1969

    // Get the last item selected, if any
    // Ignoer other selections in this case
    var item = Scene.getPrimarySelection();
    // Make sure soemthing was selected
    if ( item ) {
     // If the seelcted item was a bone,
     // get its skeelton (the actual figure)
     if ( item.inherits("DzBone" ) ) {
      item = item.getSkeleton();
     }
     // Make sure we have a skeleton, as opposed to a prop or light
     if ( item.inherits( "DzSkeleton" ) ) {
      // Get the eyes - the true tells the search
      // to check the whole figure rather than just
      // the immediate children
      var rEye = item.findNodeChild( "rEye" , true );
      var lEye = item.findNodeChild( "lEye" , true );
      // And find the camera - use the right label, of course
      var cam = Scene.findNodeByLabel( "Camera 1" );
      // make sure we have all three items
      if ( rEye && lEye && cam ) {
       // getPointAtControl iss aid to be always valid, so
       // we can skip any checking here, just set the target node
       rEye.getPointAtControl().setNode( cam );
       lEye.getPointAtControl().setNode( cam );
      }
     }
    }

    I've tried to add explanatory comments

  • CMacksCMacks Posts: 202
    edited October 2013

    Thanks, very helpful. I renamed Camera 1 to the name of my camera and it worked...once.
    It's not continuing to work, and I wonder if the value has to be set to 1.0 ? If so,
    what would be the code needed for that?

    Post edited by CMacks on
  • cm152335cm152335 Posts: 421
    edited December 1969

    what is the use of "LOOK AT" ?

  • Richard HaseltineRichard Haseltine Posts: 96,219
    edited December 1969

    CMacks said:
    Thanks, very helpful. I renamed Camera 1 to the name of my camera and it worked...once.
    It's not continuing to work, and I wonder if the value has to be set to 1.0 ? If so,
    what would be the code needed for that?

    Not working how? You can't change it to point at a different camera, or you can't use it on another figure to point at the same camera?

  • CMacksCMacks Posts: 202
    edited December 1969

    The first time I run the script I saved based on your code, the eyes look at the camera as expected. If I then leave the Point At value at 1.0 but use the parameter drop down to change Camera 100mm to None, and try the script it works (again). However, if instead I put the value at 0.0 and try the script, it doesn't work. Hope that's clear.

  • Richard HaseltineRichard Haseltine Posts: 96,219
    edited December 1969

    Right, it isn't setting the value just the target. If you want the value you need to have a setValue( number ) line as well as the setNode( node ) line:

    // Get the last item selected, if any
    // Ignoer other selections in this case
    var item = Scene.getPrimarySelection();
    // Make sure soemthing was selected
    if ( item ) {
     // If the seelcted item was a bone,
     // get its skeelton (the actual figure)
     if ( item.inherits("DzBone" ) ) {
      item = item.getSkeleton();
     }
     // Make sure we have a skeleton, as opposed to a prop or light
     if ( item.inherits( "DzSkeleton" ) ) {
      // Get the eyes - the true tells the search
      // to check the whole figure rather than just
      // the immediate children
      var rEye = item.findNodeChild( "rEye" , true );
      var lEye = item.findNodeChild( "lEye" , true );
      // And find the camera - use the right label, of course
      var cam = Scene.findNodeByLabel( "Camera 1" );
      // make sure we have all three items
      if ( rEye && lEye && cam ) {
       // getPointAtControl iss aid to be always valid, so
       // we can skip any checking here, just set the target node
       rEye.getPointAtControl().setNode( cam );
       rEye.getPointAtControl().setValue( 1 );
       lEye.getPointAtControl().setNode( cam );
       lEye.getPointAtControl().setValue( 1 );
      }
     }
    }  
  • dpm316dpm316 Posts: 0
    edited December 1969

    Thanks, Richard. I really appreciate you taking the time to post this.

    Peace \/
    dpm316

  • barbultbarbult Posts: 23,050
    edited December 1969

    Wow, that works great. Thank you. I added a comment line to credit you and a link to this thread.

  • Richard HaseltineRichard Haseltine Posts: 96,219
    edited December 1969

    You're welcome.

  • CMacksCMacks Posts: 202
    edited December 1969

    Yes, thanks! I will get a lot of use out of this. Also, it makes me wonder what other time saving scripts might be possible. Has anyone made a list or compendium of what has been shared like this?

  • Richard HaseltineRichard Haseltine Posts: 96,219
    edited December 1969

    See the second link in my signature, though I haven't added in the scripts from the old forum yet (but there is a link to the old list).

Sign In or Register to comment.