Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • pyddg pyddg
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 190
    • Issues 190
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 11
    • Merge requests 11
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • pyddg
  • pyddgpyddg
  • Issues
  • #520
Closed
Open
Issue created Sep 19, 2022 by Nina Smeenk@smeenkOwner

ddg.blender clean up

Cleanup of ddg.visualization.blender.utils:
Always check and complete docstrings, and check tests.

General conventions

  • light, camera, mesh, ... (not bmesh) should by default create (or act on) blender objects (which contain the light, camera, mesh data). use wrap_in_object=True as corresponding argument
  • add documentation for modules
    • make clear that specific object modules like light, camera, mesh, include functions working on objects with the respective data or the data itself. object.py includes functionalities for all blender objects regardless what data they are carrying.
  • Blender object arguments should be called bobj everywhere
  • review docstrings for our conventions

Individual Tasks

  • bmesh: @do
    • rename create_from_pydata -> from_pydata !421 (merged)
    • add/complete documentation for: from_pydata, bisect_plane, cut_between_coordinate_planes, cut_bounding_box !429 (merged)
    • delete: create_curve, create_quad_mesh, create_torus, create_cone, create_cylinder, create_cylinder_between_points, create_icosphere, create_disc, create_circle !420 (merged)
      • all instances in which they are used should be replaced by internal geometry objects creation
  • camera: @tyburn
    • add_camera -> camera; complete docstring !406 (merged)
    • look_at_point is alias, documentation should refer to original instead of duplicate text !406 (merged)
  • clear: @choukri
    • clear_xxx -> xxx
    • clear_empty_objects -> empty
  • collection: @prasetya
    • children_recursive can completely be removed. Where it is used it can be replaced by the blender internal collection attribute Collection.children_recursive. !406 (merged)
  • light: @tyburn
    • add_light -> light !404 (merged)
    • look_at_point is alias, documentation should refer to original instead of duplicate text !404 (merged)
  • mesh: @do
    • all mesh creation function, e.g. from_bmesh should create mesh objects (and optionally only the mesh data)
    • add_xxx and create_xxx should be deleted !420 (merged)
    • select_xxx functions exists on mesh and mesh object basis. they should be joined and optionally work on mesh and mesh object !555 (merged) and !556 (merged)
    • in duplicate_by_properties and duplicate_by_transformation_matrices: rename argument unlink_initial_object->unlink_original and add to docstring
    • unify object and mesh argument names: blender object: bobj, mesh: mesh, bmesh: bm
    • transform should also work on blender objects (use decorator) !531 (merged)
    • join should work on meshes (and on blender objects by decoration), remove parent and matrix attributes !531 (merged)
    • connected_compontents should work on meshes (+ decorator); add warning to docstring: uses bpy operator !547 (merged)
    • shade_smooth should work on meshes (+decorator); should this fail for other data? !531 (merged)
    • intersection_curve: should work on meshe (+decorator); add warning to docstring: uses bpy operator; name=None, needs tests for empty intersection, intersection with multiple connected components, ideally rewrite to avoid bpy.ops !547 (merged)
    • select_ functions: there should only be select functions that work on mesh objects (+decorator that might have to use bpy operators in this case); !555 (merged) and !556 (merged)
    • remove selected_vertices_of_active_object !556 (merged)
  • object: @hoekstra !466 (merged)
    • wrap_in_object and add_in_object should be joined to from_data !408 (merged)
    • delete and copy need docstring
    • add_joined -> mesh.join and docstring
    • add_connected_components -> mesh.connected_components and docstring
    • selected_vertices_of_active_object -> mesh and docstring
    • add_intersection_curve -> mesh.intersection_curve
    • matrix_to_obj_trafo missing Return value in docstring
    • create_duplicate_linked -> mesh
    • module docstring: remove explanation on create_ vs add_
    • from_data in docstring replace "mesh" by "data"
    • remove add_joined, add_connected_components, selected_vertices_of_active_object
    • rename matrix_to_obj_trafo -> matrix_world_transformation_function and argument m->matrix
    • rename set_bobj_prop -> set_prop
    • look_at_point: arguments obj -> bobj, in docstring "camera"->"object"
    • remove everythin below look_at_point except move_to_layer and _root
    • move_to_layer: rename argument ob->bobj
    • rename _root -> empty
  • review compliance with conventions: @rancic
    • unify attribute names: bobj, mesh, ...
    • decorators to wrap in blender objects (see mesh module)
Edited Jun 10, 2023 by Le Nam Do
Assignee
Assign to
Time tracking