Crashing duplicate script
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 27/01/2009 at 14:26, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 10
Platform: Windows ;
Language(s) : C.O.F.F.E.E ; XPRESSO ;---------
Hi there!I've tried to write my first coffee script. I had a tutorial of Arndt von Koenigsmarck and modified it for my own purpose. But there must be a error, cause it crashes Cinema after activation.
Here is the script I wrote:
>
main() \> { \> if (!instanceof(op, PolygonObject)) return false; \> \> if(an) \> { \> var init_step, count; \> init_step = hoehe/anzahl; \> count = anzahl - 1; \> \> var data = new(BaseContainer); \> data->SetData(MDATA_DUPLICATE_COPIES, count); \> data->SetData(MDATA_DUPLICATE_INSTANCES, true); \> data->SetData(MDATA_ARRANGE_MODE, 1); \> data->SetData(MDATA_ARRANGE_LINEAR_PERSTEP,true); \> data->SetData(MDATA_ARRANGE_LINEAR_USE_MOVE,true); \> data->SetData(MDATA_ARRANGE_LINEAR_USE_MOVE_Y, true); \> data->SetData(MDATA_ARRANGE_LINEAR_MOVE, vector(0,init_step,0)); \> \> SendModelingCommand(ID_MODELING_DUPLICATE_TOOL, NULL,op,data,MODIFY_ALL); \> \> op->Message(MSG_UPDATE); \> } \> set = false; \> }The script is entered in a coffee-node which is connected with xpresso-nodes on both sides for the user-datas.
Any ideas why it crashes Cinema everytime?
Thank you for your help.
Best regards,
skone -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 27/01/2009 at 17:03, xxxxxxxx wrote:
I am not 100%, but I think Coffee nodes are now allowed to alter the scene. Why don't you make a command plugin from your code?
Greetings,
Jack -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/01/2009 at 00:12, xxxxxxxx wrote:
Hi Jack,
a command plugin is exactly what?
Is it something like the one you describes in your wiki?I think I have to read the section about the different types of plugins first. ;]
I'll inform you about my success - hopefully. :]
Till next time,
Skone -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/01/2009 at 00:27, xxxxxxxx wrote:
It is not allowed to alter the scene's structure (allocations, insertions, removing etc.) from within an expression. I am not what you want to to achieve but a script may be sufficient.
cheers,
Matthias