[Closed] Capturing Subobject level change?
Oh I understand now. But I don’t think you need to, if the rolloutfloater is open, then your callback is registered, if it isn’t open, then your callback isn’t registered.
Your callback will change the rollout inside dependent on the subobjectlevel, or have I missed the plot again!
J.
fn test =
(
format “Sub-object level=%
” subobjectlevel
removerollout vrt newroll
removerollout edg newroll
case subobjectlevel of
(
1: addrollout vrt newroll
2: addrollout edg newroll
)
)
rollout Vrt “Vertex.”
(
label l “Vertex”
on vrt open do registerRedrawViewsCallback test
on vrt close do unregisterRedrawViewsCallback test
)
rollout Edg “Edge.”
(
label l “Edge”
on edg open do registerRedrawViewsCallback test
on edg close do unregisterRedrawViewsCallback test
)
newroll=newrolloutfloater “test.” 270 180 600 100
addrollout Vrt newroll
yeah, I did it in a similar way to what you put, but I just had an “About” rollout registering the callback, (which handles rollout assignment) then when about closes, (which means the whole floater is closed) it unregisters the callback.
Not the same as your way, but it works and I won’t need to copy the registering code over multiple times.
Thanks anyway
BTW, the tool I am developing is called ProMo Tools, which you can check in the attachment:
So have a play and let me know if you find any bugs. (If you want)
Hey that was just a guideline! Glad you worked it out.
The file you uploaded seems to be corrupt, try again, I’d like to have a look.
J.
did the zip not work for you? I tried to download it and it works fine for me.
I’ll upload a new one anyway for you to try (I added a vertex loop function)
Sorry dude,
Still something wrong with that zip file. I’ve tried it on a few computers, and with different extraction software. can’t just be me can it…
hmm, thats wierd. Would it make a difference if I told you I used Winrar to zip it? I uploaded another zip before and someone else downloaded it without a problem.
i usually encounter the same problem when posting a zip file, members cant DL it, it says the file is corrupt. I cant DL your file also. so what i did was upload it using my geocities account… which is quite slow bcoz of limited bandwidth… i think theres a problem with the way CGtalk handles zip files for upload… im not really sure about that though… is ther a guide somewhere on how to upload a zip files properly here in CGtalk?
I also use WinRar! try a RAR file if you like. I’m on XP which reads zip files automatically, so I tried that also. why not just post the MS file?
J.
well, I would but both MS and RAR are unsupported formats for attachments here
BTW, i posted a support thread about this, but still no reply.