MaxScript Fragen

Dropye

Grünschnabel
Hallo,

ich habe angefangen mit mit Max script einen restless exporter zu schreiben und brauch in 2 punkten etwas hilfe da ich auch mit der recht guten hilfe datei nicht weiter komme

1. ich benötige die gesammtzahl der Materialien meiner szene und etwas wie ich darauf zugreifen kann

2. benötige ich eine möglichkeit meine über snapShotAsMesh erhaltene Primitive zu identifizieren, d.h. ich muss wissen ob es sich um eine Box oder ein zylinder handelt

danke im vorraus für hoffentlich konstruktive vorschläge :)

lg
 
I hope you won't mind some English here...

1. You can get that by querying sceneMaterials collection, for example for the count you'd use sceneMaterials.count You can iterate over it as well, for example for i in sceneMaterials do ... or for i = 1 to sceneMaterials.count by 2 do print sceneMaterials[1].name However bear in mind that the library contains top-level maps (such as enviroment map and such) as well, and check for the type of material to avoid problems.

2. I'm afraid that you can only identify the original primitive if you'd store the info before making snapshot of the mesh. There might be other workarounds but they might fail if the pivot is moved or resetted.
 
Zurück