Dynamic Component rotation through Ruby code
-
Hi all,
I am trying to write a Ruby tool that needs to access a dynamic component's attributes.
I created two attributes within my component : two rotation angles along two different axes.First issue I had : the name I gave to the attributes wasn't the good one for the ruby code.
So I downloaded the AttributeManager to see the real name of the attribute.Then, I tried to actually make my component rotate through the ruby code.
But it seems like the value of the attribute has changed, but not the view in the design.
So my component stays exactly at the same position and doesn't rotate at all.How can I do the refresh the value or refresh the view in my code, in order to make my component move each time I compute my code ?
Thanks every one for your help,
Marie
-
After you have set the attributes in code you need a line like this to force the update...
$dc_observers.get_latest_class.redraw_with_undo(dc_instance) -
Thank you TIG !
It works perfectly.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginAdvertisement