Quantcast
Channel: Rhino Developer - McNeel Forum
Viewing all articles
Browse latest Browse all 8532

HatchPatternTable.FindName bug

$
0
0

@clement wrote:

Hi @Alain,

i am trying to find the solid hatch pattern in Rhino 6 using the new FindName method. If i open a blank new file using any template and run this:

import scriptcontext

solid_index = scriptcontext.doc.HatchPatterns.FindName("Solid")
print solid_index

it returns None. The solid hatchpattern exists in the file, once i open the _Options dialog, click on the Hatch page entry and close the _Options dialog, then run the script again, it returns:

HatchPattern: Solid (0)

I can repeat the same behavior using the now obsolete method:

scriptcontext.doc.HatchPatterns.Find("Solid", False)

which returns first an index of -1 then 0. It does not give any deprication message in V6 and works in V5.
_
c.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 8532

Trending Articles