• Registering tokens in python

    windows python r20
    4
    0 Votes
    4 Posts
    836 Views
    r_giganteR
    Hi line6dude, thanks for following up. With regard to registering Tokens in c++, given that it's not a complex task, requires at least a minimum background of C++, familiarity with Xcode (or VisualStudio) and understanding of our Cinema 4D tool-chain. If you feel comfortable in becoming familiar with such concepts, please open a new thread to tackle the argument. Best, Riccardo
  • R20 Script State Function

    Moved python r20
    7
    0 Votes
    7 Posts
    2k Views
    M
    Thanks a_block, Sadly I had to disable the state() function because it breaks (delays forever) Material Preview/Shader rendering. This State() function should somehow be isolated if possible ... but i guess this is the limitation of "checking the gui state". kind regards mogh
  • Changing DATETIME_GUI date format

    python r19
    3
    1
    0 Votes
    3 Posts
    696 Views
    A
    @s_bach Hi Sebastian, Thanks for your help! That makes sense! Andre
  • 0 Votes
    8 Posts
    3k Views
    M
    @bentraje said in Get World Position of Obj A's position and Set it to Obj B's position: RE: main function Just wondering does it have to be in a main function (like literally the name of the function is main) or just inside the if __name__=='__main__':? Does C4D places special treatment to the word "main"? I was confused at that previously and later realized that if __name__=='__main__': is not specific to C4D but used in python in general in checking if the script is referenced to other script, which I don't do at the moment. So I just skip it. So would this code be just fine? if __name__=='__main__': executeMe() Yes this is correct.
  • Getting a pointer to a UserArea

    python r19 r20
    5
    0 Votes
    5 Posts
    894 Views
    S
    Hello, I don't have a Cinmea 4D R14 version so I can't test that case. But in R20 some symbols have changed. E.g. c4d.DESCFLAGS_SET_0 was changed to c4d.DESCFLAGS_SET_NONE. Similarly, c4d.USERAREAFLAGS_NONE was c4d.USERAREA_0. best wishes, Sebastian
  • Damaged block

    r20 c++ macos
    4
    0 Votes
    4 Posts
    823 Views
    r_giganteR
    Hi Roger, thanks for following up. Although I've run a few tests here trying to mix-up STL data-types and Cinema API ones, I wasn't able to reproduce the issue on Xcode 9.4.1 and Cinema R20.057. That said, where possible, we encourage sticking to Cinema 4D API related data-types in order to grant better performance and superior stability. In your specific case I would go for maxon::BaseArray rather than std::vector and I would have switched from std::vector<std::string> to maxon::BaseArray<maxon::String> Would this be an option? Would you like to share a portion of code to reproduce the issue? Best, Riccardo
  • Universal "Undo" to Rule them All?

    r20 python
    15
    0 Votes
    15 Posts
    4k Views
    B
    @Cairyn Thanks again for the detailed explanation. I'll put this to rest. At least for now I know the limitation and the commands to avoid. @s_bach Thanks for the confirmation. Have a great day ahead!
  • Triangulate geometry when exporting a fbx

    r20 python
    2
    0 Votes
    2 Posts
    796 Views
    M
    Hi @Rage, I think this question is related to the another topic you posted, so I will not explain again how import/export works in CInema 4D. In your case, you have to use FBXEXPORT_TRIANGULATE and not FBXEXPORT_TRIANGULATE_GEOMETRY. And yes you are right, currently, no symbol is defined for the FBX exporter so you have to use 1026370 directly. Cheers, Maxime.
  • Set options when importing a file

    r20 python
    2
    0 Votes
    2 Posts
    708 Views
    M
    Hi @rage, you first have to configure the exporter plugin then Load the document/ Merge it. Cinema 4D will automatically use the settings you defined in the plugin. You can find examples of the procedure in our github repository. Finally, symbols for supported exporter/importer are exposed in this page of the Python documentation. Unfortunately, there is no area describing each symbol for each exporter in the python documentation, but you can find them using the search engine in the C++ documentation. (I linked you the C++ symbols of OBJ, import) If you have any questions, please let me know. Cheers, Maxime.
  • Developing .obj sequence exporter for selected objects

    python
    12
    0 Votes
    12 Posts
    4k Views
    B
    Probably not that helpful but there is an existing script for the C4D OBJ Sequence Exporter https://richh.co/c4d-native-obj-sequence-export-no-plugins/
  • Execute a Python Code Within PyCharm that Connects to C4D?

    python r20
    14
    0 Votes
    14 Posts
    4k Views
    B
    Thanks for the confirmation @a_block Will hope for the best in the future regarding sublime Have a great a day ahead!
  • Calling a Tool (Naming Tool) and Modify the Parameters

    r20 python
    7
    0 Votes
    7 Posts
    2k Views
    B
    @C4DS Works as expected. Phew! I never knew it is this complicated. Thanks again. Have a great day ahead!
  • GeDialog.GetType() Missing Link

    python
    2
    0 Votes
    2 Posts
    500 Views
    M
    Hi, @merkvilson thanks for pointing this function is private and have no use case since its return the type of a c4d.gui.Gadget which is only used internally. Cheers, Maxime.
  • 0 Votes
    5 Posts
    991 Views
    B
    Gotcha. Thanks for clarification!
  • Select the Children of a Selected Object. Then, Store it in a List

    r20 python
    4
    0 Votes
    4 Posts
    2k Views
    B
    @mp5gosu Thanks for the response and for the link regarding recursive and nonrecusive distinction, but I think the recursive version is shorter to write @Cairyn Thanks for the revised script. Works as expected. To be honest, I really do not know Python in C4D per se. I'm just winging it. Hahaha. So, thanks for the explanation!
  • Drive one parameter with another and vice versa

    python
    3
    0 Votes
    3 Posts
    732 Views
    merkvilsonM
    Thanks, Andreas! This is a really interesting approach.
  • Is there an online doc with all the 'id list' / 'type name' for the R20 ?

    Moved
    3
    0 Votes
    3 Posts
    835 Views
    M
    Hi @Fransua welcome in the plugincafe community. Do not worry since it's your first post but please read and follow these rules (I've setup your post correctly) How to Post Questions especially the tagging part. Q&A New Functionality. Unfortunately, a complete list is not available for the moment. But if you are looking only for object there is this page Object Types and Fields Object Types which refer to all symbols available to describe an object. To know a specific object id, you can drag and drop this object/element to the console, for more information see Python Console, Scene Elements. Finally, you can also retrieve for the full list of id by their type with c4d.plugins.FilterPluginList Cheers, Maxime.
  • GetVirtualObjects or GetContour

    c++ sdk r20
    3
    0 Votes
    3 Posts
    907 Views
    J
    Thank you for your answer. That was exactly what I was looking for. John Thomas
  • Number and Position of Points for Light Object

    sdk c++ classic api r20 windows
    3
    0 Votes
    3 Posts
    500 Views
    O
    Hello @r_gigante Thank you for your time and answer. I will try the other way then. Best, Ogers
  • Cinema 4D R20 and Octane 3.08.5 attribute issue

    11
    0 Votes
    11 Posts
    6k Views
    A
    @a_block Hi Andreas, Thanks for your help and you are never too late! That actually makes more sense. Unfortunately I can't seem to replicate the issue again on my machine, as it seems that it's been working for all my updates. I will have a look on one of my team machines when released and see if that could be the problem. Thank you again!