Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Some elements of the main Cinema 4D application there're missing from Cinema 4D light, but often you can write a script to take place of that missing feature. And that's what we're going to do here. We're going to write a script which will reset the position values of an object. (INAUDIBLE) chart seven or two C4D and if you want to follow along, you can open at. Here i have my main robot and he consists of various different body parts linked together using a (INAUDIBLE) And we also have a relief object in here and you'll notice that if i select the hips and move them, the relief object isn't moving with them because its a separate item.
Also, I don't really want to have to select the hips to move the body around. I want the controller for the hips, and all the different body parts, and also the relief object. So, I'm going to create a new Null, and I'm going to call it main robot. And that's going to be the controller for this robot. So, we'll call it main robot. So, one way of picking up the position of the hips, this position here, is to actually drag the main robot now on to the hips. And you'll notice that when I do that, it picks up the position of the hips, but you may be surprised to see that it hasn't appeared up here.
Plus because its still maintaining a relative position, what we want to do is have it take an absolute position value from the hips and in order to do that, what we need to do is to 000 the position values, okay. So, I type in 000 and we can see now, the null is in exactly the same place as the hips. So you can see exactly in the same place. There's a difference in rotation there, because we haven't linked the rotation.
But the position is exactly the same. We could do the same with rotation if we wanted to. So basically, now I have my null in the right place. I can move it where I want, and reposition all the other elements. And I'll show you how to do that in a second. But before we do that, what I want to do is show you how we can save what we've just done as a script. Now we've just reset the 0, 0, 0 position. So all I need to do is right click, go to expressions, create script. And it remembers what I've just done.
And you can see there, it's resetting the base object to 0, 0, 0. So, I can just type in Reset Position. So I've created my own script. Now you can actually create buttons for the script. You can create short-cuts for the script as well if you want to add a short-cut to control that script, you can do. If you've created your own custom artwork, you can also use that here instead of using this default max on icon.
I'm just going to go with the Default max on icon and I'm going to drag it up to my toolbar and place it in there. And now I have a button which activates a script to reset those position values, so I'm going to close it and now if I select any object. And then click on that button, it resets it back to 0. Okay, so any object I want Click on that button resets it to 0. So we've now got a way to getting things back to the 0, 0, 0 position, using this Reset Position button.
So, really easy to create scripts. You just do what you want it to do. And then create a script for it. And it writes it for you. Couldn't be easier. Okay so now I've got that nail. What I can do is I can take that nail, place it back at the top of the stack so it's not related to anything. And now I can select the hips. And the relief. Drag them both to the Main Robot nail. And I now have a single controller for my robot and my relief object.
So I can start to move him around. Animate him spinning. Doing whatever I want him to do. Scaling if I want him to. So that's our easy way of getting your null to take the attributes of the parent object. And write a script that will do it for you automatically.
Get unlimited access to all courses for just $25/month.Become a member
107 Video lessons · 36882 Viewers
100 Video lessons · 7520 Viewers
94 Video lessons · 25859 Viewers
147 Video lessons · 5527 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.