Jump to content


Recommended Posts

Hey everyone. I have a problem with xpresso. I have a box (controller) and a mesh with bend modifier. I wanna when I rotate a box that hasn't to be rotated, but the strength in bend has to be changed. I've tried to make a variable, but when I return box rotation to zero a variable also gets value 0. I need anything like that:

int x, y, output;

x = box.rotation;

y = x;

output = y;

x = new x == 0;

Share this post


Link to post
Share on other sites

Must admit that I have trouble following what you need. Is there any way to simplify your request? Maybe add a scene file depicting what should happen. Could be that you are looking for something related to interaction tag?

Share this post


Link to post
Share on other sites
  • Topic Author
  • 1 hour ago, HSrdelic said:

    Must admit that I have trouble following what you need. Is there any way to simplify your request? Maybe add a scene file depicting what should happen. Could be that you are looking for something related to interaction tag? 

    I need something like that, but when I rotate a cube, cube mustn't be rotated. I also tried to make what I want without scripting. I used user data, but I have an issue. (last screen) Why I have an empty value?

     

    screen04.jpg

    screen05.jpg

    screen06.jpg

    Share this post


    Link to post
    Share on other sites

    Did you try interaction tag? It seems as you just need values from cursor drag?

     

    EDIT: Here is what I mean. You simply rotate as usual and use object delta to calculate degrees (didn't do that part, object delta is in radians) via Xpresso if that is what you are looking for. The object with tag stays unaffected. Interaction tag is a real hidden gem...

    Interaction_tag.c4d

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • 16 minutes ago, HSrdelic said:

    Did you try interaction tag? It seems as you just need values from cursor drag? 

    Interaction is for moving. I need only rotation.

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • 1 hour ago, HSrdelic said:

    EDIT: Here is what I mean. You simply rotate as usual and use object delta to calculate degrees (didn't do that part, object delta is in radians) via Xpresso if that is what you are looking for. The object with tag stays unaffected. Interaction tag is a real hidden gem... 

    Interaction_tag.c4d

    What's wrong? I get an empty value again. In delta z is set also empty value.

    Share this post


    Link to post
    Share on other sites

    Maybe you misunderstood? If you start rotating on any axis object delta is calculated in radians. Simply output that in Xpresso from interaction tag and convert to degrees. Effectively you get the rotation values but object stay "locked"

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • 24 minutes ago, HSrdelic said:

    Maybe you misunderstood? If you start rotating on any axis object delta is calculated in radians. Simply output that in Xpresso from interaction tag and convert to degrees. Effectively you get the rotation values but object stay "locked" 

    Seems I actually misunderstand. I get values, but then the value will become empty. How to save the value?

    screen08.jpg

    Interaction_tag_edited.c4d

    Share this post


    Link to post
    Share on other sites

    You will need to use a bit of python there. So you want to store the value? What happens when you start new rotation? Do values keep adding up or you reset and show the new absolute value?

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • 6 minutes ago, HSrdelic said:

    What happens when you start new rotation? Do values keep adding up or you reset and show the new absolute value? 

    When I finish rotate the value appears for 1 second. Then getting value (data in my screen) get the new value = 0.

    Share this post


    Link to post
    Share on other sites

    Yes, I understand, but what would you like to happen. So, let's say you rotate and then store the value once mouse is released. What should happen after new rotation starts? Do you want to overwrite the value? Add to stored one?

    Share this post


    Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

    • Recently Browsing   0 members

      No registered users viewing this page.

    ×