• "Cubic Bias" interpolation...

    5
    0 Votes
    5 Posts
    1k Views
    N
    Thanks Ferdinand!
  • Discover when a tag has been disabled

    c++
    4
    1
    0 Votes
    4 Posts
    909 Views
    ferdinandF
    Hello @user168462, Thank you for reaching out to us. You said, "I guess there is no way to observe a tag if you are not implementing it." It depends a bit on how you mean that and how you mean your question in general. @C4DS gave you already a very nice answer (thanks for that). There are basically two scenarios (which effectively will become one): There is a specific BaseTag instance tag where you did not implement the tag type yourself and you want to track changes for that specific tag instance for a specific parameter. There is a BaseTag type t where you did not implement the tag type yourself and you want to track changes of a parameter for all tags of that type in a scene. One might be tempted to solve option 1 by simply storing a pointer to that BaseTag and then periodically look up the tag to track changes. But this will not work due to node reallocation. This problem can be solved by either using the Baselink type or by manually traversing a document tree/graph and identifying nodes by their unique id stored under MAXON_CREATOR_ID. This second approach (traversing the whole document tree) is also what is the solution to option 2. To carry out the periodical checking, the most straight forward option is to the core message EVMSG_CHANGE. You can do this in a MessageData plugin or GeDialog derived GUIs. An alternative approach is to implement a SceneHookData plugin and do the traversing in its Execute() method. TLDR: While the Cinema 4D classic API does not have a dependency graph or a very granular event system, scene changes can be tracked with EVMSG_CHANGE. It is only that it is up to the user to find out if the change that occurred is of relevance as Cinema 4D does not give any context for the cause of EVMSG_CHANGE. Cheers, Ferdinand
  • How to just open a certain window instead of toggling

    python
    3
    0 Votes
    3 Posts
    495 Views
    K
    Hi @ferdinand, I deleted my original post because I realized the question contained my misunderstanding. And now your answer has completely solved the problem I had. Thank you very much for your detailed response!
  • Change FBX Exporter Settings

    python
    3
    0 Votes
    3 Posts
    1k Views
    C
    @m_adam - Now I'm sorry for my late reply! I appreciate you writing this up for me and I think it's a really good reference. This question has been answered then! Another quick question which sort of relates (I can create a new thread if admins want) - Do you have any recommendation for up-to-date C4D Python API training? I'm coming from writing Python in Houdini and Maya, but Cinema 4D seems to have a more unique setup with how to interface with their API. Any training recommendations would be appreciated. Teach a man to fish and... something something fish. Thank you, Clayton
  • Get the preview images from c4d files

    c++ s26
    5
    0 Votes
    5 Posts
    1k Views
    H
    thanks that works.
  • Osubdivisionsurface ?

    python
    4
    0 Votes
    4 Posts
    874 Views
    ferdinandF
    Hey @indexofrefraction, Well, that is because Mograph is one of the areas where the type symbols have not been exposed. So, to be clear: There is no cloner object symbol. But now that you brought this up again, I just realized that we (the SDK Team) never talked about fixing this and I do not see (fully) why. I have a suspicion why this might have been postponed or refuted in the past, but I will bring it up again. In the end we just must add a few defines to ge_prepass.h and then users do not have to jump through these hoops anymore. It will be difficult to catch all the missing symbols, but we could at least start with the ones we know. I will update the thread with the outcome of our discussion. Edit: So, we talked about this, and came to the obvious conclusion, that we should do what we should have done a long time ago, and fix this. I cannot give an ETA, but I will try to give it priority as I think this is a problem which impacts many users. Cheers, Ferdinand
  • Questions about messages (original: 关于消息的问题)

    2
    0 Votes
    2 Posts
    415 Views
    ferdinandF
    Hello @未凡fh, Thank you for reaching out to us. Support on this forum is only being provided in the English language, as this serves our community best, and because we also simply do not speak all languages of the world. I think the language you posted in is Simplified Chinese, please excuse me when I wrong, but that is what Google said. No-one on the SDK Team speaks that language. And even if we would, we would refuse to answer in this language as it would lock out large parts of the community. As we do for requests which come in German, French, or Spanish (languages we do speak). Running your request through Google Translate, I got this: Let me ask: How do I detect an object moving and send a message when an object moves? Please confirm that this is your request and that we can communicate in English. Thank you for your understanding, Ferdinand
  • How can I change the path of a Redshift shader with Python?

    r21 python
    3
    0 Votes
    3 Posts
    878 Views
    ferdinandF
    Hello @conductor, Thank you for reaching out to us. I am glad that you could solve your problem yourself. Please do not hesitate to ask further questions you might have. Cheers, Ferdinand
  • SaveWorldPreferences() in Python

    5
    0 Votes
    5 Posts
    1k Views
    a_blockA
    Hi Ferdinand, thanks a lot! No ETA needed, I'm grateful it will be added eventually. Cheers, Andreas
  • How to Manually Build the Cache for a Vector Import Instance?

    3
    0 Votes
    3 Posts
    631 Views
    I
    works like a charm, thank you!
  • Handling Windows Paths with a Umlaut in Python - Ä.

    r21 python
    3
    0 Votes
    3 Posts
    2k Views
    FSSF
    Eh, this was the first approach i tried, it will map the decoded utf-8 to Windows codepage 1252. (Sorry about the wrong one in the code above). I tried to change the system setting to utf8 but it would not accpet that. Thanks for your help, Maxime
  • Implementing a watermark on render

    c++ windows r21
    6
    0 Votes
    6 Posts
    1k Views
    ferdinandF
    Hello @dunhou, Thank you for reaching out to us. Please read our Forum Guidelines regarding the scope of topics, your question does not seem to be a valid follow-up question to me, and therefore should be its own topic. I also struggle to see how this is an API question, as you seem to report an end-user problem which has nothing to do with one of our APIs. Please contact user support via the Support Center for such questions. Cheers, Ferdinand
  • How to Show Nodes API Nodes in the Node Editor?

    5
    1
    0 Votes
    5 Posts
    785 Views
    DunhouD
    @m_adam Great Help! Thanks a lot for your help, the code works pretty well. I can go further with my works .
  • How to Set Node Spcace use python?

    5
    0 Votes
    5 Posts
    878 Views
    M
    Just a note as mentioned in the documentation BeginTransaction must always be used with the "with" statement, otherwise it could cause Cinema 4D to freeze. Cheers, Maxime.
  • How to change polygon axis

    r21 c++
    5
    1
    0 Votes
    5 Posts
    1k Views
    N
    @ferdinand Thank you very much for your continuous help in the past two days. I just searched axis related content in cafe, and it is confirmed that my idea is wrong. You are a patient and good teacher. Thank you again, Ferdinand.
  • Making a PolygonObject-like object plugin

    python r23 windows
    3
    0 Votes
    3 Posts
    540 Views
    J
    First of all, thanks for your support. It is not possible, at least not without A LOT of work, to implement polygonal geometry that is driven by Attribute Manger parameters and can maintain vertex-by-vertex manipulations of users. You must reimplement all its vertex/edge/polygon interactions OBJECT_POLYGONOBJECT is sort of uncharted territory. That answers my question. My approach was trying if I could use the already implemented geometry interactions and add from that point. Since I found no example for OBJECT_POLYGONOBJECT, thought that could be it, but seems not. If you just want to some information being displayed for objects, I would recommend implementing a tag which does that. If you want to, you could hide that tag from the users view, and also write a plugin which automatically distributes that tag in a scene My plan B was along these lines, with a dialog to show the info. Thanks, Oscar
  • R21 and Python Version

    r21 python
    2
    0 Votes
    2 Posts
    664 Views
    ferdinandF
    Hey @brucek5, Thank you for reaching out to us. The Python interpreter shipped with Cinema 4D is not identical to CPython and it is not intended to be replaced by the user. Technically speaking you could try it, but this would be out of scope of support and will likely also fail. We cannot give instructions on how to do it, you would have to hack your Cinema 4D yourself. It also depends on how much you want to change the Python version. Given that you are on R21, i.e., Python 2.7, and likely want to jump to a Python 3.X version, the answer will change from "practically impossible" to "categorically impossible". Cheers, Ferdinand
  • Copy LayerShader to a new Material

    python
    11
    0 Votes
    11 Posts
    3k Views
    indexofrefractionI
    tx ferdinand, and yes intertwined threads .-)
  • Get Point selection tag center

    c++ r21
    7
    0 Votes
    7 Posts
    1k Views
    N
    @m_magalhaes Thank you, I think I understand
  • Export multiple GLB files via script

    2
    0 Votes
    2 Posts
    442 Views
    ManuelM
    Hi, We have an example on github to export to obj and how to define the parameters, you can find it here You need to retrieve the plugins with its plugin ID GLTFEXPORTER_PLUGIN_ID 1041129 There is no symbol attached for it. Then, you must send the message MSG_RETRIEVEPRIVATEDATA to define the option you want. For each parameter you will find its ID in the following file : \resource\modules\gltf\description\fgltfexporter.res You will find that the parameter you want to change is c4d.GLTFEXPORTER_FILEFORMAT and it should be set to c4d.GLTFEXPORTER_FILEFORMAT_GLB So just like in this line, you will write objExport[c4d.GLTFEXPORTER_FILEFORMAT] = c4d.GLTFEXPORTER_FILEFORMAT_GLB You should be able to clean the code from the obj example and adapt it to your needs. That will help for your thousands of exports. Cheers, Manuel