• R23 plugin windows 10 error

    Cinema 4D SDK r23 c++ windows
    7
    0 Votes
    7 Posts
    2k Views
    ManuelM
    @adam_k_garner said in R23 plugin windows 10 error: . Any idea why this ONE person had the issue on Windows 10? I've move your other question to a new post. Let's try to fix your issue there if we can help Cheers, Manuel
  • C4D in VirtualBox... no viewport displayed

    Cinema 4D SDK windows r21 s22
    3
    0 Votes
    3 Posts
    664 Views
    fwilleke80F
    I guess VirtualBox is just not a good choice then. Damn. But thanks for the answer! Cheers, Frank
  • Merge IsolateObjects into a second document

    Cinema 4D SDK r20 python windows
    2
    0 Votes
    2 Posts
    679 Views
    ManuelM
    hi, you have to save the document to memory and use the result to merge the document. When you merge, you have to set the flags to what you want to merge, otherwise it will not merge what you want. On this example i'm merging a document with another selected document. import c4d from c4d import gui # Welcome to the world of Python # Main function def main(): obj = doc.GetActiveObject() if obj is None: return # Isolate the active object isolateDoc = c4d.documents.IsolateObjects(doc, [obj]) # Creates the Memory File Strcuture mfs = c4d.storage.MemoryFileStruct() # Sets the mfs to write mode mfs.SetMemoryWriteMode() # save the document to mfs c4d.documents.SaveDocument(isolateDoc, mfs, c4d.SAVEDOCUMENTFLAGS_DONTADDTORECENTLIST, c4d.FORMAT_C4DEXPORT) # retrieve the data data = mfs.GetData() # Set the MFS to read mode mfs.SetMemoryReadMode(data[0], data[1] ) flags = c4d.SCENEFILTER_OBJECTS | c4d.SCENEFILTER_MATERIALS # Load Document selectedFile = c4d.storage.LoadDialog() if selectedFile is None: return newDoc = c4d.documents.LoadDocument(selectedFile, flags) #Merge the isolated document with the current one. c4d.documents.MergeDocument(newDoc, mfs, flags) c4d.documents.InsertBaseDocument(newDoc) c4d.documents.SetActiveDocument(newDoc) # Execute main() if __name__=='__main__': main() Cheers, Manuel
  • 0 Votes
    4 Posts
    947 Views
    ManuelM
    hi, you could also use LoadDocument lowPoly = c4d.documents.LoadDocument("preset://Optimized_Assets.lib4d/Asset_Library.c4d", c4d.SCENEFILTER_OBJECTS | c4d.SCENEFILTER_MATERIALS) As the documentation says: Similar to LoadFile() but this time the document is not put into the editors list of documents and it gives control over the loaded document. Cheers, Manuel
  • How to enforce StatusBar redraws

    Cinema 4D SDK r21 python windows
    11
    0 Votes
    11 Posts
    1k Views
    M
    I am also having trouble to get the Status bar to update while a script is running. My old scripts using Callcomand nevertheless update the Status bar fine ...?!? nevermind got it working again ... mistake on my end. (passed a small flot to the statusbar instead of 0-100. kind regards mogh
  • GeDialog shadows

    Cinema 4D SDK c++ windows macos r20 r19
    6
    0 Votes
    6 Posts
    2k Views
    ManuelM
    hi, this is the current state: "I think this is related to the ASYNC_POPUPEDIT being a non-resizable, modal dialog - and as such it is displayed kind of "Win legacy style" by the OS. Nothing we actively do set (and something which could change once they do further design overhauls in Win10)" Cheers, Manuel
  • 0 Votes
    5 Posts
    2k Views
    ferdinandF
    Hi, thanks, that answers all my questions. Cheers, zipit
  • Which lock to use?

    Cinema 4D SDK r21 r20 s22 c++ macos windows
    3
    0 Votes
    3 Posts
    411 Views
    fwilleke80F
    Always using the threadIndex, of course Thanks, I'll try that!
  • BaseDraw known issues in S22

    Locked Cinema 4D SDK windows macos c++ python
    1
    1 Votes
    1 Posts
    627 Views
    No one has replied
  • ParallelFor with race conditions

    Cinema 4D SDK c++ windows r21 r20 maxon api
    4
    0 Votes
    4 Posts
    772 Views
    ManuelM
    hi, that really depends on what you are doing. There's different type of lock for different cases and scenario. That also depends on what you care first, speed or memory. but the manual is pretty easy to understand, just pass the lock as a reference to your lambda function and you should be good to go. Cheers, Manuel
  • 0 Votes
    8 Posts
    1k Views
    I
    Hello to all @zipit said in GetFontDescription() on Windows and Mac: FONT_FLAGS Thank you i miss flags in https://developers.maxon.net/forum/post/58961
  • a few strange errors

    Cineware SDK c++ r21 windows
    3
    0 Votes
    3 Posts
    2k Views
    r_giganteR
    Hi @adlarch, thanks for reaching out us. With regard to your issue, I don't understand if it has been solved or not, since the very first post has been deleted and, after, a reply has been left by you in the thread. Can we delete the thread, or can we restore the initial post to give everybody in the community the chance to understand the scope of the second post? Cheers, Riccardo
  • SculptTag

    Cinema 4D SDK r20 python windows
    6
    0 Votes
    6 Posts
    1k Views
    M
    The bug is fixed in S22. Cheers, Maxime.
  • Ptex Shader Progress

    Moved General Talk c++ windows r21
    8
    2
    2 Votes
    8 Posts
    2k Views
    r_giganteR
    Hi @wuzelwazel, thanks a lot for sharing your progresses on the Ptex Shader and for sharing your code. I've moved the thread to the more appropriate "General Programming & Plugin Discussions" hoping other developers could contribute to the discussion. Cheers, Riccardo
  • C++ Shader Plug-In Best Practices

    Cinema 4D SDK c++ r21 sdk windows
    6
    1
    3 Votes
    6 Posts
    1k Views
    ManuelM
    hello, thanks @PluginStudent for the answer here if (obj != nullptr) // If I'm checking for nullptr could I just use if(obj) as in Python? The correct way is to check against nullptr, that's a c++11 standard. if (obj) could lead to false positive and bugs. String is not the same thing as maxon::String. String is the classic API while maxon::String is the Maxon API. You can read more about that in the manual about strings Error handling is super eady to use, we got every thing to do so, you should definitely use it. Check Our manual about Error Handling Last but not least you can probably use our Url class to handle file or filename. Give it a look Cheers, Manuel
  • R21 Windows System Error

    Cinema 4D SDK r21 c++ windows
    4
    0 Votes
    4 Posts
    1k Views
    S
    Hello, as Riccardo has pointed out, AdditionalIncludeDirectories has nothing to do with DLLs. It is used to define search paths for header files. See Additional include directories. It was never valid. Also, looking at the error, the plugin was installed into the C:/Program Files folder. In R21, there is no reason to install plugins there; one can install plugins at any location and just tell Cinema 4D the plugin path. best wishes, Sebastian
  • Issue with registering a ToolData

    Cinema 4D SDK
    3
    0 Votes
    3 Posts
    800 Views
    a_blockA
    Hi Maxime, thanks a lot! Both are valid solutions for me. Very helpful. Cheers
  • 0 Votes
    3 Posts
    1k Views
    r_giganteR
    Hi jhpark, thanks for reaching out us. Aside from the notes left by @blastframe - thanks dude for the remarks - I think it's worthy, thinking of a more generic scene, to mention the need BaseDocument::ExecutePasses() to be sure that everything is actually evaluated before querying the scene rather than the EventAdd() which serves a different scope. This function is responsible to execute the scene evaluation and, consequently to be sure that, moving from a frame to another, all the items in the scene reflect the changes imposed by the frame switch. The approach used by @blastframe actually operates on CTracks and key but, although this approach works fine for your specific case, when more evaluation dependencies are created in the scene you could easily end up in unexpected results. The code could then look like frames_count = 10 # [Set] frames counter for f in range(0, frames_count): doc.SetTime(c4d.BaseTime(f, doc.GetFps())) # evaluate the scene doc.ExecutePasses(None, True, True, True, c4d.BUILDFLAGS_NONE) obj = doc.SearchObject('Cube') # get object position x = int(obj.GetMg().off.x) y = int(obj.GetMg().off.y) z = int(obj.GetMg().off.z) # get object color r = int(obj[c4d.ID_BASEOBJECT_COLOR].x * 255) g = int(obj[c4d.ID_BASEOBJECT_COLOR].y * 255) b = int(obj[c4d.ID_BASEOBJECT_COLOR].z * 255) print("Frame = " + str(f) + ", (X,Y,Z) = " + str(x) + "," + str(y) + "," + str(z) + ", RGB = " + str(r) + "," + str(g) + "," + str(b))
  • Building Cinema 4D SDK on Windows

    Cinema 4D SDK r21 c++ sdk windows
    3
    0 Votes
    3 Posts
    742 Views
    W
    Thank you @m_magalhaes! I needed to open the plugins.sln solution instead of the project file. I feel like I've learned something, but I'm not sure what