Fri, Jan 31, 4:50 AM CST

Renderosity Forums / Poser Technical



Welcome to the Poser Technical Forum

Forum Moderators: Staff

Poser Technical F.A.Q (Last Updated: 2024 Dec 04 2:47 am)

Welcome to the Poser Technical Forum.

Where computer nerds can Pull out their slide rules and not get laughed at. Pocket protectors are not required. ;-)

This is the place you come to ask questions and share new ideas about using the internal file structure of Poser to push the program past it's normal limits.

New users are encouraged to read the FAQ sections here and on the Poser forum before asking questions.



Checkout the Renderosity MarketPlace - Your source for digital art content!



Subject: Comments in PP2 files


lgrant ( ) posted Thu, 01 August 2002 at 11:18 AM ยท edited Fri, 31 January 2025 at 4:49 AM

I have been trying to find a way to put comments in PP2/CR2 files, so that I can put our copyright information in them. No one I have talked to knew how to do this. Today I stumbled across a PP2 file that had a value commented out using a double slash (//), just like C/C++. That makes a lot of sense, I thought, since the language of PP2 files has a very C-ish look to it. So, I tried putting our copyright block in the front of a PP2 file, with a // in front of each line, just after the version information, and it worked like a champ. I have not tried it yet with CR2s, and I have only tried it with Pro Pack, but is looking like the answer I have been searching for. Thought y'all might be interested, in case you were searching for the same answer. When I get a chance to do further testing (which may not be right away), I'll post again. Lynn Grant Castle Development Group


SAMS3D ( ) posted Thu, 01 August 2002 at 11:51 AM

Lynn you did a great job investigating this already, we use mostly cr2 files and I am going to try it later tonight to see how it works. But wow what a great discovery, lets call the the LGrant Rule.....good work Watson....Sharen


Jaager ( ) posted Thu, 01 August 2002 at 1:09 PM

See what happens when you save that file back to the library. This was discussed a couple of years ago and comments could be gotten in, but not retained, was what I remember. Hey, I just had an idea. Once a material block is in a library, it only goes away if you delete it by hand. Maybe a copyright can be entered as a texture. Actually - the Material could be "Copyright"


kawecki ( ) posted Thu, 01 August 2002 at 2:39 PM

// works without problems

Stupidity also evolves!


KattMan ( ) posted Thu, 01 August 2002 at 2:51 PM

Jeesh, I had this worked out a long time ago. But I didn't find the // donation, if I remember correctly I used *. There are commented lines in a few CR2 files that come with poser. The only requirement is that the comments HAVE to be inside a bracketed section. This works: { Version 4.03 * my comment } This doesn't: *My comment ( version 4.03 } So anyway, that is the last peice for you.


Jaager ( ) posted Thu, 01 August 2002 at 6:23 PM

A library file will open with comments // or * inside the { } Poser will not keep them for me on resave. However This - added into the Materials section - will stay until manually deleted - i.e. Poser will keep it in on resave. (You cannot put comments as a texture call, it will look for a texture by that name. So, the length of the comment is determined by low long a material name can be. The neat thing is - this shows up in the materials menu in Poser. material Copyright-2002-by-Jaager { KdColor 1 1 1 1 KaColor 0 0 0 1 KsColor 0 0 0 1 TextureColor 0.8 0.8 0.8 1 NsExponent 100 tMin 0 tMax 0 tExpo 0 bumpStrength 1 ksIgnoreTexture 0 reflectThruLights 0 reflectThruKd 0 textureMap NO_MAP bumpMap NO_MAP reflectionMap NO_MAP transparencyMap NO_MAP ReflectionColor 0 0 0 1 reflectionStrength 0 } This should keep the data in more or less forever for 99% of Poser users, what with the phobia against text editing a poser file. I just checked - UVMapper strips old comments and will remove a usemtl line that has no associated facets. So this is not a way to keep comments in an OBJ file.


lesbentley ( ) posted Tue, 06 August 2002 at 12:27 PM

Nice one Jagger :)
It seems the principle here is just to fool Poser into thinking the comment is a relevant bit of code.

After reading your last post, I tried your method on a CR2 (not a PP2), and it worked, but the comment got truncated at, I think it was 32 characters. I though the "name" string in a "valueParm" might be a good place to store a comment in a comment in a CR2, as I knew that an unused valueParm does not get stripped out in a resave. I put the following text in the "channels" section of the "BODY" element of Posette:

valueParm COMMENT
{
name Comments_a123456789b123456789c123456789d123456789e123456789f12345
}

There are 65 characters in this "name" string (I don't know the limit), the string was preserved through a resave, as expected. Poser created an entire ValuParm channel, and changed the internal name of the channel to "valueParm 3456789d123456789e123456789f12345", note that it used the last part of the string for the name, not the first.

I then tried inserting a "valueParm" channel in the Poser "box.pp2", with the folloing code:

valueParm QT1Comment
{
name This is a comment!
}

Upon resave the "name" string was preserved. Again the entire channel was built from the fragment I inserted, and this time internal channel name was NOT overwritten.

I don't know why the internal channel name kept getting overwritten with text from the "name" string, in the CR2, but this does seem like another way of inserting fairly long comments like copyright notices, in PP2's and CR2's. The whole string can be read and edited from the interface by double clicking on the parameter dial, and of course the dial can be hidden by setting "hidden 1".

Undoubtedly there are lots of other places in Poser files where this sort of comment can be inserted, any name string would have to be a good bet.

As for inserting coding comments at the relevant place in the code, it looks like we are still stuck with "//", and loosing it if the character or prop is resaved from within the Poser interface.


Privacy Notice

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.