Announcement

Collapse
No announcement yet.

MaxScript Masters - find objects with Hair and Fur?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • MaxScript Masters - find objects with Hair and Fur?

    Hi all scripting guys and other clever people

    I have an old scene with a gazillion objects and something has Hair and Fur on it. I can't see what in the render, but I need to find that object(s)
    Kind Regards,
    Morne

  • #2
    This should do it. Just run this.
    Code:
    (
    	hairMods = getclassinstances HairMod
    	clearSelection()
    	for m in hairMods do
    	(
    		nds = refs.dependents m
    		for n in nds where superclassof n == GeometryClass do selectMore n
    	)
    )
    Daniel Santana | Co-Founder / Technical Director
    You can do it! VFX
    Lisbon/Porto - Portugal
    http://www.ycdivfx.com

    Comment


    • #3
      Thanks Daniel

      If nothing happens, does that mean no objects has that modifier applied?
      I opened all the groups and also the groups within groups

      Nothing happens
      Kind Regards,
      Morne

      Comment


      • #4
        If nothing gets selected then there is no modifier applied. You can also run this modified version and will print to the listener how many instances there in the scene in case the ref system isn't catching them.

        Code:
        (
        	hairMods = getclassinstances HairMod
        	format "Found % instances of HairMod\n" hairMods.count
        	clearSelection()
        	for m in hairMods do
        	(
        		nds = refs.dependents m
        		for n in nds where superclassof n == GeometryClass do selectMore n
        	)
        )
        or an alternative is this using a brute force approach
        Code:
        (
        	-- Brute force mode
        	for o in objects do
        	(
        		for m in o.modifiers where classof m == HairMod do selectMore n
        	)
        )
        Best regards,
        Daniel
        Daniel Santana | Co-Founder / Technical Director
        You can do it! VFX
        Lisbon/Porto - Portugal
        http://www.ycdivfx.com

        Comment


        • #5
          Thanks Daniel
          Kind Regards,
          Morne

          Comment

          Working...
          X