Adverti horiz upsell

User Selections 3.3.0 for Maya (maya script)

Create selection presets

License
Button download
1,189 Downloads

Compatibility

  • 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011, 2010, 2009, 2008, 8.x

Operating Systems

  • Linux
  • Mac
  • Windows

History

Created:10/10/2009
Last Modified:05/18/2018
File Size: 11.4 KB

Keywords

selection, objects, User

Bugs

Not working

Statusclosed
Prioritylow
Date10/29/2016
Submitted byjomaro110 jomaro110
Not working with Maya 2017 on OSX

Comments on this bug:

  • CharlieWales

    CharlieWales said about 8 years ago:

    Can you try selecting vertex instead of edge?
  • CharlieWales

    CharlieWales said about 8 years ago:

    What is the error? What is the output of the script editor? The issue is that I cannot debug the script in OS X.
  • jomaro110

    jomaro110 said about 8 years ago:

    Nothing happens no error and no UI shows after applying the script.
  • CharlieWales

    CharlieWales said about 8 years ago:

    ok. Do you know how to run the script? maybe that is the issue
  • jomaro110

    jomaro110 said about 8 years ago:

    I just opened craSelections.mel in v3.0.0 folder and applied it in the command window in Maya
  • CharlieWales

    CharlieWales said about 8 years ago:

    The easiest way to show the UI would be: 1. copy the script to one of your script paths (for example run "internalVar -usd" , no quotes, in a MEL tab or MEL command line, to get your user scripts folder) restart Maya or execute "rehash" command and then run: craSelections; or 2 . You can drag and drop the file to the Script Editor (MEL tab), or Load Script from Script Editor and then execute it and afterwards execute: craSelections; or 3. Source Script from script editor and then execute: craSelections; or 4. Optionally you can Load the Script in the Script Editor, then put: craSelections; at the end of the script, select all text, middle-click drag to a shelf to create a shelf button. Click the shelf button.
  • jomaro110

    jomaro110 said about 8 years ago:

    Now I can see the UI after writing "craSelections" at the end but now when I select a face or edge and click on the "Click to store..." I get this message: Error on edge: // Error: line 118: The source attribute 'solidify.e[30].message' cannot be found. Error on face: // Error: line 118: The source attribute 'solidify.f[1].message' cannot be found. Error on vertex: // Error: line 118: The source attribute 'solidify.vtx[4].message' cannot be found. Thanks
  • jomaro110

    jomaro110 said about 8 years ago:

    When I go to Vertex mode and select few and click on "Click to store selected objects" I still get this error: // Error: line 118: The source attribute 'solidify.vtx[4].message' cannot be found.
  • jomaro110

    jomaro110 said about 8 years ago:

    By the way it works on the objects but not on the Vertices, Edges, Faces
  • CharlieWales

    CharlieWales said about 8 years ago:

    Maya 2017, Windows 10 x64. craSelections v3.2.0. Working ok. All types of selections for now.
  • CharlieWales

    CharlieWales said about 8 years ago:

    can you try with a simple sphere? just in case.
  • jomaro110

    jomaro110 said about 8 years ago:

    You can see it here, I did record a video to show the issue https://youtu.be/2XqNqIfL6mY
  • CharlieWales

    CharlieWales said about 8 years ago:

    Can you clear the Script Editor and the run the tool? then copy all the text from the Script Editor and paste it here. As I told you I am unable to debug on OSX.
  • jomaro110

    jomaro110 said about 8 years ago:

    /* 'User Selections' MEL script Author: Carlos Rico Adega - carlos.rico.3d@gmail.com First Release Date: October 10, 2009 Copyright © 2016 Carlos Rico Adega Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. SCRIPT NAME: craSelections.mel Main procedure: craSelections; DESCRIPTION: craSelections is a small script that lets you create selections and recall them later (it does not use sets o quick select sets) so nothing remains ins the scene. It has the option of creating hudButtons in the viewport also. Once the selections are set you can use the shift and control modifiers while pressing any window button or hudButton to add to the current selection (shift key) or remove from current selection (control key). LAUNCH UI: craSelections; Change Log: Version 3.0.0: Date: July 9, 2016 - Interface redesign - HUD buttons removed - Selections are now like quick select sets. - Selections are now node based instead of name based, meaning if you change the name of an object it will be still selected - Added Isolate button to toggle Isolate Selection on active view - Selections can be renamed by alt+click selection button - Now there are 10 selections instead of 9 - Not backwards compatible with version 2.2.0 - Version 2.2.0 included in the package Version 2.2.0: Date: July 1, 2016 - Added visibility button to toggle the visibility of the objects - Added template button to toggle the template state of the objects - Added right-click menu to delete objects on the clear selection button Version 2.1.0: Date: January 23, 2016 - Added load button to reload selection. They were auto-refreshed when a scene was opened via a scriptJob. - Added save button to save current selections in the UI to a new scene. Version 2.0.0: Date: January 21, 2016 - UI redesign - Selection now stored in the scene Version 1.1.0: Date: October 11, 2009 - Added auto update buttons state. If you create some HUD buttons and close the UI, later on when you reopen it, the selection buttons will reflect the currently used HUD buttons. Version 1.0.0: Date: October 10, 2009 - First release. */ global proc craSelectionStore( int $selNum) { string $sel[] = `ls -sl`; if(size($sel)) { if(!`objExists craUserSelections_storedSelections`) { createNode -n "craUserSelections_storedSelections" "chooser"; for($crai=0;$crai 1 ? {.0, .75, 1} : {.4, .6, 1}); button -e -w 65 -l (size($labelName) > 16 ? `substring $labelName 1 13` + "..." : $labelName) -vis 0 -dtg `stringArrayToString $sel " "` -ann (size($sel) > 1 ? ("Alt + click to rename selection\n\nMultiple objects:\n" + $sel[0] + "..."): ("Alt + click to rename selection\n\n" + $sel[0])) -bgc $color[0] $color[1] $color[2] -c ("craSelectStoredSelection " + $selNum) ("craStoreSel" + ($selNum)); button -e -vis 1 ("craStoreSel" + ($selNum)); nodeIconButton -e -vis 1 ("cra_toggleVis" + ($selNum)); nodeIconButton -e -vis 1 ("cra_toggleIsolate" + ($selNum)); nodeIconButton -e -vis 1 ("cra_toggleTemplate" + ($selNum)); nodeIconButton -e -vis 1 ("cra_delSel" + ($selNum)); } select -r $sel; setAttr -type "string" ("craUserSelections_storedSelections.selection" + ($selNum)) ($sel[0]+ ":" +(stringArrayToString($sel," "))); } else { craInViewMessage("Nothing selected. Select object(s) to store selection ", ($selNum)); } } global proc craSelectStoredSelection( int $selNum ) { string $objects[]; if(`objExists craUserSelections_storedSelections`) $objects = `listConnections ("craUserSelections_storedSelections.selectionMsg" + $selNum)`; else { createNode -n "craUserSelections_storedSelections" "chooser"; for($crai=0;$crai 1 ? {.0, .75, 1} : {.4, .6, 1}); button -e -vis 0 -dtg $selBufferStr -l (size($tokenBufferName[0]) > 16 ? `substring $tokenBufferName[0] 1 13` + "..." : $tokenBufferName[0]) -ann (size($selBuffer) > 1 ? ("Alt + click to rename selection\n\nMultiple objects:\n" + $selBuffer[0] + "..."): ("Alt + click to rename selection\n\n" + $selBuffer[0])) -w 65 -bgc $color[0] $color[1] $color[2] -c ("craSelectStoredSelection " + $crai) ("craStoreSel" +$crai); button -e -vis 1 ("craStoreSel" + $crai); nodeIconButton -e -vis 1 ("cra_toggleVis" + $crai); nodeIconButton -e -vis 1 ("cra_toggleIsolate" + $crai); nodeIconButton -e -vis 1 ("cra_toggleTemplate" + $crai); nodeIconButton -e -vis 1 ("cra_delSel" + $crai); } else { button -e -vis 0 -l ("click to store selected objects") -ann "Store selected objects" -dtg "" //-w 181 -bgc 0.4 0.4 0.4 -c ("craSelectionStore(" + $crai + ")") ("craStoreSel" + $crai); button -e -vis 1 ("craStoreSel" + $crai); nodeIconButton -e -vis 0 ("cra_toggleVis" + $crai); nodeIconButton -e -vis 0 ("cra_toggleIsolate" + $crai); nodeIconButton -e -vis 0 ("cra_toggleTemplate" + $crai); nodeIconButton -e -vis 0 ("cra_delSel" + $crai); } } } else craInViewMessage( "No selections to load", "" ); } global proc craInViewMessage( string $message1, string $message2 ) { if(`getApplicationVersionAsFloat` > 2013) { int $inViewStatus = `optionVar -q inViewMessageEnable`; optionVar -iv inViewMessageEnable true; print ("\n" + $message1 + " " + $message2); inViewMessage -a .9 -smg (" cannot be found. //
  • CharlieWales

    CharlieWales said about 8 years ago:

    Umm... looks like the text is truncated. I would advise to use method 1 explained earlier to run the script. 1. copy the script to one of your script paths (for example run "internalVar -usd" , no quotes, in a MEL tab or MEL command line, to get your user scripts folder), and copy the script craSelections.mel there. Restart Maya or execute "rehash" command and then run: craSelections; Note: I see in the header that the script version is 3.0.0. Try the one inside the root of the ZIP file v3.2.0. Not the v2.2.0 nor v3.0.0.
  • jomaro110

    jomaro110 said about 8 years ago:

    Many thanks...Now it's working with your last method :)

Post a comment: