Cleaner

88 votes
Date Updated: 
09/26/2017
Author Name: 
Andreas Meissner

This tool can help you to clean and speed up your scene. Hover with your cursor over the clean-buttons to see tooltips for further information.

 

Additional Info: 

Installation:

  • Drag and drop the file "install macro.ms" into your scene
  • You can create a toolbar button by using the macro under: Customize > Category: "# Scripts" > Cleaner

Tips:

  • If you look inside the folder .../Cleaner/clean/deactivated/... you can find further functions. To use them you need to move them into the folder  .../Cleaner/clean/...
  • Before cleaning dublicate objects, you should select and isolate these objects to check if they are really dublicates!
  • The "Texture Filtering" will speed up your rendering cause textures like leafes, flowers and ivys will be set to filtering:none, but this will change the look of your rendering, use with care!

 WARNING: I DONT GIVE ANY WARRANTY, USE AT OWN RISK, BETTER SAVE SCENE BEFORE USE

Version Requirement: 
tested in 2009, 2012 with Vray, 2015 with Vray
AttachmentSize
cleaner8.ms27.6 KB
cleaner_v25.zip25.13 KB

Comments

Comment viewing options

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

install ?

Hello there

do you know how do i install it ?

usually is a little file .. not a text

thanks for your time

P.

peprgb's picture

Uninstall

Thanks for sharing, i not need now, could explain please how can i remove it?

Best regards,

real08121985's picture

Go for it, the sourcecode is

Go for it, the sourcecode is there.

asymptote's picture

Thanks, very useful, but Pug

Thanks, very useful, but Pug Ugly....the UI needs some work ;)

bobmorane888's picture

More than 36 000 000 note tracks less ^^

1,2 Go to 70 Mo °°_

A must-have script, thanks !

barigazy's picture

Hi real08121985,

I have a idea. Maybe you can add option for cleaning autoback files.
Sometimes it happens that remain large files.
I think about this concept

autoBackFiles = getFiles ((getdir #autoback)+"/*")
mapped fn deleteLarge autoBackFiles = 
( 
	if autoBackFiles.count != 0 do ((dotnetclass "System.IO.File").delete autoBackFiles)
)
deleteLarge autoBackFiles

bga

timonlp2003's picture

Great

Thanks to save my time, you're Great

real08121985's picture

Update- added buttons to

Update
- added buttons to select affected objects and send materials to materialeditor
- added TP Variation Texmap (something we need to clean at my workplace since not all renderslaves got that installed)
- added Missing Texmap (if the scene you opened uses texture plugins that are not installed on your computer, then these plugins will be replaces by a missing_texmap placeholder, can throw errors on renderfarm)
- fixed the count of object ids and material ids, id=0 will not be counted as id anymore

real08121985's picture

Max did not throw an error

Max did not throw an error when I tried it with a MR material but okay it should be fixed now, thanks for your input.

hot chip's picture

Hi thank you for the Script.

Hi thank you for the Script. But it works not correct with mental ray. Here some code to fix it for mental ray.

# new Function to find mental ray environment shaders

fn shader_compatible shader_definition =
(
local status=off
case classof shader_definition of
(
mr_Physical_Sky: status= on

mia_physicalsky: status= on
Environment_Background_Switcher__mi: status= on

iray_Matte_Environment: status= on

Environment_Blur: status= on

Environment_Probe_Chrome_Ball__mi: status= on

Environment_Probe_Gray_Ball__mi:status= on

Environment_Background_Camera_Map__mi:status= on

Arch__Environment_Blur:status= on

)
if status = on then (return false) else (return true)
)

####################################################################

# Your Functions optimized for mental ray

fn count =
(
local lMatIds = #()

for mat in scenematerials do ( if (shader_compatible mat)==true then ( appendIfUnique

lMatIds mat.effectsChannel )
)

return lMatIds.count
),

fn clean =
(
for mat in scenematerials do ( if (shader_compatible mat)==true then mat.effectsChannel

= 0 )
)

####################################################################

# Your Functions optimized for mental ray

if matchpattern (renderers.current as string) pattern:"v_ray*"
then meditmaterials[n] = vraymtl name:tMat
else meditmaterials[n] = Arch___Design__mi name:tMat

Comment viewing options

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