• ScrollGroupBegin() is not work in GeUserArea()

    Cinema 4D SDK python s24
    7
    0 Votes
    7 Posts
    903 Views
    gheyretG
    @ferdinand I will handle it. Thanks for your help! Cheers~
  • Enabling Team Render in Render Queue

    Cinema 4D SDK s24 python
    4
    1
    0 Votes
    4 Posts
    845 Views
    CairynC
    (Yes, I notice that the thread has been closed, and marked as solved, and I probably shouldn't barge in, but it seems the original script error has never been addressed, so I must mansplain because that's the obnoxious guy I am.) Two points: The error in the script above is that the index used in SetUseNet is wrong. The indices in the BatchRender element list begin at 0, so the first valid index is 0, and the last is GetElementCount()-1. dBatchCount starts as GetElementCount(), which is fine as counter, but as an index, it is the first unused index. Then this counter is increased += 1, so now it is the second unused index after the list. When AddFile is called with that index, it simply adds the file as last element because it cannot leave empty gaps in the list. It returns True although it didn't use the desired index - it used index-1. Now SetUseNet is called with the same index. The reason it fails is that this index is not the index that AddFile actually used. This index is not even valid. There is no element with that index. So, nothing happens. If you use dBatchCount-1 as index at this point, or simply never increase dBatchCount in the first place, the script works fine. The actual API error is that SetUseNet does not raise an IndexError as the docs claim. (Other methods like GetElementStatus do.) Okay, I go annoy someone else now.
  • Drag and Drop Gradient Data onto a Gradient

    Cinema 4D SDK c++ r20 r21 r23 s22 s24 sdk
    5
    0 Votes
    5 Posts
    787 Views
    ferdinandF
    Hello @kbar, without any further questions, we will consider this topic as solved by Monday, the 25th and flag it accordingly. Thank you for your understanding, Ferdinand
  • Filename::SetMemoryReadMode Docs don't seem right.

    Moved Bugs c++ r20 r21 r23 s22 s24 sdk
    4
    1
    0 Votes
    4 Posts
    977 Views
    ferdinandF
    Hello @kbar, I should have replied here since there is at least an implied request in your last answer. I have added a task for this in our documentation task pool and added the tracking tag to this topic. Without any further questions or replies, we will consider this thread as solved by Monday the 20th and flag it accordingly. But that does not mean that the topic is forgotten, due to its to fix tag. Thank you for your understanding, Ferdinand
  • 0 Votes
    2 Posts
    503 Views
    ferdinandF
    Hello @thomasb, thank you for reaching out to us. Please remember to open a new thread for new questions of yours. It is fine to ask follow-up questions in a topic, but when the threshold to a new topic is being crossed, a new thread should be opened. I have done this for you here. In principle this is at least partially possible. You can determine the visibility for a user data description element with the description field DESC_HIDE, see example at the end of the posting for details. It is not possible to gray-out, i.e., disable, user data description elements. It is also a bit a case of an unusual workflow for user data, since you would have to rebuild the user data container every time you want to hide or show and element in it. You could overwrite for example message() in a Python scripting tag and then react to when a user clicks a button, drags a slider, etc. in the user data and rebuild the user data based on that. Which would give you the dynamic GUI feeling you are probably after. I have done this in the past, but more as a hack for fun to see how far I can push user data. I would not recommend doing it as it will complicate things like animation and can lead to "janky" interfaces. Being bound to the execution order of expressions can also lead to problems. If you want dynamic GUIs, you should implement a plugin. There you can overwrite NodeData.GetDDescription() to modify the description, e.g., add, remove, or hide stuff. To disable stuff, i.e., gray it out, you must overwrite NodeData.GetDEnabling(). Cheers, Ferdinand """Example for adding a hidden user data element. """ import c4d def main(): """Adds a hidden check box and a visible integer element to the user data of the selected object. """ if op is None: raise ArgumentError("Please select an object for running this script.") datenDesc = c4d.GetCustomDataTypeDefault(c4d.DTYPE_BOOL) datenDesc[c4d.DESC_NAME] = "Daten" datenDesc[c4d.DESC_HIDE] = True # Element will be hidden stepsDesc = c4d.GetCustomDataTypeDefault(c4d.DTYPE_LONG) stepsDesc[c4d.DESC_NAME] = "steps" stepsDesc[c4d.DESC_HIDE] = False # Element will be visible op.AddUserData(datenDesc) op.AddUserData(stepsDesc) c4d.EventAdd() if __name__ == '__main__': main()
  • Python plugin and Linux CLR arguments

    Cinema 4D SDK python s24 r23
    5
    0 Votes
    5 Posts
    793 Views
    V
    Hello, Adding the path to the plugin in g_additionalModulePath fixed the issue. Thank you very much for your help.
  • Get port id of xpresso node

    Cinema 4D SDK python s24
    6
    0 Votes
    6 Posts
    1k Views
    kbarK
    Was just searching for something related and came across this post and thought I would also point out my site that also displays all the data from the resource files. https://plugins4d.com/Description/Nodes Here is the page for GVSpline: https://plugins4d.com/Description/Node?containerName=GVspline It is similar to the documentation now supplied in the official maxon docs.
  • Get a Deformed Point Position Over Time

    Cinema 4D SDK windows python s24
    7
    0 Votes
    7 Posts
    652 Views
    ferdinandF
    Hello @blastframe, yes, there is a loop in that script which is like my pseudo-code one. If they are doing the same thing is a bit a point of view. The script evaluates each frame to do something each frame, while my pseudo code evaluates all frames to do something after that. So, for clarity again as pseudo code: # Evaluate all frames and do something for each frame, i.e., what Maxime's # script does. for frame in FRAMES: for item in document: item = evaluate(item, frame) DoSomthing(item) # Evaluate all frames and after that do something, i.e., what I am proposing. # From a more abstract point of view, both are doing the same thing. The only # difference here is that we are not interested in the intermediate results, # only in updating an item with is prior state: `item = evaluate(item, frame)` for frame in FRAMES: for item in document: item = evaluate(item, frame) DoSomthing(someItem) If you say, you are fine with not respecting this than this will simplify things. And most things that impact (deform) caches, won't be impacted by that. But there are direct cases which are affected, e.g. cloth simulations, some deformers like for example the collision the deformer and more. And indirect cases like when you have a particle system whose state over three corners will impact some deformation. And yes, this is very taxing to do, because you must evaluate a lot of stuff each frame. And you will have likely to execute all passes (animation, expressions, and caches); in the end it depends on how a specific scene is setup. The performant way to do this is cache the required data yourself. Like for example the collision deformer can do it; i.e., you click a button and then all data is calculated which then later is only played back. I would not say that it is impossible to do this in Python, but you will lack some important types to store such data in Python that are exposed in our C++ API. Python is also in general not well suited for such task, due to its inherent slowness of iteration. But that does not mean that with some smart thinking you could not make it work in Python in a performant way. This all depends on what you are exactly trying to do and is more of a general complexity of an algorithm or project design question (and therefore out of scope of support). The bottom line is that your initial question of Get a Deformed Point Position Over Time might contain more complexity than anticipated by you, because it implies something is the recursive function itself and time. Which is always a pain in the *** to handle. Cheers, Ferdinand
  • 0 Votes
    5 Posts
    620 Views
    ?
    @ferdinand Thank you. I'll try to cache myself.
  • Add button to run a script

    Cinema 4D SDK
    12
    0 Votes
    12 Posts
    2k Views
    ferdinandF
    Hello @stereo_stan, without further questions or replies, we will consider this topic as solved by Monday, the 30th and flag it accordingly. Thank you for your understanding, Ferdinand
  • How to detect a document switching?

    Cinema 4D SDK python r23 s24 sdk
    5
    0 Votes
    5 Posts
    851 Views
    ferdinandF
    Hello @mocoloco, without further questions or replies, we will consider this topic as solved by Monday, the 30th and flag it accordingly. Thank you for your understanding, Ferdinand
  • Modifying Scene On First Open or Before Save?

    Cinema 4D SDK s24 python
    5
    0 Votes
    5 Posts
    1k Views
    dskeithbuckD
    @C4DS @kbar @ferdinand - Thank you so much for the in-depth responses. @kbar I'll see if I can get my employer to pony up for a license for Call Python as that seems like the simplest root. Although, this is potentially a light enough lift that I can finally make the transition into C++ development. @ferdinand Helpful to know that I won't be able to interrupt the save process (probably a good thing from the user POV).
  • 0 Votes
    9 Posts
    2k Views
    M
    Hello! @ferdinand ,@Cairyn Thank you for politely teaching me! I was able to solve the title problem. I will use an external editor. I also understood loading plugins! I was restarting the software many times. I have a new question, but if you study a little more and don't solve it, let me ask you another thread. I'm really thankful to you!
  • 0 Votes
    3 Posts
    820 Views
    a_blockA
    Hello Ferdinand, yes, I was talking about the plugin ID argument of GeDialog.Open() and Restore(). Thanks for your explanation. I'm completely fine with your answer, despite some seeming here and there. I do understand the problems a codebase grown over decades can cause for answering such questions definitely. Nevertheless your explanations largely sync with my expectations from quite a few experiments. Regarding the mentioned issue of the other thread, I can acknowledge, the plugin ID parameter did not seem to have influence on the issue in my experiments. This question here was really more targeted the sizing issues I have with requesters of varying content. And your answer provides me with some confidence, I can make use of different plugin IDs (I should probably rather say unique IDs from Plugin Café) even if they are not related to any registered plugins at all. While I had already thought so and did not find any issues with this practice, it's always a bit hard to know for sure from the outside. And there's always this feeling one could be doing something harmful, which will only bite at the worst possible point in future. Thanks for the clarification. Cheers, Andreas
  • 0 Votes
    16 Posts
    3k Views
    ferdinandF
    Hey Andreas, no need to feel sorry. It is valuable for us to be aware of this, as this could cause more serious problems further down the road, even though it is hard to reproduce for now. We have pushed this off to QA for now, due to them having the required tools (hardware) to assess this more thoroughly. I do not see anything inherently wrong with that. But the only ones who could answer this with complete certainty are the developers who wrote the Cinema 4D core. And until we cannot say with a reasonable degree of certainty that this is a reproduceable bug that we want to address, I will not bother them with this, since there is other "stuff" in front of the queue for them anyway. I have forked your second part of the question, as I would like to keep this thread clean, as I would anticipate that QA will confirm this bug, it then going to the developers, and we will then report back here. Which will get a bit convoluted when there is a second question being discussed here. The topic can be found here. I understand that this is not the most satisfying procedure for you, as it will take a bit of time. The issue of yours must go through our bug tracking system now first, rather than taking the shortcut we sometimes offer here, of us talking with the developers and then creating an issue if we decide to do so. Cheers, Ferdinand
  • Accessing json data from DataDictionary

    Cinema 4D SDK c++ r20 r21 r23 s22 s24
    3
    0 Votes
    3 Posts
    573 Views
    kbarK
    That is what I was looking for. Thanks Manuel!
  • 0 Votes
    6 Posts
    1k Views
    jochemdkJ
    So, now we have a maxon.Int :} Yes, the system is working - thx @m_adam Consider it solved // more info in general on the maxon framework - especially on the python side - would we be welcome..
  • 0 Votes
    5 Posts
    2k Views
    a_blockA
    Hi Ferdinand, thanks for the confirmation and looking into it. While it's a bit unfortunate, I do not consider this a major road block. From my side this thread can be considered close. Cheers
  • Demo code for c4d.GeGetLanguage in Documentation

    Moved Bugs s24 sdk
    3
    0 Votes
    3 Posts
    784 Views
    ferdinandF
    Hello @blastframe, thank you again for reporting this But can we close this or are there any remaining issues? The thread has been added to the fixed issues pool, see tag in the first posting. This is how we track documenation and API updates that are the result of a forum thread. When this issue has been fixed, we will post here and remove the tag. So, closing this thread does not mean that we will ignore the issue. Cheers, Ferdinand