is it possible to unhide selected polys ?

is it ?
something like "$.unHide #Face" ?
I don't want to do UnHideAll...
thanks

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
barigazy's picture
titane357's picture

I find a solution for my

I find a solution for my tool...
easy for 2 materials id, but I don't know how to optimize for 20...

modPanel.setCurrentObject $.baseObject

fn Fmask AAA =
(
OBJ.selectByMaterial AAA
polyList = polyop.getFaceSelection OBJ
OBJ.Hide #Face
)

OBJ = $
OBJ.unHideAll #Face
rollout ROLL "MAT iD"
(
checkbutton b01 "01" pos:[1,11] width:40 height:20 unchecked:true
checkbutton b02 "02" pos:[41,11] width:40 height:20 unchecked:true

on b01 changed state do
if state == on then Fmask 1
else (
OBJ.unHideALL #Face

if ROLL.b02.state == on then
(
OBJ.selectByMaterial 2
polyList = polyop.getFaceSelection OBJ
OBJ.Hide #Face
)
)

on b02 changed state do
if state == on then Fmask 2
else (
OBJ.unHideALL #Face

if ROLL.b01.state == on then
(
OBJ.selectByMaterial 1
polyList = polyop.getFaceSelection OBJ
OBJ.Hide #Face
)
)
)
createdialog ROLL

miauu's picture
titane357's picture

thanks, I already have it but

thanks, I already have it but I want to make something different.
I have used Lightwave for a long time and I want to have something like its layer management (like smoothing groups panel in max)
here is an example with 5 matid, I want to make rows of 10 ids...

AttachmentSize
matid.jpg 28.12 KB
barigazy's picture

Hi Kostadin, You always have

Hi Kostadin,
You always have the Joker in a sleeve :)
Cheers!

barigazy

barigazy's picture

solution

This is a simple trick how to do it.

fn unhideFaces obj facesBitarray: = if isKindOf obj Editable_Poly do
(
	local hiddenFaces = polyop.getHiddenFaces obj
	if not hiddenFaces.isEmpty do
	(
		facesToHide = hiddenFaces-facesBitarray
		with redraw off 
		(
			polyop.unHideAllFaces obj
			polyop.setHiddenFaces obj facesToHide
		)
	)
)

Now how to use it
E X A M P L E:

delete objects 
theSphere = converttopoly (sphere segs:16)
polyop.setHiddenFaces theSphere #{49..64}
update theSphere

Then run this line

unhideFaces theSphere facesBitarray:#{53,54}--last argument must be bitarray face list

barigazy

titane357's picture

Thanks barigazy, but arrays

Thanks barigazy,
but arrays are nightmare for me, so bitarrays....
can you explain what I'm doing wrong : I want to show material ID 10
--------------------------
obj = $
$.selectByMaterial 10
Faces2show = #{}
Faces2show = polyop.getFaceSelection $ as array <--- there is a problem here
(
local hiddenFaces = polyop.getHiddenFaces obj
if not hiddenFaces.isEmpty do
(
facesToHide = hiddenFaces-Faces2show
with redraw off
(
polyop.unHideAllFaces obj
polyop.setHiddenFaces obj facesToHide
)
)
)

barigazy's picture

Are you try Kostadin script

Are you try Kostadin script that suggested earlier

barigazy

titane357's picture

yes, but as I said to him I

yes, but as I said to him I wanted to do something different. :-)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.