I’ve found the solution to my problem, and that is to create an Xpresso tag and place it on the parent node (e.g. called “GEOMETRY” which is set to the “GEOMETRY” layer). In the Xpresso editor I’ve place two nodes, an object node and a python node. The object node outputs are Object and Layer. The python node inputs are inObject and inLayer. In the python node code I wrote this:
#This script will set the layer to every
#child object to the same layer as the
#parent object (the object which contains
#the xpresso tag)
import c4d
def SetChildLayers(inObj):
for child in inObj.GetChildren():
child.SetLayerObject(inLayer)
SetChildLayers(child) #recursive
def main():
SetChildLayers(inObject)
Now, any time I place objects under the GEOMETRY node, their layers will automatically be set to the GEOMETRY layer. This works perfectly and is a real time saver!