• Howto trigger CommandData::GetState()

    r20 c++
    5
    0 Votes
    5 Posts
    798 Views
    C4DSC
    I had noticed that the EVMSG_CHANGE was actually triggering the GetState of my CommandDatas, but I was wondering if a different approach was available. Still, I am OK with the EventAdd() solution. Thanks.
  • Find C4D's directory without C4D

    python
    9
    0 Votes
    9 Posts
    5k Views
    merkvilsonM
    Thanks, buddy! But the problem is that the most current one is not a way to go. If the user installed the plugin for R16, then the installer should open R16 itself. I'm trying to find and open it by the name, but the name is always different. It can be Cinema 4D / Cinema 4D R16 / Cinema 4D R16 Demo / Cinema 4D Demo / etc. Well. This is considerably easier on windows since I can check if it exists by using os.path.exists() function, but I have no Idea how to do this on Mac.
  • Updating C4DThread code to C4D R20

    7
    0 Votes
    7 Posts
    1k Views
    K
    @s_bach Aha! That helps! I will see how this works this weekend.
  • Calling Bevel tool and setting parametrs

    python r19 sdk
    9
    0 Votes
    9 Posts
    2k Views
    M
    settings[c4d.MDATA_BEVEL_RADIUS] = 0.5 Works fine here.
  • Multiple bool undo problem

    c++ r20
    2
    0 Votes
    2 Posts
    399 Views
    r_giganteR
    Hi Roger, thanks for reaching out us. With regard to the reported behavior, I'm able to reproduce it either with a custom ObjectData and the ordinary Cinema 4D standard tools (like cube generator and the Fillet option). But there's more: if the undo operates on a parameter whose values is currently equal to its initializing value, the undo is simply ignored. This can be easily tested and verified by initializing the BOOL parameter used in the resource to true in the ObjectData::Init(): as you will see the result is simply the opposite of your reported case. To me the behavior is consistent but I will check with the team responsible and see if it can be considered a bug. Best, Riccardo
  • SaveDocument() file name character limit?

    python windows r19
    3
    0 Votes
    3 Posts
    733 Views
    .
    Problem was with the total path length versus the file name length. 256 characters for the entire path and filename.
  • retrieve data from multiple cloners in python

    Moved
    10
    0 Votes
    10 Posts
    3k Views
    P
    Thank you @m_adam it's really helpful! I was going to a wrong direction. I chose to do a project that has every new aspect to explore :)) I will for sure disturb you in future with my questions. I appreciate your suggestions. Parvin
  • Copy link object

    r20 c++
    4
    0 Votes
    4 Posts
    948 Views
    M
    Hi, the topic is now marked as solved, did you solve your issue? The only workaround I was able to find is to make use of AddToExecution and define it to GENERATOR+1, here you retrieve and clone the cache of the linked object in a member variable of your instance, then in the next GVO you make use of this cache, but this has the application that you work always on a mesh that has been generated in a previous SceneExecution call, which may be an issue in case of animation. Cheers, Maxime.
  • Tag plugin and Dirty check

    r20 python
    5
    1
    0 Votes
    5 Posts
    821 Views
    P
    I create a workaround that is working. I think, like you say, that the Subdivision Surface is not ok, when I initially load the scene. I now get the polygon object under the sss and that works.
  • Problem on AddUndo and SendModellingCommand (Weld Tool)

    r20 python
    3
    0 Votes
    3 Posts
    789 Views
    B
    Thanks @m_adam Works as expected. Have a great day ahead!
  • How to use object plugin to get data from my tag plug-in

    c++
    3
    0 Votes
    3 Posts
    789 Views
    M
    @s_bach Thank you for your answer!
  • IsEqual not defined

    r20 c++
    3
    0 Votes
    3 Posts
    578 Views
    C4DSC
    @m_magalhaes said in IsEqual not defined: MAXON_OPERATOR_EQUALITY(Int32Pair, a, b); Thanks, didn't know about the MAXON_OPERATOR_EQUALITY. Very handy indeed. However, I had already tried providing an equality operator in my Int32Pair class, as such: Bool operator == (const Int32Pair& other) { return (a == other.a) && (b == other.b); } But that still resulted in the "IsEqual not defined" compiler error. The macro, however, is working fine. Looking further at my implementation of operator==, I now notice I didn't declare it as a const method. Adding the const does get rid of the compiler error. Oh boy! Overlooked a minor "typo", with major consequences. Again, thanks for the macro.
  • How to get InExcludeData in ModifyObject

    r20 c++
    4
    0 Votes
    4 Posts
    824 Views
    M
    @m_magalhaes Thank you for your answer. really helpful!
  • Tag used on multiple objects.

    python r20
    6
    0 Votes
    6 Posts
    965 Views
    P
    Read() and Write() works. Thanks.
  • Baking textures for PBR object

    2
    0 Votes
    2 Posts
    843 Views
    r_giganteR
    Hi krftt thanks for reaching out us. With regard to your question, if the intent is to bake the final appearance of a PBR material on a texture, I confirm that there are no means to achieve this considering that the baked data will also be camera-dependent. If, on the contrary, your goal is to sample the shader used in any of the reflection layers used in a PBR material you can consider BaseShader::Sample() and, given a ChannelData, retrieve the color at a specific point - see this thread. To browse through the different channel you can use something like: # check for an active material mat = doc.GetActiveMaterial() if mat is None: return # retrieve the reflection layers count layersCount = mat.GetReflectionLayerCount() # loop through the layers for i in xrange(layersCount): # get the ReflectionLayer instance and the related data ID reflLayer = mat.GetReflectionLayerIndex(i) reflLayerData = reflLayer.GetDataID() # check for the instance to be the one currently active in the Attribute Manager if reflLayer.GetFlags() & (c4d.REFLECTION_FLAG_TAB): # retrieve the color color = mat[reflLayerData + c4d.REFLECTION_LAYER_COLOR_COLOR] # try to retrieve the shader colorShader = mat[reflLayerData + c4d.REFLECTION_LAYER_COLOR_TEXTURE] # do something with the data retrieved if colorShader is None: print "Selected layer is ", reflLayer.GetName(), "and uses color: ", color else: print "Selected layer is ", reflLayer.GetName(), "and uses shader: ", colorShader.GetName() Best, Riccardo
  • How to updata message when i save data in NodeData::Message

    r20 c++
    4
    0 Votes
    4 Posts
    904 Views
    M
    @r_gigante Oh!Thank you!The plug-in ID is the reason for the problem,use another shorter number and everything is ok. Thank your for your help!
  • modulo - behind the scenes

    r19 r20 c++
    3
    0 Votes
    3 Posts
    550 Views
    C4DSC
    Thanks for the info.
  • Unable to kill my C4DThread

    8
    0 Votes
    8 Posts
    2k Views
    r_giganteR
    Hi Mafster, thanks for following up. The documentation here properly indicates that passing no parameter to Wait() is passing True. Long story short, this value is required in order to avoid Cinema being stuck on waiting for the thread to end. Hoping this helps in solving the issue, give best. Riccardo
  • Python - Cinema 4D R20.057 - Export to Alembic without Dialog

    python r20
    6
    0 Votes
    6 Posts
    2k Views
    P
    Yes it is! Thank you very much!
  • Problems of copying position keyframs to another obj

    5
    0 Votes
    5 Posts
    1k Views
    Q
    @m_adam Thank you for another detailed answer !