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

GetClone() or no GetClone()?

Author
Message
  Topic Search Topic Search
pgrooff View Drop Down
Member
Member


Joined: 2010 Nov 05
Online Status: Offline
Posts: 817
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
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: 1143
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: 817
Direct Link To This Post Posted: 2017 Apr 19 at 5:04am
Ok, clear thanks.

Back to Top

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.