Results 1 to 5 of 5

Thread: Checking same as item...

  1. #1
    Goes bump in the night RebelHill's Avatar
    Join Date
    Nov 2003
    Location
    jersey
    Posts
    5,701

    Checking same as item...

    So... Im trying to find a way to perform a check to see if a given item in layout has a same as item control or not set in its motion options...

    Not necessarily a "given" item as its sai... though this could work just as well, but generically has or not...

    I guess mainly Id be looking to see if there's an item associated, something along the lines of...

    {
    SelectItem("Whatever");

    if(PositionItem == nil)
    {
    info("no sai");
    }

    else
    {
    info("some sai");
    }
    }

    I suppose checking the channels themselves could also work just as well.. along the line of...

    {
    SelectItem("Whatever");

    if(XController == 7)
    {
    info("some sai");
    }

    else
    {
    info("no sai");
    }
    }

    Whilst neither of those pseudo scripts actually work, as in neither report the actual state of an items motion control... neither one fails or erros either... I assume because the if() doesnt really care what string is being tested for... and if it can't find a defined function for whats in the string, then it jsut reports the "else"...

    Anyhow... if anyone's got a way to test this, would like to hear.

    Thanks.
    LSR Surface and Rendering Tuts.
    RHiggit Rigging and Animation Tools
    RHA Animation Tutorials
    RHR Rigging Tutorials
    RHN Nodal Tutorials
    YT Vids Tuts for all

  2. #2
    Goes bump in the night RebelHill's Avatar
    Join Date
    Nov 2003
    Location
    jersey
    Posts
    5,701
    Oh yes... and i also tried...

    if(XController(7))

    But that just reported "none" (if it was actuall on), whilst also then proceeding to change the Xcontroller to sai (if it was off ofc)
    LSR Surface and Rendering Tuts.
    RHiggit Rigging and Animation Tools
    RHA Animation Tutorials
    RHR Rigging Tutorials
    RHN Nodal Tutorials
    YT Vids Tuts for all

  3. #3
    Banned
    Join Date
    Apr 2005
    Location
    Valencia
    Posts
    3,145
    Hi Craig,

    The command is XController(7), but that it's to set the X axis of the object controlled by a SameAsItem. But it's to SET it. Not to get which controller is applied to the object.

    I hope Mike Green can share some light, because I've been looking on the LScript documentation and I couldn't found "How to get the controller".

    If I find something i will post it here.

    David

  4. #4
    Goes bump in the night RebelHill's Avatar
    Join Date
    Nov 2003
    Location
    jersey
    Posts
    5,701
    yeah, the most recent LSdocs make no mention of PositionItem, RotationItem, etc... nor controller type (7).

    Hopefully someone might know... or maybe there's something somewhere buried in the sdk docs.
    LSR Surface and Rendering Tuts.
    RHiggit Rigging and Animation Tools
    RHA Animation Tutorials
    RHR Rigging Tutorials
    RHN Nodal Tutorials
    YT Vids Tuts for all

  5. #5
    Goes bump in the night RebelHill's Avatar
    Join Date
    Nov 2003
    Location
    jersey
    Posts
    5,701
    Well, i found a solution to my problem, though not THE problem.

    Whilst checking same as item would have been good, in my situation I can jsut as easily check something else, namely target... so...

    {

    mymesh = Mesh("Whatever");

    if(mymesh.target == nil)
    {
    info("none");
    }

    else
    {
    info("some");
    }
    }

    Works jsut fine for what Im trying to do...

    Might still be nice to know if the original idea is doable though... might come in useful somewhere.

    I also tried some guesswork... typing in mymesh.rotationitem, mymesh.rotation, mymesh.RotationItem, etc... but none of those are recognised. it does appear though that there might be a string for it, as mymesh.pole works as expected, so clearly at least some of the new motion option types from the 9.6 camp have been entered into LS.
    Last edited by RebelHill; 03-08-2011 at 08:23 AM.
    LSR Surface and Rendering Tuts.
    RHiggit Rigging and Animation Tools
    RHA Animation Tutorials
    RHR Rigging Tutorials
    RHN Nodal Tutorials
    YT Vids Tuts for all

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •