|
|
|
Tell us what you think of the site.
|
Autodesk Media & Entertainment User Community
|
Autodesk® 3ds Max®
|
|
Autodesk® Maya®
|
|
Autodesk® Softimage®
|
|
Autodesk® MotionBuilder®
|
|
Autodesk® Mudbox™
|
|
Autodesk® ImageModeler™
|
|
Autodesk® Sketchbook® Pro
|
|
Autodesk® Smoke on Mac®
|
| Is There a "Xray" Toggle Script or Plugin?
|
|
|
Does anyone know of a script or plugin to toggle “Xray” in Softimage? I tried to find the command in the keyboard mapping menu but I can’t seem to find it. I could only find the “wireframe” toggle command but not the “Xray” command. Basically I just want to be able to toggle Xray while modeling so I can see through two different objects at the same time while modeling. Any help would be appreciated. Thanks.
|
|
|
|
I dont fully understand what you need, the X-ray mode in Softimage is present, but its used to see through objects only certain things, like Bones or Null, its made because when you rig and animate you have the shading of the surface but you still are able to see the bones inside the model, example here:

If you want something like this:

You need to use the shader called “Phong” and increase its transparency, since its the only one that works for this special purpose, mia_material and architectural material doesnt have transparency preview in viewport.
For modeling i would suggerst to use a phong and give it a transparency.
|
|
|
|
I think this might help, nothing fancy,
just one line in a custom command, to which you can map a shortcut key.
The line of code simply is
Application.ToggleValue("xrayshaded", "Camera.camdisp");
...the rest is pregenerated by the Plugin Manager…
edit: removed the link, because the plugin doesn’t seem to work…
The “other” Softimage community: si-community.com
|
|
|
|
Thank you for the reply guys
@langdon: Yeah I know that the X-ray mode is used for animation to see through bones but it can also be used for modeling if you want to see through two different models. What I mean is that it can be used to move vertices that have overlapped to another geometry while in shaded mode and sometimes you don’t even know that the vertices have overlapped so you use X-ray mode to pull them out. I hope that makes sense. Toggling the X-ray mode on and off just makes it easier for me instead clicking back and forth on the display mode menu on the top right of the viewport. There is actually a similar script like this but it is for Maya though.
@Hirazi Blue: Thank you for providing the plug-in. That is actually what I was looking for and have searched all over the net for so thank you.
|
|
|
|
Well I put the ToggleXPlugin in my plug-ins folder but it does not seem to work. Maybe because I am running it on a 64 bit version of Softimage or did I miss something. I went under the “Keyboard Mapping” menu and found the “ToggleX” command and assigned a hotkey for it but it doesn’t seem to work. I don’t know what happened. The only way I could get it to work for me if I keep pressing “Display option” on the upper right of the viewport and then pressing the hotkey for the ToggleX. I think it should have worked but in a funky kind of way.
|
|
|
|
Sorry about that, I created it in a hurry yesterday, so I didn’t test it thoroughly. But it did appear to work at my end (otherwise I wouldn’t have posted it...) I will try to look at it today to see if it can be fixed. Removed the link.
The “other” Softimage community: si-community.com
|
|
|
|
|
Just had a quick look: it seems my liitle ToggleX script only has any effect, if the
“XRay Display Type” in the “Camera Display Options” is set to “Screen” (not the default “Overlay")
Not sure, if that’s in any way helpful, as I hardly use the XRay functionality myself. Please let me know…
Author: Hirazi Blue
|
| Replied: 27 February 2011 07:04 PM
|
|
|
|
|
Hey there Hirazi Blue. I figured it out last night. You do have to set the “XRay Display Type” to either “Transparent” or “Screen” under the “Display Options”. The XRay Toggle plugin does work so thank you for sharing this wonderful plug-in. The problem was on my end actually. I had a problem with the current scene I was working in for some reason, maybe because it has been saved over from previous versions of Softimage. I had to actually export all my geometry as a .obj file created an entirely new scene and then import back in my geometry and then the XRay Toggle worked. At first when I tested it out on the scene I was currently working on it did not work but when I tested on a fresh new scene the XRay toggle plug-in did work so all is well now.
Going off topic here but do you know a way to create a new right click menu in Softimage similar to when you are in component mode like say the “point” mode and when you press right click there are a bunch of different options that comes up? The reason I ask is because I want to be able to switch between different component modes without having to press keyboard shortcuts everytime I switch. I much prefer having a right click menu similar to what Maya has in terms of selecting my components that way I don’t have to keep fumbling around my keyboard so much. I know that Softimage is a keyboard shortcut centric program in order for you to work faster but some stuff could be better off if it has its own menu so you don’t have to keep pressing buttons when you want to switch components. Thanks.
|
|
|
|
I would advise you to take a look at QMenu or XPOP3 (which you can find both at the invaluable rray.de resource website) as I haven’t played with custom menues in a while…
The “other” Softimage community: si-community.com
|
|
|
|
Thanks Hirazi Blue for all your help. I’ll be sure to checkout the rray.de website.
|
|
|
|
Came a little late, but this is the code I use for my XRay Toggle button. It toggles XRay only in the active viewport.
VBScript
vw = GetFocusedViewport
set mCamera = GetViewCamera(-1)
if vw = "A" then
set mCamera = GetViewCamera(0)
elseif vw = "B" then
set mCamera = GetViewCamera(1)
elseif vw = "C" then
set mCamera = GetViewCamera(2)
elseif vw = "D" then
set mCamera = GetViewCamera(3)
end if SetValue mCamera & ".camdisp.xraytype", 1
ToggleValue "xrayshaded", mCamera &".camdisp"
And this is the one I use to Toggle a Material Transparency between 0.6 and 0. Works with multiple objects.
'Toggles Transparency Object
Check
'If nothing is selected quit
sub Check if Application.Selection.Count = 0 then
MsgBox " Select at least 1 object"
exit sub
else
ToggleTransObj
end if end sub
sub ToggleTransObj 'Get Object Material Info
for each oItem in selection
Set oMat = oItem.Material
oShad = getvalue (oMat & ".Surface.Name")
oRed = getvalue(oMat & "." & oShad & ".transparency.red")
oGreen = getvalue(oMat & "." & oShad & ".transparency.green")
oBlue = getvalue(oMat & "." & oShad & ".transparency.blue")
'Activate Transparency in Material and toggles Transparency between 0.6 and 0 if oRed <> 0.6 or oGreen <> 0.6 or oBlue <> 0.6 Then
SetValue oMat & "." & oShad & ".refract_inuse", True
SetValue oMat & "." & oShad & ".transparency.red", 0.6
SetValue oMat & "." & oShad & ".transparency.green", 0.6
SetValue oMat & "." & oShad & ".transparency.blue", 0.6 Else
SetValue oMat & "." & oShad & ".transparency.red", 0
SetValue oMat & "." & oShad & ".transparency.green", 0
SetValue oMat & "." & oShad & ".transparency.blue", 0
End if next
end sub
I just started to learn scripting by my own about a week ago so my methods may not be optimal but it works for me, for now.
|
|
|
|
|
Nice, works perfectly, thanks :)
Author: Zabander
|
| Replied: 06 July 2011 07:27 PM
|
|
|
|
|
|
|