2
$\begingroup$

I'm trying create a set of modular 3D pieces in one blender file that I can use to build scenes. My idea was to create a single file with the modular pieces and then create a second blender file that would link to them to create the scene. Because I need to export my scene as glTF, I need to import the pieces from my first file wrapped in collections (if I just import the object, the glTF exporter ignores any transform I make to the linked object).

enter image description here

I have carefully set the pivot points of my model pieces so that they can snap together easily. Unfortunately, if I put an object in a collection and that object is not at the world origin, when I import it the linked model includes the offset from the origin in my source file:

enter image description here

I can solve this by moving the model to the world origin, but that causes another problem - now all my model pieces are overlapping each other in a cluttered, unworkable mess. Is there a way for me to link to my model pieces without having to move everything to the world origin?

$\endgroup$
0

2 Answers 2

3
$\begingroup$

Seems like there is a way to do it. Once you add your object to a collection, you then move the 3d cursor to the place where you would like the origin to be, go into the Properties/Object Properties/Collections panel and then select Set Offset From Cursor from the drop down menu.

$\endgroup$
-2
$\begingroup$

Manual Approach (No Python Script)

Lets assume you have Blender File [A]. We will create one additional File[B]

These steps will move objects to the world origin. Keep this technique in mind.

  • Cursor to world origin
  • Select objects and Move Selection to Origin. If items are parented then Blender manages this.

Next part

  • Perform you work of Modelling in File[A] as usual.
  • Copy File[A] to new Blender File[B]. [A] and [B] have distinct names.
  • In File[B] use the move technique from above. File [B] is now the processed file with world origins at [0,0,0]. Save File[B].
  • You may need to delete a previous File[B].
  • You do not want to visually model with File[B] because many objects are near the origin.
  • File[B] is the target of the file append or link

If often use local mode with numeric keypad /

I am not saying I agree with your analysis of the problem. People often make copies of files for archive purposes. File [A] could also have a Python script. The script or driver can set values on the delta transform or the primary transform in a particular location.

See the first comment below for additional.

$\endgroup$
5
  • $\begingroup$ If the modelling is done in File A, why not just link the model into file B? $\endgroup$
    – brockmann
    Commented Nov 27, 2020 at 18:25
  • $\begingroup$ It sounds like you're saying I should save every model piece from my file into a separate file. While I could do that, it is a lot of extra work and adds a lot of extra files to my directory. There is also the problem that over time the master file and the exported pieces become out of sync. $\endgroup$
    – kitfox
    Commented Nov 27, 2020 at 18:44
  • $\begingroup$ No that is not the intention. Please see edit. All objects in one file. If you choose to create archives of files that is your Blender Users Choice. $\endgroup$ Commented Nov 27, 2020 at 18:48
  • $\begingroup$ So the file B would have the same objects as the file A, just with everything moved to the origin? $\endgroup$
    – kitfox
    Commented Nov 27, 2020 at 18:52
  • $\begingroup$ Yes. The difference is B is only a library for file append/link. $\endgroup$ Commented Nov 27, 2020 at 18:53

Not the answer you're looking for? Browse other questions tagged .