• 0 Votes
    5 Posts
    1k Views
    CJtheTigerC
    Hi @m_adam, thanks a lot, that did the trick. To close this topic off here's a snippet to allow other objects but not the current object to be dropped in there: def Message(self, node: GeListNode, type: int, data: object) -> bool: if type == c4d.MSG_DESCRIPTION_CHECKDRAGANDDROP: relevant_id = c4d.DescID(c4d.YOUR_PARAM) # Use the ID of the parameter of your object that you want to check. current_id: c4d.DescID = data['id'] if relevant_id.IsPartOf(current_id)[0]: dragged_element = data["element"] is_same_object = node == dragged_element data['result'] = not is_same_object return True return True Cheers, Daniel
  • Include same container multiple times in .res

    Cinema 4D SDK 2024 python c++
    2
    0 Votes
    2 Posts
    509 Views
    i_mazlovI
    Hi Daniel, You cannot include multiple containers and keep their IDs different. There's no special arguments for the INCLUDE statement that can optimize this workflow for you. In your case having your own implementation of CYCLE would be the solution you're looking for. Cheers, Ilia
  • 0 Votes
    3 Posts
    777 Views
    D
    Hi Maxime, thank you very much for your answer! I wasn't sure if storing things in the global document BaseContainer was a good approach, but it's working well. Cheers, Daniel
  • Python: Localized Plugin Name

    Cinema 4D SDK 2024 python
    5
    0 Votes
    5 Posts
    954 Views
    M
    Hi you are right, I double checked and my c4d_string.str was like that, sorry I copy-pasted your in my reply without notifying it. // C4D-StringResource // Identifier Text STRINGTABLE { PLuginName "AAAAAA-ROUNDED Tube"; } All the rest is correct in your sentences. Cheers, Maxime.
  • Python Weight Painting Brush Plugin Questions

    Cinema 4D SDK python 2024
    2
    0 Votes
    2 Posts
    489 Views
    M
    Hi @BretBays this is correct, if you want to make a Brush the easiest way is to register a SculptBrushToolData , you can find examples in Python in Github or in C++ in Github. SculptBrushToolData is derived from DescriptionToolData, meaning they can have a description visible in the attribute manager and therefor you can add your own checkbox if needed. Cheers, Maxime.
  • Python: Detect Plugins

    Cinema 4D SDK 2024 python windows
    12
    0 Votes
    12 Posts
    2k Views
    J
    Thanks for the response. I'll see if this does what I need it to John Thomas
  • 0 Votes
    7 Posts
    1k Views
    John_DoJ
    Hi Maxime, Thank you very much for looking at my issue. Did you try the new function ? I've added it in my code and unfortunately I get the same result as before. [image: 1703847634618-cinema_4d_3jwccopdud.gif]
  • 0 Votes
    2 Posts
    465 Views
    M
    Hi thanks for the report, python should never crash, so it's going to be fixed in the next release. In any case the port should be a valid a port, but an exception should be raised when None is passed. Cheers, Maxime
  • Vertex Color Tag disappearing when made editable

    Cinema 4D SDK 2024 c++
    3
    2
    0 Votes
    3 Posts
    713 Views
    D
    Thanks Ilia! That was exactly what I needed! Dan
  • Python Effector with custom FieldList

    Cinema 4D SDK python 2024
    3
    0 Votes
    3 Posts
    691 Views
    M
    Hi @baca, this is unfortunately not possible there is some default CheckDirty in place to support the default FiledList, but since you can not override CheckDirty in an effector yourself you can't add another FieldList dependency check. Cheers Maxime.
  • Python: How to import files as modules?

    Cinema 4D SDK python 2024
    2
    0 Votes
    2 Posts
    552 Views
    i_mazlovI
    Hi @gaschka, In your next postings please provide more detailed description of your question. In this case you're lacking information about the file structure you're using, the code that performs the import, the information on how and what have you set the environment variable for. Regarding your question, when splitting python code into separate pieces one usually uses the concept of packages rather than raw files. Hence, your question relates to local modules you'd like to use in your script. Please, have a look at the Python Libraries Manual especially the last section about the Local Plugin Search Paths. Another point of interest for you would be a utility function LocalImportPath that simplifies the process of importing packages. If you have any further questions, please let me know and provide a code sketch that showcases your issue. Cheers, Ilia
  • Python: How to inject code into a Python tag?

    Cinema 4D SDK python 2024
    4
    0 Votes
    4 Posts
    864 Views
    gaschkaG
    Thanks to you both for your answers. @m_adam Regarning my issue with the file linking, I'll try to come up with a procedure for reproduction of my issue soon: It was quite random, but I was in the flow of writing my script, so I circumvented with the string solution, but I would prefer the file solution for sure.
  • Python: User Data Float Slider?

    Cinema 4D SDK python 2024
    4
    1
    0 Votes
    4 Posts
    944 Views
    gaschkaG
    @i_mazlov Thank you for the friendly introduction and the hint to CUSTOMGUI and REALSLIDER, exactly what I was looking for. @baca Thank you for the additional tip.
  • Python script to Python tag hand over?

    Cinema 4D SDK 2024 python
    3
    0 Votes
    3 Posts
    713 Views
    gaschkaG
    Thanks for your help and nudging me into the right direction, I think I can work with that
  • Python tag initalization?

    Cinema 4D SDK python 2024
    7
    0 Votes
    7 Posts
    1k Views
    gaschkaG
    @m_adam @m_adam said in Python tag initalization?: OM is not single threaded, Oh, that's an interesting insight for me. Perhaps I was misinformed, as Character Rigs had the tendency to get slow quite easily in C4D, and Animators look envy over to Maya, as they do have a parallel evaluation (and caching). Though I'm aware that there are changes/improvements to C4D performance lately. Thanks for the link. A lot of new information to learn an absorb
  • Call "Set Deformed Mesh" on Weight Tag

    Cinema 4D SDK 2024 python windows
    2
    0 Votes
    2 Posts
    497 Views
    M
    Hi you need to use call button def apply_deformed_mesh(meshes): """ Apply 'Set Deformed Mesh' on all meshes with weight tags. """ for obj in meshes: weight_tag = obj.GetTag(c4d.Tweights) if weight_tag: bc = weight_tag.GetDataInstance() # Set the button to 'Set Deformed Mesh' bc.SetInt32(c4d.ID_CA_WEIGHT_TAG_SET_BUTTON, c4d.ID_CA_WEIGHT_TAG_SET_DEFORMED_MESH) c4d.CallButton(weight_tag, c4d.ID_CA_WEIGHT_TAG_SET_BUTTON) # Update the scene c4d.EventAdd() Cheers, Maxime.
  • 0 Votes
    3 Posts
    726 Views
    fwilleke80F
    Ok, thanks!
  • 0 Votes
    9 Posts
    2k Views
    fwilleke80F
    Hi Ferdinand, thank you for the clarification!
  • 0 Votes
    3 Posts
    717 Views
    fwilleke80F
    Super, thank you!
  • 0 Votes
    5 Posts
    2k Views
    B
    Awesome, Thank you so much @m_adam ! Cheers and best regards Ben