// Copyright (C) 1997-2004 Alias Systems Corp. // // The information in this file is provided for the exclusive use of the // licensees of Alias. Such users have the right to use, modify, // and incorporate this code into other products for purposes authorized // by the Alias license agreement, without fee. // // ALIAS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO // EVENT SHALL ALIAS BE LIABLE FOR ANY SPECIAL, INDIRECT OR // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR // PERFORMANCE OF THIS SOFTWARE. // // Alias Script File // MODIFY THIS AT YOUR OWN RISK // // Creation Date: 16 October 1996 // // // Procedure Name: // selPriority // // Description: // Sets the selection priorities all at once, // based on a state passed in, in order to // 'weight' selection towards animation, // modeling, rendering, dynamics, etc.. // // Input Arguments: // mode to set the priorities to. // // Return Value: // None. // // // // Declare global list of priority items. // New items must be added to the end of this list or else // the related optionVar will no longer be valid. // global string $gSelItems[] = { "handle", "ikHandle", "ikEndEffector", "joint", "light", "camera", "lattice", "cluster", "sculpt", "nonlinear", "nurbsCurve", "curveOnSurface", "nurbsSurface", "polymesh", "plane", "particleShape", "emitter", "field", "fluid", "spring", "rigidBody", "rigidConstraint", "locator", "dimension", "texture", "implicitGeometry", "controlVertex", "editPoint", "hull", "polymeshVertex", "polymeshEdge", "polymeshFace", "polymeshUV", "curveParameterPoint", "surfaceParameterPoint", "surfaceEdge", "isoparm", "latticePoint", "particle", "springComponent", "jointPivot", "scalePivot", "rotatePivot", "selectHandle", "localRotationAxis", "imagePlane", "animCurve", "animKeyframe", "animBreakdown", "animInTangent", "animOutTangent", "subdiv", "subdivMeshPoint", "subdivMeshEdge", "subdivMeshFace", "surfaceFace", "hairSystem", "follicle" // New items should be added here! }; global proc selPriority( string $mode ) { global string $gSelectPriorityMode; global int $gCustomSelPriority[]; global string $gSelItems[]; int $animWeights[] = { 10, // handle 10, // ikHandle 10, // ikEndEffector 9, // joint 2, // light 2, // camera 2, // lattice 2, // cluster 2, // sculpt 2, // nonlinear 2, // nurbsCurve 2, // curveOnSurface 2, // nurbsSurface 2, // mesh 2, // plane 2, // particleShape 2, // emitter 2, // field 2, // fluid 2, // spring 1, // rigidBody 2, // rigidConstraint 2, // locator 2, // dimension 2, // texture 2, // implicitGeometry 5, // controlVertex 4, // editPoint 3, // hull 5, // polymeshVertex 3, // polymeshEdge 4, // polymeshFace 5, // polymeshUV 5, // curveParameterPoint 5, // surfaceParameterPoint 6, // surfaceEdge 5, // isoparm 5, // latticePoint 5, // particle 5, // springComponent 5, // jointPivot 5, // scalePivot 5, // rotatePivot 5, // selectHandle 5, // localRotationAxis 5, // imagePlane 8, // animCurve 10, // animKeyframe 10, // animBreakdown 9, // animInTangent 9, // animOutTangent 2, // subdiv 4, // subdivMeshPoint 3, // subdivMeshEdge 3, // subdivMeshFace 4, // surfaceFace 2, // hairSystem 3 // follicle }; int $modelWeights[] = { 2, // handle 2, // ikHandle 2, // ikEndEffector 2, // joint 2, // light 2, // camera 2, // lattice 2, // cluster 2, // sculpt 2, // nonlinear 10, // nurbsCurve 9, // curveOnSurface 10, // nurbsSurface 10, // mesh 10, // plane 2, // particleShape 2, // emitter 2, // field 2, // fluid 2, // spring 1, // rigidBody 2, // rigidConstraint 2, // locator 2, // dimension 2, // texture 2, // implicitGeometry 14, // controlVertex 13, // editPoint 12, // hull 14, // polymeshVertex 12, // polymeshEdge 13, // polymeshFace 14, // polymeshUV 14, // curveParameterPoint 14, // surfaceParameterPoint 15, // surfaceEdge 14, // isoparm 4, // latticePoint 4, // particle 4, // springComponent 4, // jointPivot 4, // scalePivot 4, // rotatePivot 4, // selectHandle 4, // localRotationAxis 4, // imagePlane 8, // animCurve 10, // animKeyframe 10, // animBreakdown 9, // animInTangent 9, // animOutTangent 10, // subdiv 14, // subdivMeshPoint 12, // subdivMeshEdge 13, // subdivMeshFace 13, // surfaceFace 2, // hairSystem 3 // follicle }; int $renderWeights[] = {2, // handle 2, // ikHandle 2, // ikEndEffector 2, // joint 10, // light 10, // camera 2, // lattice 2, // cluster 2, // sculpt 2, // nonlinear 2, // nurbsCurve 2, // curveOnSurface 2, // nurbsSurface 2, // mesh 2, // plane 2, // particleShape 2, // emitter 2, // field 2, // fluid 2, // spring 1, // rigidBody 2, // rigidConstraint 2, // locator 2, // dimension 10, // texture 2, // implicitGeometry 5, // controlVertex 4, // editPoint 3, // hull 5, // polymeshVertex 3, // polymeshEdge 4, // polymeshFace 5, // polymeshUV 5, // curveParameterPoint 5, // surfaceParameterPoint 6, // surfaceEdge 5, // isoparm 5, // latticePoint 5, // particle 5, // springComponent 5, // jointPivot 5, // scalePivot 5, // rotatePivot 5, // selectHandle 5, // localRotationAxis 5, // imagePlane 8, // animCurve 10, // animKeyframe 10, // animBreakdown 9, // animInTangent 9, // animOutTangent 2, // subdiv 5, // subdivMeshPoint 3, // subdivMeshEdge 4, // subdivMeshFace 4, // surfaceFace 2, // hairSystem 2 // follicle }; int $dynWeights[] = { 2, // handle 2, // ikHandle 2, // ikEndEffector 2, // joint 2, // light 2, // camera 2, // lattice 2, // cluster 2, // sculpt 2, // nonlinear 2, // nurbsCurve 2, // curveOnSurface 2, // nurbsSurface 2, // mesh 2, // plane 10, // particleShape 10, // emitter 10, // field 10, // fluid 10, // spring 10, // rigidBody 10, // rigidConstraint 2, // locator 2, // dimension 2, // texture 2, // implicitGeometry 5, // controlVertex 4, // editPoint 3, // hull 5, // polymeshVertex 3, // polymeshEdge 4, // polymeshFace 5, // polymeshUV 5, // curveParameterPoint 5, // surfaceParameterPoint 6, // surfaceEdge 5, // isoparm 5, // latticePoint 5, // particle 5, // springComponent 5, // jointPivot 5, // scalePivot 5, // rotatePivot 5, // selectHandle 5, // localRotationAxis 5, // imagePlane 8, // animCurve 10, // animKeyframe 10, // animBreakdown 9, // animInTangent 9, // animOutTangent 2, // subdiv 5, // subdivMeshPoint 3, // subdivMeshEdge 4, // subdivMeshFace 4, // surfaceFace 10, // hairSystem 10 // follicle }; string $cmd; switch( $mode ) { case "nurbs": for( $i=0; $i < size( $gSelItems ); $i++) { $cmd = ("selectPriority -" + $gSelItems[$i] +" "+ $modelWeights[$i]); eval $cmd; } $gSelectPriorityMode = "nurbs"; break; case "rendering": for( $i=0; $i < size( $gSelItems ); $i++) { $cmd = ("selectPriority -"+$gSelItems[$i] +" "+ $renderWeights[$i]); eval $cmd; } $gSelectPriorityMode = "rendering"; break; case "dynamics": for( $i=0; $i < size( $gSelItems ); $i++) { $cmd = ("selectPriority -" + $gSelItems[$i] +" "+ $dynWeights[$i]); eval $cmd; } $gSelectPriorityMode = "dynamics"; break; case "custom": for( $i=0; $i < size( $gSelItems ); $i++) { $cmd = ("selectPriority -" + $gSelItems[$i] +" "+ $gCustomSelPriority[$i]); eval $cmd; } $gSelectPriorityMode = "custom"; break; case "animation": default: for( $i=0; $i < size( $gSelItems ); $i++) { $cmd = ("selectPriority -" + $gSelItems[$i] +" "+ $animWeights[$i]); eval $cmd; } $gSelectPriorityMode = "animation"; } }