Skocz do zawartości
View in the app

A better way to browse. Learn more.

Max3D.pl

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[MaxScript]Jak usunac dany RenderElement(VRay'owy) z listy RenderElement

Featured Replies

Napisano

Czy ktos wie jak z poziomy Maxscriptu usnac dany Render element ? Chcialem tylko zazynaczyc ze chodzi tu o Vray'owy render element(np. VRayZdepth) bo maxowa komenda ".RemoveRenderElement" nie dziala z vrayowymi render elementami. Dzieks

  • Odpowiedzi 3
  • Wyświetleń 2,1k
  • Created
  • Ostatniej odpowiedzi

Top Posters In This Topic

Napisano

W case wstawiasz typy do usunięcia:

 

vrayRenderElements = MaxOps.GetCurRenderElementMgr()
doUsuniecia = #()
iloscElementow = vrayRenderElements.NumRenderElements()

for i = 0 to iloscElementow-1 do 
(
   element = vrayRenderElements.GetRenderElement i
   case (classOf element) of
   (
       VRayZdepth: append doUsuniecia element
   )
)

while (doUsuniecia.count > 0) do
(
   vrayRenderElements.removeRenderElement doUsuniecia[1]
   deleteItem doUsuniecia 1
)

Edytowane przez Tamyl91

Napisano
  • Autor

Dzieki Tamyl91, dziala jak trzeba :) Po tym co masz na stronce widze, ze troche ogarniasz maxscripta ;). Moglbys mi wiec wytlumaczyc dlaczego kiedy chcialem usunac cos z listy bezposrednio poprzez .removeRenderElement VrayZDepth wywalalo blad "Unable to convert: VRayZDepth to type: MaxObject" a kiedy wrzuci sie to do tablicy to nie ma z tym problemu, a przeciez to wciaz ten sam obiekt (VrayZdepth render element) ? Jeszcze raz dzieki ! Pozdr

Napisano

Coś musisz mieć nie tak, bo w taki sposób też musi działać:

 

vrayRenderElements = MaxOps.GetCurRenderElementMgr()
element = vrayRenderElements.GetRenderElement 0
vrayRenderElements.removeRenderElement element

 

Trick z tablicą jest tylko po to, by móc usunąć wiele elementów za jednym razem, każdorazowe usunięcie zmienia całą indeksację elementów, więc usuwanie ich bezpośrednio w pętli przeszukującej tworzyłoby pewne komplikacje.

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Powiadomienie o plikach cookie

Wykorzystujemy cookies. Przeczytaj więcej Polityka prywatności

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.