def __init__(self, rig, guide): # -------------------------------------------------- # Main Objects self.rig = rig self.guide = guide self.options = self.rig.options self.model = self.rig.model self.settings = self.guide.values self.name = self.settings["comp_name"] self.side = self.settings["comp_side"] self.index = self.settings["comp_index"] # -------------------------------------------------- # Shortcut to useful settings self.size = self.guide.size self.color_fk = self.options[self.side + "_color_fk"] self.color_ik = self.options[self.side + "_color_ik"] self.negate = self.side == "R" if self.negate: self.n_sign = "-" self.n_factor = -1 else: self.n_sign = "" self.n_factor = 1 # -------------------------------------------------- # Builder init self.groups = {} ## Dictionary of groups self.controlers = [] ## List of all the controlers of the component self.inv_params = XSIFactory.CreateObject("XSI.Collection") if not self.settings["set_ctl_grp"] or (self.settings["set_ctl_grp"] and self.settings["ctl_grp"] == ""): self.settings["ctl_grp"] = "01" # -------------------------------------------------- # Property init self.anim_layout = ppg.PPGLayout() self.anim_logic = ppg.PPGLogic() self.setup_layout = ppg.PPGLayout() self.setup_logic = ppg.PPGLogic() self.ui = None # -------------------------------------------------- # Connector init self.connections = {} self.connections["standard"] = self.connect_standard self.relatives = {} # -------------------------------------------------- # Step self.stepMethods = [eval("self.step_0%s"%i) for i in range(len(self.steps))]
def __init__(self, parent): self.anim_prop = pri.createOrReturnPSet(parent, "anim_prop") self.setup_prop = pri.createOrReturnPSet(parent, "setup_prop") self.anim_prop.PPGLayout.SetAttribute(c.siUIShowChildren, False) self.setup_prop.PPGLayout.SetAttribute(c.siUIShowChildren, False) self.anim_layout = ppg.PPGLayout() self.anim_logic = ppg.PPGLogic() self.setup_layout = ppg.PPGLayout() self.setup_logic = ppg.PPGLogic()
def __init__(self): # Parameters names, definition and values. self.paramNames = [ ] ## List of parameter name cause it's actually important to keep them sorted. self.paramDefs = {} ## Dictionary of parameter definition. self.values = {} ## Dictionary of options values. # Property layout and logic self.layout = ppg.PPGLayout() ## PPGLayout object. self.logic = ppg.PPGLogic() ## PPGLogic object. # We will check a few things and make sure the guide we are loading is up to date. # If parameters or object are missing a warning message will be display and the guide should be updated. self.valid = True self.controlers = {} ## Dictionary of controlers # Keys are the component fullname (ie. 'arm_L0') self.components = {} ## Dictionary of component self.componentsIndex = [ ] ## List of component name sorted by order creation (hierarchy order) self.parents = [ ] ## List of the parent of each component, in same order as self.components self.addParameters() self.addLayout() self.addLogic() self.plog = uit.ProgressLog(False, True)
def __init__(self): # Parameters names, definition and values. self.paramNames = [ ] ## List of parameter name cause it's actually important to keep them sorted. self.paramDefs = {} ## Dictionary of parameter definition. self.values = {} ## Dictionary of options values. # Property layout and logic self.layout = ppg.PPGLayout() ## PPGLayout object. self.logic = ppg.PPGLogic() ## PPGLogic object. # We will check a few things and make sure the guide we are loading is up to date. # If parameters or object are missing a warning message will be display and the guide should be updated. self.valid = True self.root = None self.id = None # parent component identification self.parentComponent = None self.parentLocalName = None # List and dictionary used during the creation of the component self.tra = {} ## dictionary of global transform self.atra = [] ## list of global transform self.pos = {} ## dictionary of global postion self.apos = [] ## list of global position self.prim = {} ## List of primitive self.blades = {} self.size = .1 self.root_size = None # List and dictionary used to define data of the guide that should be saved self.pick_transform = [ ] ## User will have to pick the position of this object name self.save_transform = [ ] ## Transform of object name in this list will be saved self.save_primitive = [ ] ## Primitive of object name in this list will be saved self.save_blade = [] ## Normal and BiNormal of object will be saved self.minmax = { } ## Define the min and max object for multi location objects # Init the guide self.postInit() self.initialHierarchy() self.addParameters() self.addLayout() self.addLogic()
def __init__(self): # Parameters names, definition and values. self.paramNames = [] ## List of parameter name cause it's actually important to keep them sorted. self.paramDefs = {} ## Dictionary of parameter definition. self.values = {} ## Dictionary of options values. # Property layout and logic self.layout = ppg.PPGLayout() ## PPGLayout object. self.logic = ppg.PPGLogic() ## PPGLogic object. # We will check a few things and make sure the guide we are loading is up to date. # If parameters or object are missing a warning message will be display and the guide should be updated. self.valid = True