Skip to content

1.0.10rc2 with material selection and no dupes

Pre-release
Pre-release
Compare
Choose a tag to compare
@Simarilius-uk Simarilius-uk released this 01 Dec 19:28
· 872 commits to main since this release
  • Materials can be selected by passing appearances in the python call. Its using a blender filelist thingy as I couldnt get it to pass a normal list, setting it up to pass is a pita but basically you need to do a list of dicts, then tuple() it before passing, example in EntityImport3.py in my CP2077 Blender scripts github.

  • Changed the with materials code to not import duplicates, that is it doesn't import the same material name defined by the same mi twice. when it creates a material it tags it with the BaseMaterial in a custom property which is used when loading more files to determine if its the same thing. have tested on sectors and some characters and seems to work ok.

  • Stopped it parsing the entire bpy.data.objects tree quite as much, you can just grab the selection after import to get the imported objects rather than doing a compare of before and after.

  • Relocated the collection code to before the material generation, as otherwise if something does go wrong in the material code the objects get left with no collection, this way they always go in a correctly named collection first.

Combination of the above reduced import time for 504mesh files for a sector import from 68009sec (almost 19hrs) to 178 sec.