ScriptSpot is a diverse online community of artists and developers who come together to find and share scripts that empower their creativity with 3ds Max. Our users come from all parts of the world and work in everything from visual effects to gaming, architecture, students or hobbyists.
Hello
I would like to show/hide bones by a toggle.
I found different scripts, but in max2014, these script can show bones but can't hide bones even with a redraw fonction ???
Anybody can help ?
Thanks Barigazy, I found :
hideByCategory.bones = (not hideByCategory.bones)
it works on bones but not on bipedobjects...
strangely, "hide category" "Bone Object" is switched "on" by the script, but biped objects not hidden...
Thanks very much Barigazy, it works.
As I really want a shortcut : i'll keep ( one with "on" and another "off" )=
-------
fn collectClasses optArr:#(cb_bone,cb_bip,cb_cat,cb_hub) =
(
for c in 1 to optArr.count collect
(
case c of
(
(1): BoneGeometry
(2): Biped_Object
(3): CATBone
(4): HubObject
)
)
)
fn hide_unhide_Skeleton state: =
(
local skeletonClasses = collectClasses()
(for b in geometry where findItem skeletonClasses (classof b.baseobject) != 0 collect b).ishidden = state
)
hide_unhide_Skeleton state:on
-------------------------
for now, I just need to hide/show bones or biped objects...
So nevermind if I can't choose for the moment.
Very annoying that in max you can toogle visibility for shape, geometry, light,... but not bones with shortcut...
So, your script is enough for me at the moment. Thanks.
Or if you want to no loop trough all scene objects then use simply
(for b in geometry where isKindof b.baseobject BoneGeometry collect b).ishidden = on
(for b in geometry where isKindof b.baseobject BoneGeometry collect b).ishidden = off
--to hide bones(for b in objects where isKindof b.baseobject BoneGeometry collect b).ishidden = on
--to unhide(for b in objects where isKindof b.baseobject BoneGeometry collect b).ishidden = off
Comments
this is working for me as
this is working for me as toggle. Change category and names by your needs.
http://mihailupu.ro/
Thanks Barigazy, I found
Thanks Barigazy, I found :
hideByCategory.bones = (not hideByCategory.bones)
it works on bones but not on bipedobjects...
strangely, "hide category" "Bone Object" is switched "on" by the script, but biped objects not hidden...
...
Code above not works in max2014 even if you force view redrawing.
bga
...
I write simple tool In your request
http://www.scriptspot.com/3ds-max/scripts/hide-unhide-skeleton
bga
Thanks very much Barigazy, it
Thanks very much Barigazy, it works.
As I really want a shortcut : i'll keep ( one with "on" and another "off" )=
-------
fn collectClasses optArr:#(cb_bone,cb_bip,cb_cat,cb_hub) =
(
for c in 1 to optArr.count collect
(
case c of
(
(1): BoneGeometry
(2): Biped_Object
(3): CATBone
(4): HubObject
)
)
)
fn hide_unhide_Skeleton state: =
(
local skeletonClasses = collectClasses()
(for b in geometry where findItem skeletonClasses (classof b.baseobject) != 0 collect b).ishidden = state
)
hide_unhide_Skeleton state:on
-------------------------
I'd be better with a switch ;-)
But how you can chack which
But how you can chack which option ei sceleton type you want to consider in process?
bga
for now, I just need to
for now, I just need to hide/show bones or biped objects...
So nevermind if I can't choose for the moment.
Very annoying that in max you can toogle visibility for shape, geometry, light,... but not bones with shortcut...
So, your script is enough for me at the moment. Thanks.
...
Or if you want to no loop trough all scene objects then use simply
bga
...
Can you try this
bga