Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_object.c
| Context not available. | |||||
| {OB_MODE_WEIGHT_PAINT, "WEIGHT_PAINT", ICON_WPAINT_HLT, "Weight Paint", ""}, | {OB_MODE_WEIGHT_PAINT, "WEIGHT_PAINT", ICON_WPAINT_HLT, "Weight Paint", ""}, | ||||
| {OB_MODE_TEXTURE_PAINT, "TEXTURE_PAINT", ICON_TPAINT_HLT, "Texture Paint", ""}, | {OB_MODE_TEXTURE_PAINT, "TEXTURE_PAINT", ICON_TPAINT_HLT, "Texture Paint", ""}, | ||||
| {OB_MODE_PARTICLE_EDIT, "PARTICLE_EDIT", ICON_PARTICLEMODE, "Particle Edit", ""}, | {OB_MODE_PARTICLE_EDIT, "PARTICLE_EDIT", ICON_PARTICLEMODE, "Particle Edit", ""}, | ||||
| {OB_MODE_GPENCIL, "GPENCIL_EDIT", ICON_GREASEPENCIL, "Edit Strokes", "Edit Grease Pencil Strokes"}, | {OB_MODE_GPENCIL_EDIT, "GPENCIL_EDIT", ICON_EDITMODE_HLT, "Edit Mode", "Edit Grease Pencil Strokes"}, | ||||
| {OB_MODE_GPENCIL_SCULPT, "GPENCIL_SCULPT", ICON_SCULPTMODE_HLT, "Sculpt Mode", "Sculpt Grease Pencil Strokes"}, | |||||
| {OB_MODE_GPENCIL_WEIGHT, "GPENCIL_WEIGHT", ICON_WPAINT_HLT, "Weight Paint", "Grease Pencil Weight Paint Strokes"}, | |||||
| {OB_MODE_GPENCIL_PAINT, "GPENCIL_PAINT", ICON_GREASEPENCIL, "Draw", "Paint Grease Pencil Strokes"}, | |||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| }; | }; | ||||
| Context not available. | |||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| }; | }; | ||||
| const EnumPropertyItem rna_enum_object_gpencil_type_items[] = { | |||||
| { GP_EMPTY, "EMPTY", ICON_OUTLINER_OB_GREASEPENCIL, "Blank", "Create an empty grease pencil object" }, | |||||
| { GP_MONKEY, "MONKEY", ICON_MONKEY, "Monkey", "Construct a Suzanne grease pencil object" }, | |||||
| { 0, NULL, 0, NULL, NULL } | |||||
| }; | |||||
| static const EnumPropertyItem parent_type_items[] = { | static const EnumPropertyItem parent_type_items[] = { | ||||
| {PAROBJECT, "OBJECT", 0, "Object", "The object is parented to an object"}, | {PAROBJECT, "OBJECT", 0, "Object", "The object is parented to an object"}, | ||||
| Context not available. | |||||
| {OB_ARMATURE, "ARMATURE", 0, "Armature", ""}, | {OB_ARMATURE, "ARMATURE", 0, "Armature", ""}, | ||||
| {OB_LATTICE, "LATTICE", 0, "Lattice", ""}, | {OB_LATTICE, "LATTICE", 0, "Lattice", ""}, | ||||
| {OB_EMPTY, "EMPTY", 0, "Empty", ""}, | {OB_EMPTY, "EMPTY", 0, "Empty", ""}, | ||||
| {OB_GPENCIL, "GPENCIL", 0, "GPencil", ""}, | |||||
| {0, "", 0, NULL, NULL}, | {0, "", 0, NULL, NULL}, | ||||
| {OB_CAMERA, "CAMERA", 0, "Camera", ""}, | {OB_CAMERA, "CAMERA", 0, "Camera", ""}, | ||||
| {OB_LAMP, "LAMP", 0, "Lamp", ""}, | {OB_LAMP, "LAMP", 0, "Lamp", ""}, | ||||
| Context not available. | |||||
| case OB_ARMATURE: return &RNA_Armature; | case OB_ARMATURE: return &RNA_Armature; | ||||
| case OB_SPEAKER: return &RNA_Speaker; | case OB_SPEAKER: return &RNA_Speaker; | ||||
| case OB_LIGHTPROBE: return &RNA_LightProbe; | case OB_LIGHTPROBE: return &RNA_LightProbe; | ||||
| case OB_GPENCIL: return &RNA_GreasePencil; | |||||
| default: return &RNA_ID; | default: return &RNA_ID; | ||||
| } | } | ||||
| } | } | ||||
| Context not available. | |||||
| Object *ob = (Object *)ptr->id.data; | Object *ob = (Object *)ptr->id.data; | ||||
| int index = (Material **)ptr->data - ob->mat; | int index = (Material **)ptr->data - ob->mat; | ||||
| /* from armature... */ | |||||
| return BLI_sprintfN("material_slots[%d]", index); | return BLI_sprintfN("material_slots[%d]", index); | ||||
| } | } | ||||
| Context not available. | |||||
| return ((Object *)value.id.data)->type == OB_LAMP; | return ((Object *)value.id.data)->type == OB_LAMP; | ||||
| } | } | ||||
| int rna_GPencil_object_poll(PointerRNA *UNUSED(ptr), PointerRNA value) | |||||
| { | |||||
| return ((Object *)value.id.data)->type == OB_GPENCIL; | |||||
| } | |||||
| int rna_DupliObject_index_get(PointerRNA *ptr) | int rna_DupliObject_index_get(PointerRNA *ptr) | ||||
| { | { | ||||
| DupliObject *dob = (DupliObject *)ptr->data; | DupliObject *dob = (DupliObject *)ptr->data; | ||||
| Context not available. | |||||
| RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); | RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); | ||||
| /* Grease Pencil */ | /* Grease Pencil */ | ||||
| #if 1 /* FIXME: Remove this code when all Open-Movie assets have been fixed */ | |||||
| prop = RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_pointer_sdna(prop, NULL, "gpd"); | RNA_def_property_pointer_sdna(prop, NULL, "gpd"); | ||||
| RNA_def_property_struct_type(prop, "GreasePencil"); | RNA_def_property_struct_type(prop, "GreasePencil"); | ||||
| RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT); | RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT); | ||||
| RNA_def_property_ui_text(prop, "Grease Pencil Data", "Grease Pencil data-block"); | RNA_def_property_ui_text(prop, "Grease Pencil Data", "Grease Pencil data-block (deprecated)"); | ||||
| RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); | RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); | ||||
| #endif | |||||
| /* pose */ | /* pose */ | ||||
| prop = RNA_def_property(srna, "pose_library", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "pose_library", PROP_POINTER, PROP_NONE); | ||||
| Context not available. | |||||