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. kng_ito
    3. Topics
    K
    • Profile
    • Following 1
    • Followers 0
    • Topics 21
    • Posts 44
    • Best 1
    • Controversial 0
    • Groups 0

    Topics created by kng_ito

    • K

      Expose material node inputs to material attributes

      General Talk
      • off-topic-question • • kng_ito
      3
      0
      Votes
      3
      Posts
      595
      Views

      K

      Hi @ferdinand ,

      Thanks for the clarification.
      I will contact user support and request this as a feature.

    • K

      Detect error-causing nodes in XPresso

      Cinema 4D SDK
      • python • • kng_ito
      4
      0
      Votes
      4
      Posts
      666
      Views

      K

      Hi @i_mazlov ,

      Unfortunately, the python node approach is not effective for my use case, so I may have to emulate the error conditions on my own for each node.
      In any case, thank you for your answer.

    • K

      GeUserArea.GetDragObject() for xpresso node

      Cinema 4D SDK
      • python • • kng_ito
      4
      0
      Votes
      4
      Posts
      612
      Views

      ferdinandF

      Hey everyone,

      Just as an FYI: cinema::GvCopyBuffer is not a public type. Just saying this so that future C++ users do not run against a wall here. One might be able to wiggle through with a forward/dummy deceleration of GvCopyBuffer, but officially this is not supported in the public C++ API either. And we therefore cannot provide forum support for this in C++ either.

      Cheers,
      Ferdinand

    • K

      How to access the "root" Scene Nodes graph

      Cinema 4D SDK
      • python 2024 • • kng_ito
      3
      0
      Votes
      3
      Posts
      559
      Views

      K

      Hi @ferdinand ,
      Thanks as always for your clear answers, It solved the problem for me!

    • K

      How to get only tracks displayed in timeline User Mode

      Cinema 4D SDK
      • python 2024 • • kng_ito
      3
      0
      Votes
      3
      Posts
      631
      Views

      K

      Hi @ferdinand ,

      Thank you for clarifying. I needed a solution for my tool to determine which track/key is displayed&selected.
      But if I can't do that in user mode, I'll make sure my tools don't work when the timeline is in user mode.

    • K

      What does "Puffy Unicorn Reset" command do in 2024.1.0?

      General Talk
      • • • kng_ito
      2
      0
      Votes
      2
      Posts
      761
      Views

      M

      Hi @kng_ito this is some internal development commands that slipped through the release candidate. They remove some very specific cache files so nothing armful, but nothing really useful for you as it's more some internal debugging tools.

      Thanks for letting us know.
      Cheers,
      Maxime.

    • K

      Python-Generated Splines are not recognized by Cloner Object

      Cinema 4D SDK
      • python 2023 • • kng_ito
      3
      0
      Votes
      3
      Posts
      574
      Views

      K

      hi @i_mazlov ,

      I understand that it is not supported, so I will use Scene Nodes to generate the spline this time.
      No other questions, thank you very much.

    • K

      Limit the destination of UserArea.HandleMouseDrag()

      Cinema 4D SDK
      • 2023 python • • kng_ito
      4
      0
      Votes
      4
      Posts
      734
      Views

      K

      Hi @m_adam,

      Sorry for the delay in responding.
      Yes, the problem has been resolved.

    • K

      How to dynamically hide parameters

      Cinema 4D SDK
      • python 2023 • • kng_ito
      2
      0
      Votes
      2
      Posts
      537
      Views

      ferdinandF

      Hello @kng_ito,

      Thank you for reaching out to us. Modifying the description of a node via NodeData.GetDDescription should only be done when NodeData.GetDEnabling is not sufficient. To hide a parameter, the field c4d.DESC_HIDE must be set to True. Find a simple example below.

      Cheers,
      Ferdinand

      Result:
      hide_param.gif

      File: pc14487.zip

      Code:

      // The description defintion of the tag Texample. CONTAINER Texample { NAME Texample; INCLUDE Texpression; // The main "Tag" tab of the tag. GROUP ID_TAGPROPERTIES { // The element which is being hidden (or not). REAL ID_HIDDEN_ELEMENT { MIN 0.0; MAX 100.0; UNIT METER; STEP 0.001; CUSTOMGUI REALSLIDER; } // The parameter based on which the hidden element is shown or not. BOOL ID_HIDE_CONDITION {} } } """Implements a tag which dynamically hides and shows a parameter. """ import c4d import typing class ExampleTagData(c4d.plugins.TagData): """Implements a tag which dynamically hides and shows a parameter. """ # The plugin ID for the hook. ID_PLUGIN: int = 1060794 @classmethod def Register(cls) -> None: """Registers the plugin hook. """ if not c4d.plugins.RegisterTagPlugin( id=cls.ID_PLUGIN, str="Example Tag", info=c4d.TAG_EXPRESSION | c4d.TAG_VISIBLE, g=cls, description="texample", icon=c4d.bitmaps.InitResourceBitmap(c4d.Tdisplay)): print(f"Warning: Failed to register '{cls}' tag plugin.") def Init(self, node: c4d.GeListNode) -> bool: """Called to initialize a tag instance. Args: node: The BaseTag instance representing this plugin object. """ self.InitAttr(node, float, c4d.ID_HIDDEN_ELEMENT) self.InitAttr(node, bool, c4d.ID_HIDE_CONDITION) node[c4d.ID_HIDDEN_ELEMENT] = 50.0 node[c4d.ID_HIDE_CONDITION] = False return True def Execute(self, tag: c4d.BaseTag, doc: c4d.documents.BaseDocument, op: c4d.BaseObject, bt: c4d.threading.BaseThread, priority: int, flags: int) -> int: """Called when expressions are evaluated to let a tag modify a scene. Not used in this case. """ return c4d.EXECUTIONRESULT_OK def GetDDescription(self, node: c4d.GeListNode, description: c4d.Description, flags: int) -> typing.Union[bool, tuple[bool, int]]: """Called by Cinema 4D when the description of a node is being evaluated to let the node dynamically modify its own description. """ # Bail when the description cannot be not fully loaded. if not description.LoadDescription(node.GetType()): return False, flags # Define the ID of the parameter we want to modify and get the ID of the parameter which is # currently to be evaluated. paramId: c4d.DescID = c4d.DescID(c4d.DescLevel(c4d.ID_HIDDEN_ELEMENT, c4d.DTYPE_REAL, 0)) evalId: c4d.DescID = description.GetSingleDescID() # Bail when there is a to be evaluated parameter and our parameter is not part of or equal # to the evaluated parameter. if (evalId and not paramId.IsPartOf(evalId)): return True, flags # Get the description data container instance (GetParameter>I<) for the parameter we want to # modify. All changes made to the container will be directly reflected on the node. paramData: c4d.BaseContainer = description.GetParameterI(paramId) if paramData is None: return True, flags # Set the hidden state of the parameter ID_HIDDEN_ELEMENT based on the value of the # parameter ID_HIDE_CONDITION. paramData[c4d.DESC_HIDE] = node[c4d.ID_HIDE_CONDITION] return True, flags | c4d.DESCFLAGS_DESC_LOADED if __name__ == "__main__": ExampleTagData.Register()
    • K

      How to get weights from a Vertex Map tag on an uneditable object

      Cinema 4D SDK
      • 2023 python • • kng_ito
      5
      0
      Votes
      5
      Posts
      827
      Views

      ManuelM

      @kng_ito said in How to get weights from a Vertex Map tag on an uneditable object:

      Sorry for asking a question that has already been resolved in another thread.

      Don't worry, we are glad to help.

      Cheers,
      Manuel

    • K

      Condition that generator treats inner spline segment as a hole

      General Talk
      • • • kng_ito
      4
      0
      Votes
      4
      Posts
      761
      Views

      ferdinandF

      Hey @kng_ito,

      So the normal direction of the generated polygons was the point!

      It depends a bit on what you mean by normal direction, but generally speaking, normals only play a minor role here.

      Wenn all segments would always lie nicely inside a plane, it would be easy. Just compute the mean point for each segment and then come up with some cockamamie rule when you would consider two segments not being in a shell-hole relation (as I did above with 'a hole is not a hole anymore when T farther away from S than S is tall or wide').

      In practice things do not always lie nicely in a plane. So, you then must first project them there, find their mean plane. So, the 'point' would be finding the mean plane / dimensionality reduction. I cooked up an small example below.

      Cheers,
      Ferdinand

      Result (the plane gizmos are a bit buggy and sliding, did not debug this. But that is why I turn them off):

      The file:
      spline_hole.c4d

    • K

      Unpacking Animation Data Wrapped by the Motion System (NLA)

      Cinema 4D SDK
      • 2023 python • • kng_ito
      5
      0
      Votes
      5
      Posts
      1.2k
      Views

      K

      Hi @ferdinand,

      Thank you for the detailed explanation and the code.
      It works perfectly and the problem is solved!

    • K

      Get MODATA_SIZE of Mograph Particles to Build Stacks of Geometry

      Cinema 4D SDK
      • python sdk • • kng_ito
      13
      0
      Votes
      13
      Posts
      1.9k
      Views

      ferdinandF

      No worries, everything is fine, that is what we are here for, to clear up things. When you have questions I encourage you to open a new thread so that we can see what we can do. And this is also an open forum, so you can ask questions to the community if you want to. But unless pointed out specifically otherwise, we assume things to be support requests.

      Cheers,
      Ferdinand

    • K

      How to get the render time from picture viewer

      Cinema 4D SDK
      • python • • kng_ito
      3
      0
      Votes
      3
      Posts
      692
      Views

      K

      Hi @ferdinand,

      Thank you as always for your detailed answer and even the sample scene file!
      It seems like a lot of work with my current level of understanding, but your answer is a great hint.

      I'll try to do a little research on my own. Thank you very much.

    • K

      GetSegmentCount() returning 0 for a spline object with only one segment

      Cinema 4D SDK
      • windows python s26 • • kng_ito
      4
      0
      Votes
      4
      Posts
      656
      Views

      ferdinandF

      Hello @kng_ito,

      I agree that it is odd, or as you nicely put it, unkind. The problem is also that the meaning of segments in the context of a SplineObject (the data count of the Tsegment tag) and a LineObject (the data count of its Tline tag) is being mixed up.

      B(Cache).GetSegmentCount() = 2 <- A LineObject instance. B(Cache).GetTags() = [ <c4d.VariableTag object called with ID 5712 ... <- The Tline tag. <c4d.VariableTag object called with ID 5680 ... <c4d.SegmentTag object called with ID 5672 ... <- The Tsegment tag for the host. <c4d.PointTag object called with ID 5600 ... ]

      The problem of this design is that LineObject.GetSegmentCount returns the segment count in the sense of its host object, the SplineObject, as the number of disjunct curve sections in the spline (segment tag). The segments in the sense of a LineObject, the number of line segments the hosting spline object has been quantized into in the LineObject (line tag), is only indirectly accessible over getting the Tline tag of that object. Which in turn might confuse users why they cannot get a specific segment as you wanted to.

      But this design was apparently intentional and aims at minimizing the number of tags in the traverseable scene-graph (things inside caches are out of sight so to speak and not a problem). It is therefore unlikely that we will change this. The best I can do for now, is adding a note to LineObject.GetSegmentCount and SplineObject.GetSegmentCount which hints at the problem.

      Cheers,
      Ferdinand

    • K

      How to just open a certain window instead of toggling

      Cinema 4D SDK
      • python • • kng_ito
      3
      0
      Votes
      3
      Posts
      433
      Views

      K

      Hi @ferdinand,

      I deleted my original post because I realized the question contained my misunderstanding.
      And now your answer has completely solved the problem I had.

      Thank you very much for your detailed response!

    • K

      How to use GeUserArea.DrawCustomButton()

      Cinema 4D SDK
      • python sdk s26 • • kng_ito
      5
      0
      Votes
      5
      Posts
      719
      Views

      K

      Hi @m_adam ,
      It is unfortunate because I thought it would be useful if it were available, but I understand.
      Thank you for your prompt response!

    • K

      GeUserArea.DrawEllipseFill() draws a circle the wrong way

      Cinema 4D SDK
      • python r25 sdk • • kng_ito
      4
      0
      Votes
      4
      Posts
      610
      Views

      M

      Hi this bug was fixed with release 2023.0 of Cinema 4D.

      Cheers,
      Maxime.

    • K

      How can I retrieve the copied data?

      Cinema 4D SDK
      • python • • kng_ito
      3
      0
      Votes
      3
      Posts
      551
      Views

      ferdinandF

      Hello @kng_ito,

      without any further questions or postings, we will consider this topic as solved by Wednesday and flag it accordingly.

      Cheers,
      Ferdinand

    • K

      Strange behavior of UserArea docked with Timeline

      Cinema 4D SDK
      • r21 s24 python windows • • kng_ito
      5
      0
      Votes
      5
      Posts
      791
      Views

      K

      Hi,

      It looks like the problem got solved by Sized function.
      Thanks a lot @m_magalhaes and @m_adam !!