Mostly good but results with a blank row every other row:
Trying to figure out where the mystery rows come from.
Unreal Side code so far:
This is only basic test to figure out how we can get .uassets from content browser by name. This proves that it can be done and the asset loaded from construction script. Next I will need to parse the data table, but is easy. The part I'm still unsure about is how to handle reimport, but just going one problem at a time.
Replies
import csv
selection = cmds.ls(sl=True)
col = ['','actorName','tx', 'ty', 'tz', 'rx', 'ry', 'rz', 'sx', 'sy', 'sz']
with open("C:\ISMExporter\data.csv", 'w', newline='') as f:
writer = csv.writer(f)
writer.writerow(col)
for idx, obj in enumerate(selection):
data = []
data.append(idx)
actorName = obj.split("_")[0]
data.append(actorName)
data.append(cmds.getAttr(obj + '.translateX'))
data.append(cmds.getAttr(obj + '.translateY'))
data.append(cmds.getAttr(obj + '.translateZ'))
data.append(cmds.getAttr(obj + '.rotateX'))
data.append(cmds.getAttr(obj + '.rotateY'))
data.append(cmds.getAttr(obj + '.rotateZ'))
data.append(cmds.getAttr(obj + '.scaleX'))
data.append(cmds.getAttr(obj + '.scaleY'))
data.append(cmds.getAttr(obj + '.scaleZ'))
writer.writerow(data)
del data
In unreal, the only additional thing to do is make the Data Table an instance editable variable, this way you can have each one of these "ISM Loader" actors represent some export group. Again, that can be an individual model, or a whole neighborhood, or even an entire scene if it wasn't too large. It's just a balance of how many individual exports you want to make, versus how granular your iterative changes are likely to be.![Image: https://us.v-cdn.net/5021068/uploads/editor/5v/prkb4aq11glf.png](https://us.v-cdn.net/5021068/uploads/editor/5v/prkb4aq11glf.png)
So the workflow is pretty simple: