• Plugin Tag printing randomly to the console

    Moved python
    4
    1
    0 Votes
    4 Posts
    975 Views
    ferdinandF
    Hey @aghiad322, Great to hear that you solved your problem. And although I understand how you meant your last sentence, the questions of users are never inconvenient to us. All questions are welcome, but sometimes we must draw some boundaries for the scope of support. Cheers, Ferdinand
  • Problems with Reused Asset Resources in MGS_GETALLASSETS

    Moved python
    3
    0 Votes
    3 Posts
    1k Views
    P
    Hi @ferdinand , thanks a ton for the very extensive reply. I do understand where you are coming from decision/code wise and that it might indeed be intended behavior, but I also appreciate you flagging this behavior to be looked at! I will look into the code you provided and see what I can make of it to work for our specific case. As with all the examples i receive on here it is also about learning itself, to become better. I already found out that I can run my piece of code 2 times to catch the first set of instances, perhaps it is also possible to run that on a loop until the len() doesn't increase anymore It's a hack-job but it might be a good last resort. To address the first comment about the post itself, my reasoning was that since it was about GetAllAssetsNew which we talked about last, I added it to my post to keep it all together. But I can see how it deviated too much from the original question that started the topic, my apologies. Cheers,
  • abc exported object names

    Moved r25 python
    3
    2
    1 Votes
    3 Posts
    906 Views
    S
    super, thanks
  • TranslateDescID with FieldsList

    Moved python r23 2023
    7
    0 Votes
    7 Posts
    2k Views
    ferdinandF
    Hey @mikeudin, just as an FYI, one of our engineers pointed out that Description.CheckDescID is the likely culprit for the problem and that this method should be avoided when possible due to its resource hungry nature. Instead, you would just manually define the parameter ID you mean, e.g., c4d.DescID(c4d.ID_TAGFIELDS). The problem with this is of course that this statement has been made disjunct from the dynamic parameters example because I stripped that aspect away in my minimized code. The original code example says: # Fills DescLever type and creator completeId = desc.CheckDescID(descId, None) return True, completeId, tag So, they seem to be only after filling in the data type and creator ID and not resolving multi-level IDs. Which you could also do manually when you know the parameters you want to wrap, e.g.,: descId: c4d.DescID = c4d.DescID(c4d.DescLevel(c4d.ID_TAGFIELDS, c4d.CUSTOMDATATYPE_FIELDLIST, c4d.MAXON_CREATOR_ID)) return True, descId, tag Cheers, Ferdinand
  • c4d.EventAdd() is not working

    Moved python 2023
    9
    0 Votes
    9 Posts
    2k Views
    ferdinandF
    Hey everyone, The issue has been fixed and verified in an internal build. It will be shipped with one of the builds of the next major update (i.e., it will not make it into 2023.x.y anymore). Beta testers can already make use of the change in the most recent beta build. Cheers, Ferdinand
  • Cinema crashes renaming items in a TreeView

    Moved r20 s26 python windows macos
    11
    0 Votes
    11 Posts
    2k Views
    ferdinandF
    Hello @HerrMay, Thank you for your reply, and please excuse that I have overlooked it. Maybe a little bit off topic but since we're already talking Treeviews. There seems to be a bug too when it comes to multi-selecting objects in the Treeview. At least when using c4ds native BaseList2D objects. Without wanting to be rude, that statement is too vague to make a bug report out of it. The thread is quite old and therefore not the most reliable source of information, geared towards C++, and from what I see, not even conclusive in the assessment if there is a bug or not. I see there a user claiming that there is a bug, and another user, probably a Maxon employee, being skeptical about it. We are happy to file bugs, but we need a reproducible case. And just as a heads up, us filing a bug does not necessarily mean that we will fix soon or at all. I understand that this can be disheartening, but we must prioritize where our bug fixing efforts are most needed, which can lead to minor bugs being pushed for a long time. I have closed this thread due to its age, please feel free to open a new thread when you want to discuss that other bug. The thread is still be tracked due to its to_fix tag. Cheers, Ferdinand
  • Copy the texture in the Reflection channel to the Color channel

    Moved python 2023
    3
    0 Votes
    3 Posts
    931 Views
    T
    Yes, thank you so much. This works perfectly. And thanks a million for the in depth explanation.
  • Need help with Bend-Deformer in Object-Plugin

    Moved r23 2023 python windows
    6
    0 Votes
    6 Posts
    2k Views
    M
    Hello @ThomasB, without further questions or postings, we will consider this topic as solved by Monday 05/06/2023 and flag it accordingly. Thank you for your understanding, Maxime.
  • Getting only the last value of the slider (slide)

    Moved 2023 python
    5
    1
    0 Votes
    5 Posts
    1k Views
    P
    Great work!!! Thank you. Regards, Pim
  • PYP script doesn't show up in extensions

    Moved 2023 python
    4
    1
    0 Votes
    4 Posts
    1k Views
    M
    Hi @kiesi, just replying to confirm that what @C4DS is saying is true. If you need to have a plugin installed elsewhere you can add an additional plugin lookup path in the Cinema 4D preference within the Plugin category. Otherwise you can also execute Cinema 4D with the next argument g_additionalModulePath={YourPath} or define g_additionalModulePath as an environment variable to add an additional python lookup path. Cheers, Maxime.
  • Cinema 4D Connector is not working on 2023.2.0

    Moved
    3
    0 Votes
    3 Posts
    1k Views
    T
    Thank you very much for the quick answer, i effectively forgot to look into the changes notes
  • SDK typo/discrepancy ? bitmap.Init() regarding bitdepth

    Moved python sdk
    7
    0 Votes
    7 Posts
    2k Views
    M
    Thank you Ferdinand for your time, and also providing a high / low level solution. As far as I can tell it works all as intended - my code now results in clean colors "measured". (in lowlvl R20 and highlvl 2023) I found a small discrepancy with render instances but that's another topic. Cheers, mogh
  • IN_EXCLUDE list with virtual objects with parameters

    Moved python
    3
    1
    0 Votes
    3 Posts
    1k Views
    mikeudinM
    Thank you for response @ferdinand! Will try to make it with hidden tags
  • Normal Move command has no effect in R2023

    Moved python
    3
    0 Votes
    3 Posts
    789 Views
    bacaB
    @m_adam thanks!
  • DragDrop Model from UserArea into Viewport or Object Manager

    Moved c++ r20 s26 sdk
    2
    0 Votes
    2 Posts
    956 Views
    M
    Hi Kent, so far for the moment the viewport drop operation are more related to scene management rather than scene creation. By that I means except for an asset being loaded which create new elements (scene, object, material, etc...) other drag command are just here to act on the active object. So regarding drag operation for file, only DRAGTYPE_FILENAME_IMAGE is allowed and an object should be selected, then a texture tag will be applied to this object and a new material with the texture will be automatically assigned. DRAGTYPE_FILENAME_SCENE is not supported. For DRAGTYPE_ATOMARRAY it is only allowed for some particular categories, like layers to be applied on the active object or even materials for the same condition, so in any case the layer/material should already be part of the scene. So for the moment the only workaround would be to create your own temporary asset and pass this asset to be inserted into the document. For more information about the asset API I let you read Asset API - Handbook but this is S26.0+ only. Cheers, Maxime.
  • SetString() to Update Dialog crash c4d

    Moved python s22
    5
    2
    0 Votes
    5 Posts
    1k Views
    chuanzhenC
    @m_magalhaes Thanks for the detailed explanation as to why it crashed!
  • Pragma directives in Python?

    Moved python
    5
    0 Votes
    5 Posts
    2k Views
    R
    Once again, thenk you very much for all the information, Ferdinand. What I had done already was the last "solution". I do have a file inside the plugin folder that, when the code detects that it is present, skips some verifications. So, I guess I will go on doing that. That even allows me to check for specific filenames and perform different actions for each one. I was just checking to see if there was any type of build-in mechanism to emulate that pragma directives did. And I do know that python is interpreted and that real pragma directives are evaluated in the prepass stage. But I didn't knew if the Source Protector performed some type of evaluation, when protecting the code.
  • Development versions

    Moved
    3
    0 Votes
    3 Posts
    853 Views
    C4DSC
    Thanks for the link to the updated page on the dev blog.
  • 0 Votes
    5 Posts
    1k Views
    ferdinandF
    Hello @jack0319, Yes, this is a bug. I had to do some digging first (debug against c4d) to find out what is going wrong here. It seems like this is a bug in the scroll group gadget. I was unable to pinpoint what is going exactly wrong, but when a new document is created, the scroll group position is set again, because Cinema 4D is reinitializing its layout. You currently cannot do anything about this. I have filed a bug report on our bug tracker and will update this thread when the bug has been fixed. We cannot make any guarantees regarding an ETA and considering that this is a negligible impact bug, it could take multiple revisions until the bug is fixed. Cheers, Ferdinand
  • Python - Gradient userdata - Set colour and alpha

    Moved python s26
    2
    1
    0 Votes
    2 Posts
    644 Views
    ferdinandF
    Hello @pixelsinprogress, Thank you for reaching out to us. I must unfortunately tell you that it currently is technically not possible to set the alpha values of a c4d.Gradient instance in Python. In C++ this works because there Gradient::GetAlphaGradient returns a pointer to the underlying alpha gradient. The Python layer unfortunately makes a copy of that layer, severing the connection between the alpha gradient and its associated color gradient (which is also why the Python docs warn about that). I also tried some other venues of poking around in the alpha data by using C4DAtom.SetParameter, but these unfortunately also do not work in Python. I have created a ticket for this to be fixed at some point, as I would agree this is something the Python layer should be able to handle. But this is not a bug, as this was done somewhat intentionally. So, it might take a long time before we (most likely @m_adam) will find the time to do it. Cheers, Ferdinand