「Dev:Ref/GoogleSummerOfCode/2011/NotesOnCode」の版間の差分
(→Wiki page) |
細 (1版 をインポートしました) |
(相違点なし)
|
2018年6月29日 (金) 04:43時点における最新版
This page is for students to put notes on the code base - variables or functions that took awhile to find or understand, or especially useful functions or files. Also links to documentation that you found useful.
目次
General
SVN End of line property set:
When adding new source files, please remember to add a "svn:eol-style" = "native" SVN property to those files, which gets rid of any problems with line-endings between Windows/Linux (and "other" platforms). It's easier in the long run if you just ensure that you've got autoprops enabled to set this in your svn config. (Aligorith)
How to set this once for all added files in svn config file: Any time you 'svn add' a text file, this will automatically set properties for you. config file is found at: ~/.subversion/config
uncomment this line:
enable-auto-props = yes
and all of these lines:
[auto-props] *.c = svn:eol-style=native *.cpp = svn:eol-style=native *.h = svn:eol-style=native ... etc
Thanks to Aligorith for pointing this out
Note to TortoiseSVN users: Your config file can be found by going to TortoiseSVN -> Settings. In the General settings you will find an "Edit" button next to a "Subversion configuration file:" label. Clicking this button will open your config file up in Notepad.
do_versions()
It is possible that your project will involve changes that will require older blend files to be updated. This can be done in the do_versions() function found inside source/blender/blenloader/intern/readfile.c. Now, this function is around 6,000 lines long, so I'd recommend searching for some fragment of the string "put compatibility code here until next subversion bump". This is the comment above the block where you'll be adding any necessary update code. If you need some examples, just look through do_versions(), there are plenty of examples there.
User Interface
Mesh
Retopology
Modifiers
UV Unwrapping
Currently, unwrapping works based on EditMesh data. If we are to implement subsurf unwrapping, we must do some kind of reverse mapping between derivedMesh data and EditMesh data. This must already be possible because we can already select final subsurfed vertices in edit mode.
minimize stretch + pack Islands + average scale islands operators use construct_param_handle so may be influenced by development. TRY THEM!
How can i clean up a derived mesh properly? Do I have to clean a converted through a modifier function mesh? What are the various custom data layers?
from irc discussion. <nazg-gul>Psy-Fi: it could be done via ORIGINDEX customdata layer <nazg-gul> Psy-Fi: but not all modifiers supports this well (like bevel)
int *index= dm->getVertDataArray(dm, CD_ORIGINDEX) /* if i remember name correct */
<brecht> Psy-Fi, selection uses dm->foreachMappedVert(..) iterator, which also uses CD_ORIGINDEX
files:
1)\source\blender\editors\uvedit\uvedit_unwrap_ops.c
2)\source\blender\blenkernel\intern\subsurf_ccg.c
3)\source\blender\editors\uvedit\uvedit_parametrizer.c
Indeed the function necessary for setup is construct_param_handle in 1)
p_chart_abf_solve in 3) does some setup related stuff, also see p_abf_setup_system.
For smart welding check code at weld_align_uv 1) 988
Sculpting
Texture Painting
brush_sample_tex (blender\source\blender\blenkernel\intern\brush.c line 498)
samples the texture associated with a brush
Rigging
Skin Weighting
Animation
Particles
Fluids
Cloth
Physics
International Text
Wiki page
See more at the i18n wiki page
Links
Collada
entry Points
- For the Importer it is source/blender/collada/collada.cpp::int collada_import()
- For the Exporter it is source/blender/collada/collada.cpp::int collada_export()
maybe misleading names
In DocumentImporter the call anim_importer.read_node_transform(); must not have to do with animation. just reads in transforms like <matrix>, <translate>,...
Links
- Blender Collada End-User-Specification (Gsoc2009)
- [openCollada Homepage
- openCollada Google code page
- Collada Homepage
- Collada 1.5.0 specification
- Collada reference card 1.4!