Commit: 1ca355d49de0124a76d89a49b92f8563115d2535
Author: Dalai Felinto
Date:   Fri Apr 25 01:58:53 2014 -0300
https://developer.blender.org/rB1ca355d49de0124a76d89a49b92f8563115d2535

Cycles-Bake: silence rna warning and code cleanup

===================================================================

M       source/blender/editors/object/object_bake_api.c
M       source/blender/makesrna/intern/rna_scene.c

===================================================================

diff --git a/source/blender/editors/object/object_bake_api.c 
b/source/blender/editors/object/object_bake_api.c
index 8a0498b..7fbac0b 100644
--- a/source/blender/editors/object/object_bake_api.c
+++ b/source/blender/editors/object/object_bake_api.c
@@ -283,12 +283,11 @@ static int bake_exec(bContext *C, wmOperator *op)
        Scene *scene = CTX_data_scene(C);
 
        Object *ob_low = CTX_data_active_object(C);
+       Object *ob_cage = NULL;
 
        BakeHighPolyData *highpoly;
        int tot_highpoly;
 
-       Object *ob_custom_cage = NULL;
-
        char restrict_flag_low = ob_low->restrictflag;
        char restrict_flag_cage;
 
@@ -386,16 +385,16 @@ static int bake_exec(bContext *C, wmOperator *op)
        }
 
        if (custom_cage[0] != '\0') {
-               ob_custom_cage = BLI_findstring(&bmain->object, custom_cage, 
offsetof(ID, name) + 2);
+               ob_cage = BLI_findstring(&bmain->object, custom_cage, 
offsetof(ID, name) + 2);
 
                /* TODO check if cage object has the same topology (num of 
triangles and a valid UV) */
-               if (ob_custom_cage == NULL || ob_custom_cage->type != OB_MESH) {
+               if (ob_cage == NULL || ob_cage->type != OB_MESH) {
                        BKE_report(op->reports, RPT_ERROR, "No valid cage 
object");
                        op_result = OPERATOR_CANCELLED;
                        goto cleanup;
                }
                else {
-                       restrict_flag_cage = ob_custom_cage->restrictflag;
+                       restrict_flag_cage = ob_cage->restrictflag;
                }
        }
 
@@ -682,8 +681,8 @@ cleanup:
 
        ob_low->restrictflag = restrict_flag_low;
 
-       if (ob_custom_cage)
-               ob_custom_cage->restrictflag = restrict_flag_cage;
+       if (ob_cage)
+               ob_cage->restrictflag = restrict_flag_cage;
 
        if (pixel_array_low)
                MEM_freeN(pixel_array_low);
diff --git a/source/blender/makesrna/intern/rna_scene.c 
b/source/blender/makesrna/intern/rna_scene.c
index affefbf..8ff3b4d 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -3129,7 +3129,7 @@ static void rna_def_bake_data(BlenderRNA *brna)
        RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
 
        prop = RNA_def_property(srna, "margin", PROP_INT, PROP_PIXEL);
-       RNA_def_property_range(prop, 0, INT_MAX);
+       RNA_def_property_range(prop, 0, SHRT_MAX);
        RNA_def_property_ui_range(prop, 0, 64, 1, 1);
        RNA_def_property_ui_text(prop, "Margin", "Extends the baked result as a 
post process filter");
        RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);

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

Reply via email to