Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_render.c
| Show All 25 Lines | |||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| #include "DNA_scene_types.h" | #include "DNA_scene_types.h" | ||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| #include "BLI_path_util.h" | #include "BLI_path_util.h" | ||||
| #include "BKE_global.h" | |||||
| #include "RNA_define.h" | #include "RNA_define.h" | ||||
| #include "RNA_enum_types.h" | #include "RNA_enum_types.h" | ||||
| #include "rna_internal.h" | #include "rna_internal.h" | ||||
| #include "RE_engine.h" | #include "RE_engine.h" | ||||
| #include "RE_pipeline.h" | #include "RE_pipeline.h" | ||||
| ▲ Show 20 Lines • Show All 337 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| static PointerRNA rna_BakePixel_next_get(PointerRNA *ptr) | static PointerRNA rna_BakePixel_next_get(PointerRNA *ptr) | ||||
| { | { | ||||
| BakePixel *bp = ptr->data; | BakePixel *bp = ptr->data; | ||||
| return rna_pointer_inherit_refine(ptr, &RNA_BakePixel, bp + 1); | return rna_pointer_inherit_refine(ptr, &RNA_BakePixel, bp + 1); | ||||
| } | } | ||||
| static int rna_BakePixel_primitive_id_get(PointerRNA *ptr) | |||||
| { | |||||
| BakePixel *bp = ptr->data; | |||||
| if (G.baking_object_id == bp->object_id) | |||||
| return bp->primitive_id; | |||||
| else | |||||
| return -1; | |||||
| } | |||||
| #else /* RNA_RUNTIME */ | #else /* RNA_RUNTIME */ | ||||
| static void rna_def_render_engine(BlenderRNA *brna) | static void rna_def_render_engine(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| ▲ Show 20 Lines • Show All 347 Lines • ▼ Show 20 Lines | static void rna_def_render_bake_pixel(BlenderRNA *brna) | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| srna = RNA_def_struct(brna, "BakePixel", NULL); | srna = RNA_def_struct(brna, "BakePixel", NULL); | ||||
| RNA_def_struct_ui_text(srna, "Bake Pixel", ""); | RNA_def_struct_ui_text(srna, "Bake Pixel", ""); | ||||
| RNA_define_verify_sdna(0); | RNA_define_verify_sdna(0); | ||||
| prop = RNA_def_property(srna, "primitive_id", PROP_INT, PROP_NONE); | prop = RNA_def_property(srna, "primitive_id", PROP_INT, PROP_NONE); | ||||
| RNA_def_property_int_sdna(prop, NULL, "primitive_id"); | RNA_def_property_int_funcs(prop, "rna_BakePixel_primitive_id_get", NULL, NULL); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "uv", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "uv", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_array(prop, 2); | RNA_def_property_array(prop, 2); | ||||
| RNA_def_property_float_sdna(prop, NULL, "uv"); | RNA_def_property_float_sdna(prop, NULL, "uv"); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "du_dx", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "du_dx", PROP_FLOAT, PROP_NONE); | ||||
| Show All 33 Lines | |||||