• Unique Tag ID

    Cinema 4D SDK python
    9
    0 Votes
    9 Posts
    1k Views
    M
    Hi, issue about hashing byteseq is fixed in R21.1 SP1. Cheers, Maxime.
  • Cloner objects missing in Commandline FBX export

    Cinema 4D SDK python
    7
    0 Votes
    7 Posts
    2k Views
    ManuelM
    hello, this thread will be considered as "solved" tomorrow if you have nothing to add. Cheers, Manuel
  • Calling a Python plugin from C++ PluginStart()

    Cinema 4D SDK r21 c++ python
    4
    0 Votes
    4 Posts
    691 Views
    M
    If it's only a question of executing python, why not directly execute python from C++ using the python library? #include "c4d.h" #include "lib_py.h" PythonLibrary pylib; pylib.Execute("import c4d\nprint 'From Python:', c4d.GetC4DVersion()"_s); Note that in R20 the python.framework was released, and should be used for the future. The old python library (since R15) is still there and still works, but take care that in a future release it may disappear since everything that was possible and even more is now possible with the python.framework. For more information see Python Page. Cheers, Maxime.
  • utils.ViewportSelect() Problem

    Cinema 4D SDK r19 r20 r21 python
    5
    0 Votes
    5 Posts
    1k Views
    gheyretG
    @zipit Thank you man ! I see how to fix it now!~~ Cheers harry
  • Styling BitmapButtons

    Cinema 4D SDK python
    5
    1
    0 Votes
    5 Posts
    2k Views
    M
    Hi, this is fixed in R21.1 SP1. Cheers, Maxime.
  • Iterating trough Field list?

    Cinema 4D SDK python r20 r21
    6
    0 Votes
    6 Posts
    2k Views
    ManuelM
    hello, I've forked the question to this thread cheers, Manuel
  • Dialog refresh works correct in R18... not in R21 ?

    Cinema 4D SDK python r21
    12
    0 Votes
    12 Posts
    2k Views
    M
    @m_magalhaes Epic, It works! Thank you very much Manuel!
  • R21 Console Bug?

    Cinema 4D SDK r21 python
    9
    0 Votes
    9 Posts
    1k Views
    r_giganteR
    @bentraje actually there's nothing to get fixed in the future, since it can't be reproduce with a clean installation. Please give it a try with a clean installation and if you're able to achieve the issue and provide us with the steps, we'll look into it. Thanks, Riccardo
  • Writing data to the .c4d file

    Cinema 4D SDK r20 python
    26
    0 Votes
    26 Posts
    16k Views
    ?
    @m_magalhaes said in Writing data to the .c4d file: You can also use del that is pythonic bc = doc.GetDataInstance().GetContainerInstance(MyUniqueId) bc.RemoveData(2000) #del (bc[2000]) Wonderful, @m_magalhaes , thank you so much!
  • 0 Votes
    4 Posts
    649 Views
    S
    Hello, there is no thing as mouse direction. The mouse has a position. The direction is the result of comparing two mouse positions. as @zipit stated, you can create a tool that implements MouseInput(). Within MouseInput() you can use ViewportSelect.PickObject() to check what object and what point the mouse is currently over (Using BaseView.SW()). You can store the previous mouse position and compare it to the current mouse position to calculate the direction. Unfortunately, there is an issue with the Python version of PickObject() (How do I find the z-depth with Python ViewportSelect.PickObject()?), so you might have to implement your idea as a C++ plugin. You find some code in the pickobject.cpp example. best wishes, Sebastian
  • Detect if inside the Material Editor

    Cinema 4D SDK python r19 r20 r21
    2
    0 Votes
    2 Posts
    334 Views
    ferdinandF
    Hi, check RENDERFLAGS (Link). You will have listen in NodeData.Message() for them. I never did use this, but checking for RENDERFLAGS_PREVIEWRENDER sounds promising. Cheers zipit
  • 0 Votes
    10 Posts
    2k Views
    L
    @m_adam said in How to get mouse drag info from external through Python API?: Hi sorry about the confusion of server.close I was referring to self.sock.close. After some tests the main issue with your code is currently recvfrom is blocking, meaning until it receives something all the code is blocked, so TestBreak is never called and the thread never ends. So using timeout solve the issue. import c4d import socket class A(c4d.threading.C4DThread): sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) end = False def Main(self): self.sock.bind(("localhost", 20014)) while True: # use timeout to check for TestBreak() try: self.sock.settimeout(1.0) self.sock.listen(1) conn, addr = self.sock.accept() # connection print('Connection address:' + str(addr)) data = conn.recv(BUFFER_SIZE) if not data: print("Got no data.") break else: print("received data:" + str(data)) print str(data) self._data = str(data) # DO SOMETHING conn.close() # timeout except: if self.TestBreak(): self.sock.close() self.End() return continue self.sock.close() if __name__ == "__main__": threadedServer = A() threadedServer.Start() Cheers, Maxime. Awosome, the whole script works very well now, thanks man, you help me quite a lot! mua~
  • Highlight Hover on GeDialog Buttons?

    Cinema 4D SDK python r21
    4
    0 Votes
    4 Posts
    912 Views
    B
    @zipit and @m_magalhaes Thanks for the confirmation. Will close this thread for now. Will just ask separate question on GeUserAreas.
  • Inserting an Image Shader into a Dynamic Slot

    Cinema 4D SDK r20 python
    6
    0 Votes
    6 Posts
    1k Views
    S
    @blastframe said in Inserting an Image Shader into a Dynamic Slot: This is the C++ code of the shader: Hello, just to make things clear: the above snippet is NOT the "C++ code of the shader". It is the resource parameter description, that defines the parameter types and layout. See Description Resource. best wishes, Sebastian
  • AttributeError: 'list' object has no attribute 'FindTrack'

    Cinema 4D SDK
    10
    0 Votes
    10 Posts
    2k Views
    A
    @m_magalhaes Thanks. Next time I will follow the instruction. Thanks
  • Dynamically Import All Python Files

    General Talk r21 python
    5
    0 Votes
    5 Posts
    2k Views
    B
    @m_adam Thanks for the additional insight and the related links. Appreciate it a lot.
  • Transparency of GeDialog?

    Cinema 4D SDK r21 python
    8
    0 Votes
    8 Posts
    2k Views
    i_mazlovI
    Hi James, from my side there's nothing to add to Gheyret's answer. As of now there's no such option to achieve transparency of the GeDialog. Using third-party libraries could be a potential option, but we don't provide any support for this case. Cheers, Ilia
  • Move object axis problem in python

    Cinema 4D SDK python
    9
    1
    0 Votes
    9 Posts
    2k Views
    gheyretG
    @r_gigante Yes! It's really helpful.
  • 0 Votes
    19 Posts
    3k Views
    S
    Hello, as said before, it is not the purpose of GetVirtualObject() to edit the scene or to edit elements of the scene; this includes materials.