• Unnecessary Executions Under BFM_INPUT_VALUE

    Cinema 4D SDK r21 python
    5
    0 Votes
    5 Posts
    560 Views
    B
    @zipit Thanks for the confirmation!
  • 0 Votes
    4 Posts
    463 Views
    ManuelM
    Hello, thanks for the answer by the way you could also clone the renderdata, modify the clone and send it to as a parameter to the function RenderDocument. That way, you don't have to "restore" them. Just in case, don't forget that data may not be saved in the BaseContainer. Cheers, Manuel
  • 0 Votes
    19 Posts
    3k Views
    M
    The bug is fixed in R23. Cheers, Maxime
  • SetActiveRenderData Does Not Work As Expected?

    Cinema 4D SDK r21 python
    3
    0 Votes
    3 Posts
    393 Views
    B
    @PluginStudent Thanks for the explanation. Your solution works as expected
  • 0 Votes
    6 Posts
    1k Views
    M
    @m_adam said in PolygonObject.SetSelectEdges() and the Neighbor() class, a giant dilemma: ... Hope it answers your questions, Cheers, Maxime Thank you Maxime, this is a lot of useful info. Let me think through all of this and reply here if I have any further issues.
  • 0 Votes
    6 Posts
    1k Views
    dskeithD
    Realizing I never responded to this Thank you @m_magalhaes, @mikegold10, and @PluginStudent. I ended up manually making a list of the parameters I wanted to copy and iterating through all of them. Not ideal, but at least glad to know there wasn't an automated method I was missing.
  • Global Variable doesn't work on CoreMessage?

    Cinema 4D SDK r21 python
    7
    0 Votes
    7 Posts
    985 Views
    M
    @bentraje I don't have that much to add on your topic since I think @zipit already explained everything nicely. In any case some good resource for you about how global variable works in Python Global keyword in Python and Mutable vs Immutable Objects in Python. Regarding your last question, I think you should open a new topic, but the short answer there is no way to pass directly a variable with a MessageData, the best way is to use a scope accessible by both part and store this variable in this shared scope (can be global or any other). Cheers, Maxime.
  • Copy Material with Current State to Object

    Moved Cinema 4D SDK python
    5
    0 Votes
    5 Posts
    869 Views
    SwinnS
    Got it. Thanks, again, zipit for you answer.
  • Access Class B's function inside Class A?

    General Talk r21 python
    5
    0 Votes
    5 Posts
    792 Views
    B
    @Cairyn @zipit @C4DS Thank you all for the responses. I ended up with @C4DS suggestion in using SpecialEventAdd() and CoreMessage for simplicity sake. Have a great day ahead!
  • Treeview Creates An Extra Column?

    Cinema 4D SDK r21 python
    3
    0 Votes
    3 Posts
    376 Views
    B
    @m_adam Thanks! Works as expected
  • 0 Votes
    5 Posts
    1k Views
    ferdinandF
    Hi, thanks, that answers all my questions. Cheers, zipit
  • 1 Votes
    8 Posts
    1k Views
    r_giganteR
    Thanks @moGRR for reaching out us. With regard to your question, as pointed out by @zipit, it's not possible to have a Python Generator to generate object which can be recognized as real spline by generators/deformers expecting a spline as input due to the Python Generator flags used in its registration. Beside the option mentioned by @zipit I also invite to have a look at this post where it's presented a generator outputting spline and accepting splines as input. Best, R
  • Question about IDs for Python Dialog

    General Talk python
    3
    0 Votes
    3 Posts
    563 Views
    ManuelM
    hi, I'll set this thread as solved without feedback from your side. Cheers, Manuel
  • Create Proper Hierarchical Data for TreeView?

    General Talk r21 python
    11
    0 Votes
    11 Posts
    2k Views
    B
    Thanks for the clarification. Have a great day ahead!
  • 0 Votes
    5 Posts
    561 Views
    M
    Hi @fwilleke80, unfortunately, I confirm the shader effect is almost always dirty. I don't have any real workaround maybe you can retrieve all noises and compute their dirtiness, but this is indeed a very hard topic to handle all cases because you will also need to handle the actual parameter of the shader effector itself. Cheers, Maxime.
  • Unexpected ShowPopUpDialog Behavior

    Cinema 4D SDK r21 python
    3
    0 Votes
    3 Posts
    307 Views
    B
    @zipit Thanks for the response. You are right. It should have worked if there is padding between buttons. For now, I just chose either buttonData["w"] or buttonData["h"]. And it works as expected. RE: hard to read your code due to the lack of documentation and its disregard of PEP8 Sorry about that.
  • 0 Votes
    3 Posts
    604 Views
    oli_dO
    Merci Maxime ! It's work perfectly !
  • Identify Critical Stop Please?

    Cinema 4D SDK python r21
    6
    0 Votes
    6 Posts
    1k Views
    K
    @m_magalhaes said in Identify Critical Stop Please?: hello, For your next threads, please help us keeping things organised and clean. I know it's not your priority but it really simplify our work here. Q&A New Functionality. About the error it's related to FileName. But we need more information to help more. Be careful about the other thread, it may happen that we add stuff and the line will not refer to the correct DataType anymore. Cheers, Manuel Dammit! No wonder my code keeps breaking... I can't even follow simple forum instructions lol! But hey, at least I got it down to one link. Haha, progress! Yes, Filename, that actually makes perfect sense, so I'm pretty confident I've conquered this error. You're right that I shouldn't rely too strongly on those line numbers. Hell, the next bug fix could make that info obsolete, let alone a reference from years ago. But sometimes you can glean value from outdated info. Maybe in the future line 277 doesn't refer to Filename, but if that error pops up and all my Filename calls look to be in good order I might be able to make some guesses that increase my luck in identifying the issue faster. For instance, I might look at string or static text parameters first, thinking that like datatypes may have been grouped together in the source code. If 329 doesn't refer to baselink in the future I might start looking at in/exclude boxes or shader links first for the same reason. Maybe the list of datatypes in the description manual in the sdk is ordered how they are in ge_container.h and I can use that to choose my next lead. Shot in the dark type stuff, for sure, but maybe gets me generally in the right direction. You know what, this may have to do with me tracking down a weird behavior where Init() seemed to be the cause of every parameter invoking a MSG_DESCRIPTION_POSTSETPARAMETER message on any parameter change... but I have both debugging AND pandemic fog on my brain, so I don't even know exactly which thing I was doing wrong that may have been the culprit, so there's no point getting into all that... doesn't help that a VS Code update seems to like breaking my local git repo's randomly, so that makes reviewing previous code fun. In any case, the error hasn't popped up at all after ensuring all my base container calls were proper and there were no missing parameter initializations. Not that it was a readily reproduce-able error, just one that would pop up sometimes after a heavy testing session... so I had to do a lot of those to ensure it's really gone. But it does raise a question. Since the Filename object doesn't exist in python, what's the best way to initialize it? Docs say it's a string, but I saw something in a forum post that someone was initializing their filename parameter directly through the base container. I figured this had to do with how the python wrapper is internally converting the path to Filename object or something, so that's what I've been doing, but that WAS from 2013. So which is the proper way to initialize it? self.InitAttr(node, str, c4d.ID_FILENAME_PARAMETER) or data.SetFilename(c4d.ID_FILENAME_PARAMETER, "") And even if it's the former, do I set its default value through the basecontainer or in the normal way like so: node[c4d.ID_FILENAME_PARAMETER] = "" @r_gigante said in Identify Critical Stop Please?: Hi @kvb, with regard to the scope and purpose of the CriticalStop I warmly recommend you to have a look at: FAQ CriticalStop() Debug and Output Functions These pages properly explain how the CriticalStop is used in Cinema 4D, how it can be used in plugins and what to expect when it's hit. In you case, as already pointed out by @m_magalhaes , it's likely you're using a GeData::GetFilename() with a GeData whose type was not a Filename. Please recheck your code and if you don't spot the issue, provide us with an example or snippet to reproduce it. Cheers, R Thanks for the links. They'll come in handy on my next project, which will be in c++ (and I will be abusing the hell out of all the debugging options!). Could it have been caused by the filename returning None? Is that even a thing or just something I noticed while I was missing any initialization on my Filename parameter? I can't see it being anything else... unless an empty string could trigger that error? Thanks all! Kevin
  • GetWidth() for GeDialog?

    Cinema 4D SDK r21 python
    4
    0 Votes
    4 Posts
    402 Views
    B
    Hi @m_adam . Apologies for bringing up the thread again. I just have a follow up question. The def Message works well for the consecutive duration of the dialog. But for the initial life (i.e on startup), the def Message will not be executed . Is there a way to determine the width and height of the dialog upon its startup?
  • Draw Methods doesn't work on GeUserArea

    Cinema 4D SDK r21 python
    5
    0 Votes
    5 Posts
    417 Views
    B
    @zipit Thanks for pointing it out. It now works as expected.