Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login
    1. Maxon Developers Forum
    2. mike
    3. Posts
    M
    • Profile
    • Following 1
    • Followers 0
    • Topics 21
    • Posts 62
    • Best 2
    • Controversial 0
    • Groups 0

    Posts made by mike

    • RE: Is there any way to check deformcache dirty

      @chuanzhen thank you, is work : )

      posted in Cinema 4D SDK
      M
      mike
    • Is there any way to check deformcache dirty

      hi,
      I m confuse about if any way check deformcache dirty? baseobject:: IsDirty() not working properly, it always return true. I look for answers in forums, only a very old answer is caculate all points pos sum and compare , some times it is too slow to work. so , is there any way to check deformcache dirty better?
      hope your help.

      posted in Cinema 4D SDK r20 c++
      M
      mike
    • RE: Where is lib_geom.h

      @s_bach Oh, i miss a important part, thank you!

      posted in Cinema 4D SDK
      M
      mike
    • Where is lib_geom.h

      hi,
      I m sorry to ask such basic questions, i m confuse about where to find lib_geom.h? such functions Geometry Utility Manual can't be find in my porject.
      hope your help!

      posted in Cinema 4D SDK r20 c++
      M
      mike
    • RE: How ObjectData add PRIORITY and execute

      @s_bach Thank you!

      posted in Cinema 4D SDK
      M
      mike
    • How ObjectData add PRIORITY and execute

      hi,
      i am confuse about how to add PRIORITY in ObjectData like Skin and Hair object ? show in basic tab?
      and how to connect PRIORITY to ObjectData::Execute()? i try to use ObjectData::AddToExecute(), it work but not same as ExpressionTag, it will execute when i move cursor or other action, even execute after i closed objectplugin. it is strange. if any way execute ObjectData::Execute() like ExpressionTag do ?
      hope your help!

      posted in Cinema 4D SDK c++ r20
      M
      mike
    • RE: QuickTabCustomGui.GetData() is None

      @m_adam thank you for your answer😊 from the code, it similar to what i already try, but this way looks like not a perfect solution. actually after read most c4d gui sdk and write some examples, i think maybe c4d should update gui model? sometimes it not flexible. just my personal thoughts, don't mind : ) expect python 3.x and pyside2 coming : )

      posted in Cinema 4D SDK
      M
      mike
    • RE: QuickTabCustomGui.GetData() is None

      @m_adam actually i want get my QuickTabCustomGui String count and name str,also reset ,but in Python sdk, only have appendstring() and ClearStrings(),so,i think maybe i can get the cutomgui data (basecontainer or other )and reset data by myself?

      posted in Cinema 4D SDK
      M
      mike
    • RE: QuickTabCustomGui.GetData() is None

      @r_gigante thank you for your answer,i m misunderstand what it means. And is there any way to get and reset customgui data? return a basecontainer and reset setting,looks like node.setparameter( )?

      posted in Cinema 4D SDK
      M
      mike
    • QuickTabCustomGui.GetData() is None

      Hi,
      i am confuse about BaseCustomGui.GetData(), my_QuickTabCustomGui.GetData() always return None and SetData() always return False, anyone could tell me how to use it?
      hope yout help!

      posted in Cinema 4D SDK r20 python
      M
      mike
    • SET DTYPE_VECTOR4D VALUE

      hi,
      how to set DTYPE_VECTOR4D value use 'node.SetParameter'? i test vector4d list dict tuple, all show 'TypeError: could not convert 'xxx'' .this is my code:

      cid = c4d.DescID(c4d.DescLevel(Dynamic_ID.V4D, c4d.DTYPE_VECTOR4D, 0))
      node.SetParameter(cid, c4d.Vector4d(1, 2, 3, 4), c4d.DESCFLAGS_SET_NONE)
      

      hope your help!

      posted in Cinema 4D SDK r20 python
      M
      mike
    • RE: GeUserarea crash when Redraw() in Message()

      @m_adam oh,i miss this reason,thank you : )

      posted in Cinema 4D SDK
      M
      mike
    • GeUserarea crash when Redraw() in Message()

      hi,
      i write a GUI and use mouse left to refresh GeUserarea , mouse right stop refresh. Unfortunately, when click mouser left, it crash. Somebody can tell me what I did wrong ? this is my code.
      Hope your help!

      import c4d
      from c4d import gui
      
      class MyArea(gui.GeUserArea):
          def __init__(self) :
              self.leftclick = False
      
          def GetMinSize(self) :
              return (600, 500)
      
          def DrawMsg(self,x1, y1, x2, y2, msg):
              self.DrawSetPen(  c4d.Vector(.21) )
              self.DrawRectangle(x1, y1, x2, y2)
      
          def Message(self, msg, result):
              if msg.GetId():
                  if self.leftclick:
                      self.Redraw()
              return c4d.gui.GeUserArea.Message(self, msg, result)
          
          def InputEvent(self, msg) :
              if msg[c4d.BFM_INPUT_DEVICE] == c4d.BFM_INPUT_MOUSE:
                  if msg[c4d.BFM_INPUT_CHANNEL] == c4d.BFM_INPUT_MOUSELEFT:
                      self.leftclick = True
                  if msg[c4d.BFM_INPUT_CHANNEL] == c4d.BFM_INPUT_MOUSERIGHT:
                      self.leftclick = False
              return True
      
      class Dialog(gui.GeDialog):
          def __init__(self, area) :
              self.area = area
      
          def CreateLayout(self) :
              self.AddUserArea(10010, c4d.BFH_SCALEFIT | c4d.BFV_SCALEFIT)
              self.AttachUserArea(self.area, 10010)
              return True
      
      def main():
          area = MyArea()
          MyDialog = Dialog(area)
      
          MyDialog.Open(c4d.DLG_TYPE_MODAL_RESIZEABLE)
      
      if __name__ == "__main__":
          main()
      
      posted in Cinema 4D SDK r20 python
      M
      mike
    • RE: Toolplugin Crash When Close Cinema 4D

      @r_gigante Thank you for your answer! it s all fine : )

      posted in Cinema 4D SDK
      M
      mike
    • RE: Toolplugin Crash When Close Cinema 4D

      @C4DS maybe use scenehook detect tool switch, and trigger tool "messgae" to free mybaseobject is a better way ?it can avoid the crash,and tool also work normally

      posted in Cinema 4D SDK
      M
      mike
    • RE: Toolplugin Crash When Close Cinema 4D

      unsafe way , just use "try catch(...)",skip error, if any better solution?

      posted in Cinema 4D SDK
      M
      mike
    • RE: Toolplugin Crash When Close Cinema 4D

      @C4DS thank you for your answer.follow your answer, i think if i can detect currect project close, the problem will be solve, could your tell me how to detect currect project close in toolplugin or scenehook? hope your help : )

      posted in Cinema 4D SDK
      M
      mike
    • Toolplugin Crash When Close Cinema 4D

      hi,
      i write a toolplugin, alloc a baseobject in InitTool() ,the baseobject pointer is toolplugin private member. free baseobject in FreeTool .
      it works fine when switch tool .but when i close cinema 4d, myplugin will be crash and show this crash.PNG ,
      i thought maybe cinema 4d free all object auto when close(i know it will not case crash,but just try)? so i use "if(myobject != nullptr)"check if free baseobject,but it unuseful, crash again. Where did I go wrong?
      hope your help!

      class mytool : public ToolData
      {
         ......
      private:
        BaseObject* myobject;
      }
      
      Bool mytool::InitTool(BaseDocument * doc, BaseContainer & data, BaseThread * bt)
      {
        this->myobject = BaseObject::Alloc(Onull);
        doc->InsertObject(myobject,  nullptr,  false);
        return true;
      }
      
      void mytool::FreeTool(BaseDocument * doc, BaseContainer & data)
      {
         BaseObject::Free(myobject);
      }
      
      posted in Cinema 4D SDK c++ r20
      M
      mike
    • RE: DRAWPASS::HANDLES Not Effect DRAWOBJECT()

      @m_magalhaes thank you : ) : ) : )

      posted in Cinema 4D SDK
      M
      mike
    • RE: DRAWPASS::HANDLES Not Effect DRAWOBJECT()

      @m_magalhaes i am not use scenehook before,i will see how to use it,thank you for your help

      posted in Cinema 4D SDK
      M
      mike