Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login
    1. Maxon Developers Forum
    2. Cinema 4D SDK
    Log in to post
    Load new posts
    • Newest to Oldest
    • Oldest to Newest
    • Most Posts
    • Most Votes
    • Most Views
    • Y

      C++ Debugging Setup

      • • Yakuza
      6
      0
      Votes
      6
      Posts
      1.0k
      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

    • rsodreR

      Detecting TriState

      c++ r19 r20 • • rsodre
      9
      0
      Votes
      9
      Posts
      927
      Views

      ManuelM

      hi,

      yes closed is a better word in that case, I still need to add something in the documentation.

      Cheers,
      Manuel

    • B

      Highlight Hover on GeDialog Buttons?

      python r21 • • bentraje
      4
      0
      Votes
      4
      Posts
      743
      Views

      B

      @zipit and @m_magalhaes

      Thanks for the confirmation. Will close this thread for now. Will just ask separate question on GeUserAreas.

    • R

      Detect if inside the Material Editor

      python r19 r20 r21 • • rui_mac
      2
      0
      Votes
      2
      Posts
      316
      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

    • gheyretG

      Move object axis problem in python

      python • • gheyret
      9
      0
      Votes
      9
      Posts
      2.1k
      Views

      gheyretG

      @r_gigante
      Yes! It's really helpful.🍻

    • ?

      Inserting an Image Shader into a Dynamic Slot

      r20 python • • A Former User
      6
      0
      Votes
      6
      Posts
      890
      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

    • mfersaouiM

      MAXPORTS GraphView Flags - Description Resource

      c++ sdk • • mfersaoui
      4
      0
      Votes
      4
      Posts
      679
      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.

    • ?

      This topic is deleted!

      • • A Former User
      1
      0
      Votes
      1
      Posts
      7
      Views

      No one has replied

    • gheyretG

      Is there any way to get mouse drawn direction information?

      python r19 r20 r21 • • gheyret
      4
      0
      Votes
      4
      Posts
      603
      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

    • K

      Do Cinema 4D and c4dpy use different lists of plugins?

      • • kisaf
      4
      0
      Votes
      4
      Posts
      916
      Views

      M

      This issue is now fixed in R21.

      Cheers,
      Maxime.

    • L

      How to get mouse drag info from external through Python API?

      • • lotusab12
      10
      0
      Votes
      10
      Posts
      1.9k
      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~

    • mfersaouiM

      Make editable an object generated by GetVirtualObjects()

      python • • mfersaoui
      19
      0
      Votes
      19
      Posts
      2.6k
      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.

    • gheyretG

      utils.ViewportSelect() Problem

      r19 r20 r21 python • • gheyret
      5
      0
      Votes
      5
      Posts
      880
      Views

      gheyretG

      @zipit
      Thank you man ! I see how to fix it now!~~

      Cheers
      harry

    • N

      Detect if document is being rendered in ModifyObject

      c++ windows macos r20 r21 • • neon
      3
      0
      Votes
      3
      Posts
      589
      Views

      N

      Hey zipit,
      thanks for the answer!

      Exactly what I needed!

      Best Regards,
      Florian

    • ?

      Writing data to the .c4d file

      r20 python • • A Former User
      26
      0
      Votes
      26
      Posts
      15.8k
      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!

    • mfersaouiM

      How to access the ObjectPlugin child objects.

      c++ sdk • • mfersaoui
      4
      0
      Votes
      4
      Posts
      535
      Views

      M

      Hi @mfersaoui in the future try to split as much as possible your topic in order to help other users to find relevant information.
      I've forked all your discussion about baking in this post Bake Texture within ObjectData.

      And please mark this topic as solved if your original question is answered (which I think is the case by the good answers from @zipit).

      Cheers,
      Maxime.

    • mfersaouiM

      Object materials won't show up in final render

      c++ sdk • • mfersaoui
      4
      0
      Votes
      4
      Posts
      831
      Views

      M

      For more information about it, please read the BaseDocument Manual.

      Cheers,
      Maxime.

    • fwilleke80F

      API: Bogus default value in SearchPluginMenuResource() declaration

      r21 • • fwilleke80
      5
      0
      Votes
      5
      Posts
      619
      Views

      M

      @fwilleke80 said in API: Bogus default value in SearchPluginMenuResource() declaration:

      IDS_EDITOR_PLUGINS

      Yes and also affect python.

    • A

      GetAllTextures from materials only

      • • AndreAnjos
      12
      0
      Votes
      12
      Posts
      2.2k
      Views

      A

      Hi @m_adam,

      Thanks for letting me know! 😃

      Andre

    • P

      Python c4d.CheckIsRunning(type) returning None

      python • • pe_matthewalexander
      4
      0
      Votes
      4
      Posts
      544
      Views

      ManuelM

      hello,

      without any news, i'll pass this thread to solved.

      Cheers,
      Manuel