Extensions:2.6/Py/Scripts/Object/Drop to ground

提供: wiki
移動先: 案内検索
Drop to ground
Drops selected objects onto the active object
UI location Tool shelf -> drop
Usage select object(s) to drop, Select object onto which to be dropped, press "drop"
Version 1.0 Author(s) Florian Meyer(testscreenings), Unnikrishnan(kodemax)
Blender 2.55 License GPL


Executable information
File name drop_to_ground
Current version download object_drop_to_ground.py
Python modules bpy.context, bpy.data, bpy.ops, bpy.props
External Python Modules or dependencies mathutils


Warning Do "ctrl+a -> apply rotation" before using the script

Installation

  1. Drop the object_drop_to_ground.py file into your addons folder
  2. Enable the addon in the user preferences -> addons
Important
It would be best if you do ctrl+a -> rotation apply before you use the addon


Instructions

Here you will find a short tutorial on how this addon is supposed to be used. And what the result is you will be getting.


1.Setting up

First the setting up part. We decide on the objects to be dropped and on what these objects are to be dropped on. A sample setup is shown below.


D2g stage 1.png

2. Select the objects to be dropped

Once the objects are decided. Select the objects that you wish to drop on the ground as shown below


D2g stage 2.png


3. Select the ground

Ok, so you have seleceted the objects. Now you have to select the ground onto which the objects are to be dropped


D2g stage 3.png


4. Do Drop

So, done with the selection? Now click on the drop button associated with the Drop to ground addon in the tool shelf


D2g stage 4.png


Done

Voilà !!!


D2g stage 5.png

Interface

Interface.png
The interface provides the user with 2 options.

1. While dropping the object, the object aligns itself to the ground at that point.

2. Use the object's center to drop the object, instead of the lowest point.

Working

What happens here is that the objects falls on to the ground along the -ve z axis and aligns its z axis with the normal at the point of fall. This gives the feel of alignment on the ground.

Random Location

Rand loc.png

Now its possible to drop the object to the ground but in a random location by enabling the "Random Location" , it will then show you a GUI with each row having the maximum and minimum for each of the axis. Bare in mind that randomization is always relative to the current position of the object. Min and max values can be infinite and positive or negative.

Blender3D FreeTip.png
 !!! Warning !!!
If mix/max randomization of location exceeds the boundaries of the ground then its reasonable that the object or objects wont be droped to the ground, so be careful with what mix and man values you input.