-
Notifications
You must be signed in to change notification settings - Fork 19
don't repeat meshes - use Linked Duplicates instead #43
Comments
Blender doesn't have such a feature, other than duplicating objects, afaik. Materials behave like this though, and should already be handled in such a fashion. |
/cc @rioforce You know how this could work. |
I think the feature exists and is called "Linked Duplicate" This script seems to use it: |
A linked duplicate is not necessarily a good option, supposing a user wants to directly modify or simulate parts of his/her model. It would be good for things like studs, but the linking would be restricted to per-part. |
It is definitely possible in code, you'd just have to change the LDraw file parser to detect if a brick was imported by the name of the model, duplicate it (either Ctrl+D, which doesn't link, or Alt+D, which does link) and move it the the proper location. The problem is, you'd have to read the LDraw file to determine the location of the brick without having it import it again. This would save loading times and also make the script expandable. |
We actually have two issues here: an option to reuse mesh and an option to link alike mesh. The former should happen and would speed everything up, but the latter would come later. As Tribex accurately said, this would be a part-by-part bases. Only alike bricks would be linked. A 2x2 brick would not be linked to,say, a 4x6 plate. Here's the Blender 2.6 (instead of 2.4) documentation. Moved to milestone v1.3, as linked mesh has been requested before. |
i was just talking about not having multiple meshes of 2x4 bricks. and i was not talking of the manual editing process later, but of the importing step. there, each brick file should only be read once, and its mesh be established only once, the implementation would be very simple as well: |
I wasn't saying afterwards, I was saying while it imports.
|
yep, exactly |
Just adding a method that may work:
|
No, that's IMHO a weird workaround implementation, The desired one is very, very, very, very simple, |
Linking #71 as it contains info that can be used here. |
Improvement suggestion:
As far as I can see, currently each and every single LDRAW file
gets imported into a Blender scene without creating references.
For example, if a primitive 1-4cyli.dat is used, it is repeated in each
and every instance as a separate mesh.
I think that Blender supports re-use of objects.
I cannot really imagine that it does not.
My suggestion is to search for that feature and modify the loading script
to not repeat and repeat and repeat each mesh, but instead only load it once,
and then in all places where it is used, make a reference to that one instance,
just applying transformation matrix, i.e., rotation and translation and coloring.
This should dramatically reduce the resulting blender scene size,
rendering time, importing time etc.
I cannot really imagine that Blender does not have such a feature...
Also: the already loaded files should be cached inside the importing script.
Currently it seems to me that a file like 1-4cyli.dat gets repeatedly parsed
each time it is used. That's not necessary. It should get read just once,
and its parsed contents saved in some python object.
When the next occurrence of it is met, and it is already parsed,
then the parsed version will be used. This should save a LOT of loading time.
The text was updated successfully, but these errors were encountered: