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. Cinema 4D SDK
    Log in to post
    Load new posts
    • Newest to Oldest
    • Oldest to Newest
    • Most Posts
    • Most Votes
    • Most Views
    • B

      AddUserData() for In/Exclusion List?

      r21 python • • bentraje
      3
      0
      Votes
      3
      Posts
      389
      Views

      B

      @r_gigante

      Thanks for the response. Works as expected.

    • B

      Integrating a CallCommand() with Built-In Save Dialog?

      r21 python • • bentraje
      3
      0
      Votes
      3
      Posts
      368
      Views

      B

      @m_magalhaes

      Thanks for the confirmation.

    • ?

      Redrawing GeUserArea in ScrollGroup with Slider Input

      sdk python • • A Former User
      7
      0
      Votes
      7
      Posts
      1.2k
      Views

      ?

      @m_adam Thank you, Maxime, for going to this effort.

    • E

      Generator crashes and guidance

      c++ • • eldiren
      13
      0
      Votes
      13
      Posts
      1.7k
      Views

      ManuelM

      Hello,

      please open a new thread for that question, we will probably need your code. You can send it to us using our email [email protected]

      Cheers,
      Manuel

    • ?

      Listening for Selection Events

      python • • A Former User
      5
      0
      Votes
      5
      Posts
      592
      Views

      ManuelM

      hello,

      To retrieve the active object you have to iteration trough the hierarchy. (even GetActiveObject)
      In Python, GetActiveObjects is calling a c++ function so with lots of object it will be faster than iterating the hierarchy with python functions.
      We don't know what the limit is. To mesure that you have to make a bunch of tests with different scenarios and get the mean.

      Cheers,
      Manuel

    • ?

      Getting GeDialog Group Width & Height?

      python • • A Former User
      3
      0
      Votes
      3
      Posts
      324
      Views

      ?

      @r_gigante Thank you, Riccardo! I don't know how I missed that in the documentation, but it is what I needed. 😄

    • mikeudinM

      How to catch SubDialog errors?

      python • • mikeudin
      3
      0
      Votes
      3
      Posts
      407
      Views

      mikeudinM

      Thanks! So will find some workaround.

    • B

      Get Objects from the Layer?

      r21 python • • bentraje
      4
      0
      Votes
      4
      Posts
      531
      Views

      ferdinandF

      Hi,

      if I am not overlooking something here, the function recurse_hierarchy is neither recursive nor will it retrieve the layers for all objects in the scene. It will retrieve the layers for all siblings of the passed node, that were born after that node.

      You probably made a mistake copying your code or misunderstood what is meant by recursive.

      Cheers,
      zipit

    • B

      Move Tag Position in the Stack?

      r21 python • • bentraje
      5
      0
      Votes
      5
      Posts
      644
      Views

      B

      @r_gigante

      Gotcha. Thanks for the warning.

    • B

      Add Commands to ShowPopupDialog

      r21 python • • bentraje
      7
      0
      Votes
      7
      Posts
      1.0k
      Views

      B

      @m_adam Thanks for further clarification.

      @Ashton_FCS_PluginDev 's code works but I guess I'll just use the result of the ShowPopupDialog to trigger commands, as I added in the previous code.

    • ?

      Clicking Group Children Causes Bitmap to Redraw Incorrectly

      python • • A Former User
      3
      0
      Votes
      3
      Posts
      553
      Views

      ?

      @m_adam Thanks, Maxime, for the temporary workaround and for bumping it to the development team. I hope this is fixed soon!

    • Passion3DP

      Create VRay material

      python • • Passion3D
      3
      0
      Votes
      3
      Posts
      582
      Views

      Passion3DP

      Hi Sebastian,

      Thank you for your response. I found the identifiers of the different VRay materials in the file c4d_symbol.h.
      Everything works.

    • W

      C++ Shader Plug-In Best Practices

      c++ r21 sdk windows • • wuzelwazel
      6
      3
      Votes
      6
      Posts
      927
      Views

      ManuelM

      hello,

      thanks @PluginStudent for the answer here 🙂

      if (obj != nullptr) // If I'm checking for nullptr could I just use if(obj) as in Python?

      The correct way is to check against nullptr, that's a c++11 standard.
      if (obj) could lead to false positive and bugs.

      String is not the same thing as maxon::String. String is the classic API while maxon::String is the Maxon API. You can read more about that in the manual about strings

      Error handling is super eady to use, we got every thing to do so, you should definitely use it. Check Our manual about Error Handling

      Last but not least you can probably use our Url class to handle file or filename. Give it a look

      Cheers,
      Manuel

    • L

      Script to center axis but have Y axis 0, or bottom of model

      python r19 r20 r21 • • lwik
      3
      0
      Votes
      3
      Posts
      942
      Views

      L

      Manuel, thanks for taking the time and posting some links. Last night I was reading up on the Matrix and trying wrapping my head around it. I think I was stuck in the wrong area, I was trying to convert a baseObject to a pointObject to do the transformations.I would perfer not to have to open the axis window, but instead handle all this in a Python Function. I will look over the docs and samples to get a better idea of what I need to do.

      Thanks again for taking the time to respond to my post!

    • W

      Identify when scene is rendering (Redshift)

      python • • wen
      6
      0
      Votes
      6
      Posts
      899
      Views

      rsodreR

      @wen I was trying to do the same the past days.
      I could'nt figure out how to detect if Redshift IPR is enabled, but I found some relevant RS Ids.

      The 1038666 command opens the IPR window, but as far as I know there's no way to get the dialog instance to call IsOpen()

      The 1036752 CoreMessage is sent during IPR renders, but without any additional parameters (PAR1/PAR2). Not sure if there's something else we can extract from that message.

      What I ended up doing is adding a bool to my plugin to enable IPR features, but would be good to enable automatically.

    • J

      Custom Tokens with Team Render Server

      • • Janosch
      6
      1
      Votes
      6
      Posts
      1.2k
      Views

      M

      @fwilleke80 Yes or the RenderData but that means the data needs to be there before the token evaluation which is done before any scene execution render wise.

      Cheers,
      Maxime

    • ?

      COLOR Constants Guide & Documentation Error

      python r21 • • A Former User
      2
      2
      Votes
      2
      Posts
      295
      Views

      ManuelM

      Hello,

      thanks for sharing this with the everybody.

      COLOR_TIMELINE is now EX_COLOR_TIMELINE the documentation will be updated to reflect that change.

      Cheers,
      Manuel

    • rsodreR

      Generator GetDimension() not called

      r21 c++ • • rsodre
      9
      0
      Votes
      9
      Posts
      1.1k
      Views

      rsodreR

      @r_gigante ok thanks!

      I managed a workaround by filling my dummy spline with two zero length segments at the claculated bounding box limits.

    • fwilleke80F

      Deleting/clearing PluginInfo

      c++ • • fwilleke80
      3
      0
      Votes
      3
      Posts
      375
      Views

      fwilleke80F

      Super, thank you!!

    • lasselauchL

      Different behaviour with Resource File? R20/R21

      • • lasselauch
      5
      0
      Votes
      5
      Posts
      815
      Views

      M

      BitmapButtonCustomGui.SetImage was just extended in R21 to support c4d.IconData as well, but the behavior didn't changed.

      I guess the issue is more related to R21 What is News - Fixes

      Fixed a memory leak in bitmaps.InitResourceBitmap().

      So basically previously c4d.bitmaps.InitResourceBitmap produced a memory leak where the allocated BaseBitmap was never released, so that's why previously without copying it, it was working.
      But you should pass True to copyBmp to copy the BaseBitmap now since the BaseBitmap will be released at the destruction of icon variable by the Python Garbage Collection, but if you don't copy it, the BitmapButtonCustomGui will still use the previous BaseBitmap pointer, which will produce a crash since it will be dead.

      Glad you found the issue.
      Cheers,
      Maxime.