• Get active object after random value

    Cinema 4D SDK python r19
    8
    0 Votes
    8 Posts
    1k Views
    W
    @m_magalhaes said in Get active object after random value: The problem here is that Message() is called before Main() (nothing you can changed) Hello. Thank you so much. I've understood. Yea, it works. I'd break my mind to understand it by myself. So, then I gonna optimize drawcalls (don't know how to call it another) of LaunchUpdate() func
  • Limit the number of executions of an object plugin.

    Cinema 4D SDK
    5
    0 Votes
    5 Posts
    921 Views
    mfersaouiM
    @s_bach Sorry, I just saw your message. the replies notifications was disabled. Thank You!
  • Hide tag from host object's tabs

    Cinema 4D SDK c++ r19
    3
    0 Votes
    3 Posts
    481 Views
    rsodreR
    @m_magalhaes Ok, thanks
  • From edge to polygons

    Cinema 4D SDK c++ r19 r20
    5
    0 Votes
    5 Posts
    1k Views
    C4DSC
    @C4DS said in From edge to polygons: storing a pair of (4 * polygon + edge) values ... it will be. Thanks for the confirmation
  • SOLO button - viewport very slow

    Cinema 4D SDK windows r19
    2
    0 Votes
    2 Posts
    510 Views
    ManuelM
    hello, we are sorry to hear that. Unfortunately this forum is for maxon API support and for every thirds party developers. Your issue look like a bug or something, you have to use this platform instead side remark : As this is your first post i would also like to point you to this topic I've set this up this time but it is important, that will help us and the community. Cheers Manuel
  • BaseContainer and range-based loop

    Cinema 4D SDK r20 r19 c++
    7
    0 Votes
    7 Posts
    1k Views
    C4DSC
    @m_magalhaes Ah! However, I had preferred it was me who had overlooked these all those years. As this means I will still need to find a different solution for pre-R20 compatibility.
  • Force cache rebuild in python

    Cinema 4D SDK r19 r20 python
    5
    0 Votes
    5 Posts
    1k Views
    rsodreR
    @m_adam Thanks Maxime. Your example really shows that the cache must be built independent of how much processing it takes. Leaves me knowing that there must be something wrong on my modifiers, and indeed there was. I was checking if bt != nullptr inside ModifyObject(). I remember I copied this from some example, and it was interrupting the modifier to process. When the script is over, it would fire again with bt filled and finish deforming.
  • Melting Edges

    General Talk
    3
    0 Votes
    3 Posts
    742 Views
    R
    Thank you so much. I was thinging that I had to provide an edge index. Never thought that it would just require to select the points that define the edges. Great!!!
  • 0 Votes
    2 Posts
    561 Views
    Leo_SaramagoL
    I figured it out. The missing piece is a listener that's supposed to be added in main(), something like: def main(): obj = op.GetObject() bc = c4d.BaseContainer() obj.AddEventNotification(op, c4d.NOTIFY_EVENT_MESSAGE, 0, bc) The reason why this was not so obvious earlier today is that I read somewhere that there was no need for adding listeners in main(), that I would be adding unnecessary tasks. This is probably my fault, I may have misinterpreted or assumed things from a different context. But, to my defense, I must say that the code that works has no listeners in it. Have a look! Well, this is where it gets tricky: the listener code had been there indeed, but I had erased it after a few iterations(because I thought it was overkill). This means that the listener is still working despite the fact that I had it erased from the Python Tag code, in other words, it's garbage. I hope this helps other users as well as the Maxon team(you guys rule!) Thanks for your time, Leo
  • 0 Votes
    4 Posts
    1k Views
    Leo_SaramagoL
    @m_magalhaes said in User Data button Python Tag r19 - avoid "index out of depth" console feedback: if desc_id.GetDepth() > 1 Thanks a lot, Manuel! It's perfect now.
  • problems with CAWeightMgr

    Cinema 4D SDK r19 python
    5
    0 Votes
    5 Posts
    1k Views
    R
    Hi Manuel, perfect - in the Script Manager everything works as expected. Running the code via python tag isn't important to me - I just wasn't aware of this difference ScriptMgr <> PythonTag concerning the execution of the code. Thanks a lot for your solution ! Cheers, Jens
  • ObjectData plugin Draw() question

    Cinema 4D SDK python r19
    4
    0 Votes
    4 Posts
    1k Views
    chuanzhenC
    @m_magalhaes Thanks,i will try to use C++
  • Reusing customGUI in different plugins

    Cinema 4D SDK r20 r19 c++
    2
    0 Votes
    2 Posts
    462 Views
    ManuelM
    hello, while RegisterCustomGuiPlugin could be called in all your plugins, the issue is that you will have a message in the console indicating that the id is already used / in conflict. So you can check, as you stated, if the library is already installed with IsLibraryInstalled or using FindPlugin and only register and install the library if you find nothing. The load order here should not be a problem as all modules should be loaded before you need to call anything related to the UI. Instead of FindPlugin,for CUSTOMDATATYPEPLUGIN or RESOURCEDATATYPEPLUGIN you can use FindCustomDataTypePlugin or FindResourceDataTypePlugin Cheers Manuel
  • Convenience function for Combobox

    Cinema 4D SDK r19 python macos
    5
    0 Votes
    5 Posts
    1k Views
    S
    Thank you again, @m_adam! I ended up using the C++ method, and it worked like a charm. Also, I appreciate the link to the *args and **kwargs at pythontips.com. It was very helpful to understand those concepts. I do have (many) more questions, but I'll start new posts since they're not related to this topic. My Best, Eric
  • Sampling some object's material color channel

    Cinema 4D SDK c++ r19 r20
    7
    0 Votes
    7 Posts
    1k Views
    rsodreR
    @r_gigante Nice one, thanks!
  • Ignore missing plugins - NodeData

    Cinema 4D SDK r19 r20 c++
    8
    0 Votes
    8 Posts
    1k Views
    S
    Hello, I don't think you have to do anything else in Write(). WriteObject() should only write the nodes that you inserted into the list head. If you don't add outdated nodes to your list head, they are not written into the file. best wishes, Sebastian
  • 0 Votes
    4 Posts
    1k Views
    jochemdkJ
    OK, I feel pretty stupid now... I was so busy with the specific way I used the script in the past, I forgot about the animation part So, I'll try to find some time soon to get the code up and running for animation. So my main function will be larger than "pass"
  • Calling Bevel tool and setting parametrs

    Cinema 4D SDK python r19 sdk
    9
    0 Votes
    9 Posts
    2k Views
    M
    settings[c4d.MDATA_BEVEL_RADIUS] = 0.5 Works fine here.
  • modulo - behind the scenes

    Cinema 4D SDK r19 r20 c++
    3
    0 Votes
    3 Posts
    550 Views
    C4DSC
    Thanks for the info.
  • Frame selected objects correctly in camera

    Cinema 4D SDK python r19
    13
    0 Votes
    13 Posts
    3k Views
    r_giganteR
    Thanks a lot @AndreAnjos for sharing the code. I'll try to have a look at it and maybe contribute if/where needed. For the time being I'm glad to hear that you were able to tackle with it. Cheers, Riccardo