Page 1 of 1

Copying Blocks

Posted: Thu Apr 30, 2020 6:25 pm
by TSXMike
Hey guys,

I've seen this long ago but never tried it. Today, I've run into a situation in which it would be convenient to actually use it for once. So can anybody explain a little on how to copy and paste a segment or group of segments? Say I want to copy one part of my level and place the whole thing in another spot to duplicate that spot elsewhere. It seems as of now, I can only do it manually (by building the design again) which is tedious. I tried the Edit > Copy Block option which prompts me to save a file as *.blk. I know there is a way to work it properly, but I don't know why I would have to save it to the hard-drive just to copy it to another spot in the level.

Anyway, I tried it. When I perform the "paste block," I select the same file I saved. The thing is that I can't get it to paste where I want. Sometimes it pastes backwards. I imagine it has something to do with what face is selected when I paste (kind of like how the curve generator works).

So can somebody give a heads up on how to do this?

*Edit: I am going to fidget around with it, so I might figure it out myself, but any answers or advice would be helpful.

Thanks!

Re: Copying Blocks

Posted: Thu Apr 30, 2020 9:24 pm
by TSXMike
Okay, I think I figured it out. It IS like the curve generator in that which face and which vertex is selected when you paste matters. I just had to try a few times and undo each time it was sideways or whatever. I also noticed you have to select the first block last when tagging. What I mean by 'first' block is the very next block that will be attached to the one you're pasting from. And as far as why do you have to save - well I guess its just how the data are stored for this. Perhaps the RAM can't handle the block data. And I noticed quick-paste works once you already pasted normally.

So yes, I think I got it. But still answer the initial question because I'm sure any info will be useful.

Re: Copying Blocks

Posted: Fri May 01, 2020 2:37 pm
by LightWolf
There is a quick copy available (Edit > Quick Copy or Crtl+Alt+Insert). Under the hood it still writes to a file (likely because the system was originally designed with files in mind since there originally was no quick copy), but as far as the user is concerned it may as well be stored in RAM. The files are generally small enough anyway that there is virtually no lag time.

Re: Copying Blocks

Posted: Thu May 14, 2020 11:40 pm
by Sirius
The block orientation depends on a) the current face/vertex at the time you copy the block (it uses this as a reference for the relative orientation), and b) the current face/vertex at the time you paste the block. Figuring out the rules can be somewhat unintuitive; but if you look at the selected edge when you copy, the direction from the uncircled end of the edge to the circled end (selected vertex) is the "up" direction for the block. When you paste, it will figure out the "up" direction from the selected side/edge/vertex in the same way and paste the block in that orientation.
LightWolf wrote: Fri May 01, 2020 2:37 pmUnder the hood it still writes to a file (likely because the system was originally designed with files in mind since there originally was no quick copy)
Correct. A system that doesn't need the intermediate file would be possible, but DLE wasn't designed that way and it may not be all that easy to change that. Once we get the LibDescent port done it will be relatively easy to omit though.