• GetActiveObjects(flags)

    Cinema 4D SDK python r20
    3
    0 Votes
    3 Posts
    597 Views
    P
    @s_bach Ok, Thanks.
  • One to rule them all...

    Moved General Talk
    3
    0 Votes
    3 Posts
    991 Views
    M
    HI Andreas, no worries, this question was not exclusively targeted at Maxon, the opposite is the case. I was hoping for some information by other users here, like @kbar or even @m_adam (back in the days Maxime was not associated with Maxon. ;)) Meanwhile, I'm going to build a toolchain and see what works for me. I'll report back here if I have something to show. That may help someone else.
  • Blit to MultipassBitmap GeClipMap not working

    Cinema 4D SDK r20 c++
    15
    0 Votes
    15 Posts
    2k Views
    C4DSC
    @r_gigante While doing some code cleanup to add new features to a plugin, I noticed some comments regarding this particular topic. The comment mentioned the need for a workaround since the Blit() functionality on Windows was faulty. Problem with Blit() and MultipassBitmap still occurs after switching to Visual Studio 2017, Windows 10, running R20.059
  • 0 Votes
    3 Posts
    711 Views
    B
    Hi Sebastian! Turns out my issues are two seperate, but equally self inflicted problems Inserting and activating works as expected, I am blocking the update with some custom UI stuff so I will have to find a solution for that. Calling EventAdd() in the closeEvent of the UI doesn't do anything. Is there another way to force Cinema to update everything? Killing the document not only doesn't update, but actually crashes Cinema, because I am trying to kill the document from within a callback that is reacting to MSG_DOCUMENTINFO_TYPE_LOAD. I am doing some more involved environment management and sometimes I have to close a document after loading. I have a workaround that will have to do for now. In the callback I change the document path to a string I can then look for in EVMSG_CHANGE. When I detect my string there, I can then kill the document. It's not very elegant and if anyone has a better solution I would be very happy, but otherwise consider this problem solved
  • Render from picture viewer programatically

    Cinema 4D SDK r20 python windows
    2
    0 Votes
    2 Posts
    591 Views
    r_giganteR
    Hi mafster, thanks for reaching out us. With regard to accessing images being available in the Picture Viewer, I'm sorry to confirm that there is no PictureViewer-related classes/functions exposed in the API. This is valid for both C++ and Python API. Best, Riccardo
  • 0 Votes
    4 Posts
    1k Views
    a_blockA
    Hi, good we got you going It is not wrong per se to use multiple plugin directories. Actually Cinema 4D R20 was specifically designed to have multiple ones. You just need to make sure not to have duplicate plugins in these directories. Cheers, Andreas
  • GetRealSpline() not returning a result

    Cinema 4D SDK c++ r20 sdk
    13
    0 Votes
    13 Posts
    4k Views
    ManuelM
    hello, @baca To help us keep things clear and organized (and tracked), can you please open your own thread referring to this one and ask your question there. Thanks and Cheers. Manuel
  • 0 Votes
    4 Posts
    1k Views
    CairynC
    @bentraje Yeah, the second part was meant just in case you have need for a manual process. GetModelingAxis() takes multiselections of elements into account. However, I believe GetModelingAxis() works by selected mode (as you can have different selections for points, polys, and edges in parallel depending on whether the point, poly, edge, or object mode is active. So if you explicitly need the point selection and use the method in a script, you may want to switch to the point mode before using GetModelingAxis(). (Also, the actual modeling axis can be changed by the tools, so caution is in order. Personally, this is the behavior I needed, so I didn't make any big experiments.)
  • 0 Votes
    2 Posts
    666 Views
    P
    Together with the help from the c4dlounge.eu forum the issues is solved. The main issue was I did not read the manual good enough. "Note that Size symbolizes the axis size and not the expansion of the object itself. For planar projections, the true dimension is the two/fold of the axis length."
  • 0 Votes
    6 Posts
    1k Views
    B
    @Cairyn Interesting "(not just on every frame but far more often)" I guess for now I guess I'll just do it in piecemeal. Other parts in Xpresso nodes and the other python tag. Thanks for the tip on the Python nodes on the Xpresso editor. Haven't tried it. I would go for the pure Xpresso set-up but its a bit finicky to set-up such as identifying where the node sits in the xpresso editor otherwise it sits on top of each other (An automatic layout command would be nice). @m_adam Thanks for the reference!
  • 0 Votes
    3 Posts
    609 Views
    M
    This issue is now fixed in R21. So you don't need to manually SetDirty / Send the message. Cheers, Maxime.
  • 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

    Cinema 4D SDK python r19 r20
    5
    0 Votes
    5 Posts
    961 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
  • Triangulate geometry when exporting a fbx

    Cinema 4D SDK r20 python
    2
    0 Votes
    2 Posts
    888 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

    Cinema 4D SDK r20 python
    2
    0 Votes
    2 Posts
    789 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.
  • Universal "Undo" to Rule them All?

    Cinema 4D SDK r20 python
    15
    0 Votes
    15 Posts
    5k 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!
  • Damaged block

    Cinema 4D SDK r20 c++ macos
    4
    0 Votes
    4 Posts
    872 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
  • Registering tokens in python

    Cinema 4D SDK windows python r20
    4
    0 Votes
    4 Posts
    894 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
  • 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!
  • 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!