a little script need help

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 04 April 2012   #1
a little script need help

I have some code but I actually don't know how to fully implement it:
Code:
/* 1.set background color 2.set viewport 3.set Textured Decal 4.show stats(selection info/scene Info) */ // Change the active layout var desktop = Application.Desktop; var layout = desktop.Layouts("Default"); desktop.ActiveLayout = layout; //set background color: Preferences.Categories("Scene Colors").BackgroundCol = green; //What's the color type? color value? //set viewport SetViewCamera("Explorer", 0); SetViewCamera("Schematic", 2); SetViewCamera("ObjectView", 3); //Why cannot change by this way? Explorer,schematic and objectView isnot a view? //set TextureDecal: SetDisplayMode("Camera", "texturedecal"); SetDisplayMode("Views.View1.UserCamera", "texturedecal"); //show states: SetValue("Camera.camvis.selectioninfo,Views.ViewA.UserCamera .camvis.selectioninfo,Views.ViewA.TopCamera.camvis .selectioninfo,Views.ViewA.FrontCamera.camvis.sele ctioninfo,Views.ViewA.RightCamera.camvis.selection info,Views.ViewA.SpotCamera.camvis.selectioninfo,V iews.ViewB.UserCamera.camvis.selectioninfo,Views.V iewB.TopCamera.camvis.selectioninfo,Views.ViewB.Fr ontCamera.camvis.selectioninfo,Views.ViewB.RightCa mera.camvis.selectioninfo,Views.ViewB.SpotCamera.c amvis.selectioninfo,Views.ViewC.UserCamera.camvis. selectioninfo,Views.ViewC.TopCamera.camvis.selecti oninfo,Views.ViewC.FrontCamera.camvis.selectioninf o,Views.ViewC.RightCamera.camvis.selectioninfo,Vie ws.ViewC.SpotCamera.camvis.selectioninfo,Views.Vie wD.UserCamera.camvis.selectioninfo,Views.ViewD.Top Camera.camvis.selectioninfo,Views.ViewD.FrontCamer a.camvis.selectioninfo,Views.ViewD.RightCamera.cam vis.selectioninfo,Views.ViewD.SpotCamera.camvis.se lectioninfo,Views.View1.UserCamera.camvis.selectio ninfo,Views.View1.TopCamera.camvis.selectioninfo,V iews.View1.FrontCamera.camvis.selectioninfo,Views. View1.RightCamera.camvis.selectioninfo,Views.View1 .SpotCamera.camvis.selectioninfo", [true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true], null); SetValue("Camera.camvis.sceneinfo,Views.ViewA.UserCamera.cam vis.sceneinfo,Views.ViewA.TopCamera.camvis.scenein fo,Views.ViewA.FrontCamera.camvis.sceneinfo,Views. ViewA.RightCamera.camvis.sceneinfo,Views.ViewA.Spo tCamera.camvis.sceneinfo,Views.ViewB.UserCamera.ca mvis.sceneinfo,Views.ViewB.TopCamera.camvis.scenei nfo,Views.ViewB.FrontCamera.camvis.sceneinfo,Views .ViewB.RightCamera.camvis.sceneinfo,Views.ViewB.Sp otCamera.camvis.sceneinfo,Views.ViewC.UserCamera.c amvis.sceneinfo,Views.ViewC.TopCamera.camvis.scene info,Views.ViewC.FrontCamera.camvis.sceneinfo,View s.ViewC.RightCamera.camvis.sceneinfo,Views.ViewC.S potCamera.camvis.sceneinfo,Views.ViewD.UserCamera. camvis.sceneinfo,Views.ViewD.TopCamera.camvis.scen einfo,Views.ViewD.FrontCamera.camvis.sceneinfo,Vie ws.ViewD.RightCamera.camvis.sceneinfo,Views.ViewD. SpotCamera.camvis.sceneinfo,Views.View1.UserCamera .camvis.sceneinfo,Views.View1.TopCamera.camvis.sce neinfo,Views.View1.FrontCamera.camvis.sceneinfo,Vi ews.View1.RightCamera.camvis.sceneinfo,Views.View1 .SpotCamera.camvis.sceneinfo", [true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true], null);


My two main question is:
A: How to say the color? Is there a color data type? similar to "red","green","blue"...
B: How to create some views inside the current layout? example "Explorer","Schematic"...
I found Layout.CreateView but "The new view is a temporary view and not attached to this layout"
__________________
mailTo:kingmax.res@gmail.com
 
Old 04 April 2012   #2
A) Color swatches are just UI aggregations of 3 or 4 parameters.
Expand things in the explorer and you will see that color widgets are made of 3 or 4 parameters, usually following the naming convention of parnamer, parnameg, parnameb and so on.

B) Layouts are static, you can't dynamically populate them.
For dynamicism in views you want relational views, which can be controlled better and the interaction between their internals can be scripted, and then embed those into a layout.

Also moving this to the scripting subforum.
__________________
Come, Join the Cult http://www.cultofrig.com - Rigging from First Principles
 
Old 04 April 2012   #3
Thread automatically closed

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.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 07:12 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.