_dodger opened this issue on May 19, 2003 ยท 3 posts
_dodger posted Mon, 19 May 2003 at 10:58 PM
Just wanted to note: I've tested the functionality of the thing I built this for and it works. I was able to transfer a material from one file to another! Wuhu! And with only this much code:
#!/usr/bin/perl
use PoserParser;
my $matlib = new PoserParser;
$matlib->read('./weapons.mt4');
my $mat = ($matlib->getFigures)[0];
my $cr2 = new PoserParser;
$cr2->read('/usr/local/www-gc/dodger/friv/devel/ElfMageVickiBeta/Runtime/Librari
es/Character/Elf Mage Vicki/Elf Mage Boots.cr2');
my $boots = $cr2->getFigure(2);
$boots->{material}->{Silver} = $mat->{material}->{Blade};
$boots->{material}->{Silver}->{_id} = 'Silver';
$cr2->writePZ3('CR2', 'ppt/changeAMat.cr2');