Forum Coordinators: RedPhantom
Poser - OFFICIAL F.A.Q (Last Updated: 2024 Nov 28 11:20 am)
That's one syntax. You can add comments into the version{section after the version number. You can also use '#' or '//' to add comments or comment out lines in the file. Check the 'P4 Nude Woman.cr2' for an example of the latter. Didn't know that, didja? ;)
Message edited on: 10/15/2005 01:47
C makes it easy to shoot yourself in the
foot. C++ makes it harder, but when you do, you blow your whole leg
off.
-- Bjarne
Stroustrup
Contact Me | Kuroyume's DevelopmentZone
Still even if it won't survive a re-save, it's and easy edit, and it sure looks handy to store "readme" info. My readme files are horrendous and near impossible to match up with the correct Poser files. With this the info can be imbedded. Subsewuent modifications could have the lines added with a quick use of CR2Editor. mike
You can create a comment using Python. In the CR2 file place the following line below the weld statements:-
pythonStartupScript 0 0 ":Runtime:YourDirectory:YourSubDirectory:YourComment.py"
Then write a YourComment.py file to print your comment:-
print "Here is some information about this figure"
print "For more info visit ...... etc"
The comment text pops up when the figure loads. This method survives being re-saved, it is also possibly easier to edit the comment.
Could someone give us a cr2 or pz2 file with such comments in it for the persons like myself who understand better when they actually SEE in a file what it is all about? I HATE those readme.txt files! I have to rename each of them before putting them in my Readmes folder or else they keep replacing one another. And as I am re-installing all my Poser files, I found a lot of them didn't have a readme file of any kind and I have many set of textures that I don't know for which model they were created. I always look in the Poser file to see if there is a comment but only a few have them. At least if everybody would include a readme file with an appropriate filename, it would help a lot! ;o)
France, Proud Owner of
KCTC Freebies
Commenting isn't anything new in poser files, but I think the main reason it isn't used is quite simply that the average user would never in his/her wildest dreams, think of going hunting through a cr2 for information like that. If it were done by everybody, it would be more widely known. As it is, I can't think of a more obscure place to put useful information. Xena's method is the most noticable. The minute you go near the materials, you can't help but see it. mac
Here's a sample of the most obvious commented poser file - default.figure from the figures folder. This is the one which loads up the default guy.
------------------------ starts here ---------------
{
version
{
number 3.0
}
//--------------------------------------------------------
// These are commented out lines. You can switch these and/or modify
// the name to change the default figure
//--------------------------------------------------------
// readScript GetStringRes(1032,24)
// readScript ":Runtime:libraries:character:People:Casual Man.cr2"
// readScript ":Runtime:libraries:character:Poser 4 Lo:Casual Man P4 Lo.cr2"
//readScript ":Runtime:libraries:character:Poser 2 Lo:Casual Man P2 Lo.cr2"
readScript ":Runtime:libraries:character:Poser 2 Lo:Default Guy.cr2"
}
---------------------------- ends here -------------------
Note that the last readscript line (which is NOT commented), is the one which actually works. The other commented ones are all inactive alternatives. mac
Message edited on: 10/15/2005 10:03
Thank you very much! Now if I wanted to add a comment like this in my files, would I need that last line without the // at the start or not?
France, Proud Owner of
KCTC Freebies
One big problem with comments is that many of the third=party add-ons are not comment-aware - presumably their authors were not comment-aware. In particular Tailor would never run with comments in the file. So vendors installing comments in cr2's would be well advised to place them only at the top of the file, where they can be easily found/erased if need be. IIRC // is a MetaCreations-added comment facility, # is a Alias Wavefront .obj standard, and can only appear at the start of a statement (i.e. not within multi-line one). And neither should be used as the very first line of the file.
Francoise, Any line which doesn't begin with // will show up in poser. So, for the lines you DON'T want to see, add // at the beginning. Like this ------------------------------- { version { number 4.01 } //I don't want this line to be read by poser //This is user information only figureResFile :Runtime:Geometries:maclean:home one:11ceiling_fan.obj actor BODY:1 { } actor fan:1 ------------------------------- mac
A few comments (pun intended): If you add comments to your cr2 file, I purchase your product, add the cr2 to my scene, and then save the cr2 back to my library, all of your comments will be lost: Poser doesn't save comments when saving a file to the library. PhilC- Your Python idea is a good one, but I can see how it can easily become evil. People hate pop-up windows on the Internet... don't give them ideas on how to make pop-up windows in Poser. Personally, I would shoot the merchant who forced me to view messages every time I tried to load their file into my scene. Okay, maybe "shoot" is too strong of a word, but I would definitely never buy from them again and I would tell everyone else about this pop-up window. And what happens if someone loads this item into Poser 4? Would they get a "unknown line" error since Poser 4 doesn't use Python? --John
VanishingPoint... Advanced 3D Modeling Solutions
Xena's method is the best. Poser doesn't resave comments for obvious reasons - it doesn't reference the original file. It just writes a new file over the old one if it exist. For the readscript stuff, the '//' makes sense. Never 'resave' such a file. ;)
C makes it easy to shoot yourself in the
foot. C++ makes it harder, but when you do, you blow your whole leg
off.
-- Bjarne
Stroustrup
Contact Me | Kuroyume's DevelopmentZone
Well I wanted to know for my own use. I found so many files I don't know where they belong so when I find out for what model a pz2 file is, I will put the comment in that file myself so the next time, I'll know. It might slow Poser down, but it will be my Poser so it won't bother anybody else. ;o) Thanks a lot, mac!
France, Proud Owner of
KCTC Freebies
EnglishBob has a utility for tracking poser purchases, and you can rovide a link to the appropriate Readme fiel. But you probably still have to rename them, Still, I find that it is a very useful little utility. I am glad that it doesn't do a total money spent section though. There are some things better left unsaid :)
I rename all the readme files with a filename I'm sure I can find easily in Explorer. But up till now, when there was no readme file or if it didn't say in the readme file for what model the texture is for, I created a readme file and wrote that info in it. It will probably be easier for me to insert a comment in the Poser file... and faster. ;o) And I agree with you... I prefer not to know how much money I spent since I started using Poser 18 months ago. I think I would hear my bank account yell at me even from my little office.
France, Proud Owner of
KCTC Freebies
If an undocumented feature of Poser is to allow launching of a Python script when loading an item from the library, would that not also mean it is possible launch a script with less honorable intentions, i.e that Poser is in principle susceptible to a Trojan Horse type attack with all power that Python brings? If it is, check your downloads, my dears, check your downloads. B.
Bagoas, you have raised some very good points here. To address some of the points raised by others. 5 or 6 commented lines using "//" won't make any noticable diffrence to the loading time of a typical file. Using a material name for a comment:
material This is a comment
{
}
If the comment exceeds (I think it's) 32 characters including spaces, it will be truncated on a resave. Upon a resave poser will add some paramiters to the material block.
On one of my post I believe lesbently pointed this out to me a couple years back.From within poser you can use the grouping tool to create a phony material name. Then instead of a name you can type a comment saying anything you want. Then when you go to the material room there it is. This is cool because you don't need another program to create or load it..
Message edited on: 10/16/2005 21:00
This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.
I have been active in this field for almosy a year now and I still wonder why it is that the comment facility in the Poser file format is not used.
When browsing my runtimes I often run into things I must have downloaded and installed once but I have no clue as to who made it and what the conditions are for using it. For pose and mat files in particular it would be nice to know what objects or figures it is supposed to work on.
The readme is lost in most cases because the path in the zip caused it to be installed in the Poser Root under the distinctive name 'readme.txt'.
This would not be a problem if the references and origin could be found in the .cr2 or pp2 itself, but in general they are not. This surprises me since any source code file in C or Java for example habituallly begins with pages of comments about copyright and disclaimers.
The possibility to add comments is one of the few documented features of Poser-files.
The 3-D community justfully being keen on respecting authorship as it is, I really wonder why this facility is never used to at least help those wishing to respect it and to give credit where due.
B.