paint: rename box to cube
This commit is contained in:
@@ -192,7 +192,7 @@ void main() {
|
||||
|
||||
setup_colors();
|
||||
|
||||
object_t *proto = script_shape_add("box");
|
||||
object_t *proto = script_shape_add("cube");
|
||||
mesh_object_t *proto_mo = proto->ext;
|
||||
mesh_data_t *shared_data = proto_mo->data;
|
||||
material_data_t *shared_mat = proto_mo->material;
|
||||
|
||||
@@ -171,6 +171,7 @@ void context_init() {
|
||||
g_context->color_picker_previous_tool = TOOL_TYPE_BRUSH;
|
||||
g_context->brush_radius = 0.5;
|
||||
g_context->brush_hardness = 1.0;
|
||||
g_context->project_type = -1;
|
||||
}
|
||||
|
||||
bool context_use_deferred() {
|
||||
|
||||
@@ -136,8 +136,9 @@ void project_new(bool reset_layers) {
|
||||
g_context->texture = NULL;
|
||||
g_project->mesh_assets = any_array_create_from_raw((void *[]){}, 0);
|
||||
|
||||
mesh_data_t *raw = NULL;
|
||||
char *mesh_name = project_default_mesh_list == NULL ? "box_bevel" : project_default_mesh_list->buffer[g_context->project_type];
|
||||
mesh_data_t *raw = NULL;
|
||||
bool no_default = project_default_mesh_list == NULL || g_context->project_type == -1;
|
||||
char *mesh_name = no_default ? "cube_bevel" : project_default_mesh_list->buffer[g_context->project_type];
|
||||
|
||||
if (string_equals(mesh_name, "sphere")) {
|
||||
raw_mesh_t *mesh = geom_make_uv_sphere(1, 128, 64, true, 1.0);
|
||||
|
||||
@@ -14,6 +14,10 @@ void project_fetch_default_meshes() {
|
||||
any_array_push(project_default_mesh_list, "plane_2048");
|
||||
any_array_push(project_default_mesh_list, "sphere");
|
||||
any_array_push(project_default_mesh_list, "sphere_2048");
|
||||
|
||||
if (g_context->project_type == -1) {
|
||||
g_context->project_type = string_array_index_of(project_default_mesh_list, "cube_bevel");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user