Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_buttons/buttons_context.c
| Show First 20 Lines • Show All 764 Lines • ▼ Show 20 Lines | const char *buttons_context_dir[] = { | ||||
| "edit_bone", | "edit_bone", | ||||
| "pose_bone", | "pose_bone", | ||||
| "particle_system", | "particle_system", | ||||
| "particle_system_editable", | "particle_system_editable", | ||||
| "particle_settings", | "particle_settings", | ||||
| "cloth", | "cloth", | ||||
| "soft_body", | "soft_body", | ||||
| "fluid", | "fluid", | ||||
| "smoke", | |||||
| "collision", | "collision", | ||||
| "brush", | "brush", | ||||
| "dynamic_paint", | "dynamic_paint", | ||||
| "line_style", | "line_style", | ||||
| "collection", | "collection", | ||||
| "gpencil", | "gpencil", | ||||
| NULL, | NULL, | ||||
| }; | }; | ||||
| ▲ Show 20 Lines • Show All 231 Lines • ▼ Show 20 Lines | else if (CTX_data_equals(member, "soft_body")) { | ||||
| if (ptr && ptr->data) { | if (ptr && ptr->data) { | ||||
| Object *ob = ptr->data; | Object *ob = ptr->data; | ||||
| ModifierData *md = modifiers_findByType(ob, eModifierType_Softbody); | ModifierData *md = modifiers_findByType(ob, eModifierType_Softbody); | ||||
| CTX_data_pointer_set(result, &ob->id, &RNA_SoftBodyModifier, md); | CTX_data_pointer_set(result, &ob->id, &RNA_SoftBodyModifier, md); | ||||
| return 1; | return 1; | ||||
| } | } | ||||
| } | } | ||||
| else if (CTX_data_equals(member, "fluid")) { | |||||
| PointerRNA *ptr = get_pointer_type(path, &RNA_Object); | |||||
| if (ptr && ptr->data) { | else if (CTX_data_equals(member, "fluid")) { | ||||
| Object *ob = ptr->data; | |||||
| ModifierData *md = modifiers_findByType(ob, eModifierType_Fluidsim); | |||||
| CTX_data_pointer_set(result, &ob->id, &RNA_FluidSimulationModifier, md); | |||||
| return 1; | |||||
| } | |||||
| } | |||||
| else if (CTX_data_equals(member, "smoke")) { | |||||
| PointerRNA *ptr = get_pointer_type(path, &RNA_Object); | PointerRNA *ptr = get_pointer_type(path, &RNA_Object); | ||||
| if (ptr && ptr->data) { | if (ptr && ptr->data) { | ||||
| Object *ob = ptr->data; | Object *ob = ptr->data; | ||||
| ModifierData *md = modifiers_findByType(ob, eModifierType_Smoke); | ModifierData *md = modifiers_findByType(ob, eModifierType_Manta); | ||||
| CTX_data_pointer_set(result, &ob->id, &RNA_SmokeModifier, md); | CTX_data_pointer_set(result, &ob->id, &RNA_FluidModifier, md); | ||||
| return 1; | return 1; | ||||
| } | } | ||||
| } | } | ||||
| else if (CTX_data_equals(member, "collision")) { | else if (CTX_data_equals(member, "collision")) { | ||||
| PointerRNA *ptr = get_pointer_type(path, &RNA_Object); | PointerRNA *ptr = get_pointer_type(path, &RNA_Object); | ||||
| if (ptr && ptr->data) { | if (ptr && ptr->data) { | ||||
| Object *ob = ptr->data; | Object *ob = ptr->data; | ||||
| ▲ Show 20 Lines • Show All 220 Lines • Show Last 20 Lines | |||||