WEBVTT

00:00.210 --> 00:07.440
Welcome to the introduction to data blocks in this video you'll learn about data blocks.

00:07.440 --> 00:08.330
Understand.

00:08.330 --> 00:15.300
But knowing about them is about to become much more important especially as they are seen starting to

00:15.300 --> 00:17.360
get a bit more complex.

00:17.370 --> 00:21.450
Now we have come into contact with data lots lots.

00:21.450 --> 00:24.900
But let's now go explore them directly.

00:25.470 --> 00:28.390
So what is a data block and its characteristics.

00:28.380 --> 00:32.520
Well they must have unique names.

00:32.520 --> 00:39.330
So if you've got two things with the same name it will blender will spend it with the usuals 0 0 1 on

00:39.330 --> 00:40.810
the end.

00:40.830 --> 00:45.170
Now they can link to each other which is very powerful.

00:45.180 --> 00:51.570
They can even link across blend files and that's going to become very important very soon.

00:51.580 --> 00:55.310
McKay unused data blocks are eventually removed.

00:55.320 --> 01:02.640
Now we've seen that where we have a literal zero next to our texture's or next to our materials that

01:02.670 --> 01:07.210
aren't applied to anything because a material is a type of data block.

01:07.380 --> 01:13.410
And that's where we have used a fake user in the past to preserve that particular day to block.

01:13.410 --> 01:16.940
So it's not destroyed when closing blended down.

01:17.430 --> 01:25.320
So sharing data blocks Here's an example of that's the same texture on many materials the same material

01:25.320 --> 01:26.040
or many meshes.

01:26.040 --> 01:33.630
Now we've done that before where we have several mesh objects all sharing the same base material.

01:33.630 --> 01:35.990
We've done it with a particle system.

01:36.000 --> 01:39.660
Now we've often shared and then made that data block unique.

01:39.660 --> 01:47.040
So if you've cast your mind back to the rabbit that we've created we started off with a particle system

01:47.400 --> 01:56.190
and then use the same particle system again and then started making it unique depending on loads of

01:56.190 --> 01:57.210
different factors.

01:57.280 --> 02:00.410
You could do the same with a mesh you could take the same mesh data.

02:00.520 --> 02:06.510
I duplicate an object and then take it from there make it a unique object.

02:06.810 --> 02:11.390
Okay so let's go have a closer look at what these data blocks are and where they are.

02:11.420 --> 02:17.860
And blender of course before we get started let's press chemists on our source tree.

02:18.120 --> 02:21.440
And I'm going to put in here data blocks.

02:21.510 --> 02:23.760
I don't know what it's going to be about data rocks.

02:23.760 --> 02:28.620
Well sure I do but I don't know what it is about data blocks for the moment so we can amend that later

02:28.620 --> 02:28.770
on.

02:28.770 --> 02:30.840
But we know it's something about data blocks.

02:30.930 --> 02:32.440
So let's go hop into a blender.

02:33.580 --> 02:39.940
Okay so we're back over in blender and we're going to have a closer look at our building scene that

02:39.940 --> 02:41.450
we've just put together.

02:41.740 --> 02:48.950
Now what we can do here is in the outline now have a look at all of the data blocks that exist and that

02:48.940 --> 02:53.640
will give you a good overview about what constitutes a data block.

02:53.770 --> 03:00.650
So I'm just going to make the outline a much bigger so we can see what's going on and the outline as

03:00.670 --> 03:05.540
head where it says all scenes this dropdown we can change it to data blocks.

03:06.290 --> 03:13.460
And let's just scroll up and down there and we will see that there are quite a few things that are actually

03:13.460 --> 03:14.270
called a data block.

03:14.270 --> 03:18.470
So we got our blend file data and then it's broken down into all these little bits.

03:18.470 --> 03:20.210
Now some of this is exposed.

03:20.210 --> 03:25.550
When you were going to append these objects you saw the other things that you could potentially append

03:25.550 --> 03:29.540
including materials and other objects in the same.

03:30.080 --> 03:38.330
So we have objects here those make up all of our object data and as we can see here we've got this little

03:38.330 --> 03:41.580
square next to it so that's an object data block.

03:41.600 --> 03:47.630
Most of these do have their associated icon as well which makes it a lot easier to quickly spot what's

03:47.630 --> 03:49.960
going on and look down here.

03:49.970 --> 03:51.830
There's another object.

03:51.830 --> 03:57.030
So this empty that's selected here is the room test object.

03:58.840 --> 04:00.280
Let's have a closer look.

04:00.280 --> 04:03.850
There aren't any materials assigned with this scene yet we haven't applied anything.

04:03.970 --> 04:06.880
And that's reflected here zero items.

04:06.880 --> 04:12.670
Let's have a closer look at meshes because this is something that we can have and use to our advantage

04:12.970 --> 04:17.180
because we have a let's just count them one two three four five windows here.

04:17.270 --> 04:19.780
They're essentially all the same.

04:19.780 --> 04:21.660
In fact they're supposed to be all the same.

04:22.000 --> 04:31.030
So if we go ahead and open up this we can see that there's a lot of mesh data called a very odd namings

04:31.150 --> 04:35.500
or a lot of namings but very useless namings.

04:35.500 --> 04:40.560
So in this case there's something else that we need to make sure we name correctly.

04:40.690 --> 04:45.700
Not only do we need to make sure that it's name correctly in the outline we need to make sure that it's

04:45.700 --> 04:52.580
name correctly when it comes to the mesh data itself so we can identify what it actually is.

04:52.630 --> 04:58.060
So let's go ahead and select one of these windows and I'm going to go in the outliner again and go back

04:58.060 --> 05:01.720
to all scenes so I can see what I have selected.

05:01.810 --> 05:07.200
So I have this one here is selected again that's not very descriptive at the moment.

05:07.360 --> 05:15.820
However if we go to the meche data down here we will see if we go down on the properties window to the

05:16.020 --> 05:23.080
mestisa Tap which again is that little mesh icon the three vertices joined by edges upside down triangle

05:23.080 --> 05:23.830
if you will.

05:24.220 --> 05:27.290
We can see the mesh data is verte 05.

05:27.290 --> 05:33.520
Now if we click on that dropdown we can see all of the other meshed data that's in our particular scene

05:33.520 --> 05:34.820
at this time.

05:35.320 --> 05:43.240
And that is powerful because I'm going to guess here that 0 0 1 all the way to five is these five windows

05:43.240 --> 05:46.390
like a click on each one to check but I'm pretty certain it is.

05:46.420 --> 05:49.960
I think this other verte is the doorway here.

05:50.230 --> 05:58.830
So let's go ahead and switch them sort of 0 0 once a select every window and change it to series 0 1

05:58.840 --> 06:04.300
of course yours may be named slightly differently depending on how it was all set up.

06:04.450 --> 06:07.420
But there we go mining now all changed in that one.

06:07.420 --> 06:09.380
There must be Verts procedural one.

06:09.580 --> 06:14.250
Okay so now if we have a look at this dropdown again we see those zeros.

06:14.620 --> 06:21.850
Okay now that's important because if we go in say this firewall now and reopen get those bits a meshed

06:21.850 --> 06:26.100
data although they're all the same in this case are going to vanish.

06:26.110 --> 06:33.520
So if that was a model or meche data that we wanted to keep we'd need to associate a fake user only

06:33.520 --> 06:35.260
to do that at the moment.

06:35.290 --> 06:41.170
So what we're going to do is to demonstrate that is I'm going to save the file which is now been done

06:41.480 --> 06:45.710
and I'm just going to click revert here and that's going to reload the file again.

06:45.710 --> 06:50.400
And because we've literally just saved it it won't look like anything that's happened but we go to this

06:50.410 --> 06:56.730
meche data drop down we see there's no more Virts 0 2 3 4 and 5.

06:56.750 --> 07:00.510
They've completely gone now they dont exist in this blend file anymore.

07:00.790 --> 07:04.790
In fact all of these are now sharing the same meche data.

07:04.930 --> 07:07.360
So we hop into edit mode.

07:07.540 --> 07:08.520
Look at that.

07:08.680 --> 07:12.600
We can actually see that we're editing every single one of it.

07:12.610 --> 07:21.230
So if I go and select a face let's say that's grab all I need to be a bit more zoomed in to select anything.

07:25.330 --> 07:25.750
There you go.

07:25.750 --> 07:26.900
This is the mesh object.

07:26.910 --> 07:32.740
I'm editing not over here so I have to click one of these faces and we can see it's selecting them on

07:32.800 --> 07:35.890
every single one survie extrude that out.

07:35.920 --> 07:37.880
It's affected every single one.

07:37.900 --> 07:40.180
Now that is very very powerful.

07:40.240 --> 07:45.320
And looking at it that is if you did a duplicate link.

07:45.430 --> 07:46.480
When ever you.

07:46.480 --> 07:50.170
When we went in early and built this up by duplicating it.

07:50.200 --> 07:51.760
So we done a duplicate link.

07:51.760 --> 07:58.880
What that's doing in the background is saying that this mesh object shares the same mesh data block.

07:59.140 --> 08:04.650
Very important and very useful because I'm going to undo that blob that just makes I don't want it.

08:04.840 --> 08:12.520
But let's say that we wanted to put another door in just here so we can select it and go and change

08:12.520 --> 08:15.170
it to um assuming here it's Virts.

08:15.610 --> 08:16.120
Okay.

08:16.150 --> 08:16.830
Where's it gone.

08:16.870 --> 08:23.160
Okay so it is 90 degrees different so I can now rotate that's on me x axis by 90.

08:23.180 --> 08:25.300
Yeah that's the right way around.

08:25.510 --> 08:31.200
And in one quick operation without having to find another door and duplicate it and move it.

08:31.300 --> 08:38.540
Okay we had to rotate it in that instance but you can see that I've changed the mesh data of that object.

08:38.680 --> 08:43.270
It's now looks completely different it looks the same as this one.

08:43.270 --> 08:48.580
So that's got incredible potential depending on the complexity of your scene that you can just simply

08:48.580 --> 08:50.510
swap parts in and out.

08:50.530 --> 08:57.490
And that's where it's very important to make sure you construct your models themselves to be as modular

08:57.490 --> 09:03.370
as possible because that does mean that you can literally swap one object out for another and have a

09:03.370 --> 09:05.770
completely different feel to your scene.

09:06.100 --> 09:13.290
Okay guys it's Challenge time unless a particular mesh object needs to be unique.

09:13.450 --> 09:17.980
Remove all redundant mesh data blocks.

09:17.980 --> 09:23.260
Make sure your mesh data blocks have an appropriate and descriptive name.

09:23.590 --> 09:26.370
Pause a video now and give that a go.

09:29.050 --> 09:29.670
Okay guys.

09:29.670 --> 09:30.640
Welcome back.

09:30.850 --> 09:35.310
Let's go remove all redundant mash data blocks over in blender.

09:36.400 --> 09:45.250
Okay so what we should end up with in the end is literally the same number of data blocks as there are

09:45.250 --> 09:46.990
parts in our scene.

09:47.080 --> 09:55.410
Not individual parts but unique parts so we've got this front door here the windows and the first two

09:55.420 --> 10:00.620
we've got the floor panes which is three four and five.

10:00.760 --> 10:05.310
So there's only five unique mesh data blocks in this scene.

10:05.320 --> 10:07.380
So that's what we're going to shoot for.

10:07.420 --> 10:08.270
We've already done that.

10:08.270 --> 10:10.570
These doors they naturally save for set.

10:10.580 --> 10:12.640
They share the same mesh data.

10:12.640 --> 10:15.890
However what I can do here is actually name that meshed data.

10:16.000 --> 10:20.380
I got a call that one I'm going to call it exactly what it is actually.

10:20.430 --> 10:27.070
I'm going to copy the mesh title itself the object the mesh object title and store that has the mesh

10:27.070 --> 10:27.840
name as well.

10:27.850 --> 10:29.370
And I'm going to do that to the window.

10:30.860 --> 10:34.720
Of course in this case I'm going to tell what's going on there.

10:34.790 --> 10:36.100
Three by four.

10:36.110 --> 10:39.650
That's absolutely fine by not point nought.

10:40.070 --> 10:44.660
That used to be twenty five I think because that's the size of it.

10:44.840 --> 10:47.720
So let's copy that and put that in here.

10:47.720 --> 10:52.750
Now we should find after doing that that the other ones have hit naturally inherited that.

10:52.820 --> 10:53.840
Perfect.

10:53.990 --> 10:54.400
Right.

10:54.410 --> 10:56.380
So we've got our square here.

10:56.390 --> 11:01.240
I'm going to call it floor because that is actually what it is.

11:01.250 --> 11:08.560
I'm going to change this particular one which is plain 0 0 6 to the floor in the title down there.

11:08.570 --> 11:09.810
Now I've done that.

11:09.830 --> 11:12.810
I'm going to select this one and switch it to a floor.

11:13.100 --> 11:18.390
This one to floor and just literally go through and do that.

11:18.590 --> 11:22.140
And then in a moment I think there are two more things to do.

11:22.150 --> 11:28.790
You'll soon find out whether or not we've got down to the right level case and now that that is done

11:28.820 --> 11:30.490
we've got this one here.

11:30.740 --> 11:37.940
So I'm going to call I don't know what to call that let's find in the outline of first of all let's

11:37.940 --> 11:38.330
just call.

11:38.330 --> 11:44.950
Q But at the moment let's call it filler because that's what it is.

11:45.920 --> 11:50.140
Let's do x y and z so it's no point to five by nought point twenty five.

11:50.480 --> 11:56.400
So nought point to five by nought point to five by.

11:56.590 --> 11:58.310
Three high plus points to fire.

11:58.310 --> 12:03.040
So by three point two five so that is a descriptive name about what that is.

12:03.040 --> 12:06.550
And I'm going to update the mesh data name as well.

12:06.750 --> 12:12.300
So let's go ahead and fill in these ones here with phil..

12:14.830 --> 12:18.660
Soon sumate move round I'm just wondering whether I can do two at once.

12:18.660 --> 12:20.500
I'm not sure if I can.

12:20.710 --> 12:25.320
But if I can that would be much better although it's presenting a difficult selecting.

12:25.320 --> 12:31.420
So if I go here and go filler and then just check I think it's only change the active one that's changed

12:31.420 --> 12:32.060
to filter.

12:32.100 --> 12:32.580
Yeah.

12:32.580 --> 12:34.410
Does any change active one.

12:34.440 --> 12:35.530
So fill out.

12:35.620 --> 12:38.980
You can also search at the top of it becomes a bit unwieldy.

12:39.180 --> 12:44.120
So I'm going to delete this cube from the scene because it doesn't need to be there.

12:44.430 --> 12:47.100
Thus removing and this one's a bit different.

12:47.100 --> 12:49.620
This is the same sort of filler.

12:49.890 --> 12:55.560
But here it is for white not four point twenty five but it's four wide.

12:55.610 --> 12:58.620
I've got to pick either X or Y I'm going to pick x.

13:00.210 --> 13:08.520
Okay so in order to save you the mundane task of literally watching me rename a couple of mesh objects

13:08.520 --> 13:13.640
here are just fast forwarded as I was round and renamed all of these parts.

13:15.440 --> 13:20.060
And I'm going to save my file real quick and reverse it.

13:20.060 --> 13:21.140
There we go.

13:21.140 --> 13:25.480
So that means that I should have no extra ones here and look at that.

13:25.580 --> 13:31.000
The mesh data in this scene the data blocks are down to five and we can confirm that in the outline

13:31.000 --> 13:37.130
the by going to data block the meshes there are now five mesh items in here and they have descriptive

13:37.130 --> 13:37.770
names.

13:37.790 --> 13:38.480
Brilliant.

13:38.480 --> 13:45.050
So the final thing to do of course after we saved our blend file is to make sure we commit those changes

13:45.050 --> 13:47.780
so we can undo them if necessary later on.

13:47.960 --> 13:54.180
So we now know it was removing redundant data blocks or removing redundant.

13:56.040 --> 13:59.060
They two blocks in fact let's be even more descriptive.

13:59.210 --> 14:04.500
Removing redundant mesh data blocks I need to stage those files using.

14:04.540 --> 14:08.620
Ah that's absolutely fine and I'm going to press commit.

14:09.960 --> 14:10.500
Okay.

14:10.500 --> 14:11.220
Brilliant.

14:11.250 --> 14:15.990
And of course I am now in my repository that I use.

14:15.990 --> 14:18.510
This is what it's going to look like from now on.

14:18.630 --> 14:24.120
I've been keeping it nice and simple for you guys before with how you and yours would be looking.

14:24.120 --> 14:28.620
Mine's going to always look slightly different because it's set up around the structure of the lectures

14:28.620 --> 14:33.040
that you're watching rather than just the tasks that are going on.

14:33.060 --> 14:34.770
How did you guys get on.

14:34.770 --> 14:38.480
Please share in the discussions if you had any troubles or challenges.

14:38.620 --> 14:41.390
And I will see you guys in the next lecture.
