• 0 Votes
    3 Posts
    822 Views
    oli_dO
    Merci Maxime ! It's work perfectly !
  • Identify Critical Stop Please?

    Cinema 4D SDK python r21
    6
    0 Votes
    6 Posts
    2k 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
    473 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
    487 Views
    B
    @zipit Thanks for pointing it out. It now works as expected.
  • Python Tag not updating

    Moved Cinema 4D SDK python
    9
    0 Votes
    9 Posts
    2k Views
    M
    make sure to pass a str value aka str(yourMessage) if this doesn't solve the issue open a new topic Cheers, Maxime
  • BaseDraw known issues in S22

    Locked Cinema 4D SDK windows macos c++ python
    1
    1 Votes
    1 Posts
    622 Views
    No one has replied
  • 0 Votes
    9 Posts
    3k Views
    M
    You could also retrieve the current matrix of the gizmo with BaseObject.GetModelingAxis. Cheers, Maxime
  • animation disregarded after toolplugin

    Cinema 4D SDK python r20
    8
    0 Votes
    8 Posts
    1k Views
    D
    But I appreciate that you where trying to make things more streamlined
  • Generators, Materials, Undo's, Oh My!

    Cinema 4D SDK python
    12
    0 Votes
    12 Posts
    2k Views
    ManuelM
    the whole thread is the answer anyway
  • Visibility Toggle

    Moved Cinema 4D SDK
    6
    0 Votes
    6 Posts
    2k Views
    ManuelM
    hi, you already opened this thread, asking for the question, I've answer there. Please, stop asking the same question on different threads and continu on the linked one. Cheers, Manuel
  • Solo Toggle

    Moved Cinema 4D SDK
    7
    0 Votes
    7 Posts
    2k Views
    M
    Hi the CallCommand is the correct way to go. And @Cairyn it's in the Snap module because it uses some logic that is already implemented in the snap module such as the enabling state or other internal parameters storage logic. So using the CallCommand make sure everything is setup correctly. Note that in the end the solo things are only setting/clearing the NBIT_EHIDE of objects. Cheers, Maxime.
  • Python script for Rectangle Selection with options

    General Talk
    4
    0 Votes
    4 Posts
    930 Views
    T
    Hi Manuel and @rb_rodrigo, Many thanks for the tips about the Python console and help with the code. I'm a beginner (not even that!) in scripting, so much appreciated. It works as expected now! Cheers, Frederik
  • About BaseView.WC()

    Cinema 4D SDK python
    4
    1
    0 Votes
    4 Posts
    747 Views
    M
    @kikizg Yes we are aware of it and it's already reported. Thanks for you feedback, if you find other weird stuff, please post them. Cheers, Maxime.
  • Faster way of checking if dialog has closed?

    Cinema 4D SDK python
    8
    0 Votes
    8 Posts
    2k Views
    M
    @iluxa7k said in Faster way of checking if dialog has closed?: LP_c_long Long story short it's a pointer http://makble.com/the-story-of-lpclong, and I think the method provided by Zipit is the best one, since as he said there is no way to control the behavior of an external (from your plugin) GeDialog. Cheers, Maxime.
  • 0 Votes
    5 Posts
    625 Views
    M
    Hi Cayring this is indeed a bug I'm going to report them and fix them (both for BaseMaterial and shader) as soon as possible If you have other cases like that please report them. I set the topic as solved, I will bump this topic once the fix will be available. Cheers, Maxime.
  • Real Time or Live "Edge to Spline" Object?

    Cinema 4D SDK r21 python
    4
    0 Votes
    4 Posts
    556 Views
    B
    @PluginStudent and @m_adam The plugin from @noseman works. It works for now in my use case, but correct me if I'm wrong it cannot have a priority parameter because it is a generator (?). Regards, Ben
  • Identity of C4D objects in Python

    Cinema 4D SDK
    6
    0 Votes
    6 Posts
    2k Views
    CairynC
    @m_adam Thank you for the confirmation and the reading suggestions. Just for context, this is a general conceptual question and not connected to a specific code issue. I noticed the behavior while doing some test scripts with id() and is. It is worth noting that these Python properties need to be used carefully in concert with C4D objects. (I wouldn't exactly recommend using pointer comparisons in C++ either ) I will include an "advanced" chapter in my Python/C4D book to mention this.
  • Why are my Relative Transformation Values not 0?

    Cinema 4D SDK python r21
    11
    1
    0 Votes
    11 Posts
    1k Views
    P
    The source code of the C++ version of CompareFloatTolerant() is actually available in the frameworks\cinema.framework\source\ge_ieee.cpp and/or \frameworks\core.framework\source\maxon\general_math.cpp file of the C++ SDK. I assume the Python version just calls the C++ function.
  • GetLayerObjectRoot and GeListHead

    Cinema 4D SDK python r21 classic api
    8
    0 Votes
    8 Posts
    1k Views
    CairynC
    Thanks for the confirmation. I shall treat the extra link directions as nonexistent then