XSI - Scripts and Plugins Thread


#1

Please post the links to the scripts\plugins you or somebody else wrote here so it is easy for all to see and find.

Also , please post a short description of what the plugin\script does and list in the title what language the script is written in , for an example see the posts below.

Thanks!

Ali


#2

I’m not sure who originally authored this or what he originally called it. I call it HalfKill (from a LW plugin I used to use).

This script helps out with Symmetry modelling - it deletes -x. Afterwards, you can either use my next script, or Symmetrize Polygons.


[size=2]function main() {
 
var oSel = selection;
 
// return if nothing is selected
 
if (oSel.count == 0) return;
 
 
 
for (object=0; object<oSel.count; object++) {
 
var oObj = selection(object);
 
 
 
// loop next if selected object is not a polygon mesh
 
if (oObj.type != "polymsh") continue; 
 
 
 
var oGeometry = oObj.activeprimitive.geometry;
 
var oPoints = oGeometry.Points;
 
 
 
// pointPosition = pArray (x1,y1,z1, x2, y2, z2 ....) 
 
var pArray = oPoints.PositionArray.toArray();
 
 
 
// Array off point where pointPositionX < almost 0 [-1E-5] 
 
var delPoints = new Array();
 
var pointIndex;
 
var pointPositionX;
 
for (i=0, pointIndex = 0; i < pArray.length; i += 3, pointIndex++) {
 
pointPositionX = pArray[i];
 
if (pointPositionX < -1E-5) {
 
delPoints.push(pointIndex);
 
} 
 
}
 
 
 
if (delPoints.length != 0) {
 
ApplyTopoOp("DeleteComponent", oObj.fullName +".pnt["+ delPoints.toString() +"]", siUnspecified, siPersistentOperation, null);
 
 
 
// ApplyTopoOp("SymmetrizePolygon", oObj.fullName , siUnspecified, siPersistentOperation, null);
 
}
 
}
 
}
 
main()
 

PS. Thanks for starting this thread.
PPS. Maybe it’d be a good idea to list in the title what language it is.[/size]


#3

Again, not sure who originally authored it.
Basically, it creates a clone, symmetrizes the clone, and changes the original half mesh to display as wireframe. Works well with the HalfKill script.


//Select your half object.
var MyObject = Selection(0);

if(!MyObject)

{

logmessage("Please select an object");

}

else

{

//Create a collection to store local geometry approximation.

var oCollGeomApprox = XSIFactory.CreateObject( "XSI.Collection" );

//Create a collection to store local display.

var oCollDisplay = XSIFactory.CreateObject( "XSI.Collection" );

for( var e = new Enumerator( MyObject.localproperties ); !e.atEnd(); e.moveNext() )

{

oProp = e.item();

if(oProp.Name == "Geometry Approximation")

{

oCollGeomApprox.add(oProp); 

}

if(oProp.Name == "display")

{

oCollDisplay.add(oProp); 

}

}

if(oCollGeomApprox.count ==0)

{

AddProp("GeomApprox", "", "", "", null);

}

//Create a collection to store the half mesh.

var oHalfMesh = XSIFactory.CreateObject( "XSI.Collection" );

oHalfMesh.add(MyObject);

//Create a clone.

var oClone = Clone(null, null, 1, 1, 0, 0, 1, 0, 1);

//Turn off the clone selactibility.

Selection(0).properties("visibility").selectability.Value = false

//Symmetrise the clone.

ApplyTopoOp("SymmetrizePolygon", Selection(0), siUnspecified, siPersistentOperation, null);

AddProp("GeomApprox", "", "", "", null);

AddProp("Display Property", "", "", "", null);

 

//Link the clone geometry approximation to the half object geom. approx.

CopyPaste(oHalfMesh+".geomapprox.gapproxmosl", null, Selection(0)+".geomapprox.gapproxmosl", 1);

CopyPaste(oHalfMesh+".geomapprox.gapproxmordrsl", null, Selection(0)+".geomapprox.gapproxmordrsl", 1);

//Change the half mesh display.

if(oCollDisplay.count == 0)

{

MakeLocal(oHalfMesh+".display", siDefaultPropagation);

}

var oDisplay = oHalfMesh(0).localproperties("display");

for(i=0;i<9;i++)

{

//All the 9 display modes are set to wireframe.

oDisplay.parameters(i).Value = 0;

}

SelectObj(oHalfMesh);

}



#4

For those interested, I made a short script to fix symmetry map.

   It deletes the current symmetry map, and assigns a new symmetry map.

I use this when tweaking a model, that is already symmetrical, and I need to add an edge to both sides, which “breaks” the symmetry map. I use this tool to speed up the process of reapplying a symmetry map.


  /*************************************
  Matthew L. Stoehr, http://theladyandthelion.com
  1/10/2006
  
  This script deletes the current symmetry map of the selected polygon mesh,
  and assigns a new symmetry map.
  
  *************************************/
  //begin script
  
  var oSel = Selection(0);
  var oSelCount = Selection.count;
  
  if(oSelCount == 1){
  
  	DeleteObj(oSel + ".polymsh.cls.SymmetryMapCls");
  	CreateSymmetryMap(null, null, null, null);
  	
  	//reselect the fixed object
  	SelectObj(oSel)
  	
  	logMessage ("Symmetry is fixed.")
  
  }
  else
  {
  	logMessage ("Select one polymsh.")
  }
  
  //endscript
  //*********************************************
  

#5

This script toggles subdivisions. Inspired by toggle sub-d in Lightwave.


 /*
 Matthew L. Stoehr
http://formandspace.com
 10/2005
 
 This script toggles subdivisions.
 
 This script was created to simulate the subpatching tool in Lightwave when hitting tab.  I have mapped this key to tab, par my habits of toggling the mesh as I model.
 
 It subdivides the polymesh to openGL level 2, render level 3, sets the discontinuity angle to 89. 
 
 When toggled it sets subdivisions openGL level 0, render level 0, sets the discontinuity angle to 0 (for easier viewing of the facets when modeling).
 
 It also makes geometry approximation a local property, if it is not already.
 ************************************/	
 
 ActivateObjectSelTool(null);
 
 //Make sure something is selected
 
 if(Selection.count > 0)
 {
 	//make Geometry Approximation Local
 	
 	localProp();
 	
 	//for the subdivsion
 	
 	levels();
 		
 }
 
 if(Selection.count == 0)
 {
 	logMessage("Select at least one polygon mesh.");
 }
 
 /**************************************/
 function localProp()
 {
 	for(i=0; i < Selection.count; i++)
 	{
 		var oTotal = Selection.count
 		var oObj = Selection(i);
 		var oType = oObj.type;
 		var oGeo = oObj.properties("Geometry Approximation");
 		
 		//check if Geo. Approx. is local, if not, make it local
 		if(!oObj.localproperties("Geometry Approximation"))
 		{			
 			MakeLocal(oGeo, siDefaultPropagation);
 				//Only display the message one time	
 				switch (i)
 				{
 				case oTotal-1:	
 					//logMessage("Geometry Approximation is now a local property for all " + oTotal + " polymeshes");
 				Default:
 					undefined;
 				}
 		}
 	}
 }
 
 /**************************************/
 function levels()
 {
 	for(i=0; i < Selection.count; i++)
 	{
 		
 		var maxLevel = 3;
 		var maxDiscontinuityAngle = 89;
 
 		var oTotal = Selection.count
 		var oObj = Selection(i);
 		var oType = oObj.type;
 		
 		//after made local, check for local properties
 		var oGeoLocal = oObj.localproperties("Geometry Approximation");
 
 		if(oType == "polymsh" || oType == "polySubComponent")
 		{		
 			
 			if(oGeoLocal.parameters("gapproxmosl").Value == 0)
 			{
 				//discontinuity angle
 				oGeoLocal.parameters("gapproxmoan").Value = maxDiscontinuityAngle;
 				//OpenGL
 				oGeoLocal.parameters("gapproxmosl").Value = 2;
 				//Render
 				oGeoLocal.parameters ("gapproxmordrsl").Value = maxLevel;
 			}
 			else
 			{
 				//discontinuity angle
 				oGeoLocal.parameters("gapproxmoan").Value = 0;
 				//OpenGL
 				oGeoLocal.parameters("gapproxmosl").Value = 0;
 				//Render
 				oGeoLocal.parameters ("gapproxmordrsl").Value = 0;
 			}
 				//Only display the message one time	
 				switch (i)
 				{
 				case oTotal-1:
 					//logMessage ("OpenGL and Render levels are " + oGeoLocal.parameters("gapproxmosl").Value + ", Angle is " + oGeoLocal.parameters("gapproxmoan").Value + ", for all " + oTotal + " polymeshes.");
 				Default: 
 					undefined;
 				}
 		}
 		else
 		{
 			logMessage("Selection is not a polygon mesh.")
 		}
 	}
 }
 //end script
 

#6

Here are a bunch of very useful scripts from Michele Sandroni

can be downloaded from: http://www.motionblur.it/

Xsi Metaballs v1Metaballs (compiled operator, C++)

    Xsi Shatter v4 
    Breakup polygon objects into 3D fragments
    
   Xsi Wire / String v1
    Rope/Cable/Wire simulator (scripted operator)
    
      XsiAMP v1 
      WAV audio files to animation fcurves (compiled, Visual Basic)
      
      Camera converter v2.1 
      Crossplatform camera converter (Xsi - Maya - Max)
      
      Xsi Mirror / Side select v1 
      Fast subcomponent selection / mirroring helpers
      
      Xsi Scene Manager v1 
      Scene management utility
      
      Xsi Flow polygons v2 
      Break polygon object into polygons at runtime (scripted  operator)
      
      Xsi Geometry displacer v1 
      Displace geometry via image clips (scripted  operator)
      
      Xsi ImageClip to weight map v1 
      Generate weightmaps from image clips (scripted  operator)

#7

Hi everyone,

I just finished writing a script that will automate the process of making a shadow / not-deforming skin, for the purpose of having faster frame rate when animating
envelopes.

it will cut the geometry around each bone, and make this new object a child of this bone.
After the script if done, it will hide the Envelopes, and un-hide the extracted objects,
and also create a group for them.

here’s a page that explains how to use the script, with a demo scene and of course
the script it self

it will work on XSI 5.x or higher

http://www.ozadi.com/E2C.html

Please let me know if stuff doesnt work… so I can try and fix this.

and a couple tiny scripts:

This Script will Offset an SRT animation - Select an animated object, move/rotate/scale it,
run the script and check/uncheck what you want to do.

This is a simple script that will Autoextract subcurves, from imported .AI or .EPS curves:
select all crvlist objects, and run the script.


#8

This is a simple macro style script I made to create Joystick style controls, such as the ones seen in Jason Osipa’s book “Stop Staring”.

For all you people not fimiler with scripts, copy/paste the code below into your script editor and run it.

Then just put a name for the control in your box and it will make a controller smiler to:

Thanks :slight_smile:


'joyCnt JoyStick Creator
'Version 1
'Chris Bate www.chrisbate.com


set myRoot = ActiveProject.ActiveScene.Root

'Creates PPG
***'------------------------------------
***AddProp "Custom_parameter_list",myRoot, , "tmpJoyCnt", tmpJoyCnt
***SIAddCustomParameter "tmpJoyCnt", "controlName", siString, , 0, 1, , 4, 0, 1, "Control Name"
***InspectObj tmpJoyCnt, "", "Joystick Control Maker", siModal
***'====================================


'Setup Variables
***'------------------------------------
***joyName = getvalue ( tmpJoyCnt & ".controlName")
***joyCnt = "joyCnt_" & joyName
***'====================================
***
'Create Border, Handle and Text
***'------------------------------------
***GetPrim "Square"
***SetValue "square.Name", joyCnt
***SetValue joyCnt & ".square.length", 2
***
***GetPrim "Circle"
***SetValue "circle.Name", joyCnt & "Handle"
***SetValue joyCnt & "Handle.circle.radius", 0.2
***
***CreatePrim "Text", "NurbsCurve"
***SetValue "text.Name", joyCnt & "Text"
***SetValue joyCnt & "Text.text.text", "_RTF_{\rtf1\ansi\deff0{\fonttbl{\f0\froman\fprq7\fcharset0 Arial;}}" & vbCrLf & "\viewkind4\uc1\pard\qc\lang2057\f0\fs20 " & joyName & "\par" & vbCrLf & "}" & vbCrLf & ""
***SetValue joyCnt & "Text.crvlist.TextToCurveList.fitsize", 0.2
***'====================================
***
'Sets Parents, Selectability and Positions
***'------------------------------------
***ParentObj joyCnt, joyCnt & "Handle"
***SelectObj joyCnt & "Handle"
***AddProp "Transform Setup"
***SetValue joyCnt & "Handle.transformsetup.tool", 4
***SetValue joyCnt & "Handle.transformsetup.zaxis", False
***
***ParentObj joyCnt, joyCnt & "Text"
***SelectObj joyCnt & "Text"
***Translate , 0, -1.25, 0, siRelative, siLocal, siObj, siXYZ, , , , , , , , , , 0
***SetNeutralPose , siSRT, False
***SetValue joyCnt & "Text.visibility.selectability", False
***'====================================
***
'Sets limits on handles movement
***'------------------------------------
***SetValue joyCnt & "Handle.kine.local.posxminactive", True
***SetValue joyCnt & "Handle.kine.local.posxminlimit", -1
***SetValue joyCnt & "Handle.kine.local.posyminactive", True
***SetValue joyCnt & "Handle.kine.local.posyminlimit", -1
***SetValue joyCnt & "Handle.kine.local.poszminactive", True
***SetValue joyCnt & "Handle.kine.local.poszminlimit", 0
***SetValue joyCnt & "Handle.kine.local.posxmaxactive", True
***SetValue joyCnt & "Handle.kine.local.posxmaxlimit", 1
***SetValue joyCnt & "Handle.kine.local.posymaxactive", True
***SetValue joyCnt & "Handle.kine.local.posymaxlimit", 1
***SetValue joyCnt & "Handle.kine.local.poszmaxactive", True
***SetValue joyCnt & "Handle.kine.local.poszmaxlimit", 0
***'====================================
***
'Sets Colours
***'------------------------------------
***MakeLocal joyCnt & ".display", siNodePropagation
***SetValue joyCnt & ".display.wirecol", 367
***
***MakeLocal joyCnt & "Handle.display", siNodePropagation
***SetValue joyCnt & "Handle.display.wirecol", 15
***'====================================

'Finishing Script
***'------------------------------------
***DeleteObj "tmpJoyCnt"
***SelectObj joyCnt
***'====================================


#9

here’s a little script that will randomly de-selects from a selected subcomponent collection.
select some points/polys/edges and run the script…

 
var sel = selection.item(0);
var sub = sel.subcomponent;
var compCount= sub.ComponentCollection.Count;
var selArr = new VBArray (sub.ElementArray);
var jarr = selArr.toArray();
StringIndex = sel.type.search("SubComponent");
Stype = sel.type.substr(0,StringIndex);
for (i=0;i<compCount;i++)
{ 
var random = (Math.random());
if (random>0.5)
{
ToggleSelection(sel.name+"."+Stype+"["+jarr[i]+"]", null, true);
}
}


#10

a useful yet simple script for xsi i saw on xsi base by Atyss [greatfor ppl coming from maya] selec a meterial and run it to select all objects with the current material
[size=2]selectobj( selection(0).usedby );[/size]


#11

A plugin I wrote last week : XSI_Guides


#12

When symmetry modeling, I copy a clone of the original half and scale it X-1 and every change i do to my original half is automaticly updated on the clone, that’s ok, But I would like to see a merged single element without that anoying seam, so I merge the 2 sides, what makes a copy of the original and clone then apply a simmetry map turn on sym in the transform panel and it makes the symmetry modeling when moving points, BUT if I use an add edge tool or any other subdivision method, new polygons are not updated in the other side and even the symmetry does not work the same since it makes an approximation of the points of the oposite side
[b]Is it there a [color=Lime]sript that could make a MERGED copy of two sides and work in perfect symmetry when moving and adding new geometry?

[/b]Another Question:

I’d love to move points without having to use “T” to select them and then hold “T” to select another point to preserve my current transform, I can use the move point tool and it works great, but only one point at the time!, i cannot see the transform gizmo (axis transform) and i cannot use it with other components :banghead: of course i could use the QWERTY tools and alt navigation camera to override this selection method, but still i have to first click to select and then click and hold to transform!
[color=Yellow][b]
Is it there a [color=Lime]script or any other method without overriding XSI navigation keyboard to select and move components with a single click?

[/b]I would really appreciate if you share your experience about this matters, :)[/color][/color][/color]


#13

Hello,
This script converts texture uv editor selection to viewport polygon selection.


dim mylist(100000)
dim myindices(10000)
indice_count=0
selected_count=0
if selection.count>0 then
   set oObj = selection(0).Subcomponent.Parent3DObject
   set oGeometry = oObj.activeprimitive.geometry

  set subComponent = Selection(0).SubComponent
  selectedIndices = subComponent.ElementArray
  poly_count=oGeometry.polygons.Count
      ubnd=Ubound( selectedIndices, 1 )
      
  for j = 0 to ubnd
      indice=selectedIndices(j)
      skip=false
      for nn=0 to indice_count-1 
         if indice=myindices(nn) then
            skip=true
            logmessage "skip"
         end if
      next
      if skip=false then
         for i=0 to poly_count - 1
             set osample = oGeometry.polygons(i).samples
           poly_found=false
           for kk=0 to osample.count-1
                  if indice=osample(kk).index then 
                     mylist(selected_count)=i
                     selected_count=selected_count+1
                     poly_found=true
                     for mr=0 to osample.count-1
                        myindices(indice_count)=osample(mr).index
                        indice_count=indice_count+1   
                     next
                     exit for
                  end if
           next
           if poly_found=true then
                 exit for
               end if
         next
      end if
  next

   deselectall
   for counter=0 to selected_count-1
      AddToSelection oGeometry.polygons(mylist(counter)) , , True
   next
   'SelectGeometryComponents  oGeometry.polygons(selected_index)
end if


#14

3tehakanyuksel, sorry, but this script too slow…

my variant:


'SelectComponentsBySamples (VBS) author: depol@mail.ru
dim sind(),components()
str = ""
set o = selection(0).subcomponent.parent3dobject
set g = o.activeprimitive.geometry
set XSIDial = CreateObject("XSIDial.XSIDialog")
aItems = Array("Points","Edges","Polygons")
indx = XSIDial.ComboEx("Select Components Type", aItems, 0)

if (indx=-1) then 
	logmessage "User cancelled" 
else 
	logmessage "User selected: " & aItems( indx )
	redim sind(g.samples.count - 1)
	if indx = 0 then : cmppref = "pnt" : set cmps = g.points : end if
	if indx = 1 then : cmppref = "edge" : set cmps = g.edges : end if
	if indx = 2 then : cmppref = "poly" : set cmps = g.polygons : end if
	for each c in cmps
		for each s in c.samples
			sind(s.index) = c.index
		next
	next
	redim components(cmps.count - 1)
	for each s in selection(0).subcomponent.componentcollection
		if components(sind(s.index)) <> 1 then
			if str <> "" then
				str = str & ","
			end if
			str = str & sind(s.index)
			components(sind(s.index)) = 1
		end if
	next
	SelectObj o &"."& cmppref &"["& str &"]"
end if


#15

wow this is uncomparebly faster than mine. Its a better idea to take it to a 2 nested loops and another loop instead of 3 nested loops. I am very enlighted by this code.
Thank you…


#16

Hi,

the Create Spine under the Skeleton menu, is not using the MakeSpine command,
introduced in v4.0

Me and another guy here, did a little hack to the rigs.vbs file, under :

C:\Softimage\XSI_5.x\Application\DSScripts

Now it uses the MakeSpine command instead, when calling SKELETON>CREATE SPINE
so it gives you the ability to have a strechy spine.

*** please use this on your own risk !!! ***

change the file extenion to .vbs
make a copy of the original rigs.vbs, to be safe
replace it with the old one.


#17

This is a simple script to set the BG grid and snap size to either inches or feet. It’s currently set to have a gridsize of feet and a snapsize of inches.


 
[size=1]inch = 0.254
 
foot = 3.048
 
'**** set gridsize or snapsize below *** 
 
gridsize = foot
 
snapsize = inch
 
gridarea = 100
 
'**** uses values defined above to set grid size and snap size ****
 
SetValue "*.*.*.camvis.disustep", gridsize
 
SetValue "*.*.*.camvis.snapustep", snapsize
 
SetValue "*.*.*.camvis.disvstep", gridsize
 
SetValue "*.*.*.camvis.snapvstep", snapsize
 
'**** sets grid area ****
 
SetValue "*.*.*.camvis.disextent", gridarea
 
[/size]


#18

Hi,

Me and a friend (Yaniv Gorali) wrote a little Scripted Operator to draw a curve that shows where to locate a reflector so it will be reflected on a certain place on a polymesh.

A brief explanation and the xsiaddon can be found here:

Oz_ReflectionRay Page


#19

[size=2]Viewport Controls v2.0 is now available

Download it here

[http://www.xsibase.com/tools/plugins.php?detail=1291](http://www.xsibase.com/tools/plugins.php?detail=1291)

[/size] This plugin works in XSI 5.11 on Windows and Linux

Viewport Controls Overview

XSI has the concept of the “Active Viewport”.  
This plugin has many commands to assist 
artists’ workflow as well as new commands 
to access the viewports and their layout.  

During the creation of this plugin I wrote many useful 
commands and functions. When this plugin is installed 
scripters have access to these day-to-day commands

Viewport Controls Breakdown

This plugin installs 3 top level menu items:
1.    Camera
2.    Visibility
3.    Viewports

This addon consists of: 
ViewportControls.vbs – Commands for artists
ViewportControlsAPI.vbs - Commands for scripters

Isolated.xsivw – Control view for isolating objects

4 x  .presets files for Custom Preferences
ViewportControls
Isolate
QuickFlix
ViewSwitcher

ViewportControls Synoptic
ViewSwitcher Synoptic

ViewportControlsHelp.htm

New commands for artists

Viewport and Camera Commands
    KeyCamera
    KeySpot
    TearOffCamera
    CameraFromView
ToggleStats    
ToggleCustomInfo    
ToggleHeadlight    
    LoopShading
    LoopShadingActive
    Isolate
    TurnTableCreate
RotoscopeOffAll    
RotoscopeClearAll    
ResetDisplayMode    
DisplayGeometryOnly    
DisplayGeometryOnlyAll    
ResetVisibilityOptions    
ResetVisibilityOptionsAll    
ResetDisplayOptions
ResetDisplayOptionsAll

View Switching Commands:
    FrontView    
    RightView    
    UserView    
    TopView
    LeftView    
    BackView    
    BottomView    
    CameraView    

General Commands
    LoopViews    

QuickFlix
    QuickCapture:
    QuickRender    

Synoptics    
    ViewportSynoptic
    ViewSwitcher    

There are a number of additional menu items in this plugin
that are not listed here as they are self-explanatory



Overview of some new artist commands

KeyCamera
    If the active viewport is a scene camera this will key:
    the local rotation and translation and the
    field of view, projection and focal length.
    If the camera has an interest this will key:
    The interest’s local rotation and translation
    
    Note:  In the ViewportOptions property page
    there is an option to key selected cameras

When Key Selected Cameras is on
ONLY if your selection contains:
Any Cameras, Camera Roots, Interests
or Groups (with any of the above in them)
KeyCamera will find and key the: 
Cameras and Interests in this selection.
This will ignore the active viewport.  
BUT if no camera elements are selected it 
will behave as normal

Spot Light View Menu
    Any viewport can look through a spotlight.
    As with cameras, SpotLights have a dedicated menu.
    Key SpotLight will key the rotation and translation and
    on its interest if it has one.
      
Tear Off Camera
    This will work for any camera viewport type.
    It will create on Object View and copy all parameter
    values.

Create Light from View
    If the viewport is a Scene Camera a spot light is created
    and the cone angle matching the camera’s field of view.
    If the viewport is a View Camera an infinite is created 
    If the viewport is already a spot light it will log an error  

Create Camera from View
    This works for Scene Cameras and SpotLights 
    with or without an interest. 
    If the viewport is a View Camera a camera is created 
    without an interest or a parent.  This is useful for camera
    texture projections, as the camera can be animated. 
    On creation the viewport switches to the new camera, 
    which inherits the name from the view or light source
    
LoopShading
    This should be mapped to a hotkey
    This uses the position of the curser under the mouse
    Whichever viewport it is over it will loop through 
    wireframe, shaded, hiddenline and textured 

LoopShadingActive
    As above but uses the active viewport
    
LoopViews    
    This should be mapped to a hotkey
    Whichever viewport active it will loop through 
    Right, Top, Front, User, Camera (the first camera in the scene it finds)

Isolate
    AKA Isolate With Options
    This opens a mini ppg which has a few more options than the 
    normal Isolate Selected
    When the mini ppg is closed it will Un-Isolate all Views
    
TurnTableCreate
    Creates a turntable camera and a controls PPG
    The controls PPG can be found under the turntable model
    This can be used from any view
    This will also work on a sub-component selection

View Switching Commands:
    FrontView    
    RightView    
    UserView    
    TopView
    LeftView     (this is actually a Right view with a Left view values)
    BackView    (this is actually a Front view with a Back view values)
    BottomView (this is actually a Top view with a Bottom view values)    
    CameraView    

QuickFlix (custom preference)
    QuickCapture
        One click to capture the viewport playback
    QuickRender
        One click to render the active viewport (includes audio)
    QuickCaptureOptions    
        A few settings not found in the normal capture options

Synoptics    
    ViewportSynoptic
        A synoptic toolbar for the most common viewport commands
    ViewSwitcher    
        A mini synoptic for switching between Right, Top, Front, User, Camera

New commands for scripting
GetViewport
SetViewport
SetViewportLayout
GetViewportNumber
GetLightFromViewport
CopyViewport
GetSelFilter
StringList
StringTrim 
DeleteBranch
GetSceneName
GetScenePath
CamerasFromSelection


Have fun!

Chinny


#20

This script is a partial answer to an old question of mine where I wanted ghosting to only be on for the selected object. Basically it turns on ghosting for all views, disables ghosting on all objects and then toggles ghosting on or off for the currently selected object.

SetValue "*.*.*.camdisp.animghostenable", true
set osel = application.selection(0)

objghost = getvalue(oSel & ".visibility.ghosting")

SetValue oSel & ".visibility.ghosttype", 2

' set above to:

'0 for object

'1 for point

'2 for pose 

'3 for velocity

'4 for trail

logmessage objghost

logmessage osel

'SetValue oSel & ".visibility.ghosting", False

If objghost = False then

Setvalue "*.visibility.ghosting", False

SetValue oSel & ".visibility.ghosting", true

else

SetValue oSel & ".visibility.ghosting", False

end if