PopulateCopies: Reference placement propagation
This commit is contained in:
parent
f4b88d1a2e
commit
62c6b6d7cc
|
@ -121,12 +121,26 @@ class LatticePopulateCopies(lattice2BaseFeature.LatticeFeature):
|
|||
|
||||
outputIsLattice = lattice2BaseFeature.isObjectLattice(screen(obj.Object))
|
||||
|
||||
|
||||
# Pre-collect base placement list, if base is a lattice. For speed.
|
||||
if outputIsLattice:
|
||||
objectPlms = lattice2BaseFeature.getPlacementsList(screen(obj.Object),obj)
|
||||
|
||||
placements = DereferenceArray(obj, obj.PlacementsTo, screen(obj.PlacementsFrom), obj.Referencing)
|
||||
|
||||
#inherit reference placement from the array being copied
|
||||
if outputIsLattice:
|
||||
refplm = None
|
||||
if obj.Referencing == 'Array\'s reference' or obj.Referencing == 'First item' or obj.Referencing == 'Last item':
|
||||
#simple cases - we just copy the reference plm from the object
|
||||
refplm = lattice2BaseFeature.getReferencePlm(obj.Object)
|
||||
else:
|
||||
#other cases - apply first transform to reference placement
|
||||
refplm = lattice2BaseFeature.getReferencePlm(obj.Object)
|
||||
if refplm is not None and len(placements) > 0:
|
||||
refplm = placements[0].multiply(refplm)
|
||||
self.setReferencePlm(obj, refplm)
|
||||
|
||||
# initialize output containers and loop variables
|
||||
outputShapes = [] #output list of shapes
|
||||
outputPlms = [] #list of placements
|
||||
|
|
Loading…
Reference in New Issue
Block a user