Esempio n. 1
0
def n_create_stencil_prop(n_trishapedata):
    n_nistencilproperty = NifFormat.NiStencilProperty()
    n_trishapedata.properties.reverse()  # ensure property is at top of list

    n_trishapedata.num_properties += 1
    n_trishapedata.properties.update_size()
    n_trishapedata.properties[-1] = n_nistencilproperty

    n_trishapedata.properties.reverse()
Esempio n. 2
0
 def branchentry(self, branch):
     if isinstance(branch, NifFormat.NiTriBasedGeom):
         # does this block have an stencil property?
         for prop in branch.get_properties():
             if isinstance(prop, NifFormat.NiStencilProperty):
                 return False
         # no stencil property found
         self.toaster.msg("adding NiStencilProperty")
         branch.add_property(NifFormat.NiStencilProperty())
         self.changed = True
         # no geometry children, no need to recurse further
         return False
     # recurse further
     return True