Thank you so much for your concentration on converting the script, PKHG!!!
Yes, there is no document for API yet, so I thought I had to wait until the official release of Blender 2.57, but it appears to be working. Are there any problems that the modified script still has?
Please share your effort if possible. I really want to look into your modified code by comparing the changes of the two.
It is correct, PKHG. Without document, I think it takes a long time to manage to make it work.
I remember that I have to mention how to animate, ora. Here is it.
-
- Place the Object that you want to animate, set the frame to 1, press key I and select Location from the menu.
-
- Place the Object where you want to move, set the frame to 2000, press key I and select Location from the menu.
-
- Change Screen lay-out from Default to Animate and see the created f-curve in Graph Editor window.
-
- Select the f-curve, press key Shift+T and select Linear from the menu.
Thatâs brief operations that I did in making the previous .blend file.
Not nice but used for the examples above:
http://petertregarg.host22.com/pmwiki/pmwiki.php/CSV/CsvImportAddon
Thank you very much for sharing, PKHG.
Itâs already at night in Japan, and my weekend is getting over, so I will look at the script that you kindly provided deeply later.
I also saw some other major scripts to see how they are update for the latest Blender. I will learn from your modification.
ăăăăż = oyasumi (schlaf gut!)
Meanwhile I understood how to use GroupProperties ⌠the result is, that the original script is nearly unchanged âŚmostly the registration is adapted and the GroupPropertie classes are initialized early.
I remember that I have to mention how to animate, ora. Here is it.
- Place the Object that you want to animate, set the frame to 1, press key I and select Location from the menu.
- Place the Object where you want to move, set the frame to 2000, press key I and select Location from the menu.
- Change Screen lay-out from Default to Animate and see the created f-curve in Graph Editor window.
- Select the f-curve, press key Shift+T and select Linear from the menu.
Thatâs brief operations that I did in making the previous .blend file.
Thank you Sorry, but I still have to ask:
Did you use a Bezier curve as the object? What view/mode should I select before attempting to press âIâ?
Youâve done a lot of work, PKHG. I looked over the modified code comparing to the previous one.
It gave me the fact that there is a great change in the usage of GroupPropertie.
Out of curiosity, how did you know that about GroupPropertie? a lot of trial and errors by your own? or a good page somewhere?
Thank you for your question, ora.
> Did you use a Bezier curve as the object
No, I used the imported object, which is a mesh object containing vertices and edges.
> What view/mode should I select before attempting to press âIâ
Make sure your mouse cursor is in 3D View and Object Mode when you press key I.
@Hans
No there is a info page at blender documentation (will give the link later)
By the way, your code on the wiki page (given above) is changed only slightly AND NEW!!! (if you have the old one, that is not good enough! You may have gotton a wrong impression)
Found in the doc (of the trunc)
"""
Custom Properties
+++++++++++++++++
PropertyGroups are the base class for dynamically defined sets of properties.
They can be used to extend existing blender data with your own types which can
be animated, accessed from the user interface and from python.
.. note::
The values assigned to blender data are saved to disk but the class
definitions are not, this means whenever you load blender the class needs
to be registered too.
This is best done by creating an addon which loads on startup and registers
your properties.
.. note::
PropertyGroups must be registered before assigning them to blender data.
.. seealso::
Property types used in class declarations are all in :mod:`bpy.props`
"""
import bpy
class MyPropertyGroup(bpy.types.PropertyGroup):
custom_1 = bpy.props.FloatProperty(name="My Float")
custom_2 = bpy.props.IntProperty(name="My Int")
bpy.utils.register_class(MyPropertyGroup)
bpy.types.Object.my_prop_grp = bpy.props.PointerProperty(type=MyPropertyGroup)
# test this worked
bpy.data.objects[0].my_prop_grp.custom_1 = 22.0
Thanks once again
Should I be able to change the csv-file (for both the mesh and the f-curve) and get a new kind of a graph? I am asking this, becaue I selected a different csv-file, but nothing changes on the screen? Am I missing something elementary here?
Thank you for your further improvement, PKHG.
The piece of the code that you found is really simple and good example. From it, I understood a bit how to use PropertyGroup. Such a small example code is very helpful. Thanks again for your effort.
I will explain again about all the detailed steps of how to import a .csv file and to make a brief graph. Here is it, ora.
I assume that youâve already installed the script successfully.
â Importing a CSV File â
-
- Find the UI of CSV Mesh Importer in the Scene panel.
-
- Specify âPoint list containing X, Y, Z columnsâ in the âFile Typeâ menu.
-
- Select a CSV file in the â.csv File Path:â file selection box. In this case, âfulldata.csvâ
-
- Click the âAddâ button and youâll see a configuration box below.
-
- Specify the âMesh Typeâ menu as âCreate vertices and edges (single line)â.
-
- Specify the âX column:â number as 0.
-
- Specify the âY column:â number as 1.
-
- Specify the âZ column:â number as 0.
-
- Click the âImportâ button.
-
- Youâll see an imported mesh in the 3D view. A mesh object will automatically created there if successfully imported. If not, please send me the log text message in the console window.
-
- Select the imported object by clicking with the right mouse button.
-
- Press key N and youâll see Properties window.
-
- Change the âScale:â values to x = 0.01, y = 1.0, z = 0.0.
â Setting Animation â
-
- Place the imported object where you want to put by pressing key G and moving your mouse.
-
- Confirm the imported object is selected, set the frame to 1 by pressing Shift+Left Arrow.
-
- Press key I and select Location from the menu that will be shown after pressing key I.
-
- Place the imported object where you want to move by pressing key G and moving your mouse.
-
- Confirm the imported object is selected, set the frame to 2000 by pressing Shift+Up Arrow and Shift+Right Arrow several times.
-
- Press key I and select Location from the menu, again.
-
- Change Screen lay-out from Default to Animate from the top menu in Blender and you will see the created f-curve in Graph Editor window.
-
- Select the f-curve by clicking with the right mouse button, press Shift+T and select Linear from the menu that will be shown after pressing Shift+T.
Here is the .blend file, again.
http://cid-0395cf4bd1d03ae3.photos.lâŚesh^_ora.blend
Sorry for my bad English. I wrote it down without thinking about grammer.
To what step have you completed now? and what number in the step is your problem?
If this doesnât work, please send me your half-created .blend file that youâre working on just right now.
Oh, itâs getting midnight. Iâm in a hurry to sleepâŚzZZ
Thank you Hans for the guide Unfortunately I can only test this on Monday. One step that I donât quite understand (at least now) is this:
-
- Place the imported object where you want to put by pressing key G and moving your mouse.
What do you mean by âwhere you want to putâ? If I want a graph like you made, what does this step actually mean? Do you mean the location of the object in relation to the âmovie windowâ
What step +14. actually means is, in this case, to place the imported object in such a way that the left edge of the object is in the left corner of the graph frame.
Woohoo! I finally understood it Thank you soo much Hans for your effort and patience
Iâm glad, ora.
Some days ago, Blender 2.57 was released, and Iâm working now on updating this script to work in 2.57 based on your code, PKHG. Iâll upload the script for 2.57 soon.