A Script to Import a CSV File and Create F-Curves (for Blender 2.5x or later)

@chebhou: What a wonderful fix!!! Thank you so much for sharing the code. I should’ve written in that way.
@vklidu: Thank you for trying.

Now I understand how to fix so quickly thanks to you all.

OK … I need help. I don’t know who has a patience to read it, but I get two minor problems:

Question 1: How can I change “Data Path”?

In the list there are not any options (even I have loc, rot, scale created, like one keyframe). Write it manually to the field only jumps back to “location”, “Copy data Path” and paste from your post #8 doesn’t help.
You wrote about 6 basic like loc, rot, scale ect. It seems like a bug, am I correct?

(My dirty workaround was change all “location” to “rotation_euler” directly in the script … since I needed only Z rot, but now I need copy more axis and can’t imagine copy one by one and manually copy past to specific one. I can do that once, but since it’s in experiment stage … it can be million times.)

“Action Name” is not problem to change another if I have some created already.

Question 2: How does it work with TIME / FRAMES?

- My CSV file consist from column called “Logging Sample” that looks like number of rows and seems like can be used for blenders timeline (frames). If I set frame rate per second (FPS) to 32 (sometimes 34) it quite match tested time 1 minute. (In one minute it recorded like 1920 rows).

  • My CSV file consist also from “TimeStamp” columns for each type of transformation. This seems to be one to use for correct timing, but since it records timestamp from last reboot of program, imported curve is quite far from start and I need to move it manually to first frame.
    (With home button “,” not so hard - find and move, but in testing stage I move them almost one hundred times now.) Main problem here is - curve for 60 sec smashed into 60 frames. For animation with 30 fps I have to scale this curve by 30 on X axis to match 60 sec of recording. (And I have to scale it directly after importing otherwise I loose details because blender keeps only one control point per frame.)

What should I use for correct timing?

Thank you for help.

@vklidu:
Question 1: It seems like a bug. I confirmed there are not any options in the list. Blender UI API was changed at some point and I didn’t know it.
Question 2: I removed that feature (time scale tuning) to briefly update the script from 2.4x to 2.5x.

Now I’m fixing to run the script in the latest version of Blender.

I’ve tried to use template_ID() to fix the bug shown in Question 1, but I can’t find the detail of how to use template_ID()…mmm


I’m thinking alternative.
Adding a normal string box and a search box and switching the two by a button…mmm


I’ve tried #61 code but it fails in my environment.
There are not any options in the “Data Path” suggestion list.
I’m thinking to simply obsolete this feature… the script works but there is no suggestion available.

Updated.
csv_fcurve_importer v0_7_alpha4.zip

Sorry, your last version creates data blocks, but zero keyframes are created.
From your posts I don’t understand if there exist a way to specify for what kind of transformation will data used in blender.


Thank you for comment.
Sorry, I misstook to update the script. I uploaded the latest version of the script to sourceforge.net and confirmed.
Please try again.

Addon itself looks much better, no errors appears, but by pressing “import” are not created any keyframes, only channels as before.
Tested with today build 4e7ef3f (with factory setting) under OS X 10.8.5.


Edit: your sample file works, but my doesn’t … it’s the same file I was able to import with your older version (chebhou’s fix). I don’t have an idea what can be problem. If you or someone will have a time to check what can be suddenly problem …

csv file https://dl.dropboxusercontent.com/u/55113627/>%20Blender/2015-05-02_17-36-52.csv
for import were used columns time=1 data=27

Underline note: One cosmetic think that is not functional, just looks a bit confusing … “Data path” type selected from addon’s menu is not reflected in the configuration’s header (visible on my screen above - in header is written “rotation” (that I wrote to the filed manually) even in menu I selected later “location”, but as I wrote - script generates correctly what is selected in menu not what is written in header, so just cosmetic).

Thank you for the .csv file.
I understand the cause.

Updated.

Download:csv_fcurve_importer v0_7_alpha5.zip

Now we can specify delimiters.
The default is “,” (comma) only.

great thank you :slight_smile: will test it more in spare time

Hi! Sorry for reviving this old topic but I don’t see anything like this for Blender 2.8. The latest download does no longer work.

Is there any way to import / export f-curves in Blender 2.8x?

I’m using Sonic Visualiser which can produce SVG, XML, JSON, CSV and images based on numerous sound analysis algorithms (not just amplitude, but also following frequencies, noisiness and many others.

I think importing f-curves can be very powerful for motion graphics, data visualization, etc.

1 Like

This is the error I get. There are a few changes that need to be made to the code in order to use it with 2.8 but i’m not sure what I need to change.

I updated the plugin to be compatible with blender 2.80, you can get it here https://github.com/ProtoxiDe22/Blender-csv-fcurve-importer/releases/tag/0.7.6

1 Like

This is grate! Thank you.
Do you know how can I save the configs like a template ? So I could select it another time in the import configs. Is it hard to code that option ? I took a look at the code but I don’t understand how it works.
I need to add a button at the bottom to save current config into a file and add it to dropdown list.
That way I can pull up like 60 location transforms.

Hi,
anyone interested (proud) for 3.x update here?
Thank you for your time :slight_smile:

BTW … is it possible to set “Data path” (Copy Data Path/Paste as mentioned in Tool Tips) of some material node?
My tests failed. I mean, copy paste is not an issue …

Screen Shot 2022-08-13 at 22.14.51

but the f-curve is generated still as Action at object level not at Shader Nodetree level.

Does it a bug or current limitation?
I tried to use also data path to camera focal length that wasn’t working as well.
Thank you for any info.

1 Like

I finally updated the addon to support newer blender versions, I have no experience at all in blender addon development so i don’t know about the data path problem, i’ll try looking into it later today but i don’t really think i’ll be able to solve that