A more detailed example of the technique zeffi outlined is illustrated by the following example from http://web.purplefrog.com/~thoth/blender/python-cookbook/import-python.html
dir = os.path.dirname(bpy.data.filepath)
if not dir in sys.path:
# this next ...
I must say that I make quite extensive use of Bezier Curve objects in Blender, I use them a lot more than I actually use mesh objects.
I work mainly in architecture mostly doing archviz, design and interior decoration projects. I know this is not a popular nor a 'standard' modeling technique, I am perfectly aware how exotic it is and that most people's ...
Don't needlessly convert your bezier to a mesh unless strictly necessary, it is a destructive process and will ruin your model and the benefits of using curve objects.
For an animated outline and fill effect you will need to independent copies of your original SVG imported curve object.
For the animated outline make sure a new copy of ...
Maybe something like this?
See also: Create NURBS surface with Python
from mathutils import Vector
coords_list = [[0,1,2], [1,2,3], [-3,2,1], [0,0,-4]]
# make a new curve
crv = bpy.data.curves.new('crv', 'CURVE')
crv.dimensions = '3D'
# make a new spline in that curve
spline = crv.splines.new(type='NURBS')
# a spline point for each point
Animation Node can be used here, a simple sine wave spline can be generated as follows:
Animating an object along the wave can be done by evaluating it at some point as follows:
Where the divide controls the speed of the motion.
To align the rotation of the object, you can compute the angle that the tangent to the curve makes with the x axis, the tangent ...
Make Sure you create Keyframes for the Offset value in the Follow Path Constraint.
Insert Keyframes on the [Follow Path Constraint]. Use [Fixed Position] TRUE. The image belows shows two keyframes in the timeline and the dopesheet.
By using keyframes to directly and easily change position, you will change the speed, usefully and indirectly. The object ...
Python has a built-in __file__ global to access the path a script is running at. You can use it in your script by using this code snippet:
script_directory = os.path.dirname(os.path.abspath(__file__))
The font is bfont.pfb
This is a built-in font which means it is compiled into blender. The font file is available from the blender source tree in release/datafiles
You can access and download the file, e.g., from the GIT repository at blender.org:
In the directory listing, ...
user_path = bpy.utils.resource_path('USER')
config_path = os.path.join(user_path, "config")
Or on Linux:/home/user_name/.config/blender/2.74
On ms-windows will return:C:\Users\user_name\AppData\Roaming\Blender Foundation\Blender\2.74
See: bpy.utils.resource_path api docs
When you execute a python script inside Blender, the current working directory is not the base directory of your .blend file. You can easily confirm this by importing os and printing os.getcwd(), and that will explain why blender isn't finding these modules you're trying to import.
you'll get the current .blend filepath using bpy.data.filepath, from which ...
In edit mode:
select all (A)
right click > Switch Direction
(or right click > D)
There isn't a more direct shortcut, but these are pretty quick! However, if you need to use this option so often that you'd like to only use the keyboard, you can Right click on the "Switch Direction" menu option ad do "Add shortcut".
By design, in Blender 2.8x, the ...
With the curve selected;
Select the Object Data tab in the Properties window,
In the Path Animation panel change the Frames value, higher values result in a slower follow speed.
This value can be modified in python using the following line;
bpy.data.curves["NurbsPath"].path_duration = X
where NurbsPath is the name of your curve, and X is the value ...
I have had this exact problem with other addons, namely the add mesh rocks, and cg cookies' poly strips.
The problem comes from the name of the directory you created in the addon folder. For your case the folder needs to be named exactly add_mesh_siding_utils. If you rename the folder the addon will work.
This is why, blender is trying to import everything ...
Add a single key frame to the camera the go to the f-curve editor. Selcet the curve for the desired coordinate. Go to the proverties panel of the f-curve editor (if you don't have it press N to get it)
Add a Built-In Function modifier
You're looking for a "sin" type for each of your coeficients.
For example I'll do the X location formula you provided:
Yes, cycles caches BVH (Bounding Volume Hierarchy) files in there when Cache BVH is enabled in Render settings > Performance:
Deleting them shouldn't do anything bad. Cycles will just regenerate these files (though it won't cache them if you disable Cache BVH), which might cause an increase in render times, depending on the complexity of your scene.
You can run this code straight from Blender's Text Editor.
You'll see a lot is the same for creating a simple vertex-edge based mesh, but this snippet:
imports x,y,z as a list of coordinates
creates a curve object and prepares it to accept the vertex coordinates
transforms the list of coordinates to flat list
[x1,y1,z1], [x2,y2,z2], [x3,y3,z3]
In this case I would not go with Curves as they aren't best choice in terms of modeling in Blender. My method is based upon simple plane which gives us very simple base geometry and allows to have nice top part of model. Starting with circle will give massive headache to close and straighten up this part of a mesh.
This is method I've used to model it:
The best way is to completely avoid drivers inside node groups. They do not update correctly and are only trouble.
You should make your own custom Rotate node with the angle value accessible. You can make almost any spacial transformation using the correct math put together with Math nodes. Rotating a 3d vector around Z axis θ degrees looks like this:
x' = ...
Here's my take on this...
Open a Text Editor window and paste the following code :
def create_sine(numCycles = 1, stepsPerCycle = 16, curvelen=2, yscale=1):
curve = bpy.data.curves.new('sinepath', type='CURVE')
curve.dimensions = '2D'
curve.resolution_u = 1
spline = curve.splines.new('NURBS')
#cursor = bpy....