Navigation

    • Register
    • Login
        No matches found
    • Search
    1. Home
    2. kalugin
    K

    kalugin

    @kalugin

    1
    Reputation
    5
    Posts
    46
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    • Profile
    • More
      • Following
      • Followers
      • Topics
      • Posts
      • Best
      • Groups
    kalugin Follow

    Best posts made by kalugin

    RE: ShowPopupDialog in SceneLoaderData

    I didn't display a dialog box, but a popup menu. I used it for drag&drop of a custom extension file. It was very convenient to prompt the user what to do with the dropped file. Anyway, I moved that logic to a messagedata plugin that gets called from the sceneloader and that way I can show the popup menu 🙂

    posted in Cinema 4D SDK •

    Latest posts made by kalugin

    RE: ShowPopupDialog in SceneLoaderData

    I didn't display a dialog box, but a popup menu. I used it for drag&drop of a custom extension file. It was very convenient to prompt the user what to do with the dropped file. Anyway, I moved that logic to a messagedata plugin that gets called from the sceneloader and that way I can show the popup menu 🙂

    posted in Cinema 4D SDK •
    ShowPopupDialog in SceneLoaderData

    Hi. I have a sceneloader plugin that shows a popup menu in it's Load function. Until S26 it was working fine, but in S26 I get the following error when I call it:

    result = gui.ShowPopupDialog(cd=None, bc=menu, x=c4d.MOUSEPOS, y=c4d.MOUSEPOS)
    RuntimeError:must be called from the main thread
    

    I guess this has something to do with the new task management system, but how can approach this issue?
    Thanks.

    posted in Cinema 4D SDK •
    RE: Getting points and edges of parametric objects

    Nevermind. I figured it out 🙂 It was my mistake in the code. I made myself a helper function to initialize the ViewportSelect object, and I was initializing it with the wrong object. That's where the runtime error came from. Thanks anyway.

    posted in Cinema 4D SDK •
    RE: Getting points and edges of parametric objects

    what if I want to code my own snapping ? How can you snap to points of parametric objects ?

    posted in Cinema 4D SDK •
    Getting points and edges of parametric objects

    Hi folks. Is there a way to use the "GetNearest" functions on parametric objects ? Like Cube and Sphere and so on.

    ViewportSelect.GetNearestEdge(op, x, y, maxrad=MAXLONGl, onlyselected=False, ignorelist=None, ignorecnt=0)

    If the target object is not editable I get:
    RuntimeError: Object is not initialized yet

    I've tried currentstate and makeeditable, but the result is the same.

    posted in Cinema 4D SDK •