Here's one possible way to go about converting your date data into something you can utilize in Animation Nodes or elsewhere.
- Paste the below script into a new text block in Blender's text editor.
- Paste your date / address list into the triple-quoted text block of the 'houseData' variable. I've followed your example format. The below is assuming you have an object named eg '7865' for every house, already added to your scene. (inserting / creating those 98 objects in a script loop is outside the scope of your question as written, so apologies for not covering that here).
Note: The script is splitting the date from the address using the word 'address' just as you wrote it, but feel free to change the format with any short separator as needed, and just edit the entry.split("address") part accordingly if you do.
- Run the script (alt-p in the text editor or press the Run Script button).
from datetime import datetime
housedata = """
December 20, 1972 address 7865
January 31, 1973 address 1234
March 6, 1971 address 9999
# The chosen start date will correspond to timeline frame 0...
startDate = datetime(1970, 3, 1) # (yyyy, mm, dd) -> 1st March 1970
dateformat = "%B %d, %Y"
# Format codes are explained in the table here:
# separate the text lines, discard blanks:
entries = [e for e in housedata.splitlines() if e]
# Now, we set pass_index on all objects named as whatever came after
# 'address' in the text list above.
for entry in entries:
dateTxt, addressTxt = [t.strip() for t in entry.split("address")]
date = datetime.strptime(dateTxt, dateformat)
datediff = date - startDate
dayNum = datediff.days
houseObject = bpy.data.objects[addressTxt]
houseObject.pass_index = dayNum
# Note: pass_index is 0 by default.
- Now in Animation Nodes, you can read each Object's pass index using an
Object Attribute Input node with the value
pass_index in its entry field.
Time Info node will give you the current frame, and a Compare will let you see if those match.
The rest is a matter of setting up a list/loop node to run over all the objects in question, instead of selecting one specific object as I've done in this example screenshot. That part should be well covered by the Animation Nodes documentation.