Code Monkey home page Code Monkey logo

custom-sculpt-mode-interface's Introduction

'Sculpt Mode Interface':

Forces sculpt mode with Cookie Cutter interface

Instructions for Use:

  • ...

Instructions for Use as Submodule:

  • The following functions can be rewritten in a subclass:

    • self.can_start(context)
      • returns True if Custom Sculpt Mode's ui and data structures can be initialized, else False
      • by default, this function checks the following, where ob is bpy.context.active_object: return ob is not None and ob.type == "MESH" and bpy.context.mode == "OBJECT"
      • must be rewritten with the @classmethod decorator
    • self.ui_setup_post()
      • called after ui elements have been declared
      • create your own ui panels and elements
      • add/edit buttons, frames, properties, etc. in the existing structure:
          self.info_panel
              self.inst_paragraphs
          self.tools_panel
              self.commit_button
              self.cancel_button
      
      • hide existing ui elements with the following code (replace self.info_panel with any ui element above): self.info_panel.visible = False
    • self.start_post()
      • called after ui and data structures have been initialized
    • self.add_point_pre(loc)
      • called before new point added at current mouse position
      • loc argument will be 2D Vector with new point's location
      • use to evaluate the existing points using the self.b_pts list or check custom conditions for adding new point
      • returns True if point can be added, else False
    • self.add_point_post(new_point)
      • called after new point added at current mouse position
      • new_point argument will D3Point object with the following attributes:
        • new_point.label = label string for point
        • new_point.location = 3D location Vector for point
        • new_point.surface_normal = 3D surface normal Vector of the object at this point's location
        • new_point.view_direction = 3D view direction Vector of the viewport at the time this point was placed
    • self.move_point_post(moved_point)
      • called after grabbed point has been placed
      • moved_point argument will D3Point object with the following attributes:
        • new_point.label = label string for point
        • new_point.location = 3D location Vector for point
        • new_point.surface_normal = 3D surface normal Vector of the object at this point's location
        • new_point.view_direction = 3D view direction Vector of the viewport at the time this point was placed
    • self.end_commit()
      • called when Points Picker is committed
      • by default, this function switches to object mode
      • must end with the following line of code: self.end_commit_post()
    • self.end_commit_post()
      • called when Points Picker is committed

custom-sculpt-mode-interface's People

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

blendercn-org

custom-sculpt-mode-interface's Issues

Sculpt Icons

Can we pull the exsting default blender sculpt icons into a directory to allow cookie cutter to draw them when we start making brush buttons

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.