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
    • Login
    1. Home
    2. filipst
    F
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 10
    • Best 0
    • Controversial 0
    • Groups 0

    filipst

    @filipst

    0
    Reputation
    4
    Profile views
    10
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    filipst Unfollow Follow

    Latest posts made by filipst

    • RE: C4d Connector problem in 2024

      Yep, that's the issue I mentioned in my first post, first sentence.

      Thanks for confirming that it is indeed a bug!

      posted in Cinema 4D SDK
      F
      filipst
    • C4d Connector problem in 2024

      Hi,

      I just installed 2024 and I can't get the "send to IDE" button to work anymore. It just does nothing.
      VS Code connects and I can actually write stuff in VS Code and use "Execute in C4d", but I can't send from C4D.
      Also, when starting VS Code I get this error: "Incorrect path for c4d.path, autocompletion will not work" even though I did update the path to "C:\Program Files\Maxon Cinema 4D 2024" . Autocompletion actually works even though it says it will not.

      2023 still works fine.

      Any ideas how to fix it?

      posted in Cinema 4D SDK python
      F
      filipst
    • RE: Problem with plugin example

      Thank you very much!
      For now I think I just commented out the part that does the "current state to object" on the hierarchy. That's the part that causes the issue I think.
      I only need the first child, and it would be nice if I could get it to work similar to how the Spline Mask object works which operates on the splines even if they are under a null, but I need to understand more before being able to do that.

      Somewhat related, although not a SDK question, but if you don't mind, do you know why "current state to object" and "make editable" produce different results on splines? I'm not sure, but I think this started happening some versions ago, I seem to remember it was not the case.
      As far as I understand, there's no equivalent to "make editable" in scripting, right?

      posted in Cinema 4D SDK
      F
      filipst
    • RE: Problem with plugin example

      I'm guessing there's no shortcut way to update the object whenever any change occurs in the hierarchy, right?

      posted in Cinema 4D SDK
      F
      filipst
    • RE: Problem with plugin example

      @ferdinand said in Problem with plugin example:

      Hello @filipst,

      Thank you for reaching out to us. The example you quoted documents itself as:

      Retrieves the first child object and offset all its points on the y-axis by a specific value. Tangents are unaffected.

      This plugin is not intended to look anything beyond the dirtyness of the first child.

      # Checks if childSpline can be interpreted as a Spline.
      if not childSpline.GetInfo() & c4d.OBJECT_ISSPLINE and not childSpline.IsInstanceOf(c4d.Ospline) and not childSpline.IsInstanceOf(c4d.Oline):
          return None
      
      # Checks if the dirty of the child changed
      opDirty |= op.IsDirty(c4d.DIRTYFLAGS_DATA | c4d.DIRTYFLAGS_MATRIX)
      childDirty = child.GetDirty(c4d.DIRTYFLAGS_DATA | c4d.DIRTYFLAGS_MATRIX | c4d.DIRTYFLAGS_CACHE)
      

      Link to code

      To also evaluate other children for their data or other dirty states, you would have to add addtional checks here. There should also be one extra step you have to take for DIRTYFLAGS_MATRIX, i.e., the case that you want to react not only to data container changes of the input objects but also transform changes. GetVirtualObjects and GetContour will not be called for pure matrix changes on scene objects out of the box. You would have to overwrite ObjectData.CheckDirty to manually flag yourself as dirty when such event occurs so that the cache building is being invoked.

      Cheers,
      Ferdinand

      Thank you, I thought modifications to the child of an object were included in the detection for that object.
      I'll see if I can figure it out.
      Would the suggestions you gave also fix the fact that removing a child of the first child (or adding another child) doesn't update the object either or does that need to be checked a different way?

      posted in Cinema 4D SDK
      F
      filipst
    • Problem with plugin example

      Hi,

      I think I found an issue with this:
      https://github.com/PluginCafe/cinema4d_py_sdk_extended/blob/master/plugins/py-osffset_y_spline_r16/py-osffset_y_spline_r16.pyp
      If the spline (or splines) are under a null and that null is the child of the offset spline object, the offsetting works as expected... all splines get moved. But if I try to change the position of the splines, for example, or anything about the objects under the null, it's not working. It just gets "stuck" in whatever state they were when they were put under the offset object. The only way to update is to take the null with the children from under the offset object and then putting it back it.

      Any suggestions on how to fix this? I'm guessing it must be something related to "dirty" detection, but that code is really complicated, I can't quite figure it out so far.

      Thank you.

      posted in Cinema 4D SDK 2023 python
      F
      filipst
    • RE: Python plugin encryption

      Thank you very much!

      posted in Cinema 4D SDK
      F
      filipst
    • Python plugin encryption

      Hi,

      How can I encrypt a python plugin to .pypv and .pype? I think .pype was the extension for older versions?
      I searched, but weirdly I didn't find anything. I thought it would be in the SDK documentation, but couldn't find it there either. Sorry if I missed it.

      Thank you.

      posted in Cinema 4D SDK python 2023 sdk
      F
      filipst
    • RE: Sliders in Python plugin

      Thank you, it works!

      Another question if you don't mind. What's the best/recommended way to limit one of these values based on other values?
      For example, like how the corner radius on the Rectangle spline that comes with C4D is limited by the width or height of the rectangle?
      Where in the plugin would the code for this go?

      posted in Cinema 4D SDK
      F
      filipst
    • Sliders in Python plugin

      Hi,

      I'm trying to learn how to write a Python plugin that generates a spline, using the examples you have on Github.
      I'm basing it mostly on the "py-double_circle_r19" example.

      One of the things I'm having issues with is with the custom controls.
      I can add them, for example like this in the .res file:

      		REAL PYROUNDRECT_HEIGHT { UNIT METER; MIN 0.0; }
      		REAL PYROUNDRECT_WIDTH { UNIT METER; MIN 0.0; }
      

      but they only have a text box, no slider. How do I add sliders to them?

      Thank you.

      posted in Cinema 4D SDK sdk python 2023
      F
      filipst