• utils.ViewportSelect() Problem

    r19 r20 r21 python
    5
    0 Votes
    5 Posts
    973 Views
    gheyretG
    @zipit Thank you man ! I see how to fix it now!~~ Cheers harry
  • Make editable an object generated by GetVirtualObjects()

    python
    19
    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.
  • How to get mouse drag info from external through Python API?

    Moved
    10
    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~
  • Do Cinema 4D and c4dpy use different lists of plugins?

    4
    0 Votes
    4 Posts
    1k Views
    M
    This issue is now fixed in R21. Cheers, Maxime.
  • Is there any way to get mouse drawn direction information?

    python r19 r20 r21
    4
    1
    0 Votes
    4 Posts
    634 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
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    7 Views
    No one has replied
  • MAXPORTS GraphView Flags - Description Resource

    c++ sdk
    4
    0 Votes
    4 Posts
    723 Views
    mfersaouiM
    @m_magalhaes said in MAXPORTS GraphView Flags - Description Resource: sdk.zip Hello, Yes I want to dynamically change the "limit" of the UI depending on other parameters. Thank you for the ZIP example.
  • Inserting an Image Shader into a Dynamic Slot

    r20 python
    6
    0 Votes
    6 Posts
    941 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
  • Move object axis problem in python

    python
    9
    1
    0 Votes
    9 Posts
    2k Views
    gheyretG
    @r_gigante Yes! It's really helpful.
  • Detect if inside the Material Editor

    python r19 r20 r21
    2
    0 Votes
    2 Posts
    332 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
  • Highlight Hover on GeDialog Buttons?

    python r21
    4
    0 Votes
    4 Posts
    863 Views
    B
    @zipit and @m_magalhaes Thanks for the confirmation. Will close this thread for now. Will just ask separate question on GeUserAreas.
  • Detecting TriState

    c++ r19 r20
    9
    0 Votes
    9 Posts
    972 Views
    ManuelM
    hi, yes closed is a better word in that case, I still need to add something in the documentation. Cheers, Manuel
  • C++ Debugging Setup

    6
    0 Votes
    6 Posts
    1k Views
    ManuelM
    hello, We need to ask if you are compiling the SDK, your own project, etc. Different question, you should open a different thread It will help other people to find the thread. Cheers, Manuel
  • AttributeError: 'list' object has no attribute 'FindTrack'

    10
    0 Votes
    10 Posts
    2k Views
    A
    @m_magalhaes Thanks. Next time I will follow the instruction. Thanks
  • Modifier parameters change uppon scaling

    r20 c++ windows macos
    3
    0 Votes
    3 Posts
    616 Views
    N
    Hello Sebastian, thanks for this quick response! I dind't know about this. But this solved my issue! Best Regards, Florian
  • Modified Pop Up Menu

    r21 python
    7
    0 Votes
    7 Posts
    2k Views
    ManuelM
    Hello, Thanks for sharing your answer @zipit and @Cairyn Cheers, Manuel
  • RenderEngine: Showing rendering process

    c++ r21
    5
    0 Votes
    5 Posts
    1k Views
    N
    Hello Manuel, thank you very much! This was exactly what I needed! It is not exactly for my own render engine. I just wanted to implement an open source one as a side-project and to familiarize myself with that topic by just doing it. Best Regards Florian
  • LAYOUTGROUP Description Resource

    python c++
    3
    3
    0 Votes
    3 Posts
    974 Views
    mfersaouiM
    @zipit said in LAYOUTGROUP Description Resource: STATICTEXT { JOINENDSCALE; } I'm searching this solution for long time, thank you so much!!!
  • Toggle Attribute Manager from Tool to Object Mode and Vice Versa

    r21 python
    4
    0 Votes
    4 Posts
    801 Views
    B
    @C4DS Thank you. Works as expected!
  • Modifying or Adding Script Directory?

    r20 python
    5
    0 Votes
    5 Posts
    1k Views
    M
    This issue is now fixed in R21. Cheers, Maxime.