• 0 Votes
    9 Posts
    1k Views
    ferdinandF
    Hello @jenandesign, without any further questions we will consider this topic as solved by Friday, December the 17th. Thank you for your understanding, Ferdinand
  • Changing VideoPost leads to TypeError

    Cinema 4D SDK r25 windows python
    4
    0 Votes
    4 Posts
    463 Views
    ?
    @m_magalhaes Yes, I think the error was because Octane was the result of rdata.GetFirstVideoPost() and those symbols don't exist in it. If I check for the Viewport Renderer, it seems to work fine. Thanks for the reply and symbol tip!
  • 0 Votes
    4 Posts
    1k Views
    ferdinandF
    Hello @yaya, without any further questions we will consider this topic as solved by Friday, December the 17th. Thank you for your understanding, Ferdinand
  • Visibility Red Button

    Cinema 4D SDK python
    6
    0 Votes
    6 Posts
    1k Views
    ferdinandF
    Hello @WDP, when there are no further questions, we will consider this topic as solved by Wednesday, December the 1st. Thank you for your understanding, Cheers Ferdinand
  • How to Rotate an Object

    Cinema 4D SDK r25 s24 r23 python macos windows
    7
    0 Votes
    7 Posts
    2k Views
    ferdinandF
    Hello @WDP, this question would technically also be a new topic, please follow these rules. There is no formal notion of an object axis in the sense of a moveable entity in the API. Objects have their matrices (the global and the local one), which are effectively their own coordinate system opposed to the world coordinate system (or transform or frame when you prefer these terms over coordinate system). So, when you want to reproduce what is possible in the app, and move, rotate, or scale the axes of an object, without moving the geomtery of the object itself, then you will have to transform the vertices of that object. So, when the object has the world offset (0, 0, 0) and you want to move the axes to (100, 0, 0), you must first set the global object matrix to an offset of (100, 0, 0) and then apply the inverse of a transform that translates by (100, 0, 0) to all its vertices. I would recommend reading the matrix manual I did post in my first answer here. This will however only be possible for editable point objects, e.g., a c4d.PolygonObject. You are showing a generator object, i.e., a c4d.BaseObject with some cached geometry in your screenshot. You cannot move the axes for these objects, neither in the SDK nor in the app itself. We had recently this topic which dealt with moving the axes of a polygon object. Cheers, Ferdinand
  • 0 Votes
    11 Posts
    2k Views
    ferdinandF
    Hey @HerzogVonWiesel, There is nothing that is strictly illegal to do with Script Manager scripts, but threading is not supported. Scripts are intended to be little blocks of code that run and while they run block the execution of other things. They are not intended to spawn dialogs which then dangle forever without an owner. Because when the user closes a dialog, it is not deallocated (because dialogs can be re-opened). This contrasts for example with a node, tool, or command plugin, which always sit there and do stuff even when they are not the focus of things. When they own a dialog, it is bound to the plugin instance and when properly implemented, the plugin also uses one dialog which is simply opened and closed instead of allocating a new dialog for each execution. In the end you can do pretty much anything with scripts, but you should avoid the c4d.threading module and async dialogs. There might be a minor feature I am overlooking here, but the yardstick is async execution. When something is async in nature it might not work properly in Script Manager scripts. edit: You should also avoid (attempting) to draw into a viewport from a script, or more precisely, manipulate the draw buffer of a BaseDraw. Cinema 4D won't let you do this anyways but there might be cases where you can still mess up things when you add drawing instructions. Getting information, e.g., calling myBaseDraw.GetDisplayFilter() or doing other things which are not drawing instructions is fine. You can also manipulate the parameters of a BaseDraw or switch the camera. Cheers, Ferdinand
  • How do I put objects into the timeline?

    Cinema 4D SDK r23 python
    5
    0 Votes
    5 Posts
    920 Views
    ferdinandF
    Hello @Cairyn, thank you for reaching out to us. Clarification: I am not looking for the iteration of objects, for the selection, or for the folding. Just for the method that will show the object/the track in timeline xxx. I wouldn't mind if someone could confirm that there is no access at all to the Timeline elements, or present an alternative...) You can add BaseList2D to a Timeline Manger by simply adding a CTrack to them. But you are probably after the special case where an object is being placed by drag and drop into a Timeline. This is a special case since the object has then no track. When you delete the last track of an object in a Timeline, then the object will be removed. This makes the drag and drop case a special case. Internally, the objects of a Timeline Manager are tracked in a list-like structure which is populated by traversing a document and events like object creation or drag and drop. It will automatically ingest all BaseList2D that have a track (and remove such that do not have tracks anymore). Nodes without a track that have been dragged and dropped into a Timeline are added "manually" to that list without being deleted. This works as far as I understand with a GeMarker being added to them. So technically, one might be able to replicate this in C++ by also adding that marker, but its content is not public and might carry other side effects. What I found out while playing around with tracks, is that one can add "fake" tracks by either completely making up a track id, which are then called just "track", or incomplete ids, e.g., for the position of an object. This could serve as a clean slate if desired but could also have side effects. [image: 1636374366235-ac3dd38c-8e5d-4f48-a3cd-941ae2c987cc-image.png] descId = c4d.DescID(c4d.DescLevel(c4d.ID_BASEOBJECT_REL_POSITION, c4d.DTYPE_VECTOR, 0)) track = c4d.CTrack(op, descId) op.InsertTrackSorted(track) c4d.EventAdd() Preventing the object being removed from the Timeline when deleting its last track is not possible in Python. At least I do not see a way to do it at the moment. Cheers, Ferdinand
  • Cutome Render Token do not update Filename each Frame

    Cinema 4D SDK
    11
    1
    0 Votes
    11 Posts
    2k Views
    ferdinandF
    Hello @nason, without any further questions we will consider this topic as solved by Friday, December the 17th. Thank you for your understanding, Ferdinand
  • Python Objekte X Y Z

    Moved Cinema 4D SDK python r21 windows macos
    8
    0 Votes
    8 Posts
    2k Views
    W
    Thank you very much!
  • R25 - Modal dialog's Color Chooser issue

    Moved Bugs python
    3
    2
    0 Votes
    3 Posts
    928 Views
    A
    Hi, thanks for the information. Hopefully it will get fixed in the future updates. Cheers, Arttu
  • R24.111: shiboken2 fails to load (Win10)

    General Talk python s24
    3
    1 Votes
    3 Posts
    909 Views
    ferdinandF
    Hello @jcooper, thank you for reaching out to us. First of all, I must point out that what you are trying to do is out of scope of support. We cannot support third party libraries as stated in our Forum Guidelines and we especially cannot support third party GUIs. The little help I can give you here is to say: There is currently a bug in R25 which will cause faulty installations when using pip and having a vanilla CPython installation of the same version on the system. The installation itself will work fine, but the import paths of both Pythons will become entangled in this case due CPython having some hardcoded import paths in its code pointing to the user directories. We have fixed this problem and the fix will be delivered with an upcoming release. You can check this easily by checking the installation paths of modules with the ```fileattribute of the module. When you are encountering the problem, it will be pointing towards yourCPython`` site-packages and not the one from Cinema. There is not much what you can do to fix this yourself (aside from monkey-patching our Python yourself). There is more than sys.path in Python, there is also sys.meta_path and relative imports, so just being able to import other packages in the same path is no guarantee that everything is fine. I cannot say much more with the given little information, and we can unfortunately also not support third party libraries. You should check if indeed is everything installed in the correct location. The problem you have could be related to what I describe under 1., but that bug did exist for quite some time, so it should have failed before. Cheers, Ferdinand
  • Ensuring only 1 specific pyTag in a document?

    Cinema 4D SDK python r20 s24
    9
    0 Votes
    9 Posts
    1k Views
    ferdinandF
    Okay, thanks for the heads up
  • How to set a Shader for Roughness ????

    Cinema 4D SDK windows python r23
    7
    0 Votes
    7 Posts
    1k Views
    B
    @Dunhou @ferdinand Gotcha. Thanks for the confirmation and illustration links.
  • 0 Votes
    3 Posts
    746 Views
    ferdinandF
    Hello @Артём, we will set this topic to 'Solved' when there are no further questions or replies until Monday, November the 22th. Thank you for your understanding, Ferdinand
  • How to get Data unit

    Cinema 4D SDK r21 python
    3
    1
    0 Votes
    3 Posts
    411 Views
    chuanzhenC
    @ferdinand Thanks,great!
  • GeDialog Button Highlighted By Default

    Cinema 4D SDK r25 python sdk windows
    3
    1
    1 Votes
    3 Posts
    333 Views
    ferdinandF
    Hello @blastframe , we will set this topic to 'Solved' when there are no further questions or replies until Monday, November the 22th. Thank you for your understanding, Ferdinand
  • Noob wants to load custom palette

    General Talk python
    3
    0 Votes
    3 Posts
    624 Views
    R
    @cairyn Thanks a lot ... it works!
  • Cinema4D GeDialog Not Updating.

    Cinema 4D SDK python
    3
    3
    0 Votes
    3 Posts
    472 Views
    E
    Thanks for your prompt Reply, I was able to debug the whole thing yesterday, I don't know what to do with this post now though.
  • 0 Votes
    5 Posts
    2k Views
    ferdinandF
    Hello @HolgerBiebrach, we will set this topic to 'Solved' when there are no further questions or replies until Monday, November the 22th. Thank you for your understanding, Ferdinand
  • Constant tracking of object position with Python

    Cinema 4D SDK python r23
    5
    0 Votes
    5 Posts
    776 Views
    D
    Hello @ferdinand , this example was perfect for me, thank you very much!