Browse Source

unpack animations, not just models, from multifiles

David Rose 22 years ago
parent
commit
2913be304f
2 changed files with 8 additions and 8 deletions
  1. 1 1
      dtool/pptempl/Global.pp
  2. 7 7
      dtool/pptempl/Template.models.pp

+ 1 - 1
dtool/pptempl/Global.pp

@@ -570,7 +570,7 @@ Warning: Variable $[upcase $[tree]]_INSTALL is not set!
 #define language_dna_filters $[language_filters:%=%.dna]
 
 // This is used for evaluating SoftImage unpack rules in Template.models.pp.
-#defer soft_scene_file $[DATABASE]/SCENES/$[SCENE_PREFIX]$[MODEL].1-0.dsc
+#defer soft_scene_files $[matrix $[DATABASE]/SCENES/$[SCENE_PREFIX],$[MODEL] $[ANIMS],.1-0.dsc]
 
 // Include the global definitions for this particular build_type, if
 // the file is there.

+ 7 - 7
dtool/pptempl/Template.models.pp

@@ -42,8 +42,6 @@
 
 #defer source_prefix $[SOURCE_DIR:%=%/]
 
-#map soft_scenes soft_scene_file(soft_char_egg)
-
 #define build_models \
    $[SOURCES(flt_egg):%.flt=%.egg] \
    $[patsubst %.lwo %.LWO,%.egg,$[SOURCES(lwo_egg)]] \
@@ -136,7 +134,7 @@ pal : $[if $[pal_egg_targets],$[pal_egg_dir]] $[pal_egg_targets]
 
 bam : pal $[if $[bam_targets],$[bam_dir]] $[bam_targets]
 
-unpack-soft : $[soft_scenes]
+unpack-soft : $[soft_scene_files(soft_char_egg)]
 
 #define install_bam_targets \
     $[install_egg_dirs] \
@@ -273,12 +271,14 @@ $[TAB]maya2egg $[MAYA2EGG_OPTS] -a chan -cn "$[CHAR_NAME]" -o $[target] -sf $[be
 #end maya_char_egg
 
 // Unpack the Soft scene database from its multifile.
-#formap scene_file soft_scenes
-  #define target $[scene_file]
-  #define source $[DATABASE]/$[SCENE_PREFIX]$[MODEL].mf
+#forscopes soft_char_egg
+  #foreach file $[MODEL] $[ANIMS]
+    #define target $[SCENE_PREFIX]$[file].1-0.dsc
+    #define source $[DATABASE]/$[SCENE_PREFIX]$[file].mf
 $[target] : $[source]
 $[TAB]multify xf $[source] -C $[DATABASE]
-#end scene_file
+  #end file
+#end soft_char_egg
 
 // Egg character model generation from Soft databases.
 #forscopes soft_char_egg