def export_texturing_property(self, flags=0x0001, applymode=None, b_mat=None, b_obj=None): """Export texturing property.""" self.determine_texture_types(b_obj, b_mat) texprop = NifFormat.NiTexturingProperty() texprop.flags = flags texprop.apply_mode = applymode texprop.texture_count = 7 self.export_texture_shader_effect(texprop) self.export_nitextureprop_tex_descs(texprop) # search for duplicate for block in self.nif_export.dict_blocks: if isinstance(block, NifFormat.NiTexturingProperty ) and block.get_hash() == texprop.get_hash(): return block # no texturing property with given settings found, so use and register # the new one return texprop
def n_create_texture_property(n_trishape): """Adds a NiTexturing Property at the top of the property list""" n_nitexturingproperty = NifFormat.NiTexturingProperty() # add property to top of list n_trishape.properties.reverse() n_trishape.num_properties += 1 n_trishape.properties.update_size() n_trishape.properties[-1] = n_nitexturingproperty n_trishape.properties.reverse()
def setup_class(cls): print(f"Class setup: {cls:s}") cls.ni_mat_prop = NifFormat.NiMaterialProperty() cls.ni_mat_prop1 = NifFormat.NiMaterialProperty() cls.ni_texture_prop = NifFormat.NiTexturingProperty()
def setup_class(cls): print("Class setup: " + str(cls)) cls.niBlock = None cls.nimatprop = NifFormat.NiMaterialProperty() cls.nimatprop1 = NifFormat.NiMaterialProperty() cls.nitextureprop = NifFormat.NiTexturingProperty()