I'm trying to create a Mesh Emitter with the selected object as Geometry, same as Simulate > Mesh Emitter when geo is already selected.
Script Manager (works):
import c4d
doc = c4d.documents.GetActiveDocument()
geo = doc.GetActiveObject()
doc.SetActiveObject(geo, c4d.SELECTION_NEW)
c4d.CallCommand(1062577, 1067510) # Mesh Emitter
c4d.EventAdd()
From an ObjectData plugin (doesn't): Create button builds a polygon object (100 pts). I don't call CallCommand from MSG_DESCRIPTION_COMMAND; the handler queues work and calls SpecialEventAdd, and a MessageData plugin runs the Mesh Emitter command in CoreMessage. Also tried having MessageData invoke a CommandData that runs the same CallCommand.
Same result either way: active stays on the grid, no new emitter in the scene.
So it's not selection or empty mesh. The command does nothing from plugin code but works in Script Manager.
Does CallCommand(1062577, 1067510) only work in certain contexts? What's the supported way to create a Mesh Emitter from a description button without BaseObject(Ofpmeshemitter) + manual SetLink (Geometry grey out in the AM)?
Ofpmeshemitter = 1062577. Script Log records CallCommand(1062577, 1067510) when using the menu.