All Projects → eddiehoyle → Screenspace

eddiehoyle / Screenspace

Licence: apache-2.0
Screenspace pickables for Maya

Projects that are alternatives of or similar to Screenspace

Mayamatchmovesolver
A Bundle Adjustment solver for MatchMove related tasks.
Stars: ✭ 50 (-46.24%)
Mutual labels:  maya
Circularpicker
CircularPicker is helpful for creating a controller aimed to manage any calculated parameter.
Stars: ✭ 73 (-21.51%)
Mutual labels:  picker
Rc Datetime Picker
React component for datetime picker by Moment.js
Stars: ✭ 85 (-8.6%)
Mutual labels:  picker
Android Dial Picker
A custom rotating dial like picker for android
Stars: ✭ 56 (-39.78%)
Mutual labels:  picker
Picker
Picker - A CameraX based WhatsApp Style Image-Video Picker
Stars: ✭ 69 (-25.81%)
Mutual labels:  picker
React Native Bubble Select
An easy-to-use customizable bubble animation picker, similar to the Apple Music genre selection
Stars: ✭ 78 (-16.13%)
Mutual labels:  picker
Sizeslidebutton
A fun Swift UIControl for picking a size
Stars: ✭ 46 (-50.54%)
Mutual labels:  picker
Bubble Picker
An easy-to-use animation which can be used for content picking for Android
Stars: ✭ 1,316 (+1315.05%)
Mutual labels:  picker
Colorpickerwpf
Simple color picker control for WPF
Stars: ✭ 71 (-23.66%)
Mutual labels:  picker
Tcpickerview
Picker view popup with multiply rows selection written in Swift
Stars: ✭ 84 (-9.68%)
Mutual labels:  picker
Datetimepicker
This is a custom android holo datepicker timepicker
Stars: ✭ 56 (-39.78%)
Mutual labels:  picker
Mkcolorpicker
ColorPicker is a fantastic color picker 🎨 written in Swift. Developers can use our color picker as is or they can customize it with all the available features
Stars: ✭ 59 (-36.56%)
Mutual labels:  picker
React Native Picker Select
🔽 A Picker component for React Native which emulates the native <select> interfaces for iOS and Android
Stars: ✭ 1,229 (+1221.51%)
Mutual labels:  picker
Materialfilepicker
Picking files since 2015
Stars: ✭ 1,056 (+1035.48%)
Mutual labels:  picker
Appchooser
自定义打开指定文件的应用选择器。
Stars: ✭ 87 (-6.45%)
Mutual labels:  picker
Persianrangedatepicker
Persian range date picker for android.
Stars: ✭ 48 (-48.39%)
Mutual labels:  picker
Material Ui Color Picker
<ColorInput> component for material-ui
Stars: ✭ 74 (-20.43%)
Mutual labels:  picker
Materialdaterangepicker
A material Date Range Picker based on wdullaers MaterialDateTimePicker
Stars: ✭ 1,315 (+1313.98%)
Mutual labels:  picker
Angular Bootstrap Datetimepicker
Native Angular date/time picker component styled by Twitter Bootstrap
Stars: ✭ 1,289 (+1286.02%)
Mutual labels:  picker
Magnetic
SpriteKit Floating Bubble Picker (inspired by Apple Music) 🧲
Stars: ✭ 1,252 (+1246.24%)
Mutual labels:  picker

screenspace

Screenspace is a Maya plugin that allows pickable shapes to be added to transforms and display as if they're attached to the viewport.

alt text

Pickables can be styled and offset to your taste. Options include color, position, size, vertical and horizontal alignment, and many more.

alt text

Build your own custom interfaces and attach to any rig! (Azri rig courtesy of: https://www.gameanim.com/)

alt text

Building

You'll need CMake, git, and Maya to build from source. Run the following commands in a shell.

# Clone the repo
git clone [email protected]:eddiehoyle/screenspace.git

# Build
cd screenspace
mkdir build
cd build
cmake ..
make

Note: You might want to change the target Maya version. That's in screenspace/CMakeLists.txt, change the line set(MAYA_VERSION <Your Target Version>

Once built, check the plugin directory for a bunch of directories and files.

# Add to XBMLANGPATH directory
plugin/icons/out_pickable.png

# Add to MAYA_SCRIPT_PATH directory
plugin/scripts/AEpickableTemplate.mel

# Add to MAYA_PLUG_IN_PATH directory
plugin/screenspace.bundle # OSX
                  .so     # Linux
                  .dll    # Windows

See Maya's plugin installation guide for more information about these paths.

Loading

In Maya, go to Windows > Settings/Preferences and open the Plug-in Manager. Look for the screenspace plugin. Load it and you're all set!

How to use

Screenspace comes with an addPickable command that makes attaching to existing transforms easy.

from maya import cmds
cmds.addPickable(parent="transform1", camera="perspShape")

The above example features the minimum required arguments to run this command. You'll need a parent to attach the pickable to and a camera whose viewports to display the pickable on. Fill in these details to fit your needs.

Here's an example Python script to attach a pickable to a selected transform and the perspective camera.

from maya import cmds
selected = cmds.ls(selected=True, type="transform")
if len(selected) != 1:
    raise ValueError("Please select one transform.")
cmds.addPickable(parent=selected[0], camera="perspShape")

Advanced

The addPickable command also supports a bunch of extra options.

cmds.addPickable(parent="transform1",     # Attach pickable to this transform 
                 camera="perspShape",     # Display pickable on this camera's viewports
                 rotate=30.0,             # Rotation in degrees
                 offset=(50.0, 20.0),     # Offset shape position
                 size=20.0,               # Size multiplier
                 width=2.0,               # Width of shape
                 height=2.0,              # Height of shape
                 color=(1.0, 0.0, 0.5),   # Color RGB values (normalised)
                 opacity=0.5,             # Opacity (normalised)
                 position="relative",     # "relative" or "absolute" position
                 verticalAlign="middle",  # "bottom", "middle", or "top" alignment
                 horizontalAlign="left",  # "left", "middle", or "right" alignment
                 depth=0,                 # Ordering. Lower number means higher priority
                 )

Removing

Screenspace also comes with a removePickables command. This command attempts to remove any pickables found under current selection, or from a specified transform.

# Remove all pickables from selection
cmds.removePickables(selected=True)

# Remove pickables from 'transform1' node
cmds.removePickables(parent="transform1")
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].