Commit Graph

15157 Commits

Author SHA1 Message Date
Chingiz Dyussenov
1aca6face8 Added cameras and lamps import, properties are not taken into account
except position.
2009-07-17 06:12:58 +00:00
Chingiz Dyussenov
5a5b47c33e *Exporter handles empty objects.
*Added textures import.
TODO:
Fix images import.
2009-07-16 07:56:17 +00:00
Arystanbek Dyussenov
b334a45b35 COLLADA importer: base for object transform animation.
Fix a crash reported by Gary Richie: check NULL materials.
2009-07-15 18:59:49 +00:00
Chingiz Dyussenov
60e2416ac0 Added object hierarchy support to importer. 2009-07-13 08:41:37 +00:00
Arystanbek Dyussenov
7007f0c945 Importer:
- fixed multi-UV set import and made code more readable
- added #ifdef'ed console output useful for debugging
2009-07-10 11:32:55 +00:00
Arystanbek Dyussenov
42fba920be Importer fixes:
- remove empty meshes created by add_object call
- make_edges
- don't create a mesh object for non-mesh nodes
2009-07-10 08:43:37 +00:00
Chingiz Dyussenov
edf5200fa1 Added export objects hierarchy. 2009-07-10 06:55:05 +00:00
Chingiz Dyussenov
b91492c683 Added import multiple UV layers.
If <geometry> has more than one primitive - UVs aren't imported properly.
Will fix this soon.
2009-07-08 11:55:11 +00:00
Chingiz Dyussenov
861a0d20c6 Small fix - now import per-face materials should work properly. 2009-07-03 07:54:55 +00:00
Chingiz Dyussenov
9cc690b0d1 Import per-face materials. 2009-07-02 12:35:46 +00:00
Chingiz Dyussenov
f86100b358 Import:
*materials are assigned to objects.
TODO:
*import UVs
2009-07-02 05:43:14 +00:00
Chingiz Dyussenov
1bd28c878b * Export cameras and lights.
* Import materials. 
TODO:
Assign materials to objects.
2009-07-01 18:18:53 +00:00
Arystanbek Dyussenov
d8313b70f3 Exporter:
- texture/UV set binding
- extract names correctly from id.name
- output <unit name="meter" meter="1"/> in <asset>, dunno if this fits Blender
2009-06-30 19:37:28 +00:00
Chingiz Dyussenov
50db74f62b Export textures mapped to diffuse, ambient, specular, emission and reflective colors.
Input is always assumed to be UV.

Texture/UV set mapping is not done yet.
2009-06-30 09:10:37 +00:00
Chingiz Dyussenov
10e1904880 Added multiple UV layers export.
Next: texture/UV binding.
2009-06-29 12:53:49 +00:00
Chingiz Dyussenov
9e987a7afe Fixed bug which I mentioned in my previous commit - mesh will be
exported properly if it has no materials.
2009-06-28 15:33:10 +00:00
Chingiz Dyussenov
d7fa3d6c80 Added per-face materials exporting. If mesh has no materials it won't be
exported.
2009-06-28 13:20:37 +00:00
Chingiz Dyussenov
14fd54554c Added export material properties. The following shader types are
supported: phong and blinn all others are exported as <lambert>. Here is 
the list of supported shader options: emission, ambient, diffuse, 
specular, shininess, reflective, reflectivity, transparency, index of 
refraction. 
Turned off texture exporting - needs fixing.
2009-06-27 12:58:34 +00:00
Arystanbek Dyussenov
b8f6221c8b Object rotation read/write.
The new QuatToAxisAngle function could go to BLI_arithb.h.
2009-06-27 09:29:30 +00:00
Chingiz Dyussenov
2f3b3e5f33 Import:
* Objects are created and linked to meshes. 
* Since I don't know how to import per-face normals, they are generated automatically by mesh_calc_normals.
* Objects are imported with transformations but without rotation yet.
2009-06-26 11:25:19 +00:00
Arystanbek Dyussenov
ab183755da Quick fix to allow reading of <polylist> and <polygons>.
Treating <polylist> as <polygons> in OpenCollada seems intentional, not a bug.
2009-06-25 16:25:07 +00:00
Chingiz Dyussenov
78110f23d4 Added very basic geometry import. Only <triangles> is supported.
Found a bug in OpenCollada - <polylist> is treated as <polygon>.
2009-06-25 12:13:32 +00:00
Chingiz Dyussenov
e53eda5ba9 * Fixed material/texture binding
* Export polylist instead of triangles

TODO:
* Exporting per-face materials
* Multiple UV channels
2009-06-23 12:15:14 +00:00
Chingiz Dyussenov
a0d7164158 COLLADA exporter:
* removed code duplication for object and material traversing
* removed geometry, material, image duplication in produced DAE

TODO:
* UVs export still needs fixing/improvments
* Material/texcoord binding is not done
2009-06-22 16:21:59 +00:00
Chingiz Dyussenov
a82d3dec41 Multi-texture material export (unfinished).
Import geometry using mesh editor module commented out. Will use blenkernel module instead.
2009-06-22 13:23:13 +00:00
Chingiz Dyussenov
82725ce933 Merged 2.5 -r 20124:21003 2009-06-19 18:24:16 +00:00
Campbell Barton
4f9e0ec06e Update Mathutils for py3k
* removed coercing types which has been removed from py3.
* matrix uses getset's rather then getset items.
* removed deprecated functions.
2009-06-18 23:12:29 +00:00
Daniel Genrich
b6182781b0 Fix for compiler error since BLO_sys_types.h was not in the path 2009-06-18 21:25:21 +00:00
Diego Borghetti
96003b5b73 Revert a small change to kerning, Matt please let me know if now it's fine (or like before). 2009-06-18 20:45:58 +00:00
Martin Poirier
2269280910 don't include stdint.h directly, it's broken on non C99 compliant compilers (you know which one I'm talking about). 2009-06-18 20:23:46 +00:00
Martin Poirier
dd250f7d85 2.5
Missing { when WITH_LCMS is defined.
2009-06-18 20:13:17 +00:00
Brecht Van Lommel
94dbb3bbdd 2.5 Python
Merging changes made by Arystanbek in the soc-2009-kazanbas branch,
plus some things modified and added by me.

* Operator exec is called execute in python now, due to conflicts
  with python exec keyword.
* Operator invoke/execute now get context argument.
* Fix crash executing operators due to bpy_import_main_set not being
  set with Main pointer.
* The bpy.props module now has the FloatProperty/IntProperty/
  StringProperty/BoolProperty functions to define RNA properties for
  operators.
* Operators now have an __operator__ property to get the actual RNA
  operator pointers, this is only temporary though.
* bpy.ops.add now allows the operator to be already registered, it
  will simply overwrite the existing one.
* Both the ui and io directories are now scanned and run on startup.
2009-06-18 19:51:22 +00:00
Brecht Van Lommel
4cd24cf058 RNA
Merging changes made by Arystanbek in the soc-2009-kazanbas branch,
plus some things modified and added by me.

* The API files now all in the makesrna module, convention is to
  call them e.g. rna_mesh_api.c for rna_mesh.c. Note for visual
  studio build maintainers, the rna_*_api.c files are compiled as
  part of "makesrna", but do not have rna_*_gen.c generated as part
  of the library. SCons/cmake/make were updated.

* Added function flags FUNC_USE_CONTEXT and FUNC_USE_REPORTS, to
  allow RNA functions to get context and error reporting parameters
  optionally. Renamed FUNC_TYPESTATIC to FUNC_NO_SELF.

* RNA collections now have a pointer to add/remove FunctionRNA's, this
  isn't actually used anywhere yet, purpose is to make an alias
  main.meshes.add() for main.add_mesh() in python.

* Fixes to make autogenerating property set/get for multidimensional
  arrays work, though a 4x4 matrix will be exposed as a length 16
  one dimensional RNA array.

* Functions and properties added:
	* Main.add_mesh()
	* Main.remove_mesh()
	* Object.matrix
	* Object.create_render_mesh()
	* WindowManager.add_fileselect()
2009-06-18 19:48:55 +00:00
Brecht Van Lommel
89d2559e6d 2.5
* Update cmake and makefiles to link python generic.
* Fix game engine building for cmake and makefiles.
* Fix compile error with py 3.x, due to 2.x compat fix.
2009-06-18 19:25:58 +00:00
Campbell Barton
025b6dcbc3 fix for building with py2.3 2009-06-18 17:34:39 +00:00
Daniel Genrich
122b206de3 Fixing gl/glw.h compiiler error 2009-06-18 15:33:58 +00:00
Ton Roosendaal
2f48d0b46b Added Make for new python/generic dir.
Also included GLEW.
2009-06-18 15:31:14 +00:00
Brecht Van Lommel
8130fb29b2 RNA:
* Make cloth settings animateable from buttons.
2009-06-18 14:29:24 +00:00
Brecht Van Lommel
5ea992df98 UI:
* Fix context.cloth, was not being set correct.
* Fix errors with context pinning, scripts should
  not assume context.object to be there.
* Always show preview even if e.g. the material is not
  set, to keep ID buttons from jumping while you're
  using them.
2009-06-18 14:20:25 +00:00
Campbell Barton
7e57823c47 build generic modules in their own lib, compiling without the game engine would fail because bpy_internal_import.c wasnt being included.
(scons only)
2009-06-18 04:36:45 +00:00
Campbell Barton
489db9994d Some generic modules from blender 2.4x building with py3k and mostly working.
* Mathutils, Geometry, BGL, Mostly working, some //XXX comments for things to fix with py3

python import override (bpy_internal_import.c) so you can import python internal scripts from the BGE and running blender normally.
2009-06-17 20:33:34 +00:00
Guillermo S. Romero
cb68b9434c Fix mask in arrow cursor and improve swap one. 2009-06-17 19:46:39 +00:00
Arystanbek Dyussenov
02acf9c354 Importer base for Chingiz. 2009-06-17 11:16:18 +00:00
Ton Roosendaal
0b0b02caf8 2.5
Logic editing back!

Test screenie:
http://download.blender.org/institute/rt9.jpg

I gave the buttons a bit more width, added nicer linkline draw.

Not working yet:
- theme colors for sensor/actuator types (was old button colors)
- moving sensors up/down (used bad pupmenu... better is icons like
  used for modifiers)
- Linkline mouse-over select. Currently deleting a link goes by
  drawing the same line again.

Needs to be fully tested for functionality too, leave that to the GE
department. :)

I noted there's bad button hacking with reading button values,
like check_state_mask(). uiBut structure was not meant to be exported
outside of interface module.
2009-06-17 11:01:05 +00:00
Chingiz Dyussenov
d8479c0fbb I rewrote the code which creates <library_materials>, <library_effects> and
<instance_material>. I used here more suitable Blender's api. Now exporter 
exports all materials in the scene. Todo: if material has textures export them.
2009-06-17 05:45:39 +00:00
Campbell Barton
54ed699743 ActionActuator in the game engine working again to display deformed meshes with the new animation system.
Note that the animation conversion from existing 2.4x blend files doesnt yet set the Action pointer in the actuator so the only way to test is to use the python api to set the new converted action active on the actuator because there is no user interface.
2009-06-16 20:38:18 +00:00
Campbell Barton
ecb39291e9 small merge needed for testing new animsys in 2.5 BGE, mixing own changes with merge can be a hassle.
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r20928:20937
2009-06-16 19:51:58 +00:00
Campbell Barton
2faf20c4b3 BGE Action Actuator setChannel() function was broken in a number of ways.
* extract_pose_from_pose only checked one of the list items for NULL when looping over them yet its possible they are different sizes.
* game_free_pose needed to be used rather then MEM_freeN, channels would never be freed leaking memory.
* setChannel() would make a new pose that wasnt aligned with the existing pose, the lists are assumed aligned so when extracting the channels its unlikely this was ever useful.
* Added getChannel() - returns pose loc/size/quat
* Added option args for setChannel(channel, matrix) or setChannel(channel, loc, size, quat)
2009-06-16 18:25:48 +00:00
Campbell Barton
aa0825a5e5 looks like a mistake. should check with the scene render size, not the current scenes. 2009-06-16 15:44:08 +00:00
Campbell Barton
55f1a1dcad changes to the sequencer in trunk between 20855:20928, (excluding UI changes)
had to //XXX comment some funcs.
2009-06-16 15:04:29 +00:00