Profile Picture

Would it be possible to create a script that copies the scale, rotation and move x, y, z at frame...

Posted By Data Juggler 5 Years Ago
You don't have permission to rate!

Would it be possible to create a script that copies the scale,...

Author
Message
Data Juggler
Data Juggler
Posted 5 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (12.4K reputation)Distinguished Member (12.4K reputation)Distinguished Member (12.4K reputation)Distinguished Member (12.4K reputation)Distinguished Member (12.4K reputation)Distinguished Member (12.4K reputation)Distinguished Member (12.4K reputation)Distinguished Member (12.4K reputation)Distinguished Member (12.4K reputation)

Group: Forum Members
Last Active: 5 hours ago
Posts: 1.7K, Visits: 5.4K
Here is what I want to do, and I think I know how to do some of this, but before I do does IClone have a built in way of doing this?
Somewhere I have seen a Reset Transform button or menu item, but don't remember where? I had thought this was for the entire timeline for a prop, not just a section. Am I wrong about this?

And if not, then is what I am trying to do possible before I dive in (I want to at least know there is water).
-
Get 9 Transform values at the Source Frame
Apply 9 Transform values at the Target Frame
-
While I am animating a prop or scene I sometimes move an object before I am ready for that prop to move. I know how to do Remove Object Animation, but that takes everything off; I just want the prop to be exact same for all of the Transform options (9 I think) from frame (Start Frame) and apply all the values to frame (End Frame).

So a UI would look like roughly like the attached mock up if I can figure out the UI portion to execute this:

I also want to make sure whatever I do to the prop at the End Frame should not change the prop at the Start Frame. I was surprised the other day you can't apply two transforms in one script so hopefully applying a new one is an add not a move of the source.

On more than one occasion I have done this manually and copied 9 text box values and I start feeling very human for doing it this way; on a related not the worst part of the AI taking our jobs in the not so distant future is they are going to laugh at us at the same time.

And defiantly a version 2 question, but it would also be nice if when it listed the success message if I could include 'X key frames were found in the range given.' So if it says anything other than zero you might want to go look at what is there.

Translation of bonus question into a solution that is possible to code: Is it possible to find the key frames for a given prop? Then I could compare the range needed and show the message accordingly.

Thanks, 

https://forum.reallusion.com/uploads/images/8394b8ec-00f0-40dc-bf5f-86b9.png








Creator of the free website:
PixelDatabase.Net
A Free Online Text Based Image Editor
https://forum.reallusion.com/uploads/images/6e6663e2-0ecf-447a-ab3d-d49d.png

4u2ges
4u2ges
Posted 5 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (20.6K reputation)Distinguished Member (20.6K reputation)Distinguished Member (20.6K reputation)Distinguished Member (20.6K reputation)Distinguished Member (20.6K reputation)Distinguished Member (20.6K reputation)Distinguished Member (20.6K reputation)Distinguished Member (20.6K reputation)Distinguished Member (20.6K reputation)

Group: Forum Members
Last Active: Yesterday
Posts: 5.0K, Visits: 15.9K
Hey Data Juggler. What you really need to do here, is take some time and learn how to use a timeline.
There is no need to write scripts for something that can be easily executed using basic timeline manipulation.

You said you copied 9 values from one frame and pasted them one by one to another?
But those 9 values are stored in a single key on a timeline Transform track.
All you had to do, is to grab that key with Ctrl and drag it to another frame,
or copy/paste a key in one step (whichever way you prefer), or deleting unwanted keys.

Resetting Transform track without affecting other animated tracks is as simple as dragging
the mouse with left click through the entire *Transform* track and hitting Del (preliminary zooming timeline all the way out).

Timeline might seem cumbersome at first, but once you get to know basic principals of its operations, everything would fall in place easily.

Just do the search on Reallusion YouTube channel for timeline like:

https://www.youtube.com/user/Reallusion/search?query=timeline



Edited
5 Years Ago by 4u2ges
Data Juggler
Data Juggler
Posted 5 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (12.4K reputation)Distinguished Member (12.4K reputation)Distinguished Member (12.4K reputation)Distinguished Member (12.4K reputation)Distinguished Member (12.4K reputation)Distinguished Member (12.4K reputation)Distinguished Member (12.4K reputation)Distinguished Member (12.4K reputation)Distinguished Member (12.4K reputation)

Group: Forum Members
Last Active: 5 hours ago
Posts: 1.7K, Visits: 5.4K
Edit: I just realized you are probably right. 
I have two props:
Drone Lead
Drone

The Drone Lead is just a sphere I set the Opacity to 0 except at times I want to see it during design mode. The Drone Lead is what the camera follows so it remains stead and the Drone Lead goes straight on a Path, although not an IClone Path, I kept trying to use an ICone Path and it complicated things.

--
I am leaving my previous frustration here to remind me when I find this post in a few years

--

I did all the above and the sub prop was still rotated so idiot in my chair thought it didn't work.

I just copied a keyframe at frame 1, and when I pasted it into frame 600 my prop is still rotated at the value it was before I copied and pasted.

I would use the timeline standard controls if they did what I want.

Copy Key frame at frame 1 and paste into frame 600 retains position of the prop at frame 600.

Whether I copy or move the timeline, at frame 600 my prop is rotated.

Now if I copy each of the 9 values into a keyframe at frame 600, my prop is positioned / rotated / sized the way I want, so please explain why writing a script is not the way to do it, as I am all for the easy way.

I can paste a short video if you want to see the results that I get from your suggestion.

Thanks for the reply



Creator of the free website:
PixelDatabase.Net
A Free Online Text Based Image Editor
https://forum.reallusion.com/uploads/images/6e6663e2-0ecf-447a-ab3d-d49d.png

Edited
5 Years Ago by Data Juggler
4u2ges
4u2ges
Posted 5 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (20.6K reputation)Distinguished Member (20.6K reputation)Distinguished Member (20.6K reputation)Distinguished Member (20.6K reputation)Distinguished Member (20.6K reputation)Distinguished Member (20.6K reputation)Distinguished Member (20.6K reputation)Distinguished Member (20.6K reputation)Distinguished Member (20.6K reputation)

Group: Forum Members
Last Active: Yesterday
Posts: 5.0K, Visits: 15.9K
That happens. The subprop is rotated because the prop does. And subprop does not have keys.
So yes, work with the Drone Lead on a timeline and disregard subprop Drone.

As to visibility, set opacity to Drone Lead to 30% or something, then make it a Dummy (a check box at the very top of the prop attributes tab),
then hit Ctrl+D (or Dummy Object check box in Project settings) and it would appear semi-transparent in viewport, but it still would not render.
Note: enabling Display Dummy object would make ALL Dummy objects visible including Shadow catchers, emissive planes, .. etc..





Edited
5 Years Ago by 4u2ges
Data Juggler
Data Juggler
Posted 5 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (12.4K reputation)Distinguished Member (12.4K reputation)Distinguished Member (12.4K reputation)Distinguished Member (12.4K reputation)Distinguished Member (12.4K reputation)Distinguished Member (12.4K reputation)Distinguished Member (12.4K reputation)Distinguished Member (12.4K reputation)Distinguished Member (12.4K reputation)

Group: Forum Members
Last Active: 5 hours ago
Posts: 1.7K, Visits: 5.4K
Actually the sub props do have their own keys, and that is why I thought it wasn't working.

I wish reading a manual was something worked well for me, but I tend to have to try and figure something out, get it wrong, and then when someone like you points out my ignorance on the subject I file away in permanent memory, which is good for a week or two usually.

Change is not my strong suit as it took me 30 years to figure out they do not make new classic rock songs any longer.

Thank you, 

Creator of the free website:
PixelDatabase.Net
A Free Online Text Based Image Editor
https://forum.reallusion.com/uploads/images/6e6663e2-0ecf-447a-ab3d-d49d.png

4u2ges
4u2ges
Posted 5 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (20.6K reputation)Distinguished Member (20.6K reputation)Distinguished Member (20.6K reputation)Distinguished Member (20.6K reputation)Distinguished Member (20.6K reputation)Distinguished Member (20.6K reputation)Distinguished Member (20.6K reputation)Distinguished Member (20.6K reputation)Distinguished Member (20.6K reputation)

Group: Forum Members
Last Active: Yesterday
Posts: 5.0K, Visits: 15.9K

Change is not my strong suit as it took me 30 years to figure out they do not make new classic rock songs any longer.

lol, that's good one Smile




Data Juggler
Data Juggler
Posted 5 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (12.4K reputation)Distinguished Member (12.4K reputation)Distinguished Member (12.4K reputation)Distinguished Member (12.4K reputation)Distinguished Member (12.4K reputation)Distinguished Member (12.4K reputation)Distinguished Member (12.4K reputation)Distinguished Member (12.4K reputation)Distinguished Member (12.4K reputation)

Group: Forum Members
Last Active: 5 hours ago
Posts: 1.7K, Visits: 5.4K
4u2ges (4/20/2019)
Hey Data Juggler. What you really need to do here, is take some time and learn how to use a timeline.
There is no need to write scripts for something that can be easily executed using basic timeline manipulation.

You said you copied 9 values from one frame and pasted them one by one to another?
But those 9 values are stored in a single key on a timeline Transform track.
All you had to do, is to grab that key with Ctrl and drag it to another frame,
or copy/paste a key in one step (whichever way you prefer), or deleting unwanted keys.

Resetting Transform track without affecting other animated tracks is as simple as dragging
the mouse with left click through the entire *Transform* track and hitting Del (preliminary zooming timeline all the way out).

Timeline might seem cumbersome at first, but once you get to know basic principals of its operations, everything would fall in place easily.

Just do the search on Reallusion YouTube channel for timeline like:

https://www.youtube.com/user/Reallusion/search?query=timeline


@4U2Guess - I have used the copy and paste feature of key frames that you mentioned for a short while now, and I think this is one of the single greatest features in scene direction that I wasn't aware of it.

New information is always rejected by my subconscious as junk science as my first instinct, but after a few days I have really grown to appreciate this feature that I thought 'I invented' (I feel like Al Gore and the internet).

Thanks again in case I didn't stress it enough the first time you mentioned it.







Creator of the free website:
PixelDatabase.Net
A Free Online Text Based Image Editor
https://forum.reallusion.com/uploads/images/6e6663e2-0ecf-447a-ab3d-d49d.png




Reading This Topic