Hi there.
played a bit and came up with this:

import maya.cmds as cmds

def rBody():

selection= cmds.ls(sl=True)

for i in range(len(selection)):

cmds.select(selection[i])

rb_obj=cmds.rigidBody(n='rb_%s'%i)

startKey=i*25

endKey=startKey+25

cmds.setKeyframe(attribute='ignore',value=1, t=startKey)

cmds.setKeyframe(attribute='ignore',value=0, t=endKey)

cmds.select(cl=True)

rBody()



don't know if it's going to be formatted correctly in email, but the instructions are:
select all the 1000 objs and run the script from script editor.
hope it helps. oh and i ve guessed one second to 25 frames p/second . let me know if u want 24 or 30.

cheers
Ricardo Viana



On 12/09/2011 08:15 PM, Nick Scholtes wrote:
Hi Justin,

Here is an example of what they need to do:
http://www.youtube.com/watch?v=xpYhibbvl1Y&feature=player_embedded <http://www.youtube.com/watch?v=xpYhibbvl1Y&feature=player_embedded>

Would you need anything more? What cost are you thinking to do the script? I would need to confirm is before we can move forward.

Thanks,
Nick



On Thu, Dec 8, 2011 at 2:35 PM, Justin Israel <[email protected] <mailto:[email protected]>> wrote:

    Hey,

    What actions specifically should the script perform and what
    parameters does it need to expose to you?
    Im not a maya artist specifically im a pipeline developer so i
    dont always know every aspect of maya such as doing rbd very
    thoroughly but the artists always show me what they need to
    accomplish in order for me to produce tools.
    A sample scene and some specifics is usually all i need

    - justin


    On Dec 8, 2011, at 11:47 AM, Nick Scholtes <[email protected]
    <mailto:[email protected]>> wrote:

    Is anyone interested in this? It would be a pretty easy buck!

    Nick



    On Mon, Dec 5, 2011 at 10:42 AM, Nick Scholtes <[email protected]
    <mailto:[email protected]>> wrote:

        Hi,

        Well, if needs to be done with over 1000 objects, which is
        why they are scripting it. The other artist knows some
        python, but not a ton, and I know even less.

        We need to adjust which object collides with another object.
        i.e., Obj A cannot interact with Obj B and C but does collide
        with Obj E, F and G. Plus, the visibility has to be keyed off
        and on a lot.

        Would you be able to do a sample script if I got you some
        basic parameters? I can see how much the artist can pay.

        Thanks for your reply,
        Nick



        On Mon, Dec 5, 2011 at 10:39 AM, stephenkmann
        <[email protected] <mailto:[email protected]>> wrote:

            You should be able to just animated / key the
            active/passive state of each object.

            a simple randomize or even key directly script would do that

            hth

            -=s

            On Mon, Dec 5, 2011 at 11:34 AM, Nick Scholtes
            <[email protected] <mailto:[email protected]>> wrote:

                Hi all,

                I have been trying to get assistance from a number of
                places with this, but no luck. I'm working with
                someone on this and we REALLY need to get this
                figured out. We can pay a small fee for help. I'm
                working w/ another artist on this. Here's lowdown:

                I'm trying to animate 5 rigid bodies that appear and
                interact/collide at different intervals. I'm working
                with someone on this, trying to help them and I've
                suggested animating the rigid bodies on/off,
                collision layers and a few other options. But it
                needs to be done w/ python. How would I do this?
                Here's some more info, from the artist:
                /I am able to have bodies fall and make contact with
                other bodies. That is working well. What I haven’t
                been able to do is sequence the falling bodies to
                start at different times. Either by starting a
                dynamics run, stop it, add another rigid body and
                start it again or by placing all the bodies and
                holding them in place until I need them during the run./
                "I need to create a simple script to drop a ball on a
                flat plate and then drop another ball on to the same
                flat plate 1 second later. But I need to keyframe the
                transparency, Rigid Body Active on/off, Collision
                Layers, and several other Channel Box parameters. One
                ball falls, then later the second one appears, and
                falls. Eventually there would be 5 objects doing
                this, and selectively interact only certain objects."

                They need to do this with 1000 objects so they will
                need to script it. ANY help to just get started with
                the first couple would be greatly appreciated!

                Again, we can pay. I'm not sure how much but I'm
                pretty sure this would be quick work for someone
                versed in Python and Maya.

                Thanks,
                Nick

-- My Photo Profile:
                http://www.guru.com/freelancers/carbonorchards
                <http://goog_1715856884>



-- view archives:
                http://groups.google.com/group/python_inside_maya
                change your subscription settings:
                http://groups.google.com/group/python_inside_maya/subscribe




-- [email protected] <mailto:[email protected]>
            http://smannimation.blogspot.com/
            http://nymayausersgroup.blogspot.com/
            http://smann3d.blogspot.com/

-- view archives:
            http://groups.google.com/group/python_inside_maya
            change your subscription settings:
            http://groups.google.com/group/python_inside_maya/subscribe




-- My Photo Profile:
        http://www.guru.com/freelancers/carbonorchards
        <http://goog_1715856884>





-- My Photo Profile:
    http://www.guru.com/freelancers/carbonorchards
    <http://goog_1715856884>


-- view archives: http://groups.google.com/group/python_inside_maya
    change your subscription settings:
    http://groups.google.com/group/python_inside_maya/subscribe
-- view archives: http://groups.google.com/group/python_inside_maya
    change your subscription settings:
    http://groups.google.com/group/python_inside_maya/subscribe




--
My Photo Profile:
http://www.guru.com/freelancers/carbonorchards
<http://goog_1715856884>


--
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe

--
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe

Reply via email to