• How to pass a value from GeDialog to another class

    Cinema 4D SDK
    5
    0 Votes
    5 Posts
    926 Views
    D
    @ferdinand Thank you for your awesome explanation! I will keep this post as a reference for my studies as your approach seems a bit complicated for my understanding at the moment. I'm learning a lot with your contribution in this forum, and in this case here it's not gonna be different. Cheers
  • 0 Votes
    3 Posts
    664 Views
    ferdinandF
    Hello @RenoBozo, without any further questions or postings, we will consider this thread as solved by Friday the 4th, February 2022. Thank you for your understanding, Ferdinand
  • Exporting data from Takes to a file

    Cinema 4D SDK sdk r23 python
    8
    0 Votes
    8 Posts
    1k Views
    F
    Hi Manual, This is exactly what I needed. Thank you very much. Best regards, Tomasz
  • 0 Votes
    4 Posts
    1k Views
    ferdinandF
    Hello @wuzelwazel, without any further questions or postings, we will consider this thread as solved by Friday the 4th, February 2022. Thank you for your understanding, Ferdinand
  • Unique Material per Object Plugin instance?

    Cinema 4D SDK r20 python macos
    4
    0 Votes
    4 Posts
    929 Views
    H
    Hi Guys, as I'm pretty sure I found a way to achieve what I'm after I thought I update this thread. Maybe this will help others as well. After taking some time to make NodeData.CopyTo() work, I ended up not getting it to work at all. So I thought about how I could achieve what I'm after a different way. Long story short, I ended up implementing a MessageData plugin as some kind of watchdog for a document. Since its CoreMessage runs on the main thread I can happily insert and delete materials as much as I wish to. (At least I'm hoping so ) Tl; dr The idea behind this goes as follows. I have a timer running and in addition to that I listen for c4d.EVMSG_CHANGE and do some checking to see if the scene needs to update. In my case it's comparing the amount of a specific object against the amount of "specific" materials. If there's a difference I use that difference to delete or insert materials until there's no difference. Once there's no difference I can assign the materials to the objects and let each object control its own material. To distinguish between materials responsible for my plugin and the ones that aren't I make sure to put a unique plugin id inside the base container of the material I can then check for. Here's a code snippet of that MessageData: class Watchdog(c4d.plugins.MessageData): PLUGIN_ID = "Use your own unique one" PLUGIN_NAME = "A MessageData plugin." PLUGIN_INFO = 0 def __init__(self): self._time = 1000 def GetTimer(self): return self._time def SetTimer(self, time): self._time = time @property def should_execute(self): is_mainthread = c4d.threading.GeIsMainThread() check_running = ( bool(c4d.CheckIsRunning(c4d.CHECKISRUNNING_EDITORRENDERING)), bool(c4d.CheckIsRunning(c4d.CHECKISRUNNING_EXTERNALRENDERING)), bool(c4d.CheckIsRunning(c4d.CHECKISRUNNING_INTERACTIVERENDERING)), bool(c4d.CheckIsRunning(c4d.CHECKISRUNNING_ANIMATIONRUNNING)), bool(c4d.CheckIsRunning(c4d.CHECKISRUNNING_VIEWDRAWING)) ) is_running = any(item is True for item in check_running) return is_mainthread and not is_running def CoreMessage(self, mid, mdata): if not self.should_execute: return False doc = c4d.documents.GetActiveDocument() # SceneHandler is a custom class I delegate the whole creation and comparing stuff to. objs, mats = ..., ... scene = SceneHandler(objs, mats) # Check for a change and start the timer again. But only if the scene should update. Otherwise the timer would run all the time. if mid == c4d.EVMSG_CHANGE: if scene.should_update: self.SetTimer(1000) # If we get a timer event we update the scene as long as it shouldn't update anymore. We can then stop the timer. if mid == c4d.MSG_TIMER: if not scene.should_update: self.SetTimer(0) scene.update(doc) return True Maybe this will help others. Since I found a solution for my problem this thread can be marked solved. Cheers, Sebastian
  • RS Reference Node in Python

    Cinema 4D SDK s24 python windows
    3
    0 Votes
    3 Posts
    505 Views
    ferdinandF
    Hello @kverhaar, without any further questions or postings, we will consider this thread as solved by Friday the 4th, February 2022. Thank you for your understanding, Ferdinand
  • 0 Votes
    7 Posts
    2k Views
    F
    That's exactly what I was looking for. Thank you, Ferdinand
  • Detect new project in Python plugin

    Cinema 4D SDK python
    4
    0 Votes
    4 Posts
    613 Views
    ferdinandF
    Hello @mheberlein, without any further questions or postings, we will consider this thread as solved by Friday the 4th, February 2022. Thank you for your understanding, Ferdinand
  • Get object by active tag in Python

    Cinema 4D SDK python
    5
    0 Votes
    5 Posts
    1k Views
    ferdinandF
    Hello @stanDM, without any further questions or postings, we will consider this thread as solved by Friday the 4th, February 2022. Thank you for your understanding, Ferdinand
  • Number of Init() calls in ObjectData

    Moved Bugs python r25
    3
    0 Votes
    3 Posts
    896 Views
    a_blockA
    Hi Ferdinand, thanks for the quick and detailed answer, even trying to find workarounds. I had hoped, I could spare you this extra effort by saying, that it's no functional issue on my end. I am already satisfied with the confirmation. Often it is enough to be able to stop worrying about my own mental integrity. And while this new behavior certainly will not improve performance, I can happily ignore performance issues beyond my own responsibility. Regarding the GeDialog stuff: No worries, either. As mentioned back then, no future fix/solution can help me there and I went down a different route to get the project done with support for R19 to present. Yet, I'm thankful for your tenacity and that the issue is still being researched. Some meals simply need time to develop their flavours. Thanks and cheers, Andreas
  • SetTimeRight fail!

    Cinema 4D SDK python s22
    10
    0 Votes
    10 Posts
    2k Views
    chuanzhenC
    @ferdinand I also use ScreenToGif to make pictures!
  • Noise - Keyframe Reduction using Python

    Cinema 4D SDK r21 python
    3
    0 Votes
    3 Posts
    639 Views
    ferdinandF
    Hello @brucek5, without any further questions or postings, we will consider this thread as solved by Friday the 4th, February 2022. Thank you for your understanding, Ferdinand
  • import presets and be reversible

    Moved Cinema 4D SDK r20 python
    6
    0 Votes
    6 Posts
    908 Views
    ferdinandF
    Hello @JH23, without any further questions or postings, we will consider this thread as solved by Friday the 4th, February 2022. Thank you for your understanding, Ferdinand
  • Keyframing morph pose animations in Python

    Moved Cinema 4D SDK python
    7
    1 Votes
    7 Posts
    2k Views
    ferdinandF
    Hello @augustin, without any further questions we will consider this topic as solved by Friday, December the 17th. Thank you for your understanding, Ferdinand
  • Python script to keyframe visibility of object

    Moved Cinema 4D SDK
    4
    0 Votes
    4 Posts
    1k Views
    ferdinandF
    Hello @augustin, without any further questions we will consider this topic as solved by Friday, December the 17th. Thank you for your understanding, Ferdinand
  • How to traverse a GeListNode tree

    Cinema 4D SDK python r25 r23 s24 windows macos
    5
    0 Votes
    5 Posts
    1k Views
    ferdinandF
    Hello @WDP, without any further questions we will consider this topic as solved by Friday, December the 17th. Thank you for your understanding, Ferdinand
  • Mospline iterate start/end

    Cinema 4D SDK
    4
    0 Votes
    4 Posts
    755 Views
    ferdinandF
    Hello @ashambe, without any further questions we will consider this topic as solved by Friday, December the 17th. Thank you for your understanding, Ferdinand
  • About TimeLine Coordinate System

    Cinema 4D SDK s22 python
    3
    0 Votes
    3 Posts
    725 Views
    chuanzhenC
    @ferdinand Thanks for your detailed reply! " 2.The timeline (and as a matter of fact also the world coordinate system) has no implied unit. There is no direct translation as 1px == 1cm as both the horizontal axis and vertical axis depend on the zoom level." solved my question!
  • 0 Votes
    5 Posts
    871 Views
    ManuelM
    @thomasb said in Help needed * .res files, dialogs etc...Plugin beginner: but can I do my own init function? yes you can, specially if you want to initialize some variable. But you should not create any geometry there and return this geometry in GVO (get virtual object). About the group, there's a note about it here. Each NodeType have a "parent" group. Glad that it is working now. Cheers, Manuel
  • How to move multiple objects axis to origin?

    Moved Cinema 4D SDK python
    4
    0 Votes
    4 Posts
    1k Views
    ferdinandF
    Hello @wilsonic, without any further questions we will consider this topic as solved by Friday, December the 17th. Thank you for your understanding, Ferdinand