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
    • Register
    • Register
    • Login
    1. Maxon Developers Forum
    2. oli_d
    3. Posts
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 12
    • Best 4
    • Controversial 0
    • Groups 0

    Posts made by oli_d

    • RE: r23 console

      I confirm that with versionn 10.15.6 it works.

      Once again thank you very much Maxime for your availability and quick answers!

      Best regards

      posted in Cinema 4D SDK
      oli_dO
      oli_d
    • RE: r23 console

      Hi Maxime,
      thanx for the prompt response.
      I try to update macos and keep you informed

      posted in Cinema 4D SDK
      oli_dO
      oli_d
    • RE: r23 console

      Hi Maxime,
      I just installed the r23 on my laptop (macos 10.13.6) and I have exactly the same problem.

      I didn't copy/past preference
      It never worked
      I haven't any plugin installed
      it doesn't work neither in the console nor inside the CommandLine
      The Cinema 4D Installation path does not contains unicode character (/Applications/Maxon Cinema 4D R23/Cinema 4D.app)
      I tried to copy/paste the Cinema 4D installation directory to another place, without success
      If I install python plugins they work

      I'm going to wait a bit before trying to reinstall, to see if we can identify the problem ...

      posted in Cinema 4D SDK
      oli_dO
      oli_d
    • RE: r23 console

      I reinstalled Cinema4D and everything works, sorry for the inconvenience.

      posted in Cinema 4D SDK
      oli_dO
      oli_d
    • RE: r23 console

      Thanks for the feedback, I will try to reinstall Cinema4d ...

      posted in Cinema 4D SDK
      oli_dO
      oli_d
    • r23 console

      Hi,
      The console on the r23 does not seem to work. A simple print("Hello world") (with brackets !) shows nothing ...
      Bug?

      on macos 10.13.6

      (There is no tag r23 !)

      posted in Cinema 4D SDK python
      oli_dO
      oli_d
    • RE: BaseBitmap.CopyPartTo() with grayscale image

      Thank you very much Maxime for the reply.
      I'm looking forward to the r23 and the python 3 with a lot of impatience.

      Cheers

      posted in Cinema 4D SDK
      oli_dO
      oli_d
    • RE: BaseBitmap.CopyPartTo() with grayscale image

      Thanks for the answer and sorry for the incomplete post ! You're absolutely right I should have put the code.

      Here is an example:

      import c4d
      
      def main():
          
          fn = '/Users/donzeo/Documents/TEMP/ESRI_world_imagery-19.png'
          bmp = c4d.bitmaps.BaseBitmap()
          bmp.InitWith(fn)
          
          h,w = bmp.GetSize()
          mode = bmp.GetColorMode()
          
          if mode == c4d.COLORMODE_GRAY or mode == c4d.COLORMODE_AGRAY:
              flag = c4d.INITBITMAPFLAGS_GRAYSCALE
          else :
              flag = c4d.INITBITMAPFLAGS_NONE
          
          crop_bmp = c4d.bitmaps.BaseBitmap()
          
          if  crop_bmp.Init(h/2,w/2,depth = bmp.GetBt(), flags = flag) == c4d.IMAGERESULT_OK:
              print bmp.CopyPartTo(crop_bmp, 10, 10, w/2, h/2)
              
              c4d.bitmaps.ShowBitmap(crop_bmp)
          
      
      if __name__=='__main__':
          main()
      

      By the way it's the same with BaseBitmap.GetClonePart() (which is more simple !) :

      import c4d
      
      def main():
          
          fn = '/Users/donzeo/Documents/TEMP/ESRI_world_imagery-19.png'
          bmp = c4d.bitmaps.BaseBitmap()
          bmp.InitWith(fn)
          w,h = bmp.GetSize()
          part = bmp.GetClonePart(0,0,w/2,h/2)
          if part :    
              c4d.bitmaps.ShowBitmap(part)
          else:
              print'error'
          
      
      if __name__=='__main__':
          main()
      

      With rgb image there is no problem. With a grayscale image impossible to get anything. I tried psd, png, jpg ...

      Am I doing something wrong?

      Cheers

      posted in Cinema 4D SDK
      oli_dO
      oli_d
    • BaseBitmap.CopyPartTo() with grayscale image

      Hi,
      I have a problem with the method BaseBitmap.CopyPartTo()
      when the basic image is in grayscale it doesn't work ! (with RGB file it works fine)

      Tested with r21 and s22 on macos 10.13.6

      posted in Cinema 4D SDK python sdk
      oli_dO
      oli_d
    • Problem with TreeViewFunctions.HeaderClick in c4d r20, 21 22

      Hi everyone,
      The TreeViewFunctions.HeaderClick method works very well with r19, but since r20 not at all. I get an error message "SystemError: NULL object passed to Py_BuildValue".
      I tested with Niklas's code (thanks to him ! ) :
      https://gist.github.com/NiklasRosenstein/632e39a9b4dda391fe54

      (Tested with r19-> ok, r20, r21, s22-> not ok )

      posted in Cinema 4D SDK python r20 r21 s22
      oli_dO
      oli_d
    • RE: Effector created with python doesn't work anymore after closing the file

      Merci Maxime !

      It's work perfectly !

      posted in Cinema 4D SDK
      oli_dO
      oli_d
    • Effector created with python doesn't work anymore after closing the file

      Hi,
      When I run the following code that creates an effector, everything works perfectly. If I save the file, close it and open it again, the effector does nothing and it is impossible to make it work.

      import c4d
      
      
      def main():
          res = c4d.BaseObject(c4d.Onull)
          cloner = c4d.BaseObject(1018544)
          cloner.InsertUnder(res)
      
          rdm_effector = c4d.BaseObject(1018643)   
          rdm_effector.InsertUnder(res)
          
          inex_data = cloner[c4d.ID_MG_MOTIONGENERATOR_EFFECTORLIST]
          inex_data.InsertObject(rdm_effector,1)
          cloner[c4d.ID_MG_MOTIONGENERATOR_EFFECTORLIST] = inex_data
      
          if op:
              op.InsertUnder(cloner)
      
          doc.InsertObject(res)
          c4d.EventAdd()
      
      if __name__=='__main__':
          main()
      

      With CallCommand it works, but it's not very practical.

      import c4d
      from c4d import gui
      
      def main():
      
          res = c4d.BaseObject(c4d.Onull)
          cloner = c4d.BaseObject(1018544)
          cloner.InsertUnder(res)
      
          if op:
              op.InsertUnder(cloner)
      
          doc.InsertObject(res)
      
          doc.SetActiveObject(cloner)
      
          c4d.CallCommand(1018643) # Effecteur Randomisation
          c4d.EventAdd()
          return
      
      if __name__=='__main__':
          main()
      

      Bug or incompetence?

      (C4D r21.207 and s22.016 on macos 10.13.6)

      posted in Cinema 4D SDK python r21 s22
      oli_dO
      oli_d