Cloner Object in script?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 30/09/2009 at 10:44, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 11.5
Platform: Windows ;
Language(s) : C.O.F.F.E.E ; XPRESSO ;---------
Hello,I created a small script that uses the Cloner object.
Since the command AllocObject does not allows to add a Cloner object, I create it using CallCommand
Then I try to change the parameters of Cloner object, but my script is FAIL and Console wrote me:
*** [FAIL] Line Cloner test script '9: Invalid identifier for the object description ***
I understand that there is no update object attributes Cloner.
I tested this script in 10.5, 11 and 11.5 versions
in 10.5 works fine
in 11 and 11,5 - FAILHow can I solve this problem?
Thanks,
Andrey> <code>
> var obj = doc->GetActiveObject();
> obj->SetName("baseobject"); // Rename for searching
> var nobj = doc->FindObject("baseobject"); // Find rename baseobject
>
> CallCommand(1018544); // create Cloner Object
>
> var clone = doc->GetFirstObject(); // Select Cloner
> clone#ID_MG_MOTIONGENERATOR_MODE = 0; // Set mode - object
> clone#MG_OBJECT_LINK = nobj; // Set Link - rename base object
> clone#MG_POLY_MODE_=3; // Set object mode - surface
> clone#MG_POLYSURFACE_COUNT = 20; // Set Count
> clone->SetName("myclone"); // Rename for searchig
> clone->Message(MSG_UPDATE);
> var mclone = doc->FindObject("myclone");
>
> var sph = AllocObject(OSphere);
> doc->InsertObject(sph,mclone,null); // Insert new sphere in the cloner object
> sph#PRIM_SPHERE_RAD = 10;
> sph#PRIM_SPHERE_SUB = 12;
>
> </code>p.s. Sorry for my English. ... and this is my first post on this forum.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 06/10/2009 at 02:23, xxxxxxxx wrote:
I can confirm this. I will post it as bug.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/10/2009 at 00:44, xxxxxxxx wrote:
You have to access the cloner object's container directly to set the object link.
>
\> var bc = cloner->GetContainer(); \> \> bc->SetData(ID_MG_MOTIONGENERATOR_MODE,ID_MG_MOTIONGENERATOR_MODE_OBJECT); \> bc->SetData(MG_OBJECT_LINK,myobject); \> \> cloner->SetContainer(bc); \>cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/10/2009 at 11:32, xxxxxxxx wrote:
Many thanks for response Matthias.
My script work fine!
______________
Best Regards.
Andrey