Welcome to the introduction to data blocks in this video you'll learn about data blocks.
Understand.
But knowing about them is about to become much more important especially as they are seen starting to
get a bit more complex.
Now we have come into contact with data lots lots.
But let's now go explore them directly.
So what is a data block and its characteristics.
Well they must have unique names.
So if you've got two things with the same name it will blender will spend it with the usuals 0 0 1 on
the end.
Now they can link to each other which is very powerful.
They can even link across blend files and that's going to become very important very soon.
McKay unused data blocks are eventually removed.
Now we've seen that where we have a literal zero next to our texture's or next to our materials that
aren't applied to anything because a material is a type of data block.
And that's where we have used a fake user in the past to preserve that particular day to block.
So it's not destroyed when closing blended down.
So sharing data blocks Here's an example of that's the same texture on many materials the same material
or many meshes.
Now we've done that before where we have several mesh objects all sharing the same base material.
We've done it with a particle system.
Now we've often shared and then made that data block unique.
So if you've cast your mind back to the rabbit that we've created we started off with a particle system
and then use the same particle system again and then started making it unique depending on loads of
different factors.
You could do the same with a mesh you could take the same mesh data.
I duplicate an object and then take it from there make it a unique object.
Okay so let's go have a closer look at what these data blocks are and where they are.
And blender of course before we get started let's press chemists on our source tree.
And I'm going to put in here data blocks.
I don't know what it's going to be about data rocks.
Well sure I do but I don't know what it is about data blocks for the moment so we can amend that later
on.
But we know it's something about data blocks.
So let's go hop into a blender.
Okay so we're back over in blender and we're going to have a closer look at our building scene that
we've just put together.
Now what we can do here is in the outline now have a look at all of the data blocks that exist and that
will give you a good overview about what constitutes a data block.
So I'm just going to make the outline a much bigger so we can see what's going on and the outline as
head where it says all scenes this dropdown we can change it to data blocks.
And let's just scroll up and down there and we will see that there are quite a few things that are actually
called a data block.
So we got our blend file data and then it's broken down into all these little bits.
Now some of this is exposed.
When you were going to append these objects you saw the other things that you could potentially append
including materials and other objects in the same.
So we have objects here those make up all of our object data and as we can see here we've got this little
square next to it so that's an object data block.
Most of these do have their associated icon as well which makes it a lot easier to quickly spot what's
going on and look down here.
There's another object.
So this empty that's selected here is the room test object.
Let's have a closer look.
There aren't any materials assigned with this scene yet we haven't applied anything.
And that's reflected here zero items.
Let's have a closer look at meshes because this is something that we can have and use to our advantage
because we have a let's just count them one two three four five windows here.
They're essentially all the same.
In fact they're supposed to be all the same.
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
or a lot of namings but very useless namings.
So in this case there's something else that we need to make sure we name correctly.
Not only do we need to make sure that it's name correctly in the outline we need to make sure that it's
name correctly when it comes to the mesh data itself so we can identify what it actually is.
So let's go ahead and select one of these windows and I'm going to go in the outliner again and go back
to all scenes so I can see what I have selected.
So I have this one here is selected again that's not very descriptive at the moment.
However if we go to the meche data down here we will see if we go down on the properties window to the
mestisa Tap which again is that little mesh icon the three vertices joined by edges upside down triangle
if you will.
We can see the mesh data is verte 05.
Now if we click on that dropdown we can see all of the other meshed data that's in our particular scene
at this time.
And that is powerful because I'm going to guess here that 0 0 1 all the way to five is these five windows
like a click on each one to check but I'm pretty certain it is.
I think this other verte is the doorway here.
So let's go ahead and switch them sort of 0 0 once a select every window and change it to series 0 1
of course yours may be named slightly differently depending on how it was all set up.
But there we go mining now all changed in that one.
There must be Verts procedural one.
Okay so now if we have a look at this dropdown again we see those zeros.
Okay now that's important because if we go in say this firewall now and reopen get those bits a meshed
data although they're all the same in this case are going to vanish.
So if that was a model or meche data that we wanted to keep we'd need to associate a fake user only
to do that at the moment.
So what we're going to do is to demonstrate that is I'm going to save the file which is now been done
and I'm just going to click revert here and that's going to reload the file again.
And because we've literally just saved it it won't look like anything that's happened but we go to this
meche data drop down we see there's no more Virts 0 2 3 4 and 5.
They've completely gone now they dont exist in this blend file anymore.
In fact all of these are now sharing the same meche data.
So we hop into edit mode.
Look at that.
We can actually see that we're editing every single one of it.
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.
There you go.
This is the mesh object.
I'm editing not over here so I have to click one of these faces and we can see it's selecting them on
every single one survie extrude that out.
It's affected every single one.
Now that is very very powerful.
And looking at it that is if you did a duplicate link.
When ever you.
When we went in early and built this up by duplicating it.
So we done a duplicate link.
What that's doing in the background is saying that this mesh object shares the same mesh data block.
Very important and very useful because I'm going to undo that blob that just makes I don't want it.
But let's say that we wanted to put another door in just here so we can select it and go and change
it to um assuming here it's Virts.
Okay.
Where's it gone.
Okay so it is 90 degrees different so I can now rotate that's on me x axis by 90.
Yeah that's the right way around.
And in one quick operation without having to find another door and duplicate it and move it.
Okay we had to rotate it in that instance but you can see that I've changed the mesh data of that object.
It's now looks completely different it looks the same as this one.
So that's got incredible potential depending on the complexity of your scene that you can just simply
swap parts in and out.
And that's where it's very important to make sure you construct your models themselves to be as modular
as possible because that does mean that you can literally swap one object out for another and have a
completely different feel to your scene.
Okay guys it's Challenge time unless a particular mesh object needs to be unique.
Remove all redundant mesh data blocks.
Make sure your mesh data blocks have an appropriate and descriptive name.
Pause a video now and give that a go.
Okay guys.
Welcome back.
Let's go remove all redundant mash data blocks over in blender.
Okay so what we should end up with in the end is literally the same number of data blocks as there are
parts in our scene.
Not individual parts but unique parts so we've got this front door here the windows and the first two
we've got the floor panes which is three four and five.
So there's only five unique mesh data blocks in this scene.
So that's what we're going to shoot for.
We've already done that.
These doors they naturally save for set.
They share the same mesh data.
However what I can do here is actually name that meshed data.
I got a call that one I'm going to call it exactly what it is actually.
I'm going to copy the mesh title itself the object the mesh object title and store that has the mesh
name as well.
And I'm going to do that to the window.
Of course in this case I'm going to tell what's going on there.
Three by four.
That's absolutely fine by not point nought.
That used to be twenty five I think because that's the size of it.
So let's copy that and put that in here.
Now we should find after doing that that the other ones have hit naturally inherited that.
Perfect.
Right.
So we've got our square here.
I'm going to call it floor because that is actually what it is.
I'm going to change this particular one which is plain 0 0 6 to the floor in the title down there.
Now I've done that.
I'm going to select this one and switch it to a floor.
This one to floor and just literally go through and do that.
And then in a moment I think there are two more things to do.
You'll soon find out whether or not we've got down to the right level case and now that that is done
we've got this one here.
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
just call.
Q But at the moment let's call it filler because that's what it is.
Let's do x y and z so it's no point to five by nought point twenty five.
So nought point to five by nought point to five by.
Three high plus points to fire.
So by three point two five so that is a descriptive name about what that is.
And I'm going to update the mesh data name as well.
So let's go ahead and fill in these ones here with phil..
Soon sumate move round I'm just wondering whether I can do two at once.
I'm not sure if I can.
But if I can that would be much better although it's presenting a difficult selecting.
So if I go here and go filler and then just check I think it's only change the active one that's changed
to filter.
Yeah.
Does any change active one.
So fill out.
You can also search at the top of it becomes a bit unwieldy.
So I'm going to delete this cube from the scene because it doesn't need to be there.
Thus removing and this one's a bit different.
This is the same sort of filler.
But here it is for white not four point twenty five but it's four wide.
I've got to pick either X or Y I'm going to pick x.
Okay so in order to save you the mundane task of literally watching me rename a couple of mesh objects
here are just fast forwarded as I was round and renamed all of these parts.
And I'm going to save my file real quick and reverse it.
There we go.
So that means that I should have no extra ones here and look at that.
The mesh data in this scene the data blocks are down to five and we can confirm that in the outline
the by going to data block the meshes there are now five mesh items in here and they have descriptive
names.
Brilliant.
So the final thing to do of course after we saved our blend file is to make sure we commit those changes
so we can undo them if necessary later on.
So we now know it was removing redundant data blocks or removing redundant.
They two blocks in fact let's be even more descriptive.
Removing redundant mesh data blocks I need to stage those files using.
Ah that's absolutely fine and I'm going to press commit.
Okay.
Brilliant.
And of course I am now in my repository that I use.
This is what it's going to look like from now on.
I've been keeping it nice and simple for you guys before with how you and yours would be looking.
Mine's going to always look slightly different because it's set up around the structure of the lectures
that you're watching rather than just the tasks that are going on.
How did you guys get on.
Please share in the discussions if you had any troubles or challenges.
And I will see you guys in the next lecture.