• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Object Src by Selection
#1
Hey guys I was sick of creating an object source for each flippin object I needed to have an obj source for... at least sick of it when there were like 20 of them.

Due to some funky array stuff in the way fume handles it's objects and stuff you cannot create an object src with an object listed for the source object. So instead what we have to do is copy it then change it after it's been assigned. What's that mean? You have to first have an object source in the scene with an object assigned in the source object area. In fact it can even say "deleted"...basically it just can't be empty.

So Create an Object Src, pick an object then select any objects you want to be a source object, and run the script. You will be prompted to select which obj src you want to copy, then it should copy the object src, assign it to an object, move it to that object, and also link it to that object.

Special thanks to Eric "the machine" Hulser for helping me out

Code:
/*!
    \file        FumeObjSrcBySelection.ms

    \remarks    Create a object_src, set its object, and run on a selection of geometry
    
    \author        Ian Farnsworth
    \author        Email: farnsworth@blur.com
    \author        Company: Blur Studio
    \date        09/19/07
*/
(
    if (getClassInstances Object_src).count > 0 then (    
        -- Don't do anything if no objects are selected
        if selection.count != 0 then (
            messageBox "Select Object Source to be copied"
            -- Pick a object source to copy
            function filterObjSrc obj     = ( classof obj == object_src )
            local objSrc                 = pickobject filter:filterObjSrc
            
            -- If user picks an objectSrc
            if objSrc != undefined then (
                -- and the object src has 1 object in its list
                if objSrc.object.count == 1 then (
                    -- Go through the selection for all objects that are geometryclass
                    local success = false
                    for obj in selection as array where superclassof obj == GeometryClass do (
                        SrcCopy             = copy objSrc
                        SrcCopy.pos         = obj.pos   --copy and move object src to source object
                        SrcCopy.object         = #(obj) --selection has to be an array
                        SrcCopy.parent         = obj    --parent object src to source object
                        success                = true
                    ) --end i loop
                    
                    if not success then messageBox "You have to have some Geometry selected for this to work."
                )
                else messageBox "Your Object Source has to have 1 object in its fucking list."
            )
        )
        else messageBox "You have to have some geometry selected"
    )
    else messageBox "There are no Object Sources in your scene."
)
  Reply
#2
Hello !

Thanks for sharing this script on the forum.

We've found out (too late) that 3ds max functionality built around references storage, does not allow adding lights to FFX from MXS.
Right now, we're adding more MXS support and I'm sure we'll add a function to Object source so that user can easily
add or remove objects.

If you have any other MXS wishes for 1.1, now would be the right moment for a wishlist.

Thank you.

Kresimir
  Reply
#3
No prob for sharing! We'd also like to see script access for adding objects/src/space warps to the obj/src tab of fume as well as the lights. Allowing creation of obj src with an object selection would also be cool (obviously). I'm sure the list will get bigger as i get more into it... I'll keep you updated Big Grin Thanks!

Edit: Any reason you can't select more than one object per object source? ..especially if it's going to contain the same parameters?
  Reply
#4
"script access for adding objects/src/space warps to the obj/src tab of fume as well as the lights"

- consider this done.

Right now there is one object per Object Source due to the nature of object voxelization.
I think that in the future, we wil change this and alow multiple objects to be added.

Thank you.

Kresimir
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)