bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def tagLogger(self, jobid): idstr = [] if not jobid: # clear out the previous info if self.jobid: for key in self.jobid.keys(): self._resetLogJobId(self.jobid, key) else: self.jobid = {} jobid = self.jobid idstr.append("unknown") else: self.jobid = jobid for key in self.jobid.keys(): idstr.append("%s=%s" % (key, str(jo...
def tagLogger(self, jobid): idstr = [] if not jobid: # clear out the previous info if self.jobid: for key in self.jobid.keys(): self._resetLogJobId(self.jobid, key) else: self.jobid = {} jobid = self.jobid idstr.append("unknown") else: self.jobid = jobid for key in self.jobid.keys(): idstr.append("%s=%s" % (key, str(jo...
458,300
def _determineJobIdentity(self, outputs, inputs=None): # determine the job identity if inputs is None: inputs = [] if self.jobIdConf: # determine our template dataset for our identity template = None if self.jobIdConf.exists("templateType"): # find first dataset (in output, then input) matching # this dataset type. t...
def _determineJobIdentity(self, outputs, inputs=None): # determine the job identity if inputs is None: inputs = [] if self.jobIdConf: # determine our template dataset for our identity template = None if self.jobIdConf.exists("templateType"): # find first dataset (in output, then input) matching # this dataset type. t...
458,301
def tagLogger(self, jobid): idstr = [] if not jobid: # clear out the previous info if self.jobid: for key in self.jobid.keys(): self._resetLogJobId(self.jobid, key) else: self.jobid = {} jobid = self.jobid idstr.append("unknown") else: self.jobid = jobid for key in self.jobid.keys(): idstr.append("%s=%s" % (key, str(jo...
def tagLogger(self, jobid): idstr = [] if not jobid: # clear out the previous info if self.jobid: for key in self.jobid.keys(): self._resetLogJobId(self.jobid, key) else: self.jobid = {} jobid = self.jobid idstr.append("unknown") else: self.jobid = jobid for key in self.jobid.keys(): idstr.append("%s=%s" % (key, str(jo...
458,302
def __init__(self, name, min=None, lim=None, values=None, isstaticset=True): """ create the filter @param min the minimum identifier value recognized @param lim one more than the maximum identifier value recognized @param values an arbitrary list of identifier values recognized. These may be listed in addition...
def __init__(self, name, min=None, lim=None, values=None, isstaticset=True): """ create the filter @param min the minimum identifier value recognized @param lim one more than the maximum identifier value recognized @param values an arbitrary list of identifier values recognized. These may be listed in addition...
458,303
def allowedValues(self): """ return a list representing the complete set of values that will be returned by recognize() (except None). This may raise an exception if hasStaticValueSet() returns False. """ if any(self.range) and any(filter(lambda r: r is None, self.range)): raise RuntimeError("identifier set (%s) is no...
def allowedValues(self): """ return a list representing the complete set of values that will be returned by recognize() (except None). This may raise an exception if hasStaticValueSet() returns False. """ if len(filter(lambda r: r is not None, self.range)) > 0 and \ len(filter(lambda r: r is None, self.range)) > 0: ra...
458,304
def _determineJobIdentity(self, outputs, inputs=None): # determine the job identity if inputs is None: inputs = [] if self.jobIdConf: # determine our template dataset for our identity template = None if self.jobIdConf.exists("templateType"): # find first dataset (in output, then input) matching # this dataset type. t...
def _determineJobIdentity(self, outputs, inputs=None): # determine the job identity if inputs is None: inputs = [] if self.jobIdConf: # determine our template dataset for our identity template = None if self.jobIdConf.exists("templateType"): # find first dataset (in output, then input) matching # this dataset type. t...
458,305
def setAssignment(self, clipboard): self.client.tellReady() self.log.log(Log.INFO-2, "Told JobOffice, I'm ready!") jobid, inputs, outputs = self.client.getAssignment() if jobid is None: raise RuntimeError("empty assignment from JobOffice (event timed out?)") self.log.log(Log.INFO-2, "Received assignment") clipboard.put...
def setAssignment(self, clipboard): self.client.tellReady() self.log.log(Log.INFO-2, "Told JobOffice, I'm ready!") jobid, inputs, outputs = self.client.getAssignment() if jobid is None: raise RuntimeError("empty assignment from JobOffice (event timed out?)") self.log.log(Log.INFO-2, "Received assignment") clipboard.put...
458,306
def minimum(self): return min([s.size for s in self.snapshots])
def minimum(self): return min([s.size for s in self.snapshots])
458,307
def maximum(self): return max([s.size for s in self.snapshots])
def maximum(self): return max([s.size for s in self.snapshots])
458,308
def snapshot_size(snapshot): return snapshot.size
def snapshot_size(snapshot): return snapshot.size
458,309
def minimum(self): return min(self.snapshots, key=snapshot_size)
def minimum(self): return min(self.snapshots, key=snapshot_size)
458,310
def maximum(self): return max(self.snapshots, key=snapshot_size)
def maximum(self): return max(self.snapshots, key=snapshot_size)
458,311
def last(self): return self.snapshots[-1]
def last(self): return self.snapshots[-1]
458,312
def projects(self): projects = [] for entry in os.listdir(self.path): entry_path = os.path.join(self.path, entry)
def projects(self): projects = [] for entry in os.listdir(self.path): entry_path = os.path.join(self.path, entry)
458,313
def minimum(self): return min([s for s in self.snapshots])
def minimum(self): return min([s for s in self.snapshots])
458,314
def maximum(self): return max([s for s in self.snapshots])
def maximum(self): return max([s for s in self.snapshots])
458,315
def __init__(self, path): self.path = path self.id = os.path.basename(path)
def __init__(self, path): self.path = path self.id = os.path.basename(path)
458,316
def DeleteSelected(self): try: num = self.GetNextItem(-1, commctrl.LVNI_SELECTED) item_id = self.GetItem(num)[6] from bdb import Breakpoint for bplist in Breakpoint.bplist.itervalues(): for bp in bplist: if id(bp)==item_id: self.debugger.clear_break(bp.file, bp.line) break except win32ui.error: win32api.MessageBeep() s...
def DeleteSelected(self): try: num = self.GetNextItem(-1, commctrl.LVNI_SELECTED) item_id = self.GetItem(num)[6] from bdb import Breakpoint for bplist in Breakpoint.bplist.values(): for bp in bplist: if id(bp)==item_id: self.debugger.clear_break(bp.file, bp.line) break except win32ui.error: win32api.MessageBeep() self....
458,317
def run(self): OPENERS=('class', 'def', 'for', 'if', 'try', 'while') INDENT=tokenize.INDENT NAME=tokenize.NAME save_tabsize = tokenize.tabsize tokenize.tabsize = self.tabwidth try: try: for (typ, token, start, end, line) in token_generator(self.readline): if typ == NAME and token in OPENERS: self.blkopenline = line el...
def run(self): OPENERS=('class', 'def', 'for', 'if', 'try', 'while') INDENT=tokenize.INDENT NAME=tokenize.NAME save_tabsize = tokenize.tabsize tokenize.tabsize = self.tabwidth try: try: for (typ, token, start, end, line) in token_generator(self.readline): if typ == NAME and token in OPENERS: self.blkopenline = line el...
458,318
def main(): import getopt hiddenSpec = 1 outputName = None verboseLevel = 1 doit = 1 bForDemand = bForDemandDefault try: opts, args = getopt.getopt(sys.argv[1:], 'vo:huiqd') for o,v in opts: if o=='-h': hiddenSpec = 0 elif o=='-o': outputName = v elif o=='-v': verboseLevel = verboseLevel + 1 elif o=='-q': verboseLevel ...
def main(): import getopt hiddenSpec = 1 outputName = None verboseLevel = 1 doit = 1 bForDemand = bForDemandDefault try: opts, args = getopt.getopt(sys.argv[1:], 'vo:huiqd') for o,v in opts: if o=='-h': hiddenSpec = 0 elif o=='-o': outputName = v elif o=='-v': verboseLevel = verboseLevel + 1 elif o=='-q': verboseLevel ...
458,319
def OnOpenDocument(self, filename): # init data members #print "Opening", filename self.SetPathName(filename) # Must set this early! try: # load the text as binary we can get smart # about detecting any existing EOL conventions. f = open(filename, 'rb') try: self._LoadTextFromFile(f) finally: f.close() except IOError: ...
def OnOpenDocument(self, filename): # init data members #print "Opening", filename self.SetPathName(filename) # Must set this early! try: # load the text as binary we can get smart # about detecting any existing EOL conventions. f = open(filename, 'rb') try: self._LoadTextFromFile(f) finally: f.close() except IOError: ...
458,320
def run(self): install.run(self) # Custom script we run at the end of installing - this is the same script # run by bdist_wininst # This child process won't be able to install the system DLLs until our # process has terminated (as distutils imports win32api!), so we must use # some 'no wait' executor - spawn seems fine...
def run(self): install.run(self) # Custom script we run at the end of installing - this is the same script # run by bdist_wininst # This child process won't be able to install the system DLLs until our # process has terminated (as distutils imports win32api!), so we must use # some 'no wait' executor - spawn seems fine...
458,321
def copy_file(self, src, dest): dest, copied = install_data.copy_file(self, src, dest) # 2to3 if not self.dry_run and copied: refactor_filenames([dest]) return dest, copied
def copy_file(self, src, dest): dest, copied = install_data.copy_file(self, src, dest) # 2to3 if not self.dry_run and copied: refactor_filenames([dest]) return dest, copied
458,322
def debug_attr_print(*args): if debugging_attr: for arg in args: print arg, print
def debug_attr_print(*args): if debugging_attr: for arg in args: print arg, print
458,323
def _GetGoodDispatchAndUserName(IDispatch, userName, clsctx): # Get a dispatch object, and a 'user name' (ie, the name as # displayed to the user in repr() etc. if userName is None: if isinstance(IDispatch, str): userName = IDispatch elif isinstance(IDispatch, unicode): # We always want the displayed name to be a real ...
def _GetGoodDispatchAndUserName(IDispatch, userName, clsctx): # Get a dispatch object, and a 'user name' (ie, the name as # displayed to the user in repr() etc. if userName is None: if isinstance(IDispatch, str): userName = IDispatch elif isinstance(IDispatch, unicode): # We always want the displayed name to be a real ...
458,324
def _GetGoodDispatchAndUserName(IDispatch, userName, clsctx): # Get a dispatch object, and a 'user name' (ie, the name as # displayed to the user in repr() etc. if userName is None: if isinstance(IDispatch, str): userName = IDispatch elif isinstance(IDispatch, unicode): # We always want the displayed name to be a real ...
def _GetGoodDispatchAndUserName(IDispatch, userName, clsctx): # Get a dispatch object, and a 'user name' (ie, the name as # displayed to the user in repr() etc. if userName is None: if isinstance(IDispatch, str): userName = IDispatch elif isinstance(IDispatch, unicode): # We always want the displayed name to be a real ...
458,325
def newline_and_indent_event(self, event): text = self.text first, last = self.editwin.get_selection_indices() text.undo_block_start() try: if first and last: text.delete(first, last) text.mark_set("insert", first) line = text.get("insert linestart", "insert") i, n = 0, len(line) while i < n and line[i] in " \t": i = i...
def text.delete("insert - %d chars" % i, "insert") newline_and_indent_event(self, text.delete("insert - %d chars" % i, "insert") event): text.delete("insert - %d chars" % i, "insert") text text.delete("insert - %d chars" % i, "insert") = text.delete("insert - %d chars" % i, "insert") self.text text.delete("insert - %d ...
458,326
def GetPackageModuleName(fileName): """Given a filename, return (module name, new path). eg - given "c:\a\b\c\my.py", return ("b.c.my",None) if "c:\a" is on sys.path. If no package found, will return ("my", "c:\a\b\c") """ path, fname = os.path.split(fileName) path=origPath=win32ui.FullPath(path) fname = os.path.splite...
def GetPackageModuleName(fileName): """Given a filename, return (module name, new path). eg - given "c:\a\b\c\my.py", return ("b.c.my",None) if "c:\a" is on sys.path. If no package found, will return ("my", "c:\a\b\c") """ path, fname = os.path.split(fileName) path=origPath=win32ui.FullPath(path) fname = os.path.splite...
458,327
def ImportFile(): """ This code looks for the current window, and determines if it can be imported. If not, it will prompt for a file name, and allow it to be imported. """ try: pathName = GetActiveFileName() except KeyboardInterrupt: pathName = None if pathName is not None: if os.path.splitext(pathName)[1].lower() !...
def ImportFile(): """ This code looks for the current window, and determines if it can be imported. If not, it will prompt for a file name, and allow it to be imported. """ try: pathName = GetActiveFileName() except KeyboardInterrupt: pathName = None if pathName is not None: if os.path.splitext(pathName)[1].lower() n...
458,328
def ImportFile(): """ This code looks for the current window, and determines if it can be imported. If not, it will prompt for a file name, and allow it to be imported. """ try: pathName = GetActiveFileName() except KeyboardInterrupt: pathName = None if pathName is not None: if os.path.splitext(pathName)[1].lower() !...
def ImportFile(): """ This code looks for the current window, and determines if it can be imported. If not, it will prompt for a file name, and allow it to be imported. """ try: pathName = GetActiveFileName() except KeyboardInterrupt: pathName = None if pathName is not None: if os.path.splitext(pathName)[1].lower() !...
458,329
def ImportFile(): """ This code looks for the current window, and determines if it can be imported. If not, it will prompt for a file name, and allow it to be imported. """ try: pathName = GetActiveFileName() except KeyboardInterrupt: pathName = None if pathName is not None: if os.path.splitext(pathName)[1].lower() !...
def ImportFile(): """ This code looks for the current window, and determines if it can be imported. If not, it will prompt for a file name, and allow it to be imported. """ try: pathName = GetActiveFileName() except KeyboardInterrupt: pathName = None if pathName is not None: if os.path.splitext(pathName)[1].lower() !...
458,330
def JumpToDocument(fileName, lineno=0, col = 1, nChars = 0, bScrollToTop = 0): # Jump to the position in a file. # If lineno is <= 0, dont move the position - just open/restore. # if nChars > 0, select that many characters. # if bScrollToTop, the specified line will be moved to the top of the window # (eg, bScrollToTo...
def JumpToDocument(fileName, lineno=0, col = 1, nChars = 0, bScrollToTop = 0): # Jump to the position in a file. # If lineno is <= 0, dont move the position - just open/restore. # if nChars > 0, select that many characters. # if bScrollToTop, the specified line will be moved to the top of the window # (eg, bScrollToTo...
458,331
def JumpToDocument(fileName, lineno=0, col = 1, nChars = 0, bScrollToTop = 0): # Jump to the position in a file. # If lineno is <= 0, dont move the position - just open/restore. # if nChars > 0, select that many characters. # if bScrollToTop, the specified line will be moved to the top of the window # (eg, bScrollToTo...
def JumpToDocument(fileName, lineno=0, col = 1, nChars = 0, bScrollToTop = 0): # Jump to the position in a file. # If lineno is <= 0, dont move the position - just open/restore. # if nChars > 0, select that many characters. # if bScrollToTop, the specified line will be moved to the top of the window # (eg, bScrollToTo...
458,332
def _LoadTextFromFile(self, f): # detect EOL mode - we don't support \r only - so find the # first '\n' and guess based on the char before. l = f.readline() l2 = f.readline() # If line ends with \r\n or has no line ending, use CRLF. if l.endswith(crlf_bytes) or not l.endswith(lf_bytes): eol_mode = scintillacon.SC_EOL_C...
def _LoadTextFromFile(self, f): # detect EOL mode - we don't support \r only - so find the # first '\n' and guess based on the char before. l = f.readline() l2 = f.readline() # If line ends with \r\n or has no line ending, use CRLF. if l.endswith(crlf_bytes) or not l.endswith(lf_bytes): eol_mode = scintillacon.SC_EOL_C...
458,333
def run(self, cmd,globals=None, locals=None, start_stepping = 1): if type(cmd) not in [types.StringType, types.CodeType]: raise TypeError("Only strings can be run") self.last_cmd_debugged = cmd if start_stepping: self.isInitialBreakpoint = 0 else: self.isInitialBreakpoint = 1 try: if globals is None: import __main__ gl...
def run(self, cmd,globals=None, locals=None, start_stepping = 1): if not isinstance(cmd, (basestring, types.CodeType)): raise TypeError("Only strings can be run") self.last_cmd_debugged = cmd if start_stepping: self.isInitialBreakpoint = 0 else: self.isInitialBreakpoint = 1 try: if globals is None: import __main__ glob...
458,334
def __init__(self,adoConn): self.adoConn=adoConn self.paramstyle = paramstyle self.supportsTransactions=False for indx in range(adoConn.Properties.Count): name = getIndexedValue(adoConn.Properties,indx).Name if name == 'Transaction DDL': if getIndexedValue(adoConn.Properties,indx).Value != 0: #v2.1 Albrecht self...
def __init__(self,adoConn): self.adoConn=adoConn self.paramstyle = paramstyle self.supportsTransactions=False for property in adoConn.Properties: if property.Name == 'Transaction DDL': if property.Value != 0: #v2.1 Albrecht self.supportsTransactions=True break self.adoConn.CursorLocation = defaultCursorLocation ...
458,335
def _convertNumberWithCulture(variant, f): try: return f(variant) except (ValueError,TypeError): try: europeVsUS = str(variant).replace(",",".") return f(europeVsUS) except (ValueError,TypeError): pass
def _convertNumberWithCulture(variant, f): try: return f(variant) except (ValueError,TypeError,decimal.InvalidOperation): try: europeVsUS = str(variant).replace(",",".") return f(europeVsUS) except (ValueError,TypeError,decimal.InvalidOperation): pass
458,336
def _convertNumberWithCulture(variant, f): try: return f(variant) except (ValueError,TypeError): try: europeVsUS = str(variant).replace(",",".") return f(europeVsUS) except (ValueError,TypeError): pass
def _convertNumberWithCulture(variant, f): try: return f(variant) except (ValueError,TypeError): try: europeVsUS = str(variant).replace(",",".") return f(europeVsUS) except (ValueError,TypeError,decimal.InvalidOperation): pass
458,337
def OnButUseDefaultBackground(self, id, code): if code == win32con.BN_CLICKED: isDef = self.butIsDefaultBackground.GetCheck() self.GetDlgItem(win32ui.IDC_BUTTON4).EnableWindow(not isDef) if isDef: # Being reset to the default color style = self.GetSelectedStyle() style.background = CLR_INVALID self.UpdateUIForStyle(sty...
def OnButUseDefaultBackground(self, id, code): if code == win32con.BN_CLICKED: isDef = self.butIsDefaultBackground.GetCheck() self.GetDlgItem(win32ui.IDC_BUTTON4).EnableWindow(not isDef) if isDef: # Being reset to the default color style = self.GetSelectedStyle() style.background = style.default_background self.UpdateU...
458,338
def UpdateUIForStyle(self, style ): format = style.format sel = 0 for c in paletteVGA: if format[4] == BGR(c[3], c[2], c[1]):
def UpdateUIForStyle(self, style ): format = style.format sel = 0 for c in paletteVGA: if format[4] == BGR(c[3], c[2], c[1]):
458,339
print >> stream, "\tdef __str__(self, *args):"
print >> stream, "\tdef __str__(self, *args):"
458,340
def respondCustom(self,contentType,body): msg = u"HTTP/1.0 200 OK\r\nContent-Type: %s" % contentType
def respondCustom(self,contentType,body): msg = u"HTTP/1.0 200 OK\r\nContent-Type: %s" % contentType
458,341
def respondCustom(self,contentType,body): msg = u"HTTP/1.0 200 OK\r\nContent-Type: %s" % contentType
def respondCustom(self,contentType,body): msg = u"HTTP/1.0 200 OK\r\nContent-Type: %s" % contentType
458,342
def __prepare(cls): # This method only needs to be called once. if cls.prepared: return cls.prepared = True # First, we must ensure that the library path is # modified to locate all of the dynamic libraries. target = None filename = "libpandaexpress" + cls.dll_suffix if cls.sys.platform == "win32": filename += "_d" fo...
def __prepare(cls): # This method only needs to be called once. if cls.prepared: return cls.prepared = True # First, we must ensure that the library path is # modified to locate all of the dynamic libraries. target = None filename = "libpandaexpress" + cls.dll_suffix for dir in cls.sys.path + [cls.sys.prefix]: lib = c...
458,343
def GetLibCache(): # Returns a list of cached libraries, not prefixed by lib and not suffixed by .so* or .a! global LD_CACHE if (LD_CACHE == None): LD_CACHE = [] print "Generating library cache..." if (LocateBinary("ldconfig") != None): handle = os.popen(LocateBinary("ldconfig") + " -NXp") result = handle.read().strip(...
def GetLibCache(): # Returns a list of cached libraries, not prefixed by lib and not suffixed by .so* or .a! global LD_CACHE if (LD_CACHE == None): LD_CACHE = [] print "Generating library cache..." if (LocateBinary("ldconfig") != None): if (sys.platform.startswith("freebsd")): handle = os.popen(LocateBinary("ldconfig")...
458,344
def InstallPanda(destdir="", prefix="/usr", outputdir="built"): if (not prefix.startswith("/")): prefix = "/" + prefix PPATH=get_python_lib(1) PEXEC=os.path.join(os.path.dirname(sys.executable), os.readlink(sys.executable)) oscmd("mkdir -p "+destdir+prefix+"/bin") oscmd("mkdir -p "+destdir+prefix+"/include") oscmd("mkd...
def InstallPanda(destdir="", prefix="/usr", outputdir="built"): if (not prefix.startswith("/")): prefix = "/" + prefix PPATH = get_python_lib(1) if os.path.islink(sys.executable): PEXEC = os.path.join(os.path.dirname(sys.executable), os.readlink(sys.executable)) else: PEXEC = sys.executable oscmd("mkdir -p "+destdir+pr...
458,345
def addNewObject(self, typeName, uid = None, model = None, parent=None, anim = None, fSelectObject=True, nodePath=None, nameStr=None): """ function to add new obj to the scene """ if parent is None: parent = self.editor.NPParent
def addNewObject(self, typeName, uid = None, model = None, parent=None, anim = None, fSelectObject=True, nodePath=None, nameStr=None): """ function to add new obj to the scene """ if parent is None: parent = self.editor.NPParent
458,346
def createMenu(self): menuItem = self.menuFile.Insert(0, -1 , "&New") self.Bind(wx.EVT_MENU, self.onNew, menuItem) menuItem = self.menuFile.Insert(1, -1 , "&Load") self.Bind(wx.EVT_MENU, self.onLoad, menuItem)
def createMenu(self): menuItem = self.menuFile.Insert(0, -1 , "&New") self.Bind(wx.EVT_MENU, self.onNew, menuItem) menuItem = self.menuFile.Insert(1, -1 , "&Load") self.Bind(wx.EVT_MENU, self.onLoad, menuItem)
458,347
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
458,348
def followSelectedNodePathTask(self, state): if hasattr(base.direct, "manipulationControl") and base.direct.manipulationControl.fMultiView: for widget in base.direct.manipulationControl.widgetList: widget.setPosHpr(state.base, state.pos, state.hpr) else: base.direct.widget.setPosHpr(state.base, state.pos, state.hpr) re...
def followSelectedNodePathTask(self, state): if hasattr(base.direct, "manipulationControl") and base.direct.manipulationControl.fMultiView: for widget in base.direct.manipulationControl.widgetList: if self.worldSpaceManip: widget.setPos(state.base, state.pos) widget.setHpr(render, VBase3(0)) else: widget.setPosHpr(stat...
458,349
def manipulateObjectTask(self, state): if self.fScaling1D: self.scale1D(state) elif self.fScaling3D: self.scale3D(state) else: # Widget takes precedence if self.constraint: type = self.constraint[2:] if base.direct.fControl and not self.currEditTypes & EDIT_TYPE_UNSCALABLE: if type == 'post': # [gjeon] non-uniform scal...
def manipulateObjectTask(self, state): if self.fScaling1D: self.scale1D(state) elif self.fScaling3D: self.scale3D(state) else: # Widget takes precedence if self.constraint: type = self.constraint[2:] if base.direct.fControl and not self.currEditTypes & EDIT_TYPE_UNSCALABLE: if type == 'post': # [gjeon] non-uniform scal...
458,350
def manipulateObjectTask(self, state): if self.fScaling1D: self.scale1D(state) elif self.fScaling3D: self.scale3D(state) else: # Widget takes precedence if self.constraint: type = self.constraint[2:] if base.direct.fControl and not self.currEditTypes & EDIT_TYPE_UNSCALABLE: if type == 'post': # [gjeon] non-uniform scal...
def manipulateObjectTask(self, state): if self.fScaling1D: self.scale1D(state) elif self.fScaling3D: self.scale3D(state) else: # Widget takes precedence if self.constraint: type = self.constraint[2:] if base.direct.fControl and not self.currEditTypes & EDIT_TYPE_UNSCALABLE: if type == 'post': # [gjeon] non-uniform scal...
458,351
def xlate1D(self, state): # Constrained 1D Translation along widget axis # Compute nearest hit point along axis and try to keep # that point as close to the current mouse position as possible # what point on the axis is the mouse pointing at? self.hitPt.assign(self.objectHandles.getAxisIntersectPt( self.constraint[:1])...
def xlate1D(self, state): # Constrained 1D Translation along widget axis # Compute nearest hit point along axis and try to keep # that point as close to the current mouse position as possible # what point on the axis is the mouse pointing at? self.hitPt.assign(self.objectHandles.getAxisIntersectPt( self.constraint[:1])...
458,352
def scale1D(self, state): print self.constraint if hasattr(base.direct, "manipulationControl") and base.direct.manipulationControl.fMultiView: self.hitPtScale.assign(self.objectHandles.getMouseIntersectPt())
def scale1D(self, state): if hasattr(base.direct, "manipulationControl") and base.direct.manipulationControl.fMultiView: self.hitPtScale.assign(self.objectHandles.getMouseIntersectPt())
458,353
def scale1D(self, state): print self.constraint if hasattr(base.direct, "manipulationControl") and base.direct.manipulationControl.fMultiView: self.hitPtScale.assign(self.objectHandles.getMouseIntersectPt())
def scale1D(self, state): print self.constraint if hasattr(base.direct, "manipulationControl") and base.direct.manipulationControl.fMultiView: self.hitPtScale.assign(self.objectHandles.getMouseIntersectPt())
458,354
def scale1D(self, state): print self.constraint if hasattr(base.direct, "manipulationControl") and base.direct.manipulationControl.fMultiView: self.hitPtScale.assign(self.objectHandles.getMouseIntersectPt())
def scale1D(self, state): print self.constraint if hasattr(base.direct, "manipulationControl") and base.direct.manipulationControl.fMultiView: self.hitPtScale.assign(self.objectHandles.getMouseIntersectPt())
458,355
def scale1D(self, state): print self.constraint if hasattr(base.direct, "manipulationControl") and base.direct.manipulationControl.fMultiView: self.hitPtScale.assign(self.objectHandles.getMouseIntersectPt())
def scale1D(self, state): print self.constraint if hasattr(base.direct, "manipulationControl") and base.direct.manipulationControl.fMultiView: self.hitPtScale.assign(self.objectHandles.getMouseIntersectPt())
458,356
def scale1D(self, state): print self.constraint if hasattr(base.direct, "manipulationControl") and base.direct.manipulationControl.fMultiView: self.hitPtScale.assign(self.objectHandles.getMouseIntersectPt())
def scale1D(self, state): print self.constraint if hasattr(base.direct, "manipulationControl") and base.direct.manipulationControl.fMultiView: self.hitPtScale.assign(self.objectHandles.getMouseIntersectPt())
458,357
def scale1D(self, state): print self.constraint if hasattr(base.direct, "manipulationControl") and base.direct.manipulationControl.fMultiView: self.hitPtScale.assign(self.objectHandles.getMouseIntersectPt())
def scale1D(self, state): print self.constraint if hasattr(base.direct, "manipulationControl") and base.direct.manipulationControl.fMultiView: self.hitPtScale.assign(self.objectHandles.getMouseIntersectPt())
458,358
def scale1D(self, state): print self.constraint if hasattr(base.direct, "manipulationControl") and base.direct.manipulationControl.fMultiView: self.hitPtScale.assign(self.objectHandles.getMouseIntersectPt())
def scale1D(self, state): print self.constraint if hasattr(base.direct, "manipulationControl") and base.direct.manipulationControl.fMultiView: self.hitPtScale.assign(self.objectHandles.getMouseIntersectPt())
458,359
def scale3D(self, state): if hasattr(base.direct, "manipulationControl") and base.direct.manipulationControl.fMultiView: self.hitPtScale.assign(self.objectHandles.getMouseIntersectPt())
def scale3D(self, state): if hasattr(base.direct, "manipulationControl") and base.direct.manipulationControl.fMultiView: self.hitPtScale.assign(self.objectHandles.getMouseIntersectPt())
458,360
def enableHandles(self, handles): if type(handles) == types.ListType: for handle in handles: self.enableHandle(handle) elif handles == 'x': self.enableHandles(['x-post','x-ring','x-disc']) elif handles == 'y': self.enableHandles(['y-post','y-ring','y-disc']) elif handles == 'z': self.enableHandles(['z-post','z-ring','z...
def enableHandles(self, handles): if type(handles) == types.ListType: for handle in handles: self.enableHandle(handle) elif handles == 'x': self.enableHandles(['x-post','x-ring','x-disc', 'x-scale']) elif handles == 'y': self.enableHandles(['y-post','y-ring','y-disc']) elif handles == 'z': self.enableHandles(['z-post',...
458,361
def enableHandles(self, handles): if type(handles) == types.ListType: for handle in handles: self.enableHandle(handle) elif handles == 'x': self.enableHandles(['x-post','x-ring','x-disc']) elif handles == 'y': self.enableHandles(['y-post','y-ring','y-disc']) elif handles == 'z': self.enableHandles(['z-post','z-ring','z...
def enableHandles(self, handles): if type(handles) == types.ListType: for handle in handles: self.enableHandle(handle) elif handles == 'x': self.enableHandles(['x-post','x-ring','x-disc']) elif handles == 'y': self.enableHandles(['y-post','y-ring','y-disc', 'y-scale']) elif handles == 'z': self.enableHandles(['z-post',...
458,362
def enableHandles(self, handles): if type(handles) == types.ListType: for handle in handles: self.enableHandle(handle) elif handles == 'x': self.enableHandles(['x-post','x-ring','x-disc']) elif handles == 'y': self.enableHandles(['y-post','y-ring','y-disc']) elif handles == 'z': self.enableHandles(['z-post','z-ring','z...
def enableHandles(self, handles): if type(handles) == types.ListType: for handle in handles: self.enableHandle(handle) elif handles == 'x': self.enableHandles(['x-post','x-ring','x-disc']) elif handles == 'y': self.enableHandles(['y-post','y-ring','y-disc']) elif handles == 'z': self.enableHandles(['z-post','z-ring','z...
458,363
def enableHandles(self, handles): if type(handles) == types.ListType: for handle in handles: self.enableHandle(handle) elif handles == 'x': self.enableHandles(['x-post','x-ring','x-disc']) elif handles == 'y': self.enableHandles(['y-post','y-ring','y-disc']) elif handles == 'z': self.enableHandles(['z-post','z-ring','z...
def enableHandles(self, handles): if type(handles) == types.ListType: for handle in handles: self.enableHandle(handle) elif handles == 'x': self.enableHandles(['x-post','x-ring','x-disc']) elif handles == 'y': self.enableHandles(['y-post','y-ring','y-disc']) elif handles == 'z': self.enableHandles(['z-post','z-ring','z...
458,364
def enableHandle(self, handle): if handle == 'x-post': self.xPostGroup.reparentTo(self.xHandles) elif handle == 'x-ring': self.xRingGroup.reparentTo(self.xHandles) elif handle == 'x-disc': self.xDiscGroup.reparentTo(self.xHandles) if handle == 'y-post': self.yPostGroup.reparentTo(self.yHandles) elif handle == 'y-ring':...
def enableHandle(self, handle): if handle == 'x-post': self.xPostGroup.reparentTo(self.xHandles) elif handle == 'x-ring': self.xRingGroup.reparentTo(self.xHandles) elif handle == 'x-disc': self.xDiscGroup.reparentTo(self.xHandles) elif handle == 'x-scale' and base.direct.manipulationControl.useSeparateScaleHandles: sel...
458,365
def enableHandle(self, handle): if handle == 'x-post': self.xPostGroup.reparentTo(self.xHandles) elif handle == 'x-ring': self.xRingGroup.reparentTo(self.xHandles) elif handle == 'x-disc': self.xDiscGroup.reparentTo(self.xHandles) if handle == 'y-post': self.yPostGroup.reparentTo(self.yHandles) elif handle == 'y-ring':...
def enableHandle(self, handle): if handle == 'x-post': self.xPostGroup.reparentTo(self.xHandles) elif handle == 'x-ring': self.xRingGroup.reparentTo(self.xHandles) elif handle == 'x-disc': self.xDiscGroup.reparentTo(self.xHandles) if handle == 'y-post': self.yPostGroup.reparentTo(self.yHandles) elif handle == 'y-ring':...
458,366
def disableHandles(self, handles): if type(handles) == types.ListType: for handle in handles: self.disableHandle(handle) elif handles == 'x': self.disableHandles(['x-post','x-ring','x-disc']) elif handles == 'y': self.disableHandles(['y-post','y-ring','y-disc']) elif handles == 'z': self.disableHandles(['z-post','z-rin...
def disableHandles(self, handles): if type(handles) == types.ListType: for handle in handles: self.disableHandle(handle) elif handles == 'x': self.disableHandles(['x-post','x-ring','x-disc','x-scale']) elif handles == 'y': self.disableHandles(['y-post','y-ring','y-disc']) elif handles == 'z': self.disableHandles(['z-po...
458,367
def disableHandles(self, handles): if type(handles) == types.ListType: for handle in handles: self.disableHandle(handle) elif handles == 'x': self.disableHandles(['x-post','x-ring','x-disc']) elif handles == 'y': self.disableHandles(['y-post','y-ring','y-disc']) elif handles == 'z': self.disableHandles(['z-post','z-rin...
def disableHandles(self, handles): if type(handles) == types.ListType: for handle in handles: self.disableHandle(handle) elif handles == 'x': self.disableHandles(['x-post','x-ring','x-disc']) elif handles == 'y': self.disableHandles(['y-post','y-ring','y-disc','y-scale']) elif handles == 'z': self.disableHandles(['z-po...
458,368
def disableHandles(self, handles): if type(handles) == types.ListType: for handle in handles: self.disableHandle(handle) elif handles == 'x': self.disableHandles(['x-post','x-ring','x-disc']) elif handles == 'y': self.disableHandles(['y-post','y-ring','y-disc']) elif handles == 'z': self.disableHandles(['z-post','z-rin...
def disableHandles(self, handles): if type(handles) == types.ListType: for handle in handles: self.disableHandle(handle) elif handles == 'x': self.disableHandles(['x-post','x-ring','x-disc']) elif handles == 'y': self.disableHandles(['y-post','y-ring','y-disc']) elif handles == 'z': self.disableHandles(['z-post','z-rin...
458,369
def disableHandles(self, handles): if type(handles) == types.ListType: for handle in handles: self.disableHandle(handle) elif handles == 'x': self.disableHandles(['x-post','x-ring','x-disc']) elif handles == 'y': self.disableHandles(['y-post','y-ring','y-disc']) elif handles == 'z': self.disableHandles(['z-post','z-rin...
def disableHandles(self, handles): if type(handles) == types.ListType: for handle in handles: self.disableHandle(handle) elif handles == 'x': self.disableHandles(['x-post','x-ring','x-disc']) elif handles == 'y': self.disableHandles(['y-post','y-ring','y-disc']) elif handles == 'z': self.disableHandles(['z-post','z-rin...
458,370
def getAxisIntersectPt(self, axis): if hasattr(base.direct, "manipulationControl") and base.direct.manipulationControl.fMultiView and\ base.direct.camera.getName() != 'persp': # create ray from the camera to detect 3d position iRay = SelectionRay(base.direct.camera) iRay.collider.setFromLens(base.direct.camNode, base.d...
def getAxisIntersectPt(self, axis): if hasattr(base.direct, "manipulationControl") and base.direct.manipulationControl.fMultiView and\ base.direct.camera.getName() != 'persp': # create ray from the camera to detect 3d position iRay = SelectionRay(base.direct.camera) iRay.collider.setFromLens(base.direct.camNode, base.d...
458,371
def getWidgetIntersectPt(self, nodePath, plane): if hasattr(base.direct, "manipulationControl") and base.direct.manipulationControl.fMultiView and\ base.direct.camera.getName() != 'persp': self.hitPt.assign(self.getMouseIntersectPt()) return self.hitPt # Find out the point of interection of the ray passing though the ...
defdef drawBox(lines, center, sideLength): l = sideLength * 0.5 lines.moveTo(center[0] + l, center[1] + l, center[2] + l) lines.drawTo(center[0] + l, center[1] + l, center[2] - l) lines.drawTo(center[0] + l, center[1] - l, center[2] - l) lines.drawTo(center[0] + l, center[1] - l, center[2] + l) lines.drawTo(center[0] ...
458,372
def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR global VERSION,COMPRESSOR,THREADCOUNT,OSXTARGET longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","threads=","outputdir=","override=...
def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR global VERSION,COMPRESSOR,THREADCOUNT,OSXTARGET longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","threads=","outputdir=","override=...
458,373
def setTitleWithFilename(self, filename=""): import pdb;pdb.set_trace() title = self.ui.appname if filename != "": filenameshort = os.path.basename(filename) title = title + " (%s)"%filenameshort self.ui.SetLabel(title)
def setTitleWithFilename(self, filename=""): title = self.ui.appname if filename != "": filenameshort = os.path.basename(filename) title = title + " (%s)"%filenameshort self.ui.SetLabel(title)
458,374
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
458,375
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
458,376
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
458,377
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
458,378
def __init__(self, pathname, ignoreUsageXml = False): self.pathname = pathname self.filenames = [] self.fileSize = 0 self.nested = [] self.nestedSize = 0
def __init__(self, pathname, ignoreUsageXml = False): self.pathname = pathname self.filenames = [] self.fileSize = 0 self.nested = [] self.nestedSize = 0
458,379
def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR,VERSION global COMPRESSOR,THREADCOUNT,OSXTARGET,HOST_URL,DEBVERSION,RPMRELEASE longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","th...
def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR,VERSION global COMPRESSOR,THREADCOUNT,OSXTARGET,HOST_URL,DEBVERSION,RPMRELEASE longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","th...
458,380
def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR,VERSION global COMPRESSOR,THREADCOUNT,OSXTARGET,HOST_URL,DEBVERSION,RPMRELEASE longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","th...
def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR,VERSION global COMPRESSOR,THREADCOUNT,OSXTARGET,HOST_URL,DEBVERSION,RPMRELEASE longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","th...
458,381
def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR,VERSION global COMPRESSOR,THREADCOUNT,OSXTARGET,HOST_URL,DEBVERSION,RPMRELEASE longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","th...
def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR,VERSION global COMPRESSOR,THREADCOUNT,OSXTARGET,HOST_URL,DEBVERSION,RPMRELEASE longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","th...
458,382
def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR,VERSION global COMPRESSOR,THREADCOUNT,OSXTARGET,HOST_URL,DEBVERSION,RPMRELEASE longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","th...
def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR,VERSION global COMPRESSOR,THREADCOUNT,OSXTARGET,HOST_URL,DEBVERSION,RPMRELEASE longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","th...
458,383
def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR,VERSION global COMPRESSOR,THREADCOUNT,OSXTARGET,HOST_URL,DEBVERSION,RPMRELEASE longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","th...
def parseopts(args): global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR,VERSION global COMPRESSOR,THREADCOUNT,OSXTARGET,HOST_URL,DEBVERSION,RPMRELEASE longopts = [ "help","distributor=","verbose","runtime","osxtarget=", "optimize=","everything","nothing","installer","rtdist","nocolor", "version=","lzma","no-python","th...
458,384
def CompileCxx(obj,src,opts): ipath = GetListOption(opts, "DIR:") if (COMPILER=="MSVC"): cmd = "cl " if (platform.architecture()[0]=="64bit"): cmd += "/favor:blend " cmd += "/wd4996 /wd4275 /wd4267 /wd4101 /wd4273 " # Enables Windows 7 mode if SDK is detected. platsdk = GetRegistryKey("SOFTWARE\\Microsoft\\Microsoft S...
def CompileCxx(obj,src,opts): ipath = GetListOption(opts, "DIR:") if (COMPILER=="MSVC"): cmd = "cl " if (platform.architecture()[0]=="64bit"): cmd += "/favor:blend " cmd += "/wd4996 /wd4275 /wd4267 /wd4101 /wd4273 " # Enables Windows 7 mode if SDK is detected. platsdk = GetRegistryKey("SOFTWARE\\Microsoft\\Microsoft S...
458,385
def CompileCxx(obj,src,opts): ipath = GetListOption(opts, "DIR:") if (COMPILER=="MSVC"): cmd = "cl " if (platform.architecture()[0]=="64bit"): cmd += "/favor:blend " cmd += "/wd4996 /wd4275 /wd4267 /wd4101 /wd4273 " # Enables Windows 7 mode if SDK is detected. platsdk = GetRegistryKey("SOFTWARE\\Microsoft\\Microsoft S...
def CompileCxx(obj,src,opts): ipath = GetListOption(opts, "DIR:") if (COMPILER=="MSVC"): cmd = "cl " if (platform.architecture()[0]=="64bit"): cmd += "/favor:blend " cmd += "/wd4996 /wd4275 /wd4267 /wd4101 /wd4273 " # Enables Windows 7 mode if SDK is detected. platsdk = GetRegistryKey("SOFTWARE\\Microsoft\\Microsoft S...
458,386
ProgressOutput(progress, "Building package from pdef file", infile)
ProgressOutput(progress, "Building package from pdef file", infile)
458,387
def WriteConfigSettings(): dtool_config={} prc_parameters={} speedtree_parameters={} plugin_config={} if (sys.platform.startswith("win")): for key,win,unix in DTOOL_CONFIG: dtool_config[key] = win for key,win,unix in PRC_PARAMETERS: prc_parameters[key] = win else: for key,win,unix in DTOOL_CONFIG: dtool_config[key] = ...
def WriteConfigSettings(): dtool_config={} prc_parameters={} speedtree_parameters={} plugin_config={} if (sys.platform.startswith("win")): for key,win,unix in DTOOL_CONFIG: dtool_config[key] = win for key,win,unix in PRC_PARAMETERS: prc_parameters[key] = win else: for key,win,unix in DTOOL_CONFIG: dtool_config[key] = ...
458,388
def WriteConfigSettings(): dtool_config={} prc_parameters={} speedtree_parameters={} plugin_config={} if (sys.platform.startswith("win")): for key,win,unix in DTOOL_CONFIG: dtool_config[key] = win for key,win,unix in PRC_PARAMETERS: prc_parameters[key] = win else: for key,win,unix in DTOOL_CONFIG: dtool_config[key] = ...
def WriteConfigSettings(): dtool_config={} prc_parameters={} speedtree_parameters={} plugin_config={} if (sys.platform.startswith("win")): for key,win,unix in DTOOL_CONFIG: dtool_config[key] = win for key,win,unix in PRC_PARAMETERS: prc_parameters[key] = win else: for key,win,unix in DTOOL_CONFIG: dtool_config[key] = ...
458,389
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
458,390
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
458,391
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
458,392
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
458,393
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
458,394
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
458,395
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
458,396
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
458,397
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
458,398
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
458,399