As soon as I add a field to a Python Effector with deform mode enabled, the poly object will no longer be affected by the deform when rendered. However, it renders in the viewport just fine?
Am I missing something obvious?
Thanks for the help!
c4d version 2023.2.1
edited by @ferdinand:
import c4d op: c4d.BaseObject # The python effector gen: c4d.BaseObject # The MoGraph Generator executing the effector doc: c4d.documents.BaseDocument # The document evaluating this effector thread: c4d.threading.BaseThread # The thread executing this effector def main() -> bool: # Called when the effector is executed to set MoGraph data. Similar to EffectorData::ModifyObject in C++. moData = c4d.modules.mograph.GeGetMoData(op) if moData is None: return False cnt = moData.GetCount() marr = moData.GetArray(c4d.MODATA_MATRIX) hasField = op[c4d.FIELDS].HasContent() fall = moData.GetFalloffs() for i in range(0, cnt) : if hasField: if i%4 == 0: marr[i].off = marr[i].off + fall[i] * 1.0 else: if i%4 == 0: marr[i].off = marr[i].off + 1.0 moData.SetArray(c4d.MODATA_MATRIX, marr, hasField) return True
uh oh, maybe this still hasn't been fixed?
The workaround described in another report about this is to use the MoGraph Cache object. Sadly, that only works for MoGraph objects and not deformed polygon objects. Hopefully, a fix is around the corner crosses fingers