• Drawing on MultipassBitmap's GeClipMap crashes in R16.050

    c++ r19
    10
    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.
  • Dialog Freezes when checking for Message()

    r21 python
    12
    0 Votes
    12 Posts
    1k Views
    B
    Thanks @m_adam. First time using the c4d.DrawViews(). It works as expected. Thanks for the introduction.
  • R21 Windows System Error

    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

    3
    0 Votes
    3 Posts
    674 Views
    a_blockA
    Hi Maxime, thanks a lot! Both are valid solutions for me. Very helpful. Cheers
  • Undo for GeDialog (GUI)?

    r21 python
    4
    0 Votes
    4 Posts
    532 Views
    B
    @blastframe @m_magalhaes Thanks for the response and the confirmation that Undo is not included in the GeDialog(GUI). That said the supplied code works on my use case. Thanks again!
  • Quick Tab Radio for GeDialog?

    r21 python
    4
    0 Votes
    4 Posts
    712 Views
    B
    @r_gigante Thank you for the response and especially for the alternative code (first time to see a line with msg[c4d.BFM_ACTION_VALUE]. Both code works as expected.
  • Creating Class for Buttons Returns None

    r21 python
    5
    0 Votes
    5 Posts
    558 Views
    B
    @m_adam Ah. Gotcha. Thanks for the clarification and link.
  • 0 Votes
    13 Posts
    3k Views
    M
    SaveDocument is already present in the original code in the extended threading class "ExportThread" TO not make it happens in a thread. So to directly execute it in ExecuteConversion. The use of SendCoreMessage is a way, from a thread (and it's the case for you in ExportThread::Main) to send a message, that Cinema 4D will process on the Main thread (I didn't use in my code because in my case I'm in the main thread). So you can react to this message and do something (in your case SaveDocument). It was just for your information, regarding what's your thread is doing (only calling SaveDocument) I would say that using a thread here make no sense, and you should directly call SaveDocument in your ExecuteConversion function. Hope it's more clear. Cheers, Maxime.
  • Dragging an object from a treeview

    r20 python
    4
    1
    0 Votes
    4 Posts
    671 Views
    P
    Thanks, sounds a bit complicated, so I have to give it some thoughts. For now, it is enough. -Pim
  • Get mode (object, face, edge, point) with python

    python
    4
    1
    0 Votes
    4 Posts
    833 Views
    W
    Thanks Sebastian.
  • Command() does not honor Dynamic Lists/Variable

    r21 python
    9
    0 Votes
    9 Posts
    961 Views
    B
    When you presented the order of execution of __init__(), CreateLayout and InitValues. That makes total sense especially the 2.2.1 when it resets to an empty list. Thanks for the clarification!
  • Cant select newly created Instance

    python
    7
    0 Votes
    7 Posts
    1k Views
    esanE
    @blastframe Ok was able to retrofit your version to get what I wanted, a bit of guesswork in here, but got the result im after lol import c4d from c4d import gui def createInstance(): obj = op.GetDown() inst = c4d.BaseObject(c4d.Oinstance) # created Instance with Base Object inst[c4d.INSTANCEOBJECT_LINK] = obj # set Instance's reference link # set the name using the object passed to the function inst[c4d.ID_BASELIST_NAME] = "%s Instance"%obj[c4d.ID_BASELIST_NAME] return inst # return the Instance instance def AddLongDataType(obj): # create User Data Container named Picker if obj is None: return bc = c4d.GetCustomDataTypeDefault(c4d.DTYPE_LONG) bc[c4d.DESC_NAME] = "Picker" doc.AddUndo(c4d.UNDO_CHANGE, obj) obj.AddUserData(bc) c4d.EventAdd() def setQuickTab(obj, inst, data): # change User Date container to type Cycle, populate with Children Names descid = data[0][0] bc = data[0][1] children = obj.GetChildren() # Build new cycle options container dynamically cycle = c4d.BaseContainer() for i,child in enumerate(children): cycle.SetData(i, child.GetName()) bc[c4d.DESC_CYCLE] = cycle doc.AddUndo(c4d.UNDO_CHANGE, obj) # Set modified description data container inst.SetUserDataContainer(descid, bc) def main(doc): obj = doc.GetActiveObject() if (obj == None): gui.MessageDialog("Please select the Root of the Assets you wish to Instance.") return doc.StartUndo() inst = createInstance() doc.InsertObject(inst) AddLongDataType(inst) data = inst.GetUserDataContainer() setQuickTab(obj, inst, data) doc.AddUndo(c4d.UNDO_NEW, inst) doc.EndUndo() c4d.EventAdd() if __name__=='__main__': main(doc)
  • Treeview and Right Click

    python r20
    3
    1
    0 Votes
    3 Posts
    439 Views
    P
    @mp5gosu said in Treeview and Right Click: RemoveData() Great, thanks.
  • Stacking Tabs Menu?

    r21 python
    7
    0 Votes
    7 Posts
    858 Views
    B
    @r_gigante Thanks for the response. RE: Extending to get it working for more than one should be trivial. Unfortunately, the whole code is trivial to me being novice. Anyhow, I guess I'll just learn on QuickTabCustomGui on a separate thread. RE: With regard to the "stacked" tabs functionality, as said above Yes, you did. I was wondering if there is an option for the TabGroupBegin as that is somewhat straight forward to me rather than the QuickTabCustomGui. So I guess, this confirms that it is not possible for the TabGroupBegin. Again, no further action required. Will just open another thread for the QuickTabCustomGui.
  • Right Click Contextual Menu on a Button?

    r21 python
    3
    0 Votes
    3 Posts
    702 Views
    B
    @m_adam Works as expected! Thanks again for the sample code, makes everything clear.
  • Retrieving Link from Hyperfile

    python sdk
    3
    1
    0 Votes
    3 Posts
    489 Views
    ?
    Thank you @r_gigante for the reply! Sorry if the intent is unclear: this self-contained script was something I came up with last night to demonstrate an issue I'm having in my plugin which is too many scripts to post to the forums. Since the user can't select an object after the script is running, I added that catch to make sure an object was selected to show what was going wrong. My Goal I am trying to save a link to a scene object and its matrix to a hyperfile so the user can load the hyperfile in another session and restore the link to the object so that I can apply the saved matrix. I don't need the object itself. Update I updated the original script's GetLink() method to pass a reference to the active document, but that did not solve the issue.
  • Free Form GUI Design Layout?

    r21 python
    5
    0 Votes
    5 Posts
    706 Views
    B
    @r_gigante Thanks for the response. Unfortunately, I still can't read C++ codes at the moment. Is there a python equivalent of that page? I can't seem to see one. There is a page for that but it's like a dictionary. It does not contain any sample codes like in C++ If it does not exist, do you have any C++ with an equivalent Python page in the documentation? I'll just to interpolate them as much as possible. ########################## I also checked the Github sample and it does contain a GeUserArea sample But the button part is still in GeDialog. Is it possible to make the GeUserArea part to be clickable like a button?
  • Make Deformer Affect Objects Outside Hierarchy?

    r21 python
    12
    0 Votes
    12 Posts
    3k Views
    B
    @wuzelwazel Yes, I'm referring to the file you uploaded earlier. There is some delay when hitting Undo. You can see it here: https://www.dropbox.com/s/hayep6r4iyowqt5/c4d194_deformer_affect_outside_hierarchy_02.mp4?dl=0 RE: perhaps making sure the objects with the surface deformers are lower down the list In your file, yep they are. That's why I was wondering why there is a lag.
  • 0 Votes
    3 Posts
    973 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))
  • Update GeDialog When Button is Pressed?

    r21 python
    6
    0 Votes
    6 Posts
    717 Views
    B
    RE: So if it recreates the same things it is probably because images are not local to your class but only to your function, Ah, gotcha. Thanks for the heads up. Works now as expected