Plugin Cafe Homepage
Forum Home Forum Home > Plugin Cafe > PYTHON Development
  New Posts New Posts
  FAQ FAQ  Forum Search   Register Register  Login Login

GetClone() or no GetClone()?

 Post Reply Post Reply
Author
Message
pgrooff View Drop Down
Member
Member


Joined: 2010 Nov 05
Online Status: Offline
Posts: 812
Post Options Post Options   Quote pgrooff Quote  Post ReplyReply Direct Link To This Post Topic: GetClone() or no GetClone()?
    Posted: 2017 Apr 18 at 4:58am
When I use SendModelingCommand( command = c4d.MCOMMAND_CURRENTSTATETOOBJECT,
I thought that I should use: list = [op.GetClone()], 
but that does not work.
I must use list = [op], 

So without getting a clone of the object (in this case a MoGraph Cloner)?
Am I missing something?

-Pim
Back to Top
gr4ph0s View Drop Down
Member
Member


Joined: 2015 Jul 07
Location: France
Online Status: Offline
Posts: 437
Post Options Post Options   Quote gr4ph0s Quote  Post ReplyReply Direct Link To This Post Posted: 2017 Apr 18 at 8:29am
Can be stupid but GetCLone return an obj wich is into memory but not into the document. SO have you tried to insert it before run sendmodelingcommand?
Back to Top
Yannick Puech View Drop Down
Forum Moderator
Forum Moderator


Joined: 2011 Apr 13
Location: Spain
Online Status: Offline
Posts: 1131
Post Options Post Options   Quote Yannick Puech Quote  Post ReplyReply Direct Link To This Post Posted: 2017 Apr 19 at 1:41am
Hi Pim,

gr4ph0s is right. The object is cloned but it has to be inserted into the document for SendModellingCommand().

For MCOMMAND_CURRENTSTATETOOBJECT the object passed does not need to be cloned because the function returns the converted object.
But other commands like MCOMMAND_MAKEEDITABLE change the input object so you have to decide to pass an original or a cloned object in a temporary document.



MAXON
Developer Support
Back to Top
pgrooff View Drop Down
Member
Member


Joined: 2010 Nov 05
Online Status: Offline
Posts: 812
Post Options Post Options   Quote pgrooff Quote  Post ReplyReply Direct Link To This Post Posted: 2017 Apr 19 at 5:04am
Ok, clear thanks.

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.61 [Free Express Edition]
Copyright ©2001-2009 Web Wiz

This page was generated in 0.094 seconds.