i've decided to create a thread where i'm going to post my questions any time i'm stuck with the development. since this is my first attempt to implement something directly into the blender source, it's hard for me to understand all the internal connections and structures, basically how everything works together.
at the moment i've ported all the code from the script (http://blenderartists.org/forum/showthread.php?t=119216) into c code and integrated it into a modifier structure. but it's of course not working how a modifier should work, since it's a direct port of the script which worked directly on the mesh.
so the first question: is there some documentation, an overview or schemes how a modifier work? what needs it and what should it return?
at the moment i'm using the esubdivideflag() function to create the subdivisions. apparently it is using the editmode. is it allowed to use editmode in a modifier at all? how can i return the editmode data as regular modifier data so that the next modifier can use it?
and last but not least, would it be useful to ask for an own branch so that people can have a look at what i'm talking about, the code?
thanks in advance,
kai
Adaptive Subdivision development
Moderators: jesterKing, stiv
-
- Posts: 0
- Joined: Tue Feb 07, 2006 5:24 pm
Adaptive Subdivision development
Last edited by Kai Kostack on Fri Apr 04, 2008 6:00 am, edited 1 time in total.
modifiers -> http://wiki.blender.org/index.php/Blend ... ementation
no idea about subdivisions, maybe see how the subsurf modifier does it.
no idea about subdivisions, maybe see how the subsurf modifier does it.
-
- Posts: 0
- Joined: Tue Feb 07, 2006 5:24 pm
-
- Posts: 0
- Joined: Tue Feb 07, 2006 5:24 pm
i have some problems to determine from the modifier code what full(!) frame currently is being processed. G.scene->r.cfra is useless because i can't distinguish if it's really the next frame or only the next frame vectors which are being calculated.
it goes like this:
frame 1 - cfra 1
frame 1 - cfra 2 (next frame vectors)
frame 2 - cfra 2
frame 2 - cfra 1 (previous vectors)
frame 2 - cfra 3 (next frame vectors)
frame 3 - cfra 3
frame 3 - cfra 2 (previous vectors)
frame 3 - cfra 4 (next frame vectors)
and i need frame and not cfra.
in convertblender.c are some vars i could use but i don't know how to access them best, for instance int step from RE_Database_FromScene_Vectors().
any ideas how i could solve this problem?
it goes like this:
frame 1 - cfra 1
frame 1 - cfra 2 (next frame vectors)
frame 2 - cfra 2
frame 2 - cfra 1 (previous vectors)
frame 2 - cfra 3 (next frame vectors)
frame 3 - cfra 3
frame 3 - cfra 2 (previous vectors)
frame 3 - cfra 4 (next frame vectors)
and i need frame and not cfra.
in convertblender.c are some vars i could use but i don't know how to access them best, for instance int step from RE_Database_FromScene_Vectors().
any ideas how i could solve this problem?