public override bool Execute(BaseDocument doc) { C4dApi.MessageDialog("ManagedPlugIn"); C4dApi.GePrint("Console Output: ManagedPlugIn"); BaseObject ob = doc.SearchObject("MeinObjekt"); if (ob == null) { C4dApi.MessageDialog("Kein Objekt namens MeinObjekt gefunden"); } else { for (BaseTag tag = ob.GetFirstTag(); tag != null; tag = tag.GetNext()) { int tagType = tag.GetType(); if (tagType == C4dApi.Texpresso) { C4dApi.GePrint("XPresso-Tag gefunden"); C4dApi.GePrint(tag.GetName()); } } } return true; }
public override FILEERROR Save(BaseSceneSaver node, Filename name, BaseDocument doc, SCENEFILTER filterflags) { BaseDocument polyDoc = doc.Polygonize(); Logger.Debug("Fuseefy Me!"); SceneContainer root = new SceneContainer() { Header = new SceneHeader() { CreatedBy = "", Generator = "FUSEE Export Plugin for Cinema4D", Version = 1 }, Children = FuseefyOb(polyDoc.GetFirstObject()) }; var ser = new Serializer(); using (var file = File.Create(name.GetString())) { ser.Serialize(file, root); } return FILEERROR.FILEERROR_NONE; }
/* Your Executeable code for the plugin * This is your main function * Never change return type - this is declarated in c++ code */ public override bool Execute(BaseDocument doc) { // Let's print out some greetings Logger.Debug("Hello, I'm the first outprinted message by your plugin code."); Logger.Debug("You can see me in the 'Cinema 4D' console when using the plugin."); Logger.Debug("Open the console by just pressing shift+F10 in 'Cinema 4D'"); return true; }
public virtual void GetModelingAxis(BaseObject op, BaseDocument doc, ref Fusee.Math.Core.Matrix4D /* Matrix*&_cstype */ axis) { double[] adbl_axis; unsafe {adbl_axis = Fusee.Math.ArrayConversion.Convert.Matrix4DToArrayDoubleC4DLayout(axis); fixed (double *pdbl_axis = adbl_axis) { /* Matrix*&_csin_pre */ try { C4dApiPINVOKE.ObjectData_GetModelingAxis(swigCPtr, BaseObject.getCPtr(op), BaseDocument.getCPtr(doc), (IntPtr) pdbl_axis /* Matrix*&_csin */); } finally { axis = Fusee.Math.ArrayConversion.Convert.ArrayDoubleC4DLayoutToMatrix4D(pdbl_axis); /* Matrix*&_csin_post */ } } } /* Matrix*&_csin_terminator */ }
public override FILEERROR Save(BaseSceneSaver node, Filename name, BaseDocument doc, SCENEFILTER filterflags) { List<string> textureFiles; string fileName = name.GetString(); string sceneRoot = Path.GetDirectoryName(fileName); var root = new FusConverter().FuseefyScene(doc, sceneRoot, out textureFiles); var ser = new Serializer(); using (var file = File.Create(fileName)) { ser.Serialize(file, root); } return FILEERROR.FILEERROR_NONE; }
public BaseList2D GetLink(CAPoseMorphTag tag, CAMorph morph, BaseDocument doc) { IntPtr cPtr = C4dApiPINVOKE.CAMorphNode_GetLink(swigCPtr, CAPoseMorphTag.getCPtr(tag), CAMorph.getCPtr(morph), BaseDocument.getCPtr(doc)); BaseList2D ret = (cPtr == IntPtr.Zero) ? null : new BaseList2D(cPtr, false); return ret; }
public bool IsViewOpen(BaseDocument doc) { bool ret = C4dApiPINVOKE.BaseDraw_IsViewOpen(swigCPtr, BaseDocument.getCPtr(doc)); return ret; }
public bool UpdateCache(BaseDocument doc, BaseContainer data, BaseDraw bd, bool force) { bool ret = C4dApiPINVOKE.BrushBase_UpdateCache(swigCPtr, BaseDocument.getCPtr(doc), BaseContainer.getCPtr(data), BaseDraw.getCPtr(bd), force); if (C4dApiPINVOKE.SWIGPendingException.Pending) throw C4dApiPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public bool Run(BaseDocument doc, bool spheres, double lod, bool uselod, BUILDFLAGS flags, SWIGTYPE_p_void startdata, BaseThread bt) { bool ret = C4dApiPINVOKE.Hierarchy_Run(swigCPtr, BaseDocument.getCPtr(doc), spheres, lod, uselod, (int)flags, SWIGTYPE_p_void.getCPtr(startdata), BaseThread.getCPtr(bt)); return ret; }
public bool SetMode(BaseDocument doc, CAPoseMorphTag tag, CAMORPH_MODE_FLAGS flags, CAMORPH_MODE mode) { bool ret = C4dApiPINVOKE.CAMorph_SetMode(swigCPtr, BaseDocument.getCPtr(doc), CAPoseMorphTag.getCPtr(tag), (int)flags, (int)mode); return ret; }
public BaseList2D GetLink(BaseDocument doc) { IntPtr cPtr = C4dApiPINVOKE.GeData_GetLink__SWIG_1(swigCPtr, BaseDocument.getCPtr(doc)); BaseList2D ret = (cPtr == IntPtr.Zero) ? null : new BaseList2D(cPtr, false); return ret; }
public BaseObject GetJoint(int index, BaseDocument doc) { IntPtr cPtr = C4dApiPINVOKE.CAWeightTag_GetJoint(swigCPtr, index, BaseDocument.getCPtr(doc)); BaseObject ret = (cPtr == IntPtr.Zero) ? null : new BaseObject(cPtr, false); return ret; }
public bool Message(BaseDocument doc, BaseContainer data, int type, SWIGTYPE_p_void t_data) { bool ret = C4dApiPINVOKE.BrushBase_Message(swigCPtr, BaseDocument.getCPtr(doc), BaseContainer.getCPtr(data), type, SWIGTYPE_p_void.getCPtr(t_data)); if (C4dApiPINVOKE.SWIGPendingException.Pending) throw C4dApiPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public bool GetDDescription(BaseDocument doc, BaseContainer data, Description description, SWIGTYPE_p_DESCFLAGS_DESC flags) { bool ret = C4dApiPINVOKE.BrushBase_GetDDescription(swigCPtr, BaseDocument.getCPtr(doc), BaseContainer.getCPtr(data), Description.getCPtr(description), SWIGTYPE_p_DESCFLAGS_DESC.getCPtr(flags)); if (C4dApiPINVOKE.SWIGPendingException.Pending) throw C4dApiPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public bool SetDParameter(BaseDocument doc, BaseContainer data, DescID id, GeData t_data, SWIGTYPE_p_DESCFLAGS_SET flags) { bool ret = C4dApiPINVOKE.BrushBase_SetDParameter(swigCPtr, BaseDocument.getCPtr(doc), BaseContainer.getCPtr(data), DescID.getCPtr(id), GeData.getCPtr(t_data), SWIGTYPE_p_DESCFLAGS_SET.getCPtr(flags)); if (C4dApiPINVOKE.SWIGPendingException.Pending) throw C4dApiPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public bool GetDEnabling(BaseDocument doc, BaseContainer data, DescID id, GeData t_data, DESCFLAGS_ENABLE flags, BaseContainer itemdesc) { bool ret = C4dApiPINVOKE.BrushBase_GetDEnabling(swigCPtr, BaseDocument.getCPtr(doc), BaseContainer.getCPtr(data), DescID.getCPtr(id), GeData.getCPtr(t_data), (int)flags, BaseContainer.getCPtr(itemdesc)); if (C4dApiPINVOKE.SWIGPendingException.Pending) throw C4dApiPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public void InitDefaultSettings(BaseDocument doc, BaseContainer data) { C4dApiPINVOKE.BrushBase_InitDefaultSettings(swigCPtr, BaseDocument.getCPtr(doc), BaseContainer.getCPtr(data)); if (C4dApiPINVOKE.SWIGPendingException.Pending) throw C4dApiPINVOKE.SWIGPendingException.Retrieve(); }
public void FreeTool(BaseDocument doc, BaseContainer data) { C4dApiPINVOKE.BrushBase_FreeTool(swigCPtr, BaseDocument.getCPtr(doc), BaseContainer.getCPtr(data)); if (C4dApiPINVOKE.SWIGPendingException.Pending) throw C4dApiPINVOKE.SWIGPendingException.Retrieve(); }
public bool InitTool(BaseDocument doc, BaseContainer data, BaseThread bt, BrushToolData tool) { bool ret = C4dApiPINVOKE.BrushBase_InitTool(swigCPtr, BaseDocument.getCPtr(doc), BaseContainer.getCPtr(data), BaseThread.getCPtr(bt), BrushToolData.getCPtr(tool)); if (C4dApiPINVOKE.SWIGPendingException.Pending) throw C4dApiPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public Fusee.Math.Core.Matrix4D /* constMatrix&_cstype_out */ GetModelingAxis(BaseDocument doc) { /* <constMatrix&_csout> */ IntPtr p_ret = C4dApiPINVOKE.BaseObject_GetModelingAxis(swigCPtr, BaseDocument.getCPtr(doc)); Fusee.Math.Core.Matrix4D ret; unsafe {ret = Fusee.Math.ArrayConversion.Convert.ArrayDoubleC4DLayoutToMatrix4D((double *)p_ret);} return ret; } /* </constMatrix&_csout> */
public bool TransferWeightMap(BaseDocument doc, CAWeightTag dst, int sindex, int dindex, int offset, int cnt, AliasTrans trans) { bool ret = C4dApiPINVOKE.CAWeightTag_TransferWeightMap(swigCPtr, BaseDocument.getCPtr(doc), CAWeightTag.getCPtr(dst), sindex, dindex, offset, cnt, AliasTrans.getCPtr(trans)); return ret; }
public bool GetCursorInfo(BaseDocument doc, BaseContainer data, BaseDraw bd, double x, double y, BaseContainer bc) { bool ret = C4dApiPINVOKE.BrushBase_GetCursorInfo(swigCPtr, BaseDocument.getCPtr(doc), BaseContainer.getCPtr(data), BaseDraw.getCPtr(bd), x, y, BaseContainer.getCPtr(bc)); if (C4dApiPINVOKE.SWIGPendingException.Pending) throw C4dApiPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public int FindJoint(BaseObject op, BaseDocument doc) { int ret = C4dApiPINVOKE.CAWeightTag_FindJoint(swigCPtr, BaseObject.getCPtr(op), BaseDocument.getCPtr(doc)); return ret; }
public bool MouseInput(BaseDocument doc, BaseContainer data, BaseDraw bd, SWIGTYPE_p_EditorWindow win, BaseContainer msg) { bool ret = C4dApiPINVOKE.BrushBase_MouseInput(swigCPtr, BaseDocument.getCPtr(doc), BaseContainer.getCPtr(data), BaseDraw.getCPtr(bd), SWIGTYPE_p_EditorWindow.getCPtr(win), BaseContainer.getCPtr(msg)); if (C4dApiPINVOKE.SWIGPendingException.Pending) throw C4dApiPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public C4DAtomGoal GetLinkAtom(BaseDocument doc) { IntPtr cPtr = C4dApiPINVOKE.GeData_GetLinkAtom__SWIG_1(swigCPtr, BaseDocument.getCPtr(doc)); C4DAtomGoal ret = (cPtr == IntPtr.Zero) ? null : new C4DAtomGoal(cPtr, false); return ret; }
public void DoUndo(BaseDocument doc) { C4dApiPINVOKE.BaseDraw_DoUndo(swigCPtr, BaseDocument.getCPtr(doc)); }
public bool Apply(BaseDocument doc, CAPoseMorphTag tag, CAMORPH_DATA_FLAGS flags) { bool ret = C4dApiPINVOKE.CAMorph_Apply(swigCPtr, BaseDocument.getCPtr(doc), CAPoseMorphTag.getCPtr(tag), (int)flags); return ret; }
public BaseObject GetSceneCamera(BaseDocument doc) { IntPtr cPtr = C4dApiPINVOKE.BaseDraw_GetSceneCamera(swigCPtr, BaseDocument.getCPtr(doc)); BaseObject ret = (cPtr == IntPtr.Zero) ? null : new BaseObject(cPtr, false); return ret; }
public void InitializeView(BaseDocument doc, BaseObject cam, bool editorsv) { C4dApiPINVOKE.BaseDraw_InitializeView(swigCPtr, BaseDocument.getCPtr(doc), BaseObject.getCPtr(cam), editorsv); }
public bool GetObjects(BaseDocument doc, AtomArray objects) { bool ret = C4dApiPINVOKE.BrushBase_GetObjects(swigCPtr, BaseDocument.getCPtr(doc), AtomArray.getCPtr(objects)); return ret; }