replacing the filename with the file data but getting no graphical data


Re: replacing the filename with the file data but getting no graphical data
#15
Hmm, I think I understand what you are trying to do, but you are going about it the wrong way.

If I understand correctly, you want to define a file containing many primitives, but instead of just rotating/scaling/etc. to their final positions, you want some intermediate step, where they are all modified at once to their final state by a single final transformation.

You can't have a line type 1 without a file... the sole purpose it exists is to include files, without a file at the end it literally does nothing. I'm telling you man... read the file format standard and it'll all make sense, if you have specific questions about parts of the standard which you do not understand, I'm absolutely sure that many people here would be glad to help the answers to your questions would be much more constructive.

Now... about how to achieve what I think you are trying to achieve...

In order to have one line type 1 at the end modify everything defined so far (although if that's really all you're trying to do it would b preferable to just have things the right color/position/dimensions/etc. to begin with :| ) you would need to create two files, one with all the primitives you are trying to insert, etc, and the other file with a line type 1 that includes the previous file.

For example, say you were trying to create an abominable snowman part named subsnowman.dat (you should never name it this for the actual parts library, see this document, but it's fine for personal use).
Code:
0 ~Animal Abominable Snowman
0 Name: subsnowman.dat
0 Author: Kris Finney

1 16 0 0 0 1 0 0 0 1 0 0 0 1 48\8-8sphe.dat
1 0 0 -1.75 0 0.75 0 0 0 0.75 0 0 0 0.75 48\8-8sphe.dat
1 16 0 -3 0 0.5 0 0 0 0.5 0 0 0 0.5 48\8-8sphe.dat
0

And another file which includes the snowman, but makes him white
Code:
0 Animal Abominable Snowman (White)
0 Name: snowman.dat
0 Author: Kris Finney

1 15 0 0 0 1 0 0 0 1 0 0 0 1 subsnowman.dat
0

[Image: 6H8bB.png]
(Complete side note: See how it makes no sense for small enough images to be resized/compressed? Big deal, you saved a few pixels and now its a distorted jpeg too.)

But note that even though you tell the model to be white, the middle section is black. This is because as defined in the file format specification which must be read carefully and tested until understood changing the color of what you are including only effects things in the file with colors 16 and 24 which have special meanings.

This is sometimes done for shortcut parts, see, stuff like this (although that's a bad example because its not an official part, and will probably never become an official part because of licensing issues, it still illustrates the concept of shortcut parts better than other shortcuts I could find).

Note how both files need to be in the same directory for it to work. If you wanted subsnowman.dat to be in the s subdirectory (for subparts) then you would include it via:
Code:
1 15 0 0 0 1 0 0 0 1 0 0 0 1 s/subsnowman.dat
It is possible to have it be contained in one file by using a multi part document, but that is not allowed for parts (only for models).

But like I said... the better solution is often to just have one file, and include the primitives how you want them to be the first time.
Reply
« Next Oldest | Next Newest »



Messages In This Thread
Re: replacing the filename with the file data but getting no graphical data - by Jean-Philippe Ouellet - 2011-12-28, 21:45

Forum Jump:


Users browsing this thread: 1 Guest(s)