LDraw.org Discussion Forums

Full Version: LDCad move sub-model to model
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I vaguely remember this being possible in LDCad. I have minifig A contained in building model B contained in town model C. How do I move minifig A directly to town model C while retaining its original position and orientation?

Thanks.
That can be done using nested mode if the minifig isn't a submodel itself.

Open model C
put it in nesting mode (N, while nothing is selected).
Cut the minifig (rember it's pos).
Then paste it again back to the same position.


If it is a submodel you need to be abit more tricky:

Open model A, select the minifig.
Add a brick to the scene (so it has the sameorientation as the minifig).
Open model C
Enter nested mode
Select the tmp brick.
Locate the minifig in the models overview and drag it in to the C model.

Hope that helps.
What do you mean by submodels? Yes they are all submodels. The town is not one giant MPD.
I meant is are the minifig parts in a loose ldr or are it's parts inside model B.

Thing with nesting is it flattens all submodels so the cut/paste method will insert the loose minifig parts into c, if the minifig is in a dedicated ldr you probably don't want that. In that case you want to insert the minifg ldr reference into C (via above method 2)
What is the "Models Overview"? I am look at the scene at a slant.

[edit]

Do I need to have two instances of the program running at the same time?
In the part bin go to the top level group, then go into the 'model content overview' group (half build buildozer picture), then go into 'all models currently loaded' group (3 houses picture).

That bin group lists all currently loaded ldr's (incl ones in mpds). From there you can locate your minifig model and add it to model C like any ldraw part.
But what about the added brick? Do I put it in model A, B or C?
It's a place holder to get the absolute orientation in model C. You add it to the same model which currently holds the minifig. Don't forget to first select the minifig (so it's orientation is copied to the next insertion). When the minifig is where it should be you delete the tmp brick again (in ether it's model or from nested C).

ps: to end nesting mode use shift+n

Maybe I should do another tutorial/demo clip on the nesting mode besides the mpd tutorial I made a while back?
Could you maybe add a widget in the version to accomplish this? It might be easier to respond to application prompts than trying to drag and drop different parts, especially since I am getting less than 1 FPS when rendering model C.
Maybe I'll add 'bring to top level' to the selection menu, which would replace the copy paste action.

And you could then just double click the minifig while the tmp brick (in model c, now at top level) is selected to replace it without dragging the part.

I'm also thinking about introducing macro's, as 1.4 will introduce scripting anyway.
Would it be too much to ask if you can write a standalone command-line tool? I don't think the math would be too hard. Though I haven't done matrix math or trigonometry in a while...

E.g. input two sets of model lines and output the sum.

Even a spreadsheet that can do this would be great!
Okay, I was able to successfully move a model to the top level using this technique. I had to wrestle with the camera a lot due to my low framerate.
At the moment I try to spend all my time on 1.4, but maybe one of the script goru's on this forum can help you.
Didn't datsville have layers, maybe hide (ghost) one of the bigger ones while working on placing the minifigs.

I also thought up a shorter method you could try

click on the minifig in model B.
double click on any LDraw part in the part bin to replace the minifig.
open model C in nested and select the part just used (at where the minifig used to be).
double click on the minifig in the part bin overview group.

This way you have minimal interaction and thus fps issues.
The problem with the nested mode is that it selects the minifig torso, legs, etc. individually. I was unable to select the complete minifig model.

Working with one layer or section at a time is a good idea, thanks.


[edit]

I followed your instructions. But when editing model C I replaced the random brick with model A again, and model A got added back to model B instead of model C. Sad

It's as if I did nothing at all.
Michael Horvath Wrote:I followed your instructions. But when editing model C I replaced the random brick with model A again, and model A got added back to model B instead of model C. Sad

My bad I forgot to include the cut/paste action. Thinking this might be a nice tutorial I made a (very) short clip to demonstrate this process:

clip

I'm using the new 1.4 (64 bit) version, but the process is the same in 1.3.


edit: yt link was invisable
Okay, thanks. It's working now.
I just noticed the link to the clip I made was invisible, so here it is again

Hope it makes things more clear.
Scratch that. It is working some of the time, but not always. Sometimes it is adding the model back to model B again. Sometimes it adds the model to a sister model. Also, your video has no audio or narration, so I really don't know what you're doing in it.

[edit]

Maybe you should restrict adding parts and models to the currently viewed model.

[edit]

When I remove a submodel from a model, sometimes it gets deleted from the MPD file and parts bin as well. This should not happen unless the program is explicitly told to do so. I've had to start all over from the beginning a few times due to this behavior.
The clip follows this scenario:

Open top level model
Put it in nesting (n)
go to the model currently holding the minfig
Select the minifig
Replace it with any normal brick/part (double click in bin)
Go to top level model (end)
Select the tmp brick
Clone that brick (ins) and place it at the same location
Go to the model currently holding the minfig (end)
delete the tmp brick
Go to the top level model (end)
replace the tmp brick (still selected) with the minifig (double click in bin)


As for the wrong target model behavior, I think you went into nesting mode while a selection was active, this could affect the target insertion model (a message is given in such a case though).

File submodel content should never be deleted unless you use 'delete model' from the model menu. Are you sure you didn't delete the parts while being in nesting mode, because in such a case the original minfig parts will be removed from it's containing model and all references will point to the now empty file. This is the reason you have to use a 'tmp brick' so you're using the minifig reference instead of it's contents when replacing things.

I'll play around later this week to see if i can get it to mall function, but as far I know nesting has been very stable in the recent versions ( I use it a lot myself so it's tested all the time Smile ).
OK, I will try again. Thanks.