PDA

View Full Version : How to start in Script Manager


Moizey
08-26-2006, 03:09 PM
Hi, guys! I open this branch for begining scripters/coders.

Some times it need to quickly automate a workflow, without sinking in a jungle of plugin-building. And I find new feature — Script Manager (SM) very usefull. But unfortunately, Cinema's manual don't contain clear information about how to make most simple things. For instance, allocate primitive object, etc. All my attempts was unsuccesful, despite my little experience in programming (Visual Basic, MS Office Macros, Adobe Actions).

Of course, I've read SDK 9.5. And nothing. All examples don't work. Script Manager give out Syntax Error every time. Downloaded scripts from this forum work, but they have no information about working with objects and other significant info. (Plugin Cafee have no scripts for SM at all).

So what it need to do to have it working? From very begining. No need sophisticated explanations. Simply what we have to see in Object Manager and SM windows.

Help me & us, please.

JDP
08-27-2006, 01:32 AM
Give some examples of what you would like to do and I'll try and help, also I think 3d attack magazine had some coffee tutorials that might be helpful.

Regards,
JDP

FrankBerg
08-27-2006, 07:34 AM
Hi , here is a example of allocating a primative object and setting it's parameters.
you can look up the descreptions just by dragging them from the AM into the Commandline of the console or straight into the Script Manager.

main(doc,op)
{
var nfs = AllocObject(Osplineformula);
nfs->SetName("FormulaHelix");
doc->InsertObject(nfs,NULL,NULL);
nfs->SetBit(BIT_AOBJ);

var FX = (nfs#PRIM_FORMULA_X = "300 * cos(t) * cos(atan(0.15 * t)");
var FY = (nfs#PRIM_FORMULA_Y = "- 300 * sin(atan(0.15 * t)");
var FZ = (nfs#PRIM_FORMULA_Z = "300 * sin(t) * cos(atan(0.15 * t))");
var TMI = (nfs#PRIM_FORMULA_TMIN = -35);
var TMA = (nfs#PRIM_FORMULA_TMAX = 35);
var SMP = (nfs#PRIM_FORMULA_SAMPLES = 200);
var CI = (nfs#PRIM_FORMULA_CUBIC = TRUE);
var PLN = (nfs#PRIM_PLANE = 0);
var RVS = (nfs#PRIM_REVERSE = FALSE);
var IP = (nfs#SPLINEOBJECT_INTERPOLATION = 2);
var NMB = (nfs#SPLINEOBJECT_SUB = 8);

nfs->Message(MSG_UPDATE);
}

Hope this will get you started , Frank.

Moizey
08-30-2006, 10:47 PM
Thank you very much, Frank, and JDP too, for quick help. That's really what I missed and it works. Now I feel buisness with those scripts will go faster. //Moizey

CGTalk Moderation
08-30-2006, 10:47 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.