• 0 Votes
    3 Posts
    729 Views
    CairynC
    @m_adam Oops. Okay, GeRayCollider works only for polygon objects, as does GetPixelInfoPolygon. The idea was to provide a new selection method for arbitrary objects by just checking all hits of a scattered PickObject within a radius, and then select the nearest hit. For that, I need to be able to hit splines and parametric objects as well. Okay, I guess I can still do that in C++ then, thanks.
  • DeformCache Update

    Cinema 4D SDK r19 python
    3
    0 Votes
    3 Posts
    542 Views
    chuanzhenC
    @m_adam Thanks
  • One to rule them all...

    Moved General Talk
    3
    0 Votes
    3 Posts
    908 Views
    M
    HI Andreas, no worries, this question was not exclusively targeted at Maxon, the opposite is the case. I was hoping for some information by other users here, like @kbar or even @m_adam (back in the days Maxime was not associated with Maxon. ;)) Meanwhile, I'm going to build a toolchain and see what works for me. I'll report back here if I have something to show. That may help someone else.
  • GV Node AddPort fail

    Cinema 4D SDK python r19
    5
    1
    1 Votes
    5 Posts
    1k Views
    M
    This issue is now fixed in R21. Cheers, Maxime.
  • How to check if a spline is a freehand spline?

    General Talk r19 python
    3
    0 Votes
    3 Posts
    822 Views
    S
    Hello, I just want to add that an example on how check a spline can be found in the BaseObject Manual. best wishes, Sebastian
  • Cinema4D Application crash R19 in Release Mode

    Moved Cinema 4D SDK r19 c++
    3
    0 Votes
    3 Posts
    2k Views
    A
    @Riccardo Thank you very much for your reply Riccardo! Yes of course you are right - modifying the c4d sdk is a bad way. I just did this to see what happens. I will take a close look to the manual you have mentionend and will review the memory handling in my code. Best regards Andi
  • 0 Votes
    10 Posts
    2k Views
    C4DSC
    Just for future reference ... The topic's tag indicates this to be "solved" when it definitely isn't. But as this is a R16 issue only I guess no further time will be taken to figure out why this issue exists in R16 and not in newer releases. Also, there is currently no workaround as far as I know. The only thing one can do is check for the current C4D version running and avoid writing to a MultipassBitmap.
  • Changing DATETIME_GUI date format

    Cinema 4D SDK python r19
    3
    1
    0 Votes
    3 Posts
    699 Views
    A
    @s_bach Hi Sebastian, Thanks for your help! That makes sense! Andre
  • Getting a pointer to a UserArea

    Cinema 4D SDK python r19 r20
    5
    0 Votes
    5 Posts
    894 Views
    S
    Hello, I don't have a Cinmea 4D R14 version so I can't test that case. But in R20 some symbols have changed. E.g. c4d.DESCFLAGS_SET_0 was changed to c4d.DESCFLAGS_SET_NONE. Similarly, c4d.USERAREAFLAGS_NONE was c4d.USERAREA_0. best wishes, Sebastian
  • Python missing ObjectColorProperties?

    Cinema 4D SDK r19 r20 python
    3
    0 Votes
    3 Posts
    723 Views
    C4DSC
    @cairyn You are right. I thought having to go over the BaseContainer obtained from the object via GetData(), but didn't see anything in its content related to the displaycolor ... didn't think of just accessing the object's properties directly. I am not that confident with the Python SDK. Thanks for the piece of code.
  • BaseContainer::SetMemory() question

    Cinema 4D SDK c++ r19 r20
    6
    0 Votes
    6 Posts
    1k Views
    a_blockA
    Hello Roger, my thought was, if you allocated buffer properly via NewMem (or one of its siblings), then you should be able to use it directly. But as Cinema 4D will do an internal copy and destroy the passed buffer, you'd need to do something like this (pseudocode): SetMemory(buffer) buffer = GetMemory() // to get the pointer to the buffer owned by Cinema // ... and then in the end, if you need to free the memory yourself and can't rely on the memory being destroyed on destruction of the BaseContainer buffer = GetMemoryAndRelease() Free(buffer) Just thinking and probably you have thought of this option anyway. Cheers, Andreas
  • PoseMorph Tag question

    Cinema 4D SDK
    5
    1
    0 Votes
    5 Posts
    1k Views
    M
    The mode specifies how data can be read from the Morph Tag. By default, they are presented in a compact way (aka only modified points are stored for some internal optimization). But if you SetMode with c4d.CAMORPH_MODE_FLAGS_ALL | c4d.CAMORPH_MODE_FLAGS_EXPAND then all the points are then readable from outside of the morph Tag. I adapted the Python documentation to match the C++ documentation so it will be available in the next documentation update. But I would say the C++ documentation for SetMode is pretty self-explanatory, what is the part you don't understand? Cheers, Maxime.
  • 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
  • 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.
  • 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
  • 0 Votes
    8 Posts
    2k Views
    CairynC
    Hi again; just to close off the topic here's what I ultimately found: A lot of the delay that causes the choppyness of the motion is apparently an issue with EventAdd(). I require this call to update the Attribute Manager for the current camera, and to start the recalculation of the interactive render region. But as it seems to refresh about everything, the call causes a noticeable delay before the next viewport refresh comes through. (It is surprising that this call takes longer than a redraw of the viewport, and it is very hard to time as EventAdd() just posts a message to the queue, so I cannot actually measure the execution duration.) The scene camera is slower than the viewport camera. CollieMouse treats both the same, in fact, all handling is done through a CameraObject that I get in a similar way as the one you posted above. Yet, the redraw is slightly slower by itself, and there are apparently things indirectly happening for a scene camera that take even more time (even when expressions are switched off). There is not much I can do about that except allow the user to suppress certain refreshs for the sake of a smoother Space Navigator experience. I'm still not sure what some of the DrawViews() flags exactly mean, by the way. I guess I can ignore the HIGHLIGHT ones for now, but what are INDRAG, INMOVE and FORCEFULLREDRAW really doing, and when do I need to use them? I see that you use INMOVE in your code (but not NO_EXPRESSIONS which surprises me).
  • 3D Mouse Slider Focus

    Cinema 4D SDK python windows r19 maxon api
    13
    1
    0 Votes
    13 Posts
    3k Views
    CairynC
    @charly CollieMouse rotates around the current selection or the explicit rotation center (the one you set with the INS shortcut). It will not rotate around the mouse pointer (I think... I implemented so many modes over time that I tend to forget the options...). The mouse pointer only exists in 2D space anyway so the actual rotation would happen around a projection of the mouse position into the scene, and if you move the mouse, the rotational center would change... not sure whether that is even a usable mode. The mode I'd recommend would be around the explicit center: Position the mouse, press INS (or whatever shortcut you use), and then use the 3D mouse to rotate around that. C4D shows the explicit center as green cross so you always know where it is. At the moment there is no R2023 version of CollieMouse anyway, so the point is moot. But you can reach me under cairyn (at) tigress (dot) com if you require specialty development.
  • UVCOMMAND question?

    Cinema 4D SDK python r19
    4
    0 Votes
    4 Posts
    1k Views
    .
    Thank you for the guidance. I'll dig into that info.
  • 0 Votes
    9 Posts
    2k Views
    M
    @mp5gosu, that's true I didn't think about this possibility as well. Just for your information, an IcustomGui can only be done with C++ an implementation example can be found in customdata_customgui.cpp. Cheers, Maxime.