PDA

View Full Version : hide/unhide selection set problem


Raster man
02-16-2007, 08:43 PM
I get the following error when trying to unhide a selection set

>> MAXScript MacroScript Error Exception: -- Unknown property: "unhide" in $Editable_Mesh:wheel @ [-13.522045,-9.643635,2.072136] <<

Here is my script


macroScript Macro2
category:"DragAndDrop"

toolTip:""

(

fn hideSelset selsetIndex =

(

itemCount = (getNamedSelSetItemCount selsetIndex)

for j in 1 to itemCount do

(

node1 = getNamedSelSetItem selsetIndex j

node1.hide()

)

)

fn unhideSelset selsetIndex =

(

itemCount = (getNamedSelSetItemCount selsetIndex)

for j in 1 to itemCount do

(

node1 = getNamedSelSetItem selsetIndex j

print (getpropnames(node1) as string)

node1.unhide()

)

)

--for i in 1 to selectionSets.count do

for i in 1 to 3 do

(

print (i as string + " of " + selectionSets.count as string)



unhideSelset i

setname = (getNamedSelSetName i) as string

render fromframe:0 toframe:0 vfb:on cancelled:&wasCancelled outputfile:"test.bmp"

hideSelset i

)

)



I have tried several things, all to no avail, it seems I should be seeing if the node supports the unhide function, but I couldn't figure out how, or is there another way to unhide the whole selection set easily?

Thanks for any help.

PiXeL_MoNKeY
02-16-2007, 08:51 PM
Try using <node>.isHidden = true/false. True hides the node, while False unhides the node.

-Eric

Raster man
02-16-2007, 09:22 PM
Well, I tried that before and it didn't work, just tried it again and now it is working, must have been something else wrong before. Thanks.

Ah, was trying to use primaryVisibility which wasn't working, I didn't think I could use isHidden because that sounds like its read only.

PiXeL_MoNKeY
02-16-2007, 09:39 PM
isHidden is get/set, look it up in the General Node Properties section of the Maxscript Help. It get/set at the node level and depending on if you are using layers could cause some issue as setting false at node level also sets it for false on that node's layer.
The node's isHidden property reflects a combination of conditions 1 and 2. The property returns true if either condition 1 or 2 is true. Setting the property to true sets the node's hidden flag. Setting the property to false clears both the node's and the node's layer's hidden flag.-Eric

PiXeL_MoNKeY
02-17-2007, 05:44 AM
Also, the hiding and unhiding wasn't working because you were using it incorrectly.

hide <node> -- mapped

Hides the specified node or node collection.

unhide <node> [doLayer:] -- mapped

Unhides the specified node or node collection.

If the optional doLayer keyword is set to true and the node is in a layer that is hidden, the entire layer is unhidden. When false (the default), just the node is unhidden. -Eric

CGTalk Moderation
02-17-2007, 05:44 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.