• Register Plugin during runtime

    Cinema 4D SDK python r20 windows
    3
    0 Votes
    3 Posts
    730 Views
    B
    Ok, thanks Riccardo! I'll register them at the start then.
  • Setting window

    Cinema 4D SDK python
    7
    0 Votes
    7 Posts
    1k Views
    Passion3DP
    Thanks @Andreas I watched Py-LiquidPainter, but I did not really understand That said, for the parameters, I understood how to do
  • Bitmap Button

    Cinema 4D SDK python
    14
    1
    0 Votes
    14 Posts
    3k Views
    merkvilsonM
    This goes off topic so I'll make a new post. The main issue is already solved, thanks to Sebastian!
  • Get PluginID from within CommandData plugin

    Cinema 4D SDK python r20 windows
    4
    0 Votes
    4 Posts
    981 Views
    B
    I am trying to register multiple plugins that are instances of the same class, but do slightly different stuff (in this case construct different menus). I am getting some external data that I would like to put in a dictionary with the plugin ID as keys. I could then get the correct data set for each plugin by comparing the pluginID from e.g. within execute with the pluginIDs in the dictionary. But for that I would need a way to retrieve the pluginID of the class instance whose execute function was called. Edit: I figured out a way. I can pass the pluginID when initializing the plugin in the register function and save it as a class member in __init__
  • Python: Selection tag

    Cinema 4D SDK python
    5
    0 Votes
    5 Posts
    1k Views
    a_blockA
    Hi, while I'm glad, this was already solved, I just wanted to add a link to an old thread in the archive, which might be helpful for future readers due the contained code snippet: Select polygons from Selection Tag. Cheers, Andreas
  • Parameters for commandData Plugin

    Cinema 4D SDK python r20 windows
    3
    0 Votes
    3 Posts
    596 Views
    B
    Hi Sebastian! Thanks for your answer. I was looking for something a little more flexible than registering multiple plugins, but I guess GetSubContainer will have to do
  • Alternative menu for plugins

    Cinema 4D SDK
    6
    0 Votes
    6 Posts
    957 Views
    M
    Hi @merkvilson, sadly this is not possible to add something to the attribute manager, since the attribute manager is a special window, and the menu is hardcoded. Sorry. Cheers, Maxime.
  • CommandData plugin with a res dialog

    Cinema 4D SDK python r20
    11
    0 Votes
    11 Posts
    2k Views
    S
    Hello, yes, you can use resource files to define the dialog layout. Or combine layout files and code. def CreateLayout(self): self.SetTitle("Dialog Test") # load dialog from resource file if self.LoadDialogResource(10000, None, 0) == False: return False # set a different title self.SetTitle("New Title") # disable a GUI element self.Enable(10001, False) return True See GeDialog Manual and Layout files. best wishes, Sebastian
  • Dynamically changing icons

    Cinema 4D SDK python
    5
    0 Votes
    5 Posts
    2k Views
    merkvilsonM
    Ok Thanks
  • R19 Python Multipass (Arnold)

    Moved Cinema 4D SDK
    7
    0 Votes
    7 Posts
    2k Views
    D
    Hi Riccardo, I spoke with SolidAngle. Eventhough the problem has nothing to do with Arnold, they helped us to solve the issue. There is a different behavior on Python when using BaseBitmap and MultipassBitmap for multiple renders. We render thousands of elements from the object tree in C4D. When you reuse a BaseBitmap the depth information will be saved for every element. However when you do the same with a MultipassBitmap, it will only store the depth information for the first element. Strangely this does not apply to the beauty image. The solution is simple. We set up a new MultipassBitmap for every render call. In hindsight, we should have initiated a new bitmap even for the BaseBitmap. Thank you for time, David
  • 0 Votes
    6 Posts
    2k Views
    r_giganteR
    Hi Shir, thanks for following up and providing your additional info. Showing parameter in the Attribute Manager or a custom icon in the Object Manager is not such a big issue: you can start looking at Py-RoundedTube which is an ObjectData derived plugin where all such a stuff (and more) is shown. That said, the real question is instead to understand what your rig is actually doing and see if it's reasonable to implement the Xpresso functionality from a set of "primitive" functions you implement in your plugin or if would be instead easier to programmatically recreate the Xpresso rig in an XpressoTag then attached to the object generated by your plugin. Actually this assessment can't be done from here where the final functionality and the complexity of your Xpresso network is unknown. So far I do see three approches: start on your own, step-by-step, dissect the code from the example I mentioned above and try to move your steps alone outsource the task to some paid developer or call for volunteers in our very helpful PluginCafe community. I'm sorry not be more helpful but, as said in the first post, we can't deliver turn-key plugins or scripts but rather help our customer to learn from our resources. Best, Riccardo
  • how to insert a gradiet with step interperation?

    Cinema 4D SDK python r20
    3
    0 Votes
    3 Posts
    852 Views
    M
    yeah! I got it! Thank you very much!
  • ColorDialog Flags

    Cinema 4D SDK python
    2
    0 Votes
    2 Posts
    552 Views
    S
    Hello, ColorDialog is just the Python version of C++'s GeChooseColor() function. It uses the flags DR_COLORFIELD_ICC_BASEDOC and DR_COLORFIELD_ICC_BPTEX which just define the proper color profile. Typically is is enough to just set 0. best wishes, Sebastian
  • Phong Break Selection

    Cinema 4D SDK python
    4
    0 Votes
    4 Posts
    1k Views
    M
    Hi @merkvilson, this is a limitation actually the tool Phong Break selection and the modeling command MCOMMAND_PHONGTOSELECTION are two completely separate things. So the only solution available to you is to manually break the Phong. I'm sorry we can't help you more on that, Donovan points you to the correct direction with the neighbor class. Cheers, Maxime.
  • Spline notRealOffset to RealOffset

    Cinema 4D SDK
    6
    0 Votes
    6 Posts
    2k Views
    r_giganteR
    Hi rownn, thanks for following up. Can you elaborate more on I wasnt able to get the "customlength" by offset.? Actually looking at your screenshot and assuming that the red-labelled refers to what you actually consider "wrong" and the green-labelled to the right, I think that the red-labelled is indeed correct since it actually lies in the middle of spline considering that the start point is the top/right vertex. At the same time, the green-labelled point is the one that you can obtain when passing 0.5 to SplineHelp::GetPosition() which is the 50% of the spline parametrization not of the spline length. Assuming a linear rectangle is used as shown above the code below shows the behavior I describe: def main(): sh = c4d.utils.SplineHelp() sh.InitSpline(op) splineLength = sh.GetSplineLength() halfLength = splineLength / 2 midPointOffsetIncorrect = halfLength / splineLength midPointOffsetFromReal = sh.GetOffsetFromReal(midPointOffsetIncorrect,0) midPointOffsetFromUnit = sh.GetOffsetFromUnit(halfLength,0) mtx = c4d.Matrix() midpointRed = sh.GetPosition(midPointOffsetFromUnit) # which in this case is the same of offsetFromReal midNullRed = c4d.BaseObject(c4d.Onull) midNullRed[c4d.ID_BASEOBJECT_USECOLOR] = 2 midNullRed[c4d.ID_BASEOBJECT_COLOR] = c4d.Vector(1,0,0) midNullRed[c4d.ID_BASELIST_NAME] = "MidRed" mtx.off = midpointRed midNullRed.SetMg(mtx) midpointGreen = sh.GetPosition(midPointOffsetIncorrect) midNullGreen = c4d.BaseObject(c4d.Onull) midNullGreen[c4d.ID_BASEOBJECT_USECOLOR] = 2 midNullGreen[c4d.ID_BASEOBJECT_COLOR] = c4d.Vector(0,1,0) midNullGreen[c4d.ID_BASELIST_NAME] = "MidGreen" mtx.off = midpointGreen midNullGreen.SetMg(mtx) doc.InsertObject(midNullRed) doc.InsertObject(midNullGreen) c4d.EventAdd() Best, Riccardo
  • r20 python Field

    Moved Cinema 4D SDK r20 python
    3
    0 Votes
    3 Posts
    642 Views
    M
    Hi @Nenov, first of all, welcome in the plugincafe community. No worry since it's your first post, but I would like to point you to the Q&A Functionality and How to Post Questions especially about categories. I've setup your topic correctly and moved to the correct category. Regarding your issue, this actually the purpose of the example to do a different operation on even and odd clones. With that's said you can find more example in our Github repository especially theses following files: field_python_color_direction.c4d field_pythonmodifier_readcolor.c4d field_pythonmodifier_vertexmap.c4d If you have any question please let me know, Cheers, Maxime.
  • SaveDocument() file name character limit?

    Cinema 4D SDK python windows r19
    3
    0 Votes
    3 Posts
    737 Views
    .
    Problem was with the total path length versus the file name length. 256 characters for the entire path and filename.
  • Get clone of group and keep links

    Moved Cinema 4D SDK python
    3
    0 Votes
    3 Posts
    942 Views
    R
    Very cool, thx alot Sebastian rownn
  • Run Plugin Last

    Cinema 4D SDK python r19
    3
    1
    0 Votes
    3 Posts
    803 Views
    A
    @m_adam Hi Maxime, It works like a treat! I've ended up changing the UI to a treeView and it's still working great. Thank you very much! Andre
  • MCOMMAND_JOIN issue

    Cinema 4D SDK python
    10
    0 Votes
    10 Posts
    2k Views
    a_blockA
    Hi, thanks for pointing out this issue. We'll see if can get a fix for that (not all tags visible, if zooming in with browser). In the end Maxime wasn't referring to tags at all. Instead he was talking about the Q&A Function we have in this forum. I took the freedom to mark this thread as solved (see this shiny green stamp next to the headline ). Cheers, Andreas