Campbell Barton
9b8cbe47bd
error in recent x3d commit using undefined autosmooth var.
2011-01-06 01:45:25 +00:00
Campbell Barton
01b7299bdb
bugfix [ #25393 ] Export to X3D does not provide color field in indexedFaceSet for colored cube
...
mostly rewrote mesh export and added support for multiple materials/images, using texface or material images depending on the materials TexFace option.
2011-01-05 14:57:57 +00:00
Campbell Barton
998b789138
use x3d Group's rather then IndexedFaceSets to re-use objects.
2011-01-05 07:14:26 +00:00
Campbell Barton
2028fb45ee
X3D export
...
- last commit broke export
- more removal of not used functions.
- use twoside mesh setting rather then face flag.
- simplify transformations.
2011-01-05 06:58:52 +00:00
Campbell Barton
2225db0025
re-arrange x3d mesh export funcs in preparation for fixing [ #25393 ]
2011-01-05 06:29:43 +00:00
Campbell Barton
14880d0713
X3D Export,
...
- mesh creaseAngle was being exported as degrees, should be radians.
- remove unused vars & code.
- indenting was using a for loop, can just multiply a string instead.
2011-01-05 05:53:41 +00:00
Campbell Barton
370adc51ff
py api function to tag all ID blocks, was available in 2.4x as.
...
bpy.data.meshes.tag = True
But this was only useful for setting so make it a function for 2.5x.
bpy.data.objects.tag(False)
X3D: use tagging rather then a name dictionary, this fixes a bug where library name overlaps could mix up names.
2011-01-05 05:33:27 +00:00
Campbell Barton
d387c19444
pep8 cleanup.
2011-01-05 03:22:46 +00:00
Campbell Barton
231f3a4e2e
fix [ #25388 ] Export to X3D generates texture fields in X3D file for objects
...
use vertex color paint setting to export vertex colors when a material is assigned.
2011-01-04 15:25:12 +00:00
Campbell Barton
e86a489327
Ported back import BVH as Empties, uses delta transformations.
...
& small pep8 changes.
2011-01-03 16:22:30 +00:00
Campbell Barton
35422ac536
rna/api
...
move Object.update(...) to ID.update(). since depsgraph update function can now be called on ID types.
also changed how update flags work.
obj.update(scene, 1, 1, 1)
... is now
obj.update({'OBJECT', 'DATA', 'TIME'})
Don't pass scene anymore. This was used for recalculating text but I think this is better dont in a different function.
2011-01-03 09:09:30 +00:00
Campbell Barton
dacdfbe6f3
recent change to keyframe menu broke BVH import, now don't use the operator at all, instead assign the action manually.
...
Also added bpy.path.display_name_from_filepath(), since filepaths are not ensured to be utf8.
same as calling: os.path.splitext(os.path.basename(name))[0].encode("utf8", "replace").decode("utf8")
2011-01-03 08:28:22 +00:00
Campbell Barton
1306a38133
fix for own error in recent commit.
2011-01-03 07:07:18 +00:00
Campbell Barton
a7ceeafd71
- correct typos in comments.
...
- move boxpack struct out of the public header.
2011-01-02 11:06:50 +00:00
Campbell Barton
f101e59e09
python api: rna array slices now return tuples rather then lists (fits with recent change made to mathutils).
...
minor improvements/cleanup to exporters.
2011-01-02 09:54:44 +00:00
Campbell Barton
129b6190ed
geometry module
...
- rename functions from camel case.
- added docs for undocumented methods.
- minor functional changes with exceptions and accepting 3d/4d vectors where it makes no difference.
Renamed:
- geometry.Intersect -> intersect_ray_tri
- geometry.ClosestPointOnLine -> intersect_point_line
- geometry.PointInTriangle2D -> intersect_point_tri_2d
- geometry.PointInQuad2D -> intersect_point_quad_2d
- geometry.LineIntersect -> intersect_line_line
- geometry.LineIntersect2D -> intersect_line_line_2d
- geometry.BezierInterp -> interpolate_bezier
- geometry.TriangleArea -> area_tri
- geometry.QuadNormal, TriangleNormal -> normal
- geometry.PolyFill -> tesselate_polygon
- geometry.BoxPack2D -> box_pack_2d
- geometry.BarycentricTransform -> barycentric_transform
2011-01-02 02:11:38 +00:00
Campbell Barton
7040c89af0
BVH Importing native order eulers was broken, simplify conversion between rotation orders.
2011-01-01 13:20:35 +00:00
Campbell Barton
e1f6dc5f73
bvh export
...
- write compatible eulers (no jumping as eulers change).
- write FPS.
- correct poll function incase bvh export is called without an armature.
2011-01-01 10:38:28 +00:00
Campbell Barton
f932371d1e
added bvh export operator & menu item, now user accessible.
2011-01-01 09:44:13 +00:00
Campbell Barton
631745ab9b
bvh export now works correctly with matrix multiplications and rad -> deg.
2011-01-01 08:57:09 +00:00
Campbell Barton
e98559fc12
pep8 cleanup
2011-01-01 08:44:17 +00:00
Campbell Barton
48921a4fa1
initial 2.5x port, still need to fix up matrix multiplication orders.
2011-01-01 08:35:38 +00:00
Campbell Barton
a1b1ac5781
committing 2.4x bvh exporter, updating to 2.5x.
2011-01-01 07:26:02 +00:00
Campbell Barton
7f3fe8a2df
pep8 cleanup
2011-01-01 07:20:34 +00:00
Campbell Barton
4d0c10d5ca
presets for operators, re-using same preset system as render, cloth etc use.
...
- operators need to enable the option OPTYPE_PRESET or 'PRESET' in python.
- hidden properties are not written.
- currently this only works in the file selector (enabled for FBX/OBJ export)
- currently the menu label doesnt change when presets are selected, this is a TODO, not so simple since the UI is defined in C and the label in python.
- presets save in "scripts/presets/operators/*id*/*.py"
2010-12-24 07:46:40 +00:00
Campbell Barton
80e85c10be
bugfix [ #25364 ] Export to X3D generates objects with black color
...
was dividing color by 255 when it was already from 0-1.
also use slicing for getting tuples from vectors & colors.
2010-12-24 04:27:21 +00:00
Campbell Barton
577437488e
use slicing for exporters for some speedup, no functional change.
...
3ds also uses non tuple __slots__ and had unused default values for some classes.
2010-12-24 04:24:33 +00:00
Campbell Barton
ce36f9a189
fix for exporting OBJ, materials when no world was set. also use slicing to get tuples.
2010-12-24 04:21:05 +00:00
Campbell Barton
b1d3854095
Make FBX export respect use_deform bone option
2010-12-23 09:42:00 +00:00
Campbell Barton
194c23db0d
fix [ #25353 ] X3D Export generates AttributeError: 'NoneType' object has no attribute 'texture'
2010-12-22 23:16:45 +00:00
Campbell Barton
54343b79e6
remove reload() from builtins since python3 no longer uses this.
...
use imp.reload now.
Should use import hooks but for now replace imp.reload with our own reload as the builtin reload was replaced before.
2010-12-22 21:39:48 +00:00
Campbell Barton
088f35787f
bugfix [ #25252 ] X3D Export does not specify ImageTexture to go with provided TextureCoordinate data
...
x3d material support is primitive but at least export first image texture found, similar to how texface is treated at the moment.
2010-12-22 10:44:31 +00:00
Campbell Barton
97d8e8bf42
bugfix [ #25332 ] X3D export fails to export complete file
2010-12-22 00:30:22 +00:00
Campbell Barton
a9ba96896a
modified fix for commits r33811, 33812.
...
- SSS Presets were not working on pinned materials.
- added ability for save-presets to define variables to stop them becoming too verbose.
- remove object.active_node_material
2010-12-20 23:26:29 +00:00
Campbell Barton
4476e4c75c
bugfix [ #25289 ] X3D export generates incorrect direction for SpotLight
2010-12-19 07:40:08 +00:00
Campbell Barton
73ad13c879
fix for make-dupli-face operator & vector multiplication, tab/space error in last commit.
2010-12-19 07:14:42 +00:00
Campbell Barton
c26cc0afa1
bugfix [ #25290 ] Align on text gives a traceback
...
[#25284 ] Traceback error on "System Info" script
- Align was only working on mesh objects, now operate on all objects, missing boundbox's are treated as single points.
- obj.bound_box was returning all nan's for object types with no boundbox.
- ENUM_FLAG type enums were showing no text when displayed in operator redo panel.
2010-12-19 07:05:29 +00:00
Joshua Leung
43af26fa41
Bugfix [ #25291 ] Objects that should not have subsurface modifier have
...
it (eg cameras)
When trying to add a modifier to non-geometry objects, warnings are
now shown instead of just adding some (useless) modifiers that cannot
be removed later.
2010-12-19 01:14:57 +00:00
Campbell Barton
77c17d332d
fix [ #25262 ] Keyboard shortcut presets can't be made because of wrong folder
...
New create option when getting a user resource for creating paths.
bpy.utils.user_resource(type, path, create=False)
2010-12-18 07:22:52 +00:00
Campbell Barton
b48f7901d2
[ #25270 ] X3D Export generates incorrect location for Lamp
...
was actually incorrect location for everything!
- x3d's global scene rotation value wasnt converted from deg to radians.
- camera viewport was also incorrectly exported.
use mathutils rather then inline math for rotations.
2010-12-17 18:38:44 +00:00
Campbell Barton
4558d45d46
WM_OT_path_open was failing with non utf8 paths.
2010-12-17 05:12:36 +00:00
Campbell Barton
6d2019074f
- fix [ #25246 ] export default scene to X3D crashes exporter, own fault but also made sure all colors are now clamped and noticed 3D text was not being exported.
...
- de-duplicated 'object_type_items' enum, text was known as TEXT in one, FONT in another.
2010-12-16 05:02:15 +00:00
Daniel Salazar
dbbd12d760
Randomize Transform op: Scale Even wasn't really working with objects
...
with an asymmetric starting scale. Handling of starting scale
values of 0 needs improvement, ie: default for delta transform
2010-12-15 10:59:45 +00:00
Daniel Salazar
eac46088e5
Randomize Transform operator:
...
Added support for working on delta transformations instead of plain
transform. this should help the fact that you cant randomize animated
objects (still need to check into that)
Removed minimun scale since it was not well done, need a stronger
version of this
2010-12-15 08:21:58 +00:00
Campbell Barton
96eeb9ad93
bugfix [ #25209 ] X3D export results in invalid value for specular color
2010-12-14 04:45:29 +00:00
Campbell Barton
ddd2dff60e
bugfix [ #25186 ] FBX export rotations aren't applied to the exported model file.
2010-12-12 21:50:55 +00:00
Campbell Barton
b12ca6a400
bugfix [ #25135 ] X3D export places scene objects incorrectly in x3d file
...
matrix rotation order issue.
2010-12-10 06:08:11 +00:00
Campbell Barton
ad3ce4abab
fix [ #25116 ] X3D export does generate image texture information in x3d file
...
- was exporting UVs only if an image texture was used too
- was also only exporting vertex colors if UV's existed which doesnt make much sense.
2010-12-10 05:35:06 +00:00
Campbell Barton
b4081bfc7b
patch [ #25027 ] formatting mathutils.geometry module docs for sphinx
...
from Luka Bonavita
See:
http://www.blender.org/documentation/250PythonDoc/mathutils.geometry.html
2010-12-10 00:20:32 +00:00
Campbell Barton
1622385445
pedantic word ordering change.
...
- wm.add_modal_handler -> modal_handler_add
- wm.add_fileselect -> fileselect_add
- ob.add_shape_key -> shape_key_add
- VIEW3D_OT_add_background_image -> VIEW3D_OT_background_image_add (same for remove)
Also made 2 internal cmake vars hidden.
2010-12-08 11:42:11 +00:00