• Incorrect file structure

    r20
    6
    0 Votes
    6 Posts
    3k Views
    a_blockA
    Hi Roger, that's good news! Cheers, Andreas
  • Open GeDialog on second screen

    python windows r20
    3
    0 Votes
    3 Posts
    784 Views
    B
    Ok, thanks!
  • Drawing into Rendering

    r20 python windows
    7
    0 Votes
    7 Posts
    2k Views
    r_giganteR
    Hi @rownn, thanks for having provided further details. Assuming that you're aware of the limitation in terms of appearance that you might face by using the functionalities delivered by GeClipMap, the only way to go to access a bitmap which is supposed to contain a rendering of the scene in Python is to execute the rendering invoking the BaseDocument::RenderDocument() and pass the BaseBitmap you intend to manipulate via the GeClipMap. Best, Riccardo
  • Get Active Light Parameters

    sdk c++ r20
    2
    0 Votes
    2 Posts
    534 Views
    r_giganteR
    Hi Ogers, thanks for reaching us. With regard to your question, I need some further explanation since I actually don't get what you mean by: to get these parameters from c4d lights Which parameters are you referring to? What is the final intent of the Light Translator plugin? Best, Riccardo
  • Merging external files into plugins

    python
    4
    0 Votes
    4 Posts
    855 Views
    M
    Hi Merkvilson, the best way would be in the NodeData.Init method to load the scene with LoadDocument(). This will give you a BaseDocument. Then you can retrieve the LineObject or whatever you need from this document. Then get a Clone of these things and draw it inside your Draw method. Just in case, if you would have to return everything in the GetVirtualObject methods, you would need to insert everything under a null and return this null. And to manually handles/tracks material (this part can become very tedious) If you have any questions, please let me know. Cheers, Maxime.
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • Spline shape for BaseDraw Handles

    python
    6
    0 Votes
    6 Posts
    2k Views
    M
    The best way would be to store directly the LineObject in a member variable of your ObjectData class. The alternative way to retrieves a LineObject (which is never visible in the ObjectManager) is to call GetCache() from a Spline Object. But a Spline Object can have multiple LineObject and a SplineObject (like any other objects) does not guarantee that a cache is available at any time. So if there is no cache, the best way would have been to clone the SplineObject to a Temporary document, call ExecutePass from this document in order to build the cache. Then retrieves the cached LineObject. But I think SplineHelp, is the best option you have which works in all case, easy to setup/use, is there any drawback to it? Cheers, Maxime.
  • BaseDocument.StartPickSession() Documentation

    python
    2
    0 Votes
    2 Posts
    737 Views
    M
    Hi, Donovan thanks for reaching us. The mystery variable is actually an int flag to retrieve if the user cancels the PickSession or not. def OnPick(flags, active, multi): if flags & c4d.PICKSESSION_FLAG_CANCELED: print "User cancel" print "active: ", active print "multi: ", multi def main(): doc.StartPickSession(OnPick, multi=True) No there is no way. Actually nothing, it's up to you to detect when the user cancels with PICKSESSION_FLAG_CANCELED and do whatever you want. Cinema 4D handle automatically undo. But you can call BaseDocument.GetSelection before and BaseDocument.SetSelection after if the user cancels the pick session) Finally, note the C++ version offer to adds userdata ( For more information please read the C++ documentation https://developers.maxon.net/docs/cpp/2023_2/struct_pick_session_data_struct.html) If you have any question, please let me know. Cheers, Maxime.
  • Using c4dpy to show Class Documentation?

    3
    2
    0 Votes
    3 Posts
    1k Views
    dskeithD
    Hi Maxime - thank you very much for the response, and I'm glad to hear you're considering it for the future.
  • Python missing ObjectColorProperties?

    r19 r20 python
    3
    0 Votes
    3 Posts
    786 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.
  • Lots of "unresolved external symbol" errors

    c++ windows r20
    9
    0 Votes
    9 Posts
    2k Views
    a_blockA
    Hi, we are glad @rui_mac you were able to solve your problem. I'd just like to quickly recap to make this also clear for future readers. Visual Studio has two "concepts" two organize your development work. Projects, which is basically a set of files plus a bunch of configuration options and instructions for the tool chain (compiler, linker,...) to build a binary (in our case here always a plugin library). Solutions, which are collections of above projects plus some additional global configuration data and more important, information on dependencies of the contained projects. Now, our project tool can and does create both projects (for your plugins and for our frameworks) and a solution containing all of the above (actual workflow described in our docs under the links provided by Riccardo earlier on in this thread). So when you open such a solution and build your plugin project, also the frameworks it's depending on should be built.So, this is the way to go (project tool -> solution and projects -> open solution in Visual Studio). But if you instead open just one of the generated projects directly, Visual Studio will implicitly generate a solution for you, but it still lacks the framework projects and the build of the opened project will fail (error: unresolved symbols, i.e. function or class names normally provided by our frameworks and used in the plugins code can not be resolved). I hope this makes it a bit easier to understand. Cheers, Andreas
  • GetClone() with Fields

    r20 python windows
    4
    3
    0 Votes
    4 Posts
    1k Views
    GianniG
    Just tried now… It seems to work perfectly! Thank you! I don't want to boring you, but, please, don't disable this super feature in python. Instead you could update the documentation specifying well how to use it.
  • To grow selection in UVPolygon mode

    2
    3
    0 Votes
    2 Posts
    1k Views
    M
    Hi Kisaf, I'm afraid this is not possible from SendModelingCommand to send command in UV mode. So it's up to you to remove the extra selected stuff or build your own grow algorithm. A good way to achieves that could be to: Detects uv island and give them an ID. Store uv island ID used with the current selection. Grow the selection in polygon mode Deselect all polygons if they are not in the uv island. But this not work in all cases (e.g. topology of the object is disconnected but uv are connected). Cheers, Maxime.
  • R20 equivalent of GeSignal

    r20 sdk c++
    7
    0 Votes
    7 Posts
    2k Views
    P
    Hello. The problem was that I didn't add the definitions. iferr_scope; signal = maxon::ConditionVariableRef::Create() iferr_return; Thank you for your time and sorry for that
  • Migrating from the Classic API

    3
    0 Votes
    3 Posts
    779 Views
    C4DSC
    Thanks Riccardo, It all (well, some of it) starts to make sense after your explanation. A big step forward in starting to understand how to proceed with the MAXON API.
  • Save variables during current session (until C4D is closed)

    7
    0 Votes
    7 Posts
    2k Views
    K
    Thank you very much guys! I think that plugin will be better solution then script in this case. Cheers
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • 0 Votes
    3 Posts
    875 Views
    P
    Ok this was defently my fault. It works now. I was using GetVirtualObjects instead of GetContour.
  • Tag GetInfo() help

    4
    0 Votes
    4 Posts
    1k Views
    N
    @m_adam Great info. Thanks Maxime!
  • Python Autocomplete in Script Manger

    python r20
    4
    0 Votes
    4 Posts
    1k Views
    mikeudinM
    @ipython "c4dpy.exe/app is an executable that runs Cinema 4D in Python command-line mode. It is not only an interpreter, it brings extra features for daily Python development with external code editors/IDEs: auto-completion and debugging."