Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- blender-svn/blender/source/blender/editors/mesh/editmesh_tools.c
- void MESH_OT_subdivide(wmOperatorType *ot)
- {
- PropertyRNA *prop;
- /* identifiers */
- ot->name = "Subdivide";
- ot->description = "Subdivide selected edges";
- ot->idname = "MESH_OT_subdivide";
- /* api callbacks */
- ot->exec = edbm_subdivide_exec;
- ot->poll = ED_operator_editmesh;
- /* flags */
- ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
- /* properties */
- prop = RNA_def_int(ot->srna, "number_cuts", 1, 1, INT_MAX, "Number of Cuts", "", 1, 10);
- /* avoid re-using last var because it can cause _very_ high poly meshes and annoy users (or worse crash) */
- RNA_def_property_flag(prop, PROP_SKIP_SAVE);
- RNA_def_float(ot->srna, "smoothness", 0.0f, 0.0f, FLT_MAX, "Smoothness", "Smoothness factor", 0.0f, 1.0f);
- RNA_def_boolean(ot->srna, "quadtri", 0, "Quad/Tri Mode", "Tries to prevent ngons");
- RNA_def_enum(ot->srna, "quadcorner", prop_mesh_cornervert_types, SUBD_STRAIGHT_CUT,
- "Quad Corner Type", "How to subdivide quad corners (anything other than Straight Cut will prevent ngons)");
- RNA_def_float(ot->srna, "fractal", 0.0f, 0.0f, FLT_MAX, "Fractal", "Fractal randomness factor", 0.0f, 1000.0f);
- RNA_def_float(ot->srna, "fractal_along_normal", 0.0f, 0.0f, 1.0f, "Along Normal", "Apply fractal displacement along normal only", 0.0f, 1.0f);
- RNA_def_int(ot->srna, "seed", 0, 0, 10000, "Random Seed", "Seed for the random number generator", 0, 50);
- }
Advertisement
Add Comment
Please, Sign In to add comment