[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31473] trunk/blender: fixed [#23400] Unable to import *.3ds/*.obj files with textures

Campbell Barton ideasman42 at gmail.com
Fri Aug 20 10:11:26 CEST 2010


Revision: 31473
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31473
Author:   campbellbarton
Date:     2010-08-20 10:11:26 +0200 (Fri, 20 Aug 2010)

Log Message:
-----------
fixed [#23400] Unable to import *.3ds/*.obj files with textures
changed some rna names to be more consistant
- use_texture -> use_image, since it sets if 'image' is used.
- use_map_color_diff -> use_map_color_diffuse since diffuse is used elsewhere in the same type.

Modified Paths:
--------------
    trunk/blender/release/scripts/io/import_scene_3ds.py
    trunk/blender/release/scripts/op/animsys_update.py
    trunk/blender/release/scripts/ui/properties_texture.py
    trunk/blender/source/blender/makesrna/intern/rna_material.c
    trunk/blender/source/blender/makesrna/intern/rna_mesh.c
    trunk/blender/source/blender/makesrna/rna_cleanup/rna_properties.txt

Modified: trunk/blender/release/scripts/io/import_scene_3ds.py
===================================================================
--- trunk/blender/release/scripts/io/import_scene_3ds.py	2010-08-20 06:09:58 UTC (rev 31472)
+++ trunk/blender/release/scripts/io/import_scene_3ds.py	2010-08-20 08:11:26 UTC (rev 31473)
@@ -364,7 +364,7 @@
                         bmesh.faces[fidx].material_index = mat_idx
                         uf = uv_faces[fidx]
                         uf.image = img
-                        uf.tex = True
+                        uf.use_image = True
                 else:
                     for fidx in faces:
                         bmesh.faces[fidx].material_index = mat_idx

Modified: trunk/blender/release/scripts/op/animsys_update.py
===================================================================
--- trunk/blender/release/scripts/op/animsys_update.py	2010-08-20 06:09:58 UTC (rev 31472)
+++ trunk/blender/release/scripts/op/animsys_update.py	2010-08-20 08:11:26 UTC (rev 31473)
@@ -522,7 +522,7 @@
     ("MaterialTextureSlot", "from_original", "use_from_original"),
     ("MaterialTextureSlot", "map_alpha", "use_map_alpha"),
     ("MaterialTextureSlot", "map_ambient", "use_map_ambient"),
-    ("MaterialTextureSlot", "map_colordiff", "use_map_color_diff"),
+    ("MaterialTextureSlot", "map_colordiff", "use_map_color_diffuse"),
     ("MaterialTextureSlot", "map_coloremission", "use_map_color_emission"),
     ("MaterialTextureSlot", "map_colorreflection", "use_map_color_reflection"),
     ("MaterialTextureSlot", "map_colorspec", "use_map_color_spec"),

Modified: trunk/blender/release/scripts/ui/properties_texture.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_texture.py	2010-08-20 06:09:58 UTC (rev 31472)
+++ trunk/blender/release/scripts/ui/properties_texture.py	2010-08-20 08:11:26 UTC (rev 31473)
@@ -331,7 +331,7 @@
                 col = split.column()
                 col.label(text="Diffuse:")
                 factor_but(col, tex.use_map_diffuse, "use_map_diffuse", "diffuse_factor", "Intensity")
-                factor_but(col, tex.use_map_color_diff, "use_map_color_diff", "diffuse_color_factor", "Color")
+                factor_but(col, tex.use_map_color_diff, "use_map_color_diffuse", "diffuse_color_factor", "Color")
                 factor_but(col, tex.use_map_alpha, "use_map_alpha", "alpha_factor", "Alpha")
                 factor_but(col, tex.use_map_translucency, "use_map_translucency", "translucency_factor", "Translucency")
 

Modified: trunk/blender/source/blender/makesrna/intern/rna_material.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_material.c	2010-08-20 06:09:58 UTC (rev 31472)
+++ trunk/blender/source/blender/makesrna/intern/rna_material.c	2010-08-20 08:11:26 UTC (rev 31473)
@@ -352,7 +352,7 @@
 	RNA_def_property_ui_text(prop, "From Original", "Dupli's derive their object coordinates from the original objects transformation");
 	RNA_def_property_update(prop, 0, "rna_Material_update");
 
-	prop= RNA_def_property(srna, "use_map_color_diff", PROP_BOOLEAN, PROP_NONE);
+	prop= RNA_def_property(srna, "use_map_color_diffuse", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_COL);
 	RNA_def_property_ui_text(prop, "Diffuse Color", "Causes the texture to affect basic color of the material");
 	RNA_def_property_update(prop, 0, "rna_Material_update");

Modified: trunk/blender/source/blender/makesrna/intern/rna_mesh.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_mesh.c	2010-08-20 06:09:58 UTC (rev 31472)
+++ trunk/blender/source/blender/makesrna/intern/rna_mesh.c	2010-08-20 08:11:26 UTC (rev 31473)
@@ -1321,7 +1321,7 @@
 	RNA_def_property_ui_text(prop, "Image", "");
 	RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
 
-	prop= RNA_def_property(srna, "use_texture", PROP_BOOLEAN, PROP_NONE);
+	prop= RNA_def_property(srna, "use_image", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_TEX);
 	RNA_def_property_ui_text(prop, "Tex", "Render face with texture");
 	RNA_def_property_update(prop, 0, "rna_Mesh_update_data");

Modified: trunk/blender/source/blender/makesrna/rna_cleanup/rna_properties.txt
===================================================================
--- trunk/blender/source/blender/makesrna/rna_cleanup/rna_properties.txt	2010-08-20 06:09:58 UTC (rev 31472)
+++ trunk/blender/source/blender/makesrna/rna_cleanup/rna_properties.txt	2010-08-20 08:11:26 UTC (rev 31473)
@@ -183,8 +183,8 @@
 #AnimViz.motion_path -> motion_path:   pointer,  "(read-only)    Motion Path settings for visualisation"
 #AnimViz.onion_skin_frames -> onion_skin_frames:   pointer,  "(read-only)    Onion Skinning (ghosting) settings for visualisation"
 #+ * AnimVizMotionPaths.bake_location -> bake_location:   enum  "When calculating Bone Paths, use Head or Tips"
- + * AnimVizMotionPaths.after_current -> frame_after:   int  "Number of frames to show after the current frame (only for Around Current Frame Onion-skinning method)"
- + * AnimVizMotionPaths.before_current -> frame_before:   int  "Number of frames to show before the current frame (only for Around Current Frame Onion-skinning method)"
+#AnimVizMotionPaths.frame_after -> frame_after:   int  "Number of frames to show after the current frame (only for Around Current Frame Onion-skinning method)"
+#AnimVizMotionPaths.frame_before -> frame_before:   int  "Number of frames to show before the current frame (only for Around Current Frame Onion-skinning method)"
 #+ * AnimVizMotionPaths.frame_end -> frame_end:   int  "End frame of range of paths to display/calculate (not for Around Current Frame Onion-skinning method)"
 #+ * AnimVizMotionPaths.frame_start -> frame_start:   int  "Starting frame of range of paths to display/calculate (not for Around Current Frame Onion-skinning method)"
 #+ * AnimVizMotionPaths.frame_step -> frame_step:   int  "Number of frames between paths shown (not for On Keyframes Onion-skinning method)"
@@ -193,8 +193,8 @@
 #AnimVizMotionPaths.show_keyframe_highlight -> show_keyframe_highlight:   boolean  "Emphasize position of keyframes on Motion Paths"
 #+ * AnimVizMotionPaths.show_keyframe_numbers -> show_keyframe_numbers:   boolean  "Show frame numbers of Keyframes on Motion Paths"
 #+ * AnimVizMotionPaths.type -> type:   enum  "Type of range to show for Motion Paths"
- + * AnimVizOnionSkinning.after_current -> frame_after:   int  "Number of frames to show after the current frame (only for Around Current Frame Onion-skinning method)"
- + * AnimVizOnionSkinning.before_current -> frame_before:   int  "Number of frames to show before the current frame (only for Around Current Frame Onion-skinning method)"
+#AnimVizOnionSkinning.frame_after -> frame_after:   int  "Number of frames to show after the current frame (only for Around Current Frame Onion-skinning method)"
+#AnimVizOnionSkinning.frame_before -> frame_before:   int  "Number of frames to show before the current frame (only for Around Current Frame Onion-skinning method)"
 #+ * AnimVizOnionSkinning.frame_end -> frame_end:   int  "End frame of range of Ghosts to display (not for Around Current Frame Onion-skinning method)"
 #+ * AnimVizOnionSkinning.frame_start -> frame_start:   int  "Starting frame of range of Ghosts to display (not for Around Current Frame Onion-skinning method)"
 #+ * AnimVizOnionSkinning.frame_step -> frame_step:   int  "Number of frames between ghosts shown (not for On Keyframes Onion-skinning method)"
@@ -314,14 +314,14 @@
 #+ * BoneGroup.colors -> colors:   pointer,  "(read-only)    Copy of the colors associated with the groups color set"
 #+ * BoneGroup.name -> name:   string  "NO DESCRIPTION"
 #+ * ClothCollisionSettings.collision_quality -> collision_quality:   int  "How many collision iterations should be done. (higher is better quality but slower)"
- + * ClothCollisionSettings.min_distance -> distance_min:   float  "Minimum distance between collision objects before collision response takes in"
+#ClothCollisionSettings.distance_min -> distance_min:   float  "Minimum distance between collision objects before collision response takes in"
 #+ * ClothCollisionSettings.friction -> friction:   float  "Friction force if a collision happened. (higher = less movement)"
 #+ * ClothCollisionSettings.group -> group:   pointer  "Limit colliders to this Group"
 #+ * ClothCollisionSettings.self_collision_quality -> self_collision_quality:   int  "How many self collision iterations should be done. (higher is better quality but slower)"
- + * ClothCollisionSettings.self_min_distance -> self_distance_min:   float  "0.5 means no distance at all, 1.0 is maximum distance"
+#ClothCollisionSettings.self_distance_min -> self_distance_min:   float  "0.5 means no distance at all, 1.0 is maximum distance"
 #+ * ClothCollisionSettings.self_friction -> self_friction:   float  "Friction/damping with self contact"
- + * ClothCollisionSettings.enable_collision -> use_collision:   boolean  "Enable collisions with other objects"
- + * ClothCollisionSettings.enable_self_collision -> use_self_collision:   boolean  "Enable self collisions"
+#ClothCollisionSettings.use_collision -> use_collision:   boolean  "Enable collisions with other objects"
+#ClothCollisionSettings.use_self_collision -> use_self_collision:   boolean  "Enable self collisions"
 #+ * ClothSettings.air_damping -> air_damping:   float  "Air has normally some thickness which slows falling things down"
 #+ * ClothSettings.bending_stiffness -> bending_stiffness:   float  "Wrinkle coefficient. (higher = less smaller but more big wrinkles)"
 #+ * ClothSettings.bending_stiffness_max -> bending_stiffness_max:   float  "Maximum bending stiffness value"
@@ -345,20 +345,20 @@
 #+ * ClothSettings.structural_stiffness -> structural_stiffness:   float  "Overall stiffness of structure"
 #+ * ClothSettings.structural_stiffness_max -> structural_stiffness_max:   float  "Maximum structural stiffness value"
 #+ * ClothSettings.structural_stiffness_vertex_group -> structural_stiffness_vertex_group:   string  "Vertex group for fine control over structural stiffness"

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list