Esempio n. 1
0
        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.GetTypeC4D();
                    if (tagType == C4dApi.Texpresso)
                    {
                        C4dApi.GePrint("XPresso-Tag gefunden");
                        C4dApi.GePrint(tag.GetName());
                    }
                }
            }
            return(true);
        }
Esempio n. 2
0
 public void InsertTag(BaseTag tp) {
   C4dApiPINVOKE.BaseObject_InsertTag__SWIG_1(swigCPtr, BaseTag.getCPtr(tp));
 }
Esempio n. 3
0
 public void InsertTag(BaseTag tp, BaseTag pred) {
   C4dApiPINVOKE.BaseObject_InsertTag__SWIG_0(swigCPtr, BaseTag.getCPtr(tp), BaseTag.getCPtr(pred));
 }
Esempio n. 4
0
 public VariableTag MakeVariableTag(int type, int count, BaseTag pred) {
   IntPtr cPtr = C4dApiPINVOKE.BaseObject_MakeVariableTag__SWIG_0(swigCPtr, type, count, BaseTag.getCPtr(pred));
   VariableTag ret = (cPtr == IntPtr.Zero) ? null : new VariableTag(cPtr, false);
   return ret;
 }
Esempio n. 5
0
  public BaseTag MakeTag(int type, BaseTag pred) {
    IntPtr cPtr = C4dApiPINVOKE.BaseObject_MakeTag__SWIG_0(swigCPtr, type, BaseTag.getCPtr(pred));
    BaseTag ret = (BaseTag) C4dApiPINVOKE.InstantiateConcreteObject(cPtr, false);
    return ret;
}
Esempio n. 6
0
 internal static HandleRef getCPtr(BaseTag obj) {
   return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }
Esempio n. 7
0
  public static BaseTag InstantiateConcreteObject(IntPtr cPtr, bool owner)
  {
    BaseTag ret = null;
    if (cPtr == IntPtr.Zero) 
	{
      return ret;
    }
    int type = C4dApiPINVOKE.C4DAtom_GetType(new HandleRef(null, cPtr));
    switch (type) 
	{
       case 0:
         ret = new BaseTag(cPtr, owner);
         break;
       case 1001149:
         ret = new XPressoTag(cPtr, owner);
         break;
      // Repeat for every other concrete type.
      default:
	  //changed from the debug output to return a BaseTag object
        ret = new BaseTag(cPtr, owner);
        break;
    }
    return ret;
  }
Esempio n. 8
0
 public void SetActiveTag(BaseTag tag) {
   C4dApiPINVOKE.BaseDocument_SetActiveTag__SWIG_1(swigCPtr, BaseTag.getCPtr(tag));
 }
Esempio n. 9
0
 public void SetActiveTag(BaseTag tag, int mode) {
   C4dApiPINVOKE.BaseDocument_SetActiveTag__SWIG_0(swigCPtr, BaseTag.getCPtr(tag), mode);
 }