Mass of multiple Objects
-
- Posts: 4
- Joined: Thu Jul 12, 2012 10:51 pm
Mass of multiple Objects
Is it possible to change the physikal densety,like make the objects 2x heavier, of multiple different objects at once?
Re: Mass of multiple Objects
When you import the objects as a MultiBody than it's possible to factorize mass via the "Density" parameter. If the objects are part of a standard SD file than you need a Python batch script:
Of course, the objects' rigid body property must be active, otherwise the script throws an error.
-Thomas
Code: Select all
factor = 2.0
selObjs = scene.getSelectedNodes()
for node in selObjs:
newMass = node.getParameter("@ mass") * factor
node.setParameter("@ mass", newMass)
-Thomas
Thomas Schlick | Next Limit Technologies
-
- Posts: 4
- Joined: Thu Jul 12, 2012 10:51 pm
Re: Mass of multiple Objects
Thanks! I thing I have to dig a little bit into RF scripting! 

Re: Mass of multiple Objects
It's always a good idea to have a look at Python and RF's scripting capabilitiesinfo@dk-vision.com wrote:Thanks! I thing I have to dig a little bit into RF scripting!

Thomas Schlick | Next Limit Technologies
-
- Posts: 4
- Joined: Thu Jul 12, 2012 10:51 pm
Re: Mass of multiple Objects
But it would be nice to have something like a general mass parameter, something like kg/dm³.
Re: Mass of multiple Objects
For MultiBodies there is exactly the requested parameter (not exactly, but kg/m^3): that's density and you can change it globally in the Node Params. From this value RF calculates the mass for each node inside the MultiBody. When you go to "File > Summary Info..." you can see the individual mass for the nodes.info@dk-vision.com wrote:But it would be nice to have something like a general mass parameter, something like kg/dm³.
For single nodes from an SD you could turn the script I provided into a system or user script and hook it to the icon bar. When you call it, a GUI appears where you can enter the desired value and change the value for the selected nodes. Just have a look at the manual's scripting reference. There you'll find all you need. If you need assistance, just get back to the forum and we'll get you started.
Thomas Schlick | Next Limit Technologies