• GetContour and GetVirtualObjects in one Plugin

    Cinema 4D SDK python
    4
    0 Votes
    4 Posts
    971 Views
    P
    @rsodre works flawless!
  • Using AddEditNumberArrows

    Cinema 4D SDK python
    2
    0 Votes
    2 Posts
    401 Views
    ManuelM
    hello, you have to use the step parameter as showned in the documentation here self.SetFloat(datafield_displacement, 1.0, min=0.0, step=0.1) Cheers, Manuel
  • Re-Initialize dialog if already opened

    Cinema 4D SDK python sdk
    3
    0 Votes
    3 Posts
    393 Views
    mfersaouiM
    @m_magalhaes Hello, Right. Duly noted. Thanks for your time.
  • Unable to Detect Mouse Click

    Cinema 4D SDK r21 python
    7
    0 Votes
    7 Posts
    1k Views
    ManuelM
    hello, Please @unti open your own thread. The context is maybe a bit different and your question is a bit different. Cheers, Manuel.
  • 0 Votes
    9 Posts
    963 Views
    B
    @s_bach Thanks for the clarification
  • How to access Built-in Icons?

    Cinema 4D SDK r21 python
    3
    0 Votes
    3 Posts
    397 Views
    B
    @zipit I see. It's the same as the object ID. I also tried it with external plug-in icons. It works as expected. Thanks for the clarification!
  • Creating a Clickable Floating GUI Dialog?

    Cinema 4D SDK python r21
    2
    0 Votes
    2 Posts
    370 Views
    B
    Stupid me. I already asked the same question a year ago here: https://developers.maxon.net/forum/topic/11472/dialogue-box-manager-through-plug-in-vs-vanilla-script/5 Anyhow, for anyone interested on the working plug-in code. Here it is import c4d from c4d import bitmaps, documents, gui, plugins, threading, utils PLUGIN_ID = 1011323 class MyDialog(gui.GeDialog): def CreateLayout(self): #self.SetTitle('Colorizer') # Prepare a red bitmap for the button. w = 50 h = 50 bmpRed = c4d.bitmaps.BaseBitmap() bmpRed.Init(w, h) for y in xrange(w): for x in xrange(h): bmpRed.SetPixel(x, y, 255, 0, 0) # BitmapButton configuration bcBitmapButton = c4d.BaseContainer() bcBitmapButton[c4d.BITMAPBUTTON_BUTTON] = True # Add a BitmapButton to the dialog. # _bitmapButton is a member variable of the dialog class buttonId = 2000 _bitmapButton = self.AddCustomGui(buttonId, c4d.CUSTOMGUI_BITMAPBUTTON, "", c4d.BFH_CENTER|c4d.BFV_CENTER, w, h, bcBitmapButton) if _bitmapButton is None: print "Handle this error!" # Assign the image to the button. # Note: Let it create an internal copy as the created bitmap will be free'd, when scope is left. _bitmapButton.SetImage(bmpRed, True) def Command(self, id, msg): if id==2000: # corresponds to the button ID used in the code snippet in the first answer in this thread print "My Bitmap Button" return True class MyMenuPlugin(plugins.CommandData): dialog = None def Execute(self, doc): # create the dialog if self.dialog is None: self.dialog = MyDialog() return self.dialog.Open(dlgtype=c4d.DLG_TYPE_ASYNC, pluginid=PLUGIN_ID, defaultw=200, defaulth=150, xpos=-1, ypos=-1) def RestoreLayout(self, sec_ref): # manage the dialog if self.dialog is None: self.dialog = MyDialog() return self.dialog.Restore(pluginid=PLUGIN_ID, secret=sec_ref) if __name__ == "__main__": okyn = plugins.RegisterCommandPlugin(PLUGIN_ID, "Cubey",0, None, "Cubey initialized", MyMenuPlugin()) if (okyn): print "Cubey initialized"
  • Isolating a Cloner.

    Cinema 4D SDK r20 python
    3
    1
    0 Votes
    3 Posts
    423 Views
    P
    Yes, I already expected that. One comment, the same behavior occurs when you Copy and Paste a node into a new document. -Pim
  • Storing node data in a Tag plugin

    Cinema 4D SDK r20 python
    8
    2
    0 Votes
    8 Posts
    971 Views
    P
    @zipit, thanks for this extra information! Indeed my assumption is / was that Write is only called, when you save the scene file. -Pim
  • Objects created in real time

    Cinema 4D SDK python r19 r21 r20
    6
    0 Votes
    6 Posts
    1k Views
    ManuelM
    Hello, For your next threads, please help us keeping things organised and clean. I know it's not your priority but it really simplify our work here. Q&A New Functionality. How to Post Questions especially the tagging part. @zipit and @Cairyn have already answer here (thanks a lot) nothing to add. Cheers, Manuel
  • python combobox get current value

    Cinema 4D SDK r21 r20 r19 python
    4
    0 Votes
    4 Posts
    841 Views
    ManuelM
    Hello, For your next threads, please help us keeping things organised and clean. I know it's not your priority but it really simplify our work here. Q&A New Functionality. How to Post Questions especially the tagging part. I've already done for this thread. I can just confirm what @zipit said. Nothing to add Cheers, Manuel
  • Interact with Plugin Dialog [R21][Win][python]

    Cinema 4D SDK python r21 r20 r19
    7
    0 Votes
    7 Posts
    1k Views
    ManuelM
    hello, I'll mark this thread as solved tomorrow if you have nothing to add. Cheers, Manuel
  • Python Source Protector: Can it be called via CLI?

    Cinema 4D SDK python
    18
    0 Votes
    18 Posts
    4k Views
    a_blockA
    Thanks, Ferdinand! Much appreciated. I always forget about c4dpy and that it can still be run in parallel to a running C4D instance. Thanks.
  • Drag and Drop onto Range Slider

    Cinema 4D SDK python r19
    15
    0 Votes
    15 Posts
    2k Views
    ManuelM
    hello, I'll mark this thread as solved tomorrow if you have nothing to add. Cheers, Manuel
  • IsolateObjects question

    Cinema 4D SDK r20 python
    7
    2
    0 Votes
    7 Posts
    781 Views
    P
    Aha, thanks.
  • Custom Object Icon in R21 python

    Cinema 4D SDK python
    2
    0 Votes
    2 Posts
    531 Views
    M
    Hi @affa May I ask you in which context you are? Can you share your code? Did you take a look to the py-custom_icon.pyp plugin example. Cheers, Maxime.
  • Set Knot Value of RangeData, bug?

    Moved Cinema 4D SDK r19 python
    3
    0 Votes
    3 Posts
    618 Views
    G
    Thank You, How embarrassing I forgot to write back to the UserData. (I shouldn't code late at night) Solved.
  • 0 Votes
    3 Posts
    519 Views
    CairynC
    @m_adam Thanks, yes, you're right, a timer may be my best choice here to avoid too much load on the system. Checking the project list every 3 seconds or so should suffice for the usecases. And since I'm in a GeDialog, the timer function is easy to implement. (I just have to take care that within the 3 seconds, the state of the dialog may be inconsistent with the actual system state.)
  • Python on Linux missing submodule?

    General Talk
    2
    0 Votes
    2 Posts
    631 Views
    r_giganteR
    Hi fyeng, thanks for reaching out us. With regard to your question, I confirm that the workflow you're trying to achieve using the python executable found among the Linux CLR modules is not possible since only c4dpy, as you've already seen, has access to all the needed modules. Best, Riccardo
  • Keyframe Selection Code from Cineversity

    Cinema 4D SDK r21 python
    3
    0 Votes
    3 Posts
    404 Views
    B
    @zipit Thanks for the clarification. Yea, I guess so but just learning as much as I can. Thanks again!