Forum: Poser - OFFICIAL


Subject: Renaming figure parts?

xantor opened this issue on Oct 26, 2004 ยท 15 posts


xantor posted Tue, 26 October 2004 at 7:45 AM

Is there any way to change the internal name of a figure part without losing the grouping? I want to rename a figure so that the body parts work with poses and bvh files.


Little_Dragon posted Tue, 26 October 2004 at 8:51 AM

No, if you change the internal name, it loses its association with that mesh group. You'd have to change the name of the mesh group to match.

If you're particularly confortable with ERC code, it's sometimes possible to create a "phantom" body part and link it to another part so that the one's movements control the other's. For instance, I rigged Valandar's land-dragon freebie and stonemason's Whispering Wall with phantom heads so they'd work with standard Mimic poses.



xantor posted Tue, 26 October 2004 at 12:45 PM

I dont know how to do erc , maybe I could learn. It was actually for the free alien drone figure (I cant remember where it was from). People making figures should try to remember and name all the parts the standard poser way and this wouldn`t be a problem. Some other figures have the wrong names for parts and it makes them difficult to pose.


maclean posted Tue, 26 October 2004 at 3:26 PM

xantor, Just open both the obj file and the cr2 in notepad. Find the part you want to change and do it in both files, then save them. If you have P4, delete the geometry .rsr for the obj, then re-open the figure in poser and the body part should have your new name. You might want to make a copy of the files before doing this, but it ain't so difficult. mac


nomuse posted Tue, 26 October 2004 at 4:31 PM

...And after you've gone through it a few times you instinctively think in Poser body part names. Saves looking them up all the time!


lesbentley posted Tue, 26 October 2004 at 6:20 PM

Perhaps I have not understood the question correctly. I have offten changed the actor names in a cr2, and have never had any problems. In the declaration block you will see the actors declared like this:

actor :1
        {
        storageOffset 0 0 0
        geomHandlerGeom 13 
        }

hip is the actor name, and hip is the group name in the obj file. The two names do not have to be identicle in my experience. You could have, for instance: actor :1 { storageOffset 0 0 0 geomHandlerGeom 13 }

Of course you would have to change the actor name throughout the cr2, not just in the declaration block. A quick way to run a test on this is make a copy of a cr2. Open it in a text editor a do a search and replace of the string ":1" (substitute your actor number if it's not 1) with "A:1", this will append "A" to every actor name in the cr2. This certainly works on Posette and Victoria 2.


nomuse posted Wed, 27 October 2004 at 12:51 AM

Good point, les. Me not thinking, 'cause me too used to fixing the obj as well (it's so easy). Yah, you can change the internal name and leave the declaration alone, works just fine.


xantor posted Wed, 27 October 2004 at 6:10 AM

Thank you. Les I was changing the internal names inside poser so that was where I was going wrong.


xantor posted Wed, 27 October 2004 at 3:10 PM

I tried renaming the cr2 parts and the renamed parts didn`t load in. I tried renaming the cr2 and the object and ended up with the figure being just the head of the alien.


nomuse posted Wed, 27 October 2004 at 3:56 PM

Hrm. I'll have to leave it to Les to paste in a properly formatted cr2 here, but what that sounds like is you haven't changed the names in the right places. To get poses and the walk designer to work the Actors need to be renamed. For the internal workings (joints, welds, etc.) to work the Actor names need to be consistent. The only place you can get away with a different name is what is called the "Declarations Block" at the top of the cr2, sandwiched between the two obj calls; { version { number 4.01 } figureResFile :Runtime:Geometries:Princess:PThatW.obj actor BODY:2 { } actor hip:2 { } actor abdomen:2 { } actor chest:2 { } actor neck:2 { } actor upNeck:2 { } actor head:2 { } actor hat:2 { storageOffset 0 0 0 geomHandlerGeom 13 hat } figureResFile :Runtime:Geometries:Princess:PThatW.obj That last declaration you see there, the line with a "geomHandlerGeom" in it, is the ONLY place where you can use a name that is not consistent with the actor name; aka actor hat:2 { storageOffset 0 0 0 geomHandlerGeom 13 some_other_hat } In the editor I use I am able to select everything but that top block and do a mass find-and-replace for all the part names. It then becomes easy and only slightly tedious to set the new names at the top of each of the statements I've shown above, and the original obj group names inside. I STRONGLY suggest, though, that you change the obj group names inside the object file as well (aka the statements that look like "g rHip".) It will make it much easier to track what you are doing, easier when you are looking at the UV map or finding a problem in the obj file or exporting the figure or really, anything else.


xantor posted Thu, 28 October 2004 at 3:09 AM

I changed the lines that are red in the lesbentley message like he said and that was why the parts didn`t show up. The figure took longer to load in, too.


nomuse posted Thu, 28 October 2004 at 4:26 AM

Repeating just to make sure....if you are going to change "Right_Shin" to the proper Poser terminology "rLeg" you have to do it EVERYWHERE except the second part of the declarations block. It has to be changed in over a dozen places across the cr2; inside the right thigh and right foot where joint definitions involving the right leg are, in the blocks at the bottom that set welds, parent-child relationships, and IK chains... Do a global find-and-replace. (Then, if you for some reason don't want to edit the obj file as well, go back and change the ONE entry in the declarations block).


xantor posted Thu, 28 October 2004 at 7:59 AM

So if I change the object names I can change all the cr2 names?


lesbentley posted Thu, 28 October 2004 at 1:46 PM

Xantor, I would sugest that your first step should be to performe the test described at the end of post #6. If your figure works after this procedure, you can be confident that renaming your actors will work, before you invest a lot of time. If the test does not work, then there is some reason this method will not work with your figure, and you should probably try editing the group names in the object file to match the actor names in the cr2.

I suspect that the reason the renaming did not work, and resulted in missing body parts, is that not all instances of the actor names were changed.

To do this sort of thing a good text editor is is a great help. I use the free EditPad Lite, but there are many other good ones. Here are some step by step instructions on how to do it in EditPad Lite.

Open the cr2 in EditPad. From the declaration block (the part between the two figureResFile lines) copy the part marked in red below, and paste it into the Search field:

actor <br></br>    {<br></br>   storageOffset 0 0 0<br></br> geomHandlerGeom 13 hip  <br></br>    }

Note that the actor number has been included in the search string.

Next type the Replace string (the new actor name, including the actor number), e.g. "NEW-hip:1". Put a tick (check mark) in the "Start from begining" box, then click the "Replace all" button.

Go back the the declaration block near the start of the file, and repeat this procedure for the other actor names you want to change. Message edited on: 10/28/2004 13:55


xantor posted Thu, 28 October 2004 at 9:16 PM

I used textpad to edit the cr2, that has a replace all and does the whole file, I will check and see if anything else was wrong.