AnsweredAssumed Answered

Adding base shape colour to Plant_Loader.cga

Question asked by ms@eliotsinclair.co.nz_eliotsinclair on Jun 30, 2020
Latest reply on Jul 8, 2020 by ms@eliotsinclair.co.nz_eliotsinclair

Hi,

 

I have managed to successfully add a generic brown (mulch) colour to the Plant_Distributor.cga by adding GroundCover to the existing rule:

 

@StartRule
Generate -->
case Mix == "Custom":
alignScopeToAxes(y)
comp(f){ vertical: NIL | bottom: NIL | all= CustomMix }
GroundCover
else:
alignScopeToAxes(y)
comp(f){ vertical: NIL | bottom: NIL | all= Generate(_getMix) }
GroundCover

 

GroundCover -->
color("#948477")

 

This works and adds a brown base colour to the shapes.

 

When I try to do that to Plant_Loader.cga with:

 

@StartRule # assumes that all main attributes have been set outside
Generate -->
case Height > 0:
set(_plantNbr,_indexFromCommonName(Name))
set(_plantName,_validate(Name))
set(_plantHeight,Height)
set(_plantRadius,Radius)
s(0,0,0) center(xyz)
alignScopeToAxes(y)
TrunkOrigin
GroundCover

else:
Generate(Name)
GroundCover

GroundCover -->
color("#948477")

 

The Shape does not receive a colour and stays to generic base colour.

Can someone explain what I am doing wrong?

Outcomes