• FieldList.GetCount Bug

    Moved Cinema 4D SDK r21 r20 r19 python
    2
    0 Votes
    2 Posts
    574 Views
    M
    Hi @pyr, I've just reached the development team about it. So for them, this is not a bug since FieldList store only baseLink. In Python, we don't have BaseLink, but if you are not aware of what it is, please read BaseLink Manual. But since there is no BaseLink in Python, if a link points to a destructed object (like in your case, Python simply returns None) So I guess your workaround is ok. Cheers, Maxime
  • BaseShader global vs local filename

    Cinema 4D SDK c++ r19 r20 r21
    6
    0 Votes
    6 Posts
    658 Views
    kbarK
    @C4DS That was the most normal happy smiling glad you solved your issue emoji I could find. Any of the others could definitely have been interpreted in many ways. Hope that one came across alright
  • BaseBitmap.ScaleIt() IS NOT WORKING

    Cinema 4D SDK r21 python
    3
    1
    0 Votes
    3 Posts
    347 Views
    gheyretG
    @C4DS Thank you for your help! It works! Cheers~
  • Content Browser Like Navigation?

    Cinema 4D SDK r21 python
    3
    0 Votes
    3 Posts
    578 Views
    B
    @r_gigante Thanks for the reference. For anyone trying to achieve the same, here is a sample file. https://www.dropbox.com/sh/z1lzyphp8qnt9kw/AAB2P5gNo16IHafgc6xPEsy4a?dl=0 Thanks again for @zipit for the help.
  • 0 Votes
    6 Posts
    654 Views
    r_giganteR
    Hi @C4DS , maybe I wasn't enough clear. you end up with a single merged object, which has 2 selection tags, and both still have the specific name ... but none have the added unique ID. Surely you start to think something is really wrong. Actually you end up in a new mesh with new selection tags which beside having the data copied from the two source selection tags, they are NEW and hence the UniqueID is not supposed to be kept. The names are kept for convenience but I don't see any reason to have also the UniqueID being kept considering that - in the end - they are indeed new instances and have nothing to do with the source selection tags. Cheers, R
  • Trigger on BaseShader change

    Cinema 4D SDK r19 r20 r21 c++
    4
    0 Votes
    4 Posts
    558 Views
    C4DSC
    @m_magalhaes Thanks for reminding me of the GeDialog::CoreMessage. I totally overlooked that.
  • Example of ObjectData in Maxon API only?

    Cinema 4D SDK c++ r21
    2
    0 Votes
    2 Posts
    576 Views
    S
    Hello, this is not possible. ObjectData is a class of the "classic" API. The Maxon API has no equivalent counterpart. You get an overview over plugin types here: Plugin Types. best wishes, Sebastian
  • Commiting Xrefs to the scene

    Cinema 4D SDK r21
    3
    0 Votes
    3 Posts
    930 Views
    ManuelM
    hello, the xref will import the material unless it's on Generator mode. You can maybe juste merge de target document with your current document. This work with a simple scene of course but can go really more complicated. def main(): if op is None: raise ValueError("you have to select at least one object") if not op.IsInstanceOf(c4d.Oxref): raise ValueError("selected object must be a xref") # Starts Undo doc.StartUndo() # if the xref is in generator mode, we need to import the material from the target document. if op[c4d.ID_CA_XREF_GENERATOR]: targetDoc = op[c4d.ID_CA_XREF_FILE] c4d.documents.MergeDocument(doc, targetDoc, c4d.SCENEFILTER_MATERIALS | c4d.SCENEFILTER_OBJECTS, None) else: result = c4d.utils.SendModelingCommand(command = c4d.MCOMMAND_CURRENTSTATETOOBJECT, list = [op] , doc=doc) if result: doc.InsertObject(result[0]) doc.AddUndo(c4d.UNDOTYPE_NEW, result[0]) else: raise ValueError("couldn't retrieves the CSTO of the xref") #remove the existing xref doc.AddUndo(c4d.UNDOTYPE_CHANGE, op) op.Remove() doc.EndUndo() c4d.EventAdd() Cheers, Manuel
  • a few strange errors

    Cineware SDK c++ r21 windows
    3
    0 Votes
    3 Posts
    1k Views
    r_giganteR
    Hi @adlarch, thanks for reaching out us. With regard to your issue, I don't understand if it has been solved or not, since the very first post has been deleted and, after, a reply has been left by you in the thread. Can we delete the thread, or can we restore the initial post to give everybody in the community the chance to understand the scope of the second post? Cheers, Riccardo
  • maxon::LoggerTypes::File()

    Cinema 4D SDK r21 c++ sdk
    3
    0 Votes
    3 Posts
    520 Views
    kbarK
    Thanks Manuel.Adding that lambda did the trick. Working fine now.
  • New subdivision algorithm as a plugin

    Cinema 4D SDK c++ r21
    3
    0 Votes
    3 Posts
    648 Views
    ManuelM
    hello, since r17, some part have change but other remain the same. I would suggest you to first compile the SDK. For that you will need some steps: use the right version of visual studio or xcode, you can find information here[URL-REMOVED] use our project tool to build the solution files. compile a debug versions and a release version. Those should just compile out of the box with no errors. We have a General Plugin Information Manual After that you have to choose a plugin type that fit your need. For your project as @PluginStudent said, an ObjectData (generator) should be the right one. You will find tons of information in our manual for example about the Generator In our sdk (you compiled in first step) there are some example that will help you. You have to register your plugin with RegisterObjectPlugin where you can specify a flag so the generator will pick the child object as an input. About the slider for your parameter you will find information in this page and that manual Of course if you need help we have this forum where you can find a lot of example, information and help. And you can open a new thread for each question you have, we will try to answer them as fast as possible. Cheers, Manuel. [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.
  • 0 Votes
    11 Posts
    2k Views
    r_giganteR
    Well @pyxelrigger thanks for clarifying the final scope. Since, as already stated, folding or unfolding a scene entry doesn't generate any valuable message to be intercepted, the sole - brute force - hack you might try to implement in Python would be to implement a MessageData plugin which constantly checks for the folded/unfolded state of the entries in the scene and eventually delete the unfolded one. This approach carries strong performances penalties to the whole Cinema 4D UI because you need to constantly traverse the scene and depending on the scene size this could strongly affect Cinema performances. If there are no further question please mark the thread as solved. Best, R
  • AddEditNumberArrows Stops Working on Keyed objects

    Cinema 4D SDK r21 python
    12
    0 Votes
    12 Posts
    2k Views
    ManuelM
    hi, no trouble at all, you are here to ask questions, we are here to answer. Cheers, Manuel.
  • BaseLink from cloned document

    Cinema 4D SDK r19 r20 r21 c++
    11
    0 Votes
    11 Posts
    2k Views
    P
    There is no relationship between BaseContainer IDs and plugin IDs. All you need is a unique ID, that you can use as a BaseContainer ID. This forum (the plugin ID page) provides such IDs.
  • How to Check If you are in a Specific Tab?

    Cinema 4D SDK r21 python
    3
    0 Votes
    3 Posts
    332 Views
    B
    @m_adam Thanks. Works as expected.
  • 0 Votes
    9 Posts
    2k Views
    B
    @Dunhou Thanks for the reference but yea I'm unfortunately using the xpresso here instead of the new node editor. Which in all regards, an unfortunate scenario is xpresso is not integrated to the new node editor. @m_adam Gotcha. Thanks. Looking forward to the update.
  • Alembic camera properties

    Cinema 4D SDK python r21
    2
    0 Votes
    2 Posts
    534 Views
    ManuelM
    Hello, Some symbols are not exposed to public. There's no particular reason for that. There's no real place where all exposed symbols are. (and we agree it's could be nice) To know if a BaseObject is a camera (or something) you can use IsInstanceOf You can also send a message using the ID MSG_GETREALCAMERADATA : with an alembic generator you can use this code : camera = doc.GetActiveObject() if camera is None: return if camera.IsInstanceOf(c4d.Oalembicgenerator) == False: return # This example tries to get the internal camera from a generator. # Typically used with the Alembic Generator camera. data = {} data["res"] = None res = camera.Message(c4d.MSG_GETREALCAMERADATA, data) if res: camera = data["res"] print("Camera: " + camera.GetName()) For your next threads, please help us keeping things organised and clean. I know it's not your priority but it really simplify our work here. Q&A New Functionality. How to Post Questions especially the tagging part. I've marked this thread as a question so when you considered it as solved, please change the state Cheers, Manuel
  • Reacting on Treeview user action

    Cinema 4D SDK r21 r20 python
    2
    0 Votes
    2 Posts
    311 Views
    P
    I found a reply here. https://developers.maxon.net/forum/topic/11447/get-message-from-treeview-gui-dialog/2
  • BaseDraw scale

    Cinema 4D SDK r19 r20 r21 c++
    3
    0 Votes
    3 Posts
    541 Views
    rsodreR
    @r_gigante Thanks, I used an inverse scale matrix wen calculating my gizmo points.