Revision: 52802
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=52802
Author:   campbellbarton
Date:     2012-12-06 21:59:16 +0000 (Thu, 06 Dec 2012)
Log Message:
-----------
fix for texture_slot path, would give incorrect path when used with brushes 
which only have one texture slot.

also quiet float/double warning.

Modified Paths:
--------------
    trunk/blender/source/blender/blenloader/intern/readfile.c
    trunk/blender/source/blender/makesrna/intern/rna_texture.c

Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===================================================================
--- trunk/blender/source/blender/blenloader/intern/readfile.c   2012-12-06 
21:08:24 UTC (rev 52801)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c   2012-12-06 
21:59:16 UTC (rev 52802)
@@ -8346,7 +8346,7 @@
 
                        for (clip = main->movieclip.first; clip; clip = 
clip->id.next) {
                                if 
(clip->tracking.settings.reconstruction_success_threshold == 0.0f) {
-                                       
clip->tracking.settings.reconstruction_success_threshold = 1e-3;
+                                       
clip->tracking.settings.reconstruction_success_threshold = 1e-3f;
                                }
                        }
                }

Modified: trunk/blender/source/blender/makesrna/intern/rna_texture.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_texture.c  2012-12-06 
21:08:24 UTC (rev 52801)
+++ trunk/blender/source/blender/makesrna/intern/rna_texture.c  2012-12-06 
21:59:16 UTC (rev 52802)
@@ -264,20 +264,25 @@
         * may be used multiple times in the same stack
         */
        if (ptr->id.data) {
-               PointerRNA id_ptr;
-               PropertyRNA *prop;
-               
-               /* find the 'textures' property of the ID-struct */
-               RNA_id_pointer_create(ptr->id.data, &id_ptr);
-               prop = RNA_struct_find_property(&id_ptr, "texture_slots");
-               
-               /* get an iterator for this property, and try to find the 
relevant index */
-               if (prop) {
-                       int index = 
RNA_property_collection_lookup_index(&id_ptr, prop, ptr);
-                       
-                       if (index >= 0)
-                               return BLI_sprintfN("texture_slots[%d]", index);
+               if (GS(((ID *)ptr->id.data)->name) == ID_BR) {
+                       return BLI_strdup("texture_slot");
                }
+               else {
+                       PointerRNA id_ptr;
+                       PropertyRNA *prop;
+
+                       /* find the 'textures' property of the ID-struct */
+                       RNA_id_pointer_create(ptr->id.data, &id_ptr);
+                       prop = RNA_struct_find_property(&id_ptr, 
"texture_slots");
+
+                       /* get an iterator for this property, and try to find 
the relevant index */
+                       if (prop) {
+                               int index = 
RNA_property_collection_lookup_index(&id_ptr, prop, ptr);
+
+                               if (index >= 0)
+                                       return 
BLI_sprintfN("texture_slots[%d]", index);
+                       }
+               }
        }
        
        /* this is a compromise for the remaining cases... */

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to